An API key and a
profile_id from the dashboard. Card acceptance must be enabled on your business profile.1
Create the 3DS payment
Create and confirm the payment in one call. Set The response comes back with
authentication_type to three_ds to require 3D Secure, and pass a return_url — the bank sends the customer back there after the challenge.Replace card_number, card_exp_month, card_exp_year, card_holder_name, and card_cvc below with your own card data. The values shown are illustrative only and are not test credentials.status: "requires_customer_action" and a next_action object of type redirect_to_url — a successful call does not mean the payment is done:2
Redirect the customer
- Read
next_action.redirect_to_urlfrom the response. - Redirect the customer’s browser to that URL. The issuing bank runs its 3DS challenge there (OTP, banking app approval, etc).
- When the challenge finishes, the bank redirects the customer back to the
return_urlyou supplied.
authentication_type: "no_three_ds", there is no redirect step. The payment can go straight to succeeded (or failed) in the same confirm call or shortly after, depending on the connector.3
Poll for the final status
Once the customer returns to your
return_url, fetch the authoritative status from the connector before treating the payment as complete.Status reference
Common errors
Missing return_url on a 3DS payment
Missing return_url on a 3DS payment
When
authentication_type is three_ds, return_url is required — without it the bank has nowhere to send the customer back to after the challenge.Expired card
Expired card
The connector declines the payment and the final status is
failed.Treating the return_url redirect as success
Treating the return_url redirect as success
The redirect only means the customer’s browser came back to your site. Always confirm with
GET /payments/{payment_id}?force_sync=true before marking the order paid.Next steps
Quickstart
The full create-and-poll payment loop.
Wallet payments
M-Pesa, Airtel, and MTN MoMo.
Mandates and recurring
Save a card for repeat charges.
Refunds
Refund a settled card payment.