commerce

POST /v1/orders/{orderId}/card-payment

Open a card payment the customer's browser confirms.

All commerce endpoints

All developer docs →

Zinn®, our Viking, hammering at his anvil beside an API endpoint sending events to several listeners.

Authentication

Send an API key as a bearer token. The endpoint checks billing.payment.manage; a key without it is refused with 403, not 404.

This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.

Try it

Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.

curl -X POST https://api.zinndigital.com/v1/orders/{orderId}/card-payment \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console

Details

CARDAUTH (DAY-0434). Opens ONE card payment per order at the processor, for the browser to confirm with the processor's library, so a 3-D Secure challenge opens in the page. Calling it again while that payment is open returns the same one. The amount is computed here from the order, never from the request. Account credit pays first, exactly as on payOrder: the card is asked only for the remainder, and the credit is drawn only when the card part is confirmed captured, so an abandoned or failed challenge costs no credit. When credit pays the whole order no card payment is opened and status is covered_by_credit: settle with payOrder. The card is kept for renewals only when save_card is true AND the account's market lets a card renew unattended (CardReuseOffer.shown); otherwise it pays once. The pay step starts with "Renew automatically" ticked (owner, 2026-11-21). After a payment_failed with recurring_refused, opening again with save_card false cancels the declined card-keeping payment and opens a one-time one. Opens are limited per organisation and per order (each one reads the processor); over the limit the answer is 429 with Retry-After. A repeated call for the same order within the limit returns the same open payment.

Parameters

NameTypeRequiredWhat it is
orderId (path)UuidYesThe order's id.

Request body

NameTypeRequiredWhat it is
save_cardbooleanNoThe customer left "Renew automatically" ticked (it starts ticked). Ignored where the market does not let a card renew unattended.

Response

NameTypeRequiredWhat it is
statusstring<requires_payment, covered_by_credit>Yes—
railstring<card>Yes—
intent_kindstring<payment>No—
client_tokenstringNoThe processor's client secret, for confirmPayment in the browser only. Never stored or logged by the client. Absent when status is covered_by_credit.
payment_intent_idstringNoThe processor's payment id, posted back to confirmOrderCardPayment.
publishable_keystringNoThe processor's publishable key for the browser library.
amount_minorintegerYesWhat the card is asked for, in minor units (the order total less credit).
credit_minorintegerYesThe account credit that pays the rest, drawn only once the card part is captured.
currencystringYes—
card_reuse_appliedbooleanNoTrue only when the customer asked to renew automatically and the market allows it: the processor keeps the card for off-session renewals. False is pay once; nothing is kept.

Errors this endpoint can return

401 · 403 · 404 · 409 · 422 · 429 · 503