Integration flow
What a complete integration does, in order. Each step names the rules it follows from Integration rules.
Create
-
Generate
merchant_reference, save it with your order, then call the create endpoint of the method. (R4) - On a timeout or a dropped connection, resend the identical request. (R6, R14)
-
If your own endpoint is called again — the payer clicks Pay twice, your process restarted —
look the transaction up with
GET /v2/transactions?merchant_reference=…before creating. Never store card numbers or CVC to replay a request. See Idempotency. (R4) -
Save
id,statusandnext_actionfrom the response. Then wait for webhooks; reading the status is only the fallback. (R8, R20)
Payer step
-
On
requires_action, send the payer tonext_action.redirect.url, or ask them to confirm in the banking app, beforenext_action.expires_at. The step can also arrive later by webhook: keep the latestnext_actionwith the order so your frontend can show it — see Payer actions. (R10)
Hold
-
On
authorized, callcaptureorvoid. A repeat of the call is safe; afterpayin.capture_failedorpayin.void_failedcall it again. (R5, R11)
Webhooks
- Verify
Webhook-Signaturewith the secret of the shop the URL orshop_idnames. (R15) - Store the event by its
idand answer2xx; process it afterwards. (R16, R17) - Processing: apply
data.objectfrom the event, then mark the event processed. (R17, R18) -
Fallback: if no webhook has come for a minute, you can start polling the status with
GET /v2/transactions/{id}until it is final. (R20)
Applying a result
-
A final status never changes, except a payin
completed→refunded: once a final status is applied, a late webhook, a retry or an overlapping sync changes nothing. (R8, R19) -
completed— release the goods, once.failed— showstatus_details.code. Anything else — keep waiting. (R8, R9, R13)
Reconciliation
-
On a schedule, sync by change time with
order=updated_ascand an overlapping window — see Transactions. (R19)
Then prove it in the Sandbox with the integration checklist.
Next: Card payin