Skip to main content

Flows

When you start a 3DS transaction with the Initialisation API (POST /3ds/v2/initialization), the response tells you which of two flows to handle:

  • Flow A — Frictionless: authentication completes with no cardholder interaction.
  • Flow B — Challenge required: the cardholder must complete a challenge.

Flow A: 3DS complete (frictionless)

If the response contains eci and cavv values, the 3DS step is complete with no challenge, and the merchant can proceed to call the SALE API with these values.

Sale API call values

For more details refer to the Add 3DS fields in Sale API document.

Flow B: Challenge Required

If the threeDSProviderResponse has a status of ACS_REQUIRED (or, equivalently, challengeRequired is true), redirect to the URL provided in the redirectUrl property.

Redirect to URL

The user will land on a 3DS challenge page. After authenticating, the user is redirected back to the merchantRedirectUrl provided in the Initialisation API request body.

From there, extract the transID value and call the Result API to get the result of the 3DS challenge and retrieve the eci and cavv values required for the sale.

For more detail, see:

Example logic for the flows

A minimal example of the logic to determine which flow to handle:

// START 3DS Flow (POST /3ds/v2/initialization)
const response = await initialize();
if (response.responseCode !== '3DS_1000') return handleError(response);
else if (response.threeDSProviderResponse.eci && response.threeDSProviderResponse.cavv) // Flow A - 3DS complete
sale(response.threeDSProviderResponse);
else if (response.threeDSProviderResponse.status === 'ACS_REQUIRED') // Flow B - challenge required
redirectToChallengePage(response);