# 3-D Secure

URL: https://doc.securepayapi.com/authentication-3ds
Last updated: 2026-11-12

> Strong customer authentication is built into every checkout — no extra integration required.

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](https://doc.securepayapi.com/embedded-checkout) and
[hosted checkout](https://doc.securepayapi.com/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}`](https://doc.securepayapi.com/payment-intents#confirm-the-payment-on-your-server)
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

| Limit | What happens |
| --- | --- |
| 120 s from the start of the payment until a challenge appears or the payment completes | `error`: `Payment timed out. Please try again.` |
| 15 minutes for an open challenge to be answered | `error`: `The authentication step timed out. Please try again.` |
| 5 minutes of confirmation after the challenge | `error`: `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

| Outcome | Widget | Payment Intent |
| --- | --- | --- |
| Authenticated and charged | `success { status: "succeeded" }` | `succeeded` |
| Authenticated, charge outcome not settled | `success { status: "pending" }` | `processing` — do not ask for money again |
| Authentication failed, abandoned or timed out | `error` | `requires_payment` — nothing charged |
| Authenticated, charge declined | `error` | `failed` — 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" }`.

> **Warning:**
**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](https://doc.securepayapi.com/sandbox#test-cards) to exercise the frictionless and the
challenge paths before going live; [Testing](https://doc.securepayapi.com/testing) lists what to check.
