Skip to main content

What is 3D Secure?

3D Secure adds an extra layer of protection to card payments. Like two-factor authentication for your bank account, it helps prevent fraud and protects your customers. 3DS (3D Secure) verifies that your customer is the legitimate cardholder. When triggered, customers verify their identity using:

SMS Verification

One-time code sent via text message

Biometric Auth

Face ID, fingerprint, or other biometrics

Banking App

Confirmation through bank’s mobile app

Security Questions

Personal security questions or PINs
The authentication method is determined by the issuing bank (and region). It isn’t selected by Cheqpay or the merchant, and it may vary per transaction.
Most payments (60-80%) complete automatically without showing a challenge to your customer. Cheqpay handles the verification in the background.

When Does 3DS Trigger?

3DS is automatically activated for:
  • High-risk transactions - Based on fraud scoring
  • Large payment amounts - Above certain thresholds
  • International cards - Cards issued outside Mexico
  • Bank requirements - Issuing bank policies
  • Regulatory compliance - PSD2 in Europe and similar regulations
You don’t need to decide when to use 3DS - we handle it automatically based on risk assessment and regulations.

How 3D Secure Works

1

Create Order

Send your payment request as usual to POST /v2/payment-orders
2

Check Order Response

If 3DS is required, status will be PAYER_AUTHENTICATION_DEVICE_DATA_REQUIRED.
3

Collect and Submit Device Data

Display an invisible iframe to collect device data and send the data to POST /v2/payment-orders/{id}/payer-authentication
4

Check Authentication Response

If further challenge is needed, status will be PAYER_AUTHENTICATION_CHALLENGE_REQUIRED.
5

Display Challenge

Display an iframe for the customer to complete the 3DS challenge.
6

Validate

Once the customer completes challenge, call POST /v2/payment-orders/{id}/payer-authentication/validate to complete the payment.

Implementation

1. Create Order

Send a normal payment order request to POST /v2/payment-orders.
amount unit is the smallest currency unit (e.g., cents). So for MXN, 100 MXN = 10000 cents

2. Check Order Response

If device data is required, you’ll receive a response with status PAYER_AUTHENTICATION_DEVICE_DATA_REQUIRED and payerAuthentication field that will be used in the next step.
When 3DS is not required, the status will be COMPLETED

3 Collect and Submit Device Data

3.1 Collect Device Data

Using the payerAuthentication.url and payerAuthentication.jwt from the response, create an invisible iframe to collect device data. When the data collection is complete, you’ll receive a callback event. event.data is a JSON containing the SessionId needed for the next step. Here are examples using plain HTML and JavaScript, as well as a React component version.
index.html
DeviceDataCollector.jsx

3.2 Submit Device Data

Once you receive the SessionId from the iframe callback, submit it to Cheqpay API passing it through collectionReferenceId field via POST /v2/payment-orders/:id/payer-authentication.

4. check Authentication Response

Check the status in the response. If it’s PAYER_AUTHENTICATION_CHALLENGE_REQUIRED, proceed to display the challenge.
When challenge isn’t required, the status will be COMPLETED. The order was approved without any customer action, it’s called ‘frictionless’ approval

5. Display Challenge

Using the payerAuthentication.url and payerAuthentication.jwt from the response in step 4, display the 3DS challenge iframe where the customer will complete identity verification.
The challenge must be initiated within 30 seconds of receiving the response, or the authentication session will timeout.
When the customer completes authentication, the challenge iframe automatically redirects to the returnUrl you provided in step 3.2. This is why the example uses two separate pages: challenge-page displays the challenge, and redirection-page handles the redirect completion.

Improve Success Rates

Include Device Information

Sending device data helps banks assess risk and approve payments without showing challenges:

Best Practices

Device fingerprinting reduces friction by enabling frictionless 3DS flows.
Returning customers with saved cards are less likely to trigger 3DS challenges.
Use the same customer information across payments for better risk scoring.
Process from the same region when possible to reduce risk signals.

3D-Secure testing data

Use these test cards in sandbox:

Next Steps

Process Card Payments

Learn about basic card payment processing

Save Payment Methods

Reduce 3DS challenges with saved cards

Testing Guide

Test all 3DS scenarios in sandbox

Error Handling

Handle authentication failures gracefully