commerce
POST /v1/orders/{orderId}/card-payment/confirm
Settle the order from the card payment the browser confirmed.
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
| Name | Type | Required | What it is |
|---|---|---|---|
orderId (path) | Uuid | Yes | The order's id. |
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
payment_intent_id | string | Yes | The id returned by startOrderCardPayment. |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
status | string<paid, requires_action, processing, held, payment_failed> | Yes | — |
settled | boolean | Yes | — |
order_status | string | No | — |
failure_class | PaymentDeclineClass | No | Why 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_refused | boolean | No | On 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_rails | string[] | No | The other gateways this order may be paid on (getOrderPaymentOptions). |
Errors this endpoint can return
401 · 403 · 404 · 409 · 422 · 429 · 503