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.
| Status | Meaning |
|---|---|
captured | Payment completed successfully. Funds will be settled. |
authorized | Payment authorized but not yet captured (rare for direct integrations). |
pending_3ds | 3D Secure authentication required. Redirect the customer. |
failed | Payment was declined or an error occurred. |
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.
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.Customer completes the challenge
The customer authenticates with their bank through the 3DS challenge page.
Bank redirects back to your returnUrl
After the challenge, the bank redirects the customer to the
returnUrl you specified in the original payment request.Accelebit sends a webhook
Accelebit delivers a
payment.captured or payment.failed webhook to your server with the final payment status.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.
| Error code | Description |
|---|---|
CARD_DECLINED | The card was declined by the issuer. |
PROVIDER_ERROR | The upstream provider returned an error. A retry may succeed. |
INVALID_REQUEST | The request body is missing required fields or contains invalid values. |
UNAUTHORIZED | The API key is invalid or missing. |
DUPLICATE_REQUEST | The idempotency key was already used with different request parameters. |
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.