commerce

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

Settle the order from the card payment the browser confirmed.

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/confirm \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "payment_intent_id": <string> }'

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

⛔ The browser is not believed. The engine re-reads the payment from the processor and settles only when it succeeded, for this order's remainder, in its currency, with this order and organisation in its metadata. The processor's webhook is the second path to the same single settlement, so a closed tab still pays the order. A declined card or a failed 3-D Secure challenge answers 200 with payment_failed, the class of failure and the other rails; nothing was taken and the order is payable again.

Parameters

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

Request body

NameTypeRequiredWhat it is
payment_intent_idstringYesThe id returned by startOrderCardPayment.

Response

NameTypeRequiredWhat it is
statusstring<paid, requires_action, processing, held, payment_failed>Yes—
settledbooleanYes—
order_statusstringNo—
failure_classPaymentDeclineClassNoWhy a payment did not go through, named for what the customer can do about it (engine.commerce.payment_help.NoticeClass). processing: our side or the gateway's, not the…
recurring_refusedbooleanNoOn payment_failed only. The declined payment asked to keep the card and the bank refused it with a decline code that can mean it refused automatic renewal (do_not_honor,…
other_railsstring[]NoThe other gateways this order may be paid on (getOrderPaymentOptions).

Errors this endpoint can return

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