What is 3D Secure?
3D Secure (3DS) is an authentication protocol that adds an extra layer of security for online card transactions. It shifts liability for fraudulent chargebacks from the merchant to the card issuer.Benefits
| Benefit | Description |
|---|---|
| Liability Shift | Fraud chargebacks become issuer’s responsibility |
| Frictionless Flow | Low-risk transactions authenticate silently |
| PSD2 Compliant | Required for European transactions |
Automatic 3DS
When using the Payment Sheet or Elements SDK, 3DS is handled automatically:Manual 3DS API
For custom integrations, use the 3DS API directly.Initiate Authentication
| Parameter | Type | Required | Description |
|---|---|---|---|
session_id | string | Yes | Payment session ID |
token_id | string | Yes | Card token from tokenization |
amount | integer | Yes | Transaction amount in cents |
currency | string | Yes | Three-letter ISO currency code |
challenge_preference | string | No | no_preference, no_challenge, challenge_requested, challenge_mandated |
Handle Challenge
Ifchallenge_required is true, display the challenge URL in an iframe:
Get Authentication Result
Complete Challenge
After the customer completes the challenge:Authentication Status Values
| Status | Description |
|---|---|
Y | Fully authenticated - proceed with payment |
A | Attempted authentication - proceed with payment |
N | Authentication failed - do not proceed |
U | Unable to authenticate - proceed at merchant risk |
R | Rejected by issuer - do not proceed |
ECI Values
| ECI | Network | Meaning |
|---|---|---|
| 05 | Visa | Fully authenticated |
| 06 | Visa | Attempted authentication |
| 07 | Visa | Non-3DS transaction |
| 02 | Mastercard | Fully authenticated |
| 01 | Mastercard | Attempted authentication |
| 00 | Mastercard | Non-3DS transaction |
Best Practices
- Always attempt 3DS for European cards (PSD2 requirement)
- Use challenge_preference wisely - “no_challenge” may result in lower approval rates
- Handle timeouts - 3DS challenges can take several minutes
- Test all scenarios - Use test cards that trigger challenges
Test Cards
| Card Number | 3DS Behavior |
|---|---|
4000000000003220 | 3DS required, authentication succeeds |
4000000000003063 | 3DS required, authentication fails |
4000000000003055 | 3DS optional, not challenged |