3DS Authenticate

Performs the cardholder's 3DS authentication.

Must be called after POST /v1/acquiring/payments/3ds/setup.

The 200 response has two possible outcomes, distinguished by code:

  • ACCEPTED (frictionless): authentication is complete, no cardholder interaction. Use cavv, xid,
    authenticationId and directoryServerTransactionId in the threeDsData field of the payment call.
  • WAITING_3DS_AUTHENTICATION (challenge): the issuer requires the cardholder to authenticate. Run the
    challenge flow below.

Challenge flow

  1. Open an iframe and submit an HTML form to it: POST to stepUpUrl (application/x-www-form-urlencoded)
    with the fields JWT = accessToken and MD = authenticationId. Size the iframe with iframeDimensions.
  2. The cardholder completes the challenge inside the iframe.
  3. The issuer posts the result to your returnUrl (form-urlencoded) with the fields TransactionId,
    Response (sometimes JWT) and MD. Because this request runs inside the iframe, your endpoint must
    answer with an HTML page that notifies the parent window (e.g. window.parent.postMessage).
  4. Call POST /v1/acquiring/payments/3ds/challenge-result with authenticationTransactionId =
    TransactionId received in step 3 (fallback: authenticationId) and the same requestId used here.

Sandbox and production

The request and response contract is the same in both environments. Only the party that posts to your
returnUrl differs.

  • Production: do not send sandboxReturnCallback. Send returnUrl as usual; Autra forwards it to the
    acquirer and the issuer posts the challenge result to it. Autra does not check returnUrl against the
    sandbox simulator's origin list in this flow.
  • Sandbox, default: without sandboxReturnCallback, the simulated challenge page notifies the parent
    window directly through postMessage and does not post to your returnUrl.
  • Sandbox, simulated return callback: send sandboxReturnCallback: true to exercise the form POST to
    your returnUrl. The returnUrl must be HTTPS and its origin (scheme and host) must have been enrolled
    for your sandbox tenant by Autra beforehand. Use stepUpUrl, accessToken and authenticationId exactly
    as returned; the accessToken is valid for 5 minutes. After the simulated challenge is confirmed, the
    simulator posts TransactionId, Response and MD to your returnUrl, with TransactionId and MD
    both equal to authenticationId. The returnUrl is checked only when the simulator requests a challenge:
    a frictionless 200 does not confirm that your return URL is enrolled.

Sending sandboxReturnCallback: true outside the sandbox simulator returns 400 with
errors[0].code = SANDBOX_ONLY.

The origin enrollment, the signed accessToken and its 5-minute validity are controls of the sandbox
simulator only. They are not new requirements for production.

Handling the return request

The POST to your returnUrl is a form submission made by the cardholder's browser inside the challenge
iframe. It does not carry an Autra OAuth Bearer token, so do not require one on that route.

  • In your returnUrl endpoint, match the received MD (and any state you placed in the URL) against a
    pending authentication of your own, and consume that state only once.
  • In the parent page, accept the postMessage only when event.source is the challenge iframe's window and
    event.origin is the expected one. In production and in the sandbox with sandboxReturnCallback: true,
    the message comes from your own returnUrl page, so expect the origin of your returnUrl. In the default
    sandbox flow, the message comes from the simulator page, so expect https://sandbox.autra.io.
  • Treat the return request as a notification, not as proof of authentication. The final confirmation is
    always POST /v1/acquiring/payments/3ds/challenge-result, called from your backend with the Bearer token.

3DS return URL and webhooks are separate

returnUrl is sent on each authenticate request and is unrelated to Outbound Webhooks. Registering a
webhook endpoint does not configure the 3DS return, and sending returnUrl does not register a webhook.

Rejection: when the issuer refuses the authentication, the response is 422 with
errors[0].code = AUTH_REJECTED and the issuer's message in errors[0].msg (for example "Frictionless
Authentication rejected by the Issuer."). Any 422, and any response other than 200 with code
ACCEPTED or WAITING_3DS_AUTHENTICATION, means the payment must not proceed with 3DS data.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
required

Token obtained from POST /v1/acquiring/payments/initialize

string
required

Merchant CPF or CNPJ (digits only)

string

Full card PAN

string
string
string

Autra transaction token slug

string

Autra stored card slug

string
required

Unique 3DS request ID (generated by the client)

string
required

Reference ID returned by setup

string
enum
required

Transaction type

Allowed:
string
required

Device channel

string
required

HTTPS URL of YOUR application, publicly reachable, that receives the challenge result. After the cardholder completes the challenge, the issuer sends a POST (application/x-www-form-urlencoded) to this URL with the fields TransactionId, Response (or JWT) and MD. The request runs inside the challenge iframe, so respond with HTML that notifies the parent window, for example <script>window.parent.postMessage({type:'3DS_CHALLENGE_COMPLETE', transactionId:'...'}, 'https://yourstore.com')</script>. Required even when the result ends up frictionless. This request comes from the cardholder's browser and carries no Autra Bearer token. With sandboxReturnCallback: true, the origin of this URL must be enrolled for your sandbox tenant.

boolean

Sandbox only, optional. When true, the sandbox simulator posts the simulated challenge result to returnUrl, as the issuer does in production. Requires an HTTPS returnUrl whose origin is enrolled for your sandbox tenant. Omit it in production: outside the sandbox simulator, true returns 400 with code SANDBOX_ONLY.

string

Merchant URL (optional)

string

Transaction mode (optional)

string

ACS window size for challenge (optional)

orderInformation
object
required
buyerInformation
object

Buyer information (optional)

deviceInformation
object
required
Responses

401

Invalid access token

403

Unauthorized IP or merchant not found

500

Acquirer communication error. In the sandbox, also returned when the simulator requests a challenge and sandboxReturnCallback: true was sent with a returnUrl that is not HTTPS or whose origin is not enrolled for the tenant.

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json