Skip to content
SETSimple Easy Transactions
SET DocsSET Crypto API Suite and SET API referenceCurrent as of 2026-11-21 · wallet release 7d8a79fb
Browse: SET API

SET API · Card payments

Open a card checkout

POST/v1/card_checkouts

Key scope: write · Business accounts · Success: 201

A Stripe-hosted Checkout for one card (or Stripe bank debit) payment on the merchant's own SET Connect account, with SET's fee as the application fee: 1.02% under $1M of card volume so far that calendar month (UTC), 0.98% from $1M to $7M, 0.92% from $7M to $15M and 0.85% from $15M. Send the payer to url.

Headers

Idempotency-Key string
Optional. The same key and body run once; a replay answers with Idempotent-Replayed: true. Kept 24 hours.

Body

amount decimal stringrequired
USD, 0.50 to 999,999.99.
successUrl https URLrequired
Where the payer lands after paying.
cancelUrl https URLrequired
Where the payer lands on cancel.
description string
Shown on the Checkout.
reference string
Passed to Stripe's metadata only; SET does not store it.
invoice string
Optional: one of your own invoices (inv_…) this payment pays, in this mode, open or short, in USD, with amount exactly what is still due on it.

Notes

  • The payment appears in GET /v1/card_payments with checkoutSession set to this id. Events: card_payment.<state>, card_payment.refunded, card_payment.fee_refunded, card_payment.dispute.<status>.
  • Only payments SET started (this call, or the merchant's embedded payment form) are recorded; the merchant's other Stripe business is never read into SET.
  • With invoice: invoice_unknown also answers another business's invoice. The invoice is marked paid only from Stripe's verified report that the payment succeeded, and in the same database transaction as the card payment itself: the receipt journal entry, the invoice's received total and state, the match and their events (payment.matched, invoice.paid, invoice.short or invoice.over, journal_entry.created) are written together or not at all. A later payment to an invoice already paid is booked over, never moved back; a void invoice is never settled.

Errors

  • 400 amount_invalid
  • 400 url_invalid
  • 400 description_invalid
  • 400 reference_invalid
  • 400 invoice_invalid
  • 404 invoice_unknown
  • 409 invoice_not_open
  • 409 invoice_currency_not_card
  • 409 invoice_amount_mismatch
  • 403 card_payments_merchant_only
  • 409 set_connect_not_linked
  • 409 set_connect_not_ready
  • 502 stripe_unavailable
  • 503 set_connect_unavailable
  • 401 api_key_required
  • 401 api_key_invalid
  • 401 api_key_wrong_mode
  • 401 api_key_expired
  • 403 scope_missing
  • 403 platform_api_paused
  • 429 rate_limited
  • 503 api_disabled

All codes: Errors.