Skip to main content
This page covers accepting a card payment and handling 3D Secure (3DS) authentication. If you haven’t taken a payment yet, start with the quickstart guide.
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 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.
The response comes back with 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

  1. Read next_action.redirect_to_url from the response.
  2. Redirect the customer’s browser to that URL. The issuing bank runs its 3DS challenge there (OTP, banking app approval, etc).
  3. When the challenge finishes, the bank redirects the customer back to the return_url you supplied.
With 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.
The hit on your return_url is not proof that the payment succeeded. It only tells you the customer’s browser came back — the bank may still be finalizing the authentication, or the challenge may have failed. Never mark an order as paid at this point.Always call GET /payments/{payment_id}?force_sync=true after the redirect to fetch the authoritative status from the connector before you treat the payment as complete.

Status reference

Common errors

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.
The connector declines the payment and the final status is failed.
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.