Payment flow
The diagram below shows the end-to-end flow for a card payment, including the 3D Secure branch.Create a payment
Send card details and billing information toPOST /v1/payments. Amounts must be decimal strings (for example, "55.00"). Include an Idempotency-Key header on every request—see Idempotency for details.
Response handling
A successful request returns adata object with a status field. Check this field to determine what to do next.
3D Secure
When a payment requires 3D Secure, the API response includesthreeDsRequired: true alongside a threeDsData object containing the redirect URL and any POST parameters needed to initiate the challenge.
1
Redirect the customer
Send the customer’s browser to
threeDsData.redirectUrl. If the method is POST, submit a form to that URL with the provided parameters.2
Customer completes the challenge
The customer authenticates with their bank through the 3DS challenge page.
3
Bank redirects back to your returnUrl
After the challenge, the bank redirects the customer to the
returnUrl you specified in the original payment request.4
Accelebit sends a webhook
Accelebit delivers a
payment.captured or payment.failed webhook to your server with the final payment status.5
Confirm the status server-side
Call
GET /v1/payments/:id to verify the payment status before fulfilling the order.Error handling
When a payment fails, the API returns anerror object alongside a null data field. Read error.name to identify the failure reason and decide whether to retry or surface an error to the customer.
Idempotency
Include anIdempotency-Key header on every POST request. If a network failure causes you to retry a request with the same key, the API returns the original response without creating a duplicate payment.
Merchant reference
Use themerchantRef field to attach your own order or invoice ID to a payment. This lets you correlate Accelebit transactions with your internal records and look up payments without storing Accelebit’s transaction ID separately.