public
POST /v1/pay/invoices/{token}/confirm
The payer entered a card — record it and take the money. Unauthenticated.
Аутентификација
Ова крајња тачка је јавна. Не захтева никакве акредитиве нити организацију — то је оно што читају наш сопствени маркетиншки сајт и машине за одговоре са вештачком интелигенцијом.
Ова крајња тачка не прихвата id организације. Ваш кључ већ идентификује организацију којој припада, а одговор је ограничен на њу.
Испробајте
Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.
curl -X POST https://api.zinndigital.com/v1/pay/invoices/{token}/confirm \
-H "Content-Type: application/json" \
-d '{ "setup_intent_id": <string> }'Пријављени сте? API конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом API-ју како бисте могли да видите стварни одговор. Отворите ову крајњу тачку у API конзоли
Детаљи
The second half of a two-step that cannot be collapsed into one. A payer with no card on file gets a SetupIntent from /checkout, confirms it in the browser, and lands here; this records the mandate and then charges the order. Charging on the first call instead would put a failed payment on the order — this platform classifies a mandate-less charge as nothing was presented — and the capture webhook refuses to settle one of those, so the money would be taken and never recorded. setup_intent_id is an id and not a credential. The mandate behind it is re-read from the gateway and refused unless the gateway itself says it belongs to this invoice's payer, so holding one pay link cannot attach a stranger's saved card.
Параметри
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
token (path) | string | Да | — |
Тело захтева
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
setup_intent_id | string | Да | — |
Одговор
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
status | string | Да | — |
settled | boolean | Да | — |
amount_minor | integer | Да | — |
currency | string | Да | — |
client_token | string | Не | A card intent's client secret, for the browser SDK. It authorises confirming this one intent and nothing else. |
redirect_url | string | Не | An approval page to send the payer to (PayPal, a crypto invoice). |
action_kind | string | Не | setup means no card is on file and client_token is a SetupIntent secret — confirm it, then call /confirm. Anything else is a live charge's own action. |
setup_intent_id | string | Не | The SetupIntent the card form is mounted against, echoed back for the /confirm call. An id, not a secret: the server re-reads it from the gateway and refuses it unless the… |
Грешке које ова крајња тачка може вратити
404 · 409 · 429