securepayAPIDocs

3-D Secure

Many cards require 3-D Secure (3DS) authentication — the step where a customer confirms a payment with their bank, for example via a one-time code or their banking app. securepayAPI handles this for you.

What you need to do

Nothing extra. Both embedded checkout and hosted checkout run the full authentication flow automatically:

  • If the bank doesn't require a challenge, the payment completes seamlessly.
  • If a challenge is required, the customer is shown the bank's prompt right inside the checkout, then the payment completes.

You're notified of the final result the same way regardless of whether a challenge happened — a success message from the widget, or a completed status on the hosted page. Either way, confirm the payment on your server with GET /api/v1/payment-intents/{id} before you fulfil.

Note

Because authentication is built in, you don't handle card data or authentication redirects yourself. This also helps keep your integration's compliance scope small.

In the embedded widget

The challenge opens inside the widget's iframe — the customer is never redirected away from your page. What your page sees:

  • payment_started { method: "card" } when the card payment begins, then processing messages while it runs (their stage is the status text the customer sees — do not match on it). With the SDK, onActive(true) fires.
  • While the challenge is open the iframe grows (up to 700 px high) — honour the resize messages (the SDK does).
  • The attempt ends with success, or with payment_ended { outcome: "failed" } followed by error. With the SDK, onActive(false) fires.

Do not remove, re-create or re-initialise the widget while the challenge is open — it lives inside the frame and dies with it.

When you wire the iframe yourself, always pass your page URL as loc in init. Without it the widget falls back to its own URL and the challenge frame is refused.

Timings

LimitWhat happens
120 s from the start of the payment until a challenge appears or the payment completeserror: Payment timed out. Please try again.
15 minutes for an open challenge to be answerederror: The authentication step timed out. Please try again.
5 minutes of confirmation after the challengeerror: Your payment is still being confirmed. Please try again in a moment.

In each case nothing was charged and the customer can retry in the same widget.

Outcomes

OutcomeWidgetPayment Intent
Authenticated and chargedsuccess { status: "succeeded" }succeeded
Authenticated, charge outcome not settledsuccess { status: "pending" }processing — do not ask for money again
Authentication failed, abandoned or timed outerrorrequires_payment — nothing charged
Authenticated, charge declinederrorfailed — the customer can retry

While the challenge is open the Payment Intent reads requires_payment — nothing has been charged — and it stays there if the customer abandons it. A card that authenticates without liability shift is declined.

Wallets

Apple Pay payments carry their own authentication from the device; no 3-D Secure challenge is shown. A Google Pay payment can require 3-D Secure; it runs inside the widget and your page sees processing { stage: "authenticating" }.

Caution

Known issue — Google Pay with a redirect for 3-D Secure. When the bank answers a Google Pay payment with a redirect, the charge is completed outside the widget's flow: the money can be taken while the intent stays requires_payment, and the widget may report no final outcome. For an intent that stays requires_payment after the customer approved a wallet payment, check the transaction — GET https://app.securepayapi.com/api/v1/transactions/{transaction_reference} — or the dashboard before asking for another payment.

Testing the flow

Use the test cards to exercise the frictionless and the challenge paths before going live; Testing lists what to check.

© 2026 Lumiria LLC · securepayAPI is operated by Lumiria LLC.