3D Secure
Reduce fraud and increase security for online transactions
3D Secure is an online payment security protocol designed to reduce fraud and provide an additional layer of authentication for online transactions. When a customer makes an online purchase, 3D Secure requires them to complete an additional verification step with the card issuer, typically through a password, biometric authentication, or a one-time passcode sent over SMS.
The benefits of 3D Secure
Implementing 3D Secure for online payments provides several benefits for both merchants and customers, enhancing overall transaction security and achieving regulatory compliance.
Reduced fraud
By requiring an additional authentication step, 3D Secure significantly decreases the risk of unauthorized transactions. This added security measure helps to ensure that the person using the card online is the legitimate cardholder.
Liability shift
One of the key advantages for merchants using 3D Secure is the liability shift. If a transaction is authenticated using 3D Secure and later turns out to be fraudulent, the liability for the chargeback shifts from the merchant to the card issuer. This can result in substantial cost savings and reduced chargeback rates for merchants.
Regulatory compliance
With the increasing emphasis on online transaction security and regulations such as PSD2/SCA in Europe, implementing 3D Secure helps merchants comply with these regulations and avoid potential fines and penalties.
How 3D Secure works
3D Secure consists of several steps involving merchants, card networks, and card issuers to allow customers to be authenticated during online purchases. At a high level, a standard challenge flow looks like this.
Payment initiation
When a customer initiates an online purchase and enters their card details on the merchant's website, the merchant recognizes that the card is enrolled in 3D Secure and triggers the authentication process.
Issuer challenge
The customer is redirected to a web page hosted by their card issuer where the customer is asked to authenticate themselves. This can be done through various methods, such as entering a static password, a one-time password (OTP) sent over SMS, or using biometric authentication (e.g., fingerprint or facial recognition).
Process payment
If the authentication is successful, the merchant processes the authenticated transaction and the customer is redirected back to the merchant's website with a confirmation of their purchase. If the authentication fails or isn't completed, the transaction is typically declined, and the customer is informed of the failure.
3DS supports frictionless authentications as well, which require no interaction from the customer. A frictionless flow is initiated when the issuer determines that a transaction is low-risk, eliminating the need for additional verification steps. Frictionless authentications aren't always possible, but they provide a much smoother customer experience because there's no challenge displayed to the customer, meaning there's no action for them to take.
3DS with Evervault
Although the 3DS protocol is known for being difficult to work with, we built our solution from scratch (and we run our own 3DS server). We did this to make our API straightforward to use. We don't wrap other solutions, and our API isn't just a one-to-one mapping of the 3DS protocol. We manage a lot of the complexity for you, and surface just the parts you need to configure and control 3DS the way you want to. Completing a 3DS authentication with Evervault takes three steps:
- Create the session
- Run the session on your frontend
- Retrieve and forward authentication credentials as needed
That last step is an important differentiator. Because our solution is standalone, you can use 3DS authentications with any downstream partner. This is especially important for integrating with multiple payment service providers (PSPs). You could integrate with each PSP and use their 3DS solutions, but there are some issues with that. You're limited on the configuration side to whatever the PSPs allow, and it makes for an inconsistent customer experience because each 3DS implementation is different. Evervault lets you configure your own 3DS flows, and then share the results with any PSP, and customers always see the same interface.
Get started with 3D Secure
To start, you need to create a Sandbox app. Sandbox apps allow you to test 3D Secure without affecting live data. When you're ready to go live, contact our support team to enable 3D Secure on your production app.
Configuring acquirers
Acquirer details aren't required when testing in Sandbox mode. However, you must configure acquirer details before moving to production.
1. Create a 3DS session
Use the create session endpoint by providing the card (in encrypted form using our card collection, as a network token, or in plaintext), merchant, and payment details. Do this from your backend and then pass the session ID to your client code.
3DS Requestor Initiated (3RI) transactions
Merchant-initiated transactions (MIT) are commonly used to charge customers for subscriptions, installment payments, etc. 3RIs are a form of MIT that include a 3DS authentication without the cardholder being present (flows are frictionless and either succeed or fail, there's no challenge involved). These 3RIs are often used instead of standard MITs because they can improve acceptance rates and may still result in liability shift (moving chargeback liability from you to the issuer).
To use 3RIs, you still complete initial 3DS sessions with customers. You keep track of the session ID, and then you use it later to create a 3RI which carries over the authentication. If the initial session's status isn't success, creating the 3RI fails with a 400 error. To create a 3RI transaction, set the:
- Initiator type to
merchant - initialSession to the ID returned from the original session or a
threeDSServerTransactionID - Payment type to
recurringorinstallment
Visa Data Only authentication
Visa's Digital Commerce Authentication Program (DCAP) lowers interchange fees on transactions authenticated through Visa's Data Only flow. Rather than challenging the cardholder, Data Only sends enriched transaction data to Visa for risk assessment. The customer sees no challenge, and you pay a lower interchange rate.
Like 3RIs, a Data Only session authenticates as soon as it's created, so you don't mount the SDK on your frontend. Collect the extra data points along with the usual 3DS data, and Evervault authenticates the session when you create it.
To create a Data Only session for a Visa card, set the challenge preference to no-challenge-requested and the reason to data-sharing, and supply all of the following:
- The customer's full billing address, including
state - The customer's phone and email
- A deviceId you generate for the customer's device
- The customer's clientIp
State is required
state is optional on most 3DS sessions, but a Data Only session won't qualify without it. Supply it even for countries where you'd usually leave it out.
Evervault reports the outcome on the dcap object, which is present on every Visa session created with a data-sharing reason.
The dcap object
Whether you supplied every data point the program requires, so the transaction was submitted to Visa for DCAP.
Whether Visa reported your data as meeting the program's quality requirements. A session can be
qualifiedbut notaccepted— for example, when the billing address and IP address resolve to different places.
Retrieve and forward the authentication credentials after creating the session, as you would for any other session. Evervault also recommends combining Data Only with network tokens, which reduce interchange further.
2. Run the session on your frontend
After creating the session, use our client-side SDKs to complete the authentication flow on your frontend. If for some reason you can't use our SDKs, you can try using a redirect but Evervault doesn't generally recommend this (redirects add friction to the customer experience).
Install the SDK
Our JavaScript SDK is distributed from our CDN, and can be installed by placing this script tag in the head of your HTML file. The SDK must be loaded directly from our CDN and can't be bundled with your application or self hosted.
Once the SDK is installed, initialize it using your Team ID and App ID. You can find these in the Evervault Dashboard.
You can also install Evervault via the @evervault/js package on npm. This package is a light wrapper which handles loading the SDK from our CDN and also provides TypeScript definitions.
Frequently Asked Questions
Start the authentication
The ThreeDSecure component can be initiated using the evervault.ui.threeDSecure method by passing the session ID obtained in the previous step. After you initialize the ThreeDSecure component, call the .mount() method to open the 3DS modal in the customer's browser to start the authentication process. The success event will be fired after the authentication process completes. The failure event will be fired if the authentication process fails (e.g., the customer failed to authenticate). These callbacks occur regardless of whether there was a challenge or if the flow was frictionless.
Learn more about the JavaScript SDK.
Frequently Asked Questions
3. Retrieve and forward authentication credentials
After completing the authentication, you can retrieve information about the session as needed. To process the transaction and ensure liability is shifted, pass the raw Electronic Commerce Indicator (ECI) and 3DS cryptogram to your payment gateway or PSP.
In some cases, downstream partners might also require one or more of these IDs:
- threeDSServer.transactionIdentifier
- directoryServer.transactionIdentifier
- accessControlServer.transactionIdentifier
These values are specific to the 3DS protocol, and not Evervault. They're sometimes requested in addition to the ECI and cryptogram, but not every provider requires them.
Configuring acquirer details
Acquirer details aren't required in Sandbox mode but you do need them to use 3DS in production. Evervault automatically passes this information in when 3DS sessions are created, although you can pass values in manually yourself.
You can configure acquirers in the dashboard or with the API, and you can set up default acquirers for each card network (Visa, Mastercard, etc.). When creating a 3DS session, Evervault uses the appropriate acquirer configuration based on the card network. Configurations are specific to each app, so you need to configure these for your staging and production apps separately.
Acquirer info request template
If you need to obtain acquirer information from one of your partners (e.g., PSPs), you can use the template message below to request it. It covers everything you need to configure acquirers within Evervault.
Provide acquirer details per request
Alternatively, you can provide acquirer details when creating each 3DS session by including the acquirer object in your API request. This approach is useful if you work with multiple acquirers or need to specify different acquirer details for different transactions. However, supplying acquirer details per request adds complexity to your integration. You'll likely need to perform a BIN lookup to identify the card network, so that you can then decide which acquirer BIN or MID values to provide for each transaction.
How Evervault resolves acquirer details
When you create a 3DS session, Evervault follows this process to determine which acquirer configuration to use:
- If your request includes an
acquirerobject, those details are used. - If your request includes an ID of an acquirer configuration in the
acquirerfield, that configuration is used. - If no acquirer details are provided in the request, Evervault uses the default acquirer configuration for the card's network, if available.
- If no acquirer details can be resolved, session creation fails.
Testing your implementation
Provided you are using a Sandbox app, you can use specific test cards to simulate various real-life scenarios. These cards can be used in conjunction with any valid expiry date or CVC.
| Number | Brand |
|---|---|
3D Secure challenge flowThe following test cards will result in a 3D Secure challenge being shown. | |
4242 4242 4242 4242 | Visa |
5555 5555 5555 4444 | Mastercard |
3714 4963 5398 431 | American Express |
6011 1111 1111 1117 | Discover |
3622 720627 1667 | Diners Club |
Successful frictionless flowThe following test cards will result in a successful frictionless authentication, with no challenge shown. | |
4111 1101 1663 8870 | Visa |
5555 5501 3065 9057 | Mastercard |
3782 8224 6310 005 | American Express |
6011 0009 3838 5477 | Discover |
3622 720638 3827 | Diners Club |
Failed frictionless flowThe payment will fail frictionless authentication and a challenge will not be shown. | |
4111 1117 3897 3695 | Visa |
5555 5504 8784 7545 | Mastercard |
3782 8224 6310 013 | American Express |
6011 0009 3838 3100 | Discover |
3622 720638 3835 | Diners Club |
Attempted authenticationIn some rare occasions a 3DS transaction cannot be authenticated by the ACS. In these scenarios, the Card Network stands in and accepts the liability shift (without a challenge being shown). | |
4111 1101 4848 6405 | Visa |
5555 5588 2481 5604 | Mastercard |
3782 8224 6310 021 | American Express |
6011 0009 3838 7572 | Discover |
3622 720638 3850 | Diners Club |
Card not enrolledThe card isn't enrolled in 3D Secure, so the authentication fails and no challenge is shown. | |
4111 1101 4848 6413 | Visa |
5555 5588 2481 5612 | Mastercard |
3782 8224 6310 047 | American Express |
6011 0009 3838 6491 | Discover |
3622 720638 3868 | Diners Club |
Troubleshooting 3DS failures
There are a lot of places in the 3DS flow that can fail. In most cases, Evervault's failure reasons can tell you why and what to do. The steps below walk you through the troubleshooting process, but you can also search for error codes and failure reasons.
1. Check the failure reason
Evervault provides human-readable failure reasons. Check these first to find out what's going on. If you need more information, move to the next step.
| Failure reason | Meaning | What you can try |
|---|---|---|
acs-unavailable | The Access Control Server (ACS) associated with the card issuer was unavailable. | Try again later. |
authentication-timed-out | The authentication timed out. | No action needed. This is likely because the cardholder abandoned the transaction. |
cancelled | The cardholder cancelled the transaction. | No action needed. |
card-not-enrolled | The card isn't enrolled in 3DS, so it can't be authenticated. | Decide how to handle unenrolled cards (e.g., proceed with the transaction, run your own fraud checks first and then decide to move forward or not, etc.). |
challenge-required | The cardholder needs to complete a challenge, but the SDK was mounted with failOnChallenge set to true. | No action needed. This is expected when you use failOnChallenge. |
directory-server-unavailable | The Directory Server associated with the card network was unavailable. | Try again later. |
failed-authentication | The authentication failed. Typically this is because the cardholder didn't provide the correct 3DS authentication details. | Consider this transaction potentially fraudulent. |
invalid-acquirer-details | The acquirer details are invalid. | Check the acquirer object for the correct details. See Configuring acquirer details. |
invalid-card-details | The card details are invalid. | Check the card object for the correct details, and make sure the card isn't expired. |
no-card-record | The issuer has no record of the card. | Verify the card details with the cardholder before retrying. |
protocol-error | A protocol error occurred. | This is likely due to a technical issue with the 3DS authentication process. Try again later. |
required-data-element-missing | A required data element is missing. | Check the card object for the correct details, and make sure all required data elements are present. |
suspected-fraud | The transaction is suspected to be fraudulent. | Don't process this transaction. |
transaction-not-permitted | The current session configuration isn't permitted for this card. | Check that the session configuration is valid for the card type. For example, a merchant-initiated transaction reason of secure-corporate-payment isn't permitted for non-commercial cards. |
transient-system-failure | A transient system failure occurred. | This is likely due to a technical issue with the 3DS authentication process. Try again later. |
unsupported-version | The 3DS version isn't supported. | Move to the next step for more information. |
2. Check the transaction status
Check the transStatus code. Every authentication response includes this top-level value. It tells you what kind of outcome you're dealing with before you look at the specific reason.
| Code | Meaning | What you can try |
|---|---|---|
| Y | Authentication successful | Proceed with the transaction, you have liability shift. |
| N | Not authenticated; transaction denied | Don't proceed with the transaction unless you're deliberately accepting the risk without a shift. Check transStatusReason for why. |
| U | Couldn't be performed (technical or other issue) | Usually not a fraud signal. Check transStatusReason, and consider retrying or falling back depending on the cause. |
| A | Attempts processing performed | You can proceed to authorization. This generally carries the same liability shift as a full authentication, though a few scheme-specific exclusions exist (for example, Visa doesn't extend the shift to attempted authentications on non-reloadable prepaid cards). What's usually happening in these situations is that the card network is stepping in because the issuer's ACS was unavailable or doesn't support 3DS. |
| C | Challenge required | Run the challenge flow (CReq/CRes). |
| D | Challenge required, decoupled | Run a decoupled authentication flow instead of a standard challenge. |
| R | Rejected by the issuer | Don't attempt authorization. The issuer has explicitly asked you not to. |
| I | Informational only | No action needed. This just confirms the issuer acknowledged your challenge preference. |
| S | Challenge using SPC | Handle through the Secure Payment Confirmation flow rather than a standard challenge screen. |
If transStatus is N, U, or R, move to the next step. Otherwise, you hopefully have enough actionable information at this point.
3. Check the status reason
The transStatusReason code tells you why the failure occurred. The codes below are grouped into practical categories.
Request and data issues
| Code | Cause | What you can try |
|---|---|---|
| 02, 03 | Unknown or unsupported device | Confirm the 3DS Method and device data collection are running correctly, and check for SDK or browser compatibility issues. |
| 06 | Invalid card number | Validate the card number format (possibly doing a Luhn check if you want) before sending the request, and confirm your BIN data is current. |
| 07 | Invalid transaction | Audit the specific fields in the request. This is often a malformed or inconsistent request rather than a true decline. |
| 20 | Non-payment transaction not supported | Only send non-payment authentication requests to issuers or card ranges that support them. This is likely a configuration issue, and not something a retry fixes. |
| 21 | 3RI transaction not supported | Confirm 3RI support for the specific issuer or BIN range. |
Card and account status issues
| Code | Cause | What you can try |
|---|---|---|
| 01 | Card authentication failed | A generic, low-detail failure with no further reason attached. You might want to log it as a decline, and if one issuer returns it disproportionately, ask them what's causing the failures. |
| 05 | Expired card | Prompt the customer to update their card details, or use a card account updater to keep stored cards current. |
| 08 | No card record | Confirm the card details with the customer. This can also indicate a data entry error or attempted fraud. |
| 09 | Security failure | Treat this similar to a fraud-related code, and possibly route it for manual review (don't retry). |
| 10 | Stolen card | The issuer rejected the request because the card used was stolen. Don't retry, and don't attempt authorization. Possibly flag the account for review. |
| 11 | Suspected fraud | The issuer rejected the request because of suspected fraud. Don't retry, and don't attempt authorization. Possibly flag the account for review. |
| 12 | Transaction not permitted to cardholder | The card or account is restricted from this type of transaction. Confirm with the customer, or offer an alternate payment method. |
| 13 | Cardholder not enrolled in 3DS | Decide upfront how you want to handle unenrolled cards: proceed straight to authorization, or apply additional fraud checks first. This is something you can do with BIN Lookups (collect information about the card, then decide which path to take). |
ACS availability and technical issues
| Code | Cause | What you can try |
|---|---|---|
| 14 | Transaction timed out at the ACS | Configure fallback logic for timeouts (proceed without authentication, or decline), and monitor timeout rates by issuer. |
| 19 | Exceeds ACS maximum challenges | Reduce challenge frequency for that cardholder, and review whatever logic is triggering repeated challenges. |
| 22 | ACS technical issue | Retry after a short delay. If this is persistent for one issuer, it may indicate a broader outage on their end. |
Frequency and decoupled authentication issues
| Code | Cause | What you can try |
|---|---|---|
| 04 | Exceeds authentication frequency limit | Throttle retry logic. Retrying failed authentications too aggressively can trip this on its own. |
| 23, 24, 25 | Decoupled authentication mismatch or timeout | Only request decoupled authentication where you actually support the out-of-band flow, and give cardholders a realistic response window. |
| 26 | Authentication attempted but not completed by the cardholder | This is challenge abandonment. Focus on reducing challenge friction, or use fail-on-challenge where appropriate. |
Codes 15 through 18 (low, medium, high, and very high confidence) aren't failures. They indicate how confident the ACS is in its decision. For example, a transStatus of R with a transStatusReason of 18 means the ACS is very confident in the rejection.
You might have enough information at this point to resolve the issue, but if you're seeing any codes in the 80s, move to the next step.
4. Check card brand codes
Mastercard and Visa both use the 80s range for card brand codes, but the numbers don't mean the same thing. For example, code 81 is an accepted acquirer exemption from Mastercard but an ACS timeout from Visa. Always confirm the card brand before interpreting a code in this range.
Mastercard-specific codes (80–88)
| Code | Meaning | What you can try |
|---|---|---|
| 80 | Identity Check Insights used | Informational. Confirms the transaction was processed through Mastercard's Identity Check Insights program. No action needed. |
| 81 | Acquirer exemption accepted | Confirms your exemption request succeeded (3DS protocol 2.1 specific). Proceed with authorization. |
| 82 | Challenge mandate requested, but couldn't be performed by Smart Authentication Stand-In | The ACS was unavailable when a challenge was mandated. Retry, and escalate with the issuer if it's persistent. |
| 83 | Directory Server dropped the reason code received from the ACS | The ACS's reported reason conflicted with the transaction status, so Mastercard's DS discarded it. Flag to your provider if this recurs, since it points to inconsistent data upstream. |
| 84 | Challenge Cancellation Indicator populated; didn't route to Smart Authentication Stand-In | The transaction wasn't processed because the challenge was cancelled. Treat this like challenge abandonment and review your challenge UX. |
| 85, 86 | Reserved for future Mastercard use | Not currently defined. Shouldn't appear in production. |
| 87 | Device Channel is 3RI; didn't route to Smart Authentication Stand-in | Applies only to 3DS Requestor Initiated transactions. Informational, not something to fix. |
| 88 | Prior transaction authentication data not found or expired | Shows up specifically on 3DS Requestor Initiated transactions. If you're relying on stored authentication data for a merchant-initiated transaction and get this code, the data has gone stale. Re-authenticate. |
Visa-specific codes (80–90)
| Code | Meaning | What you can try |
|---|---|---|
| 80 | Error connecting to the ACS | Retry. If this is persistent for one issuer, it may indicate a broader outage on their end. |
| 81 | ACS timed out | Configure fallback logic for timeouts, and monitor timeout rates by issuer. |
| 82 | Invalid response from the ACS | A malformed response on the ACS side. Escalate to your provider or the network if it recurs. |
| 83 | System error response from the ACS | An ACS-side system error. Retry after a short delay. |
| 84 | Internal error generating the CAVV | An error on the issuer or ACS side generating the cryptographic proof. Not something you can fix directly; escalate if it's persistent. |
| 85 | Visa Merchant ID (VMID) not eligible for the requested program | Your VMID isn't provisioned for that specific program or feature. Check enrollment with your acquirer. |
| 86 | Protocol version not supported by the ACS | Usually means your 3DS Server needs fallback logic to negotiate an earlier protocol version with that issuer. |
| 87 | Transaction excluded from attempts processing (non-reloadable prepaid, Non-Payments) | This is unlikely to be something you can fix. In short, when an issuer's ACS doesn't support 3DS or is unreachable, Visa can stand in and return an authentication response on behalf of the issuer. This isn't supported for certain card types. Visa mentions non-reloadable prepaid cards specifically as not being supported, but there can be other excluded transactions. |
| 88 | Requested program not supported by the ACS | The specific program or feature you requested isn't supported by that issuer's ACS. Fall back to the standard flow. |
| 89 | CAVV is included in the response | Informational, not an error. Confirms a CAVV was returned. |
| 90 | Issuer SCA required | Tells you the issuer isn't going to honor an exemption request on that transaction. Proceed with full authentication instead. |
Alternative configurations
These alternative configurations mostly relate to using redirects and the failOnChallenge flag. Both have somewhat niche use cases but can be useful in the right situations.
Using failOnChallenge
3DS supports frictionless and challenge flows. Frictionless authentication requires no interaction from the customer (and maintains liability shift). The frictionless flow automatically occurs when the issuer determines that a transaction is low-risk, eliminating the need for additional verification steps. This is a much smoother customer experience.
In challenge flows, customers are required to complete an authentication step to verify their identity. This is higher friction and usually requires a password, biometric authentication, etc.
The issuer decides on the flow, but Evervault provides an additional flag that can reduce friction when a challenge is requested. When you create 3DS sessions, you can set failOnChallenge to true. If a challenge is requested, Evervault automatically fails the 3DS session which prevents the challenge from ever being shown to the customer. This isn't technically a frictionless flow in terms of 3DS, but it does allow you to skip the challenge.
EU transactions
The challenge flow is required for EU transactions and as a result frictionless-only 3D Secure isn't supported by banks in the EU.
Using a page redirect
The 3D Secure challenge can also be loaded directly—either through a full page redirect or served within an <iframe> or mobile web view. In this scenario, fingerprinting and challenge windows are presented directly in the user's browser. Once the 3D Secure authentication has been finalized (with either a success, a failure, or an error) the page is redirected back to a callback URL of your choice.
Once the 3D Secure session has been finalized, the page will redirect back to the URL provided in the redirect parameter with status and session appended to the URL parameters. More details about the 3D Secure Session can be retrieved from our API.
URL Parameters
The Team ID found in the Evervault Dashboard.
The App ID found in the Evervault Dashboard.
The 3D Secure session ID.
The URL to redirect to once the 3D Secure session has been completed. Additional URL parameters will be appended to this URL. Deep links are also supported for mobile implementations.
For example, if you provided 'https://3ds-redirect.testmerchant.com' as the redirect, the user's browser would redirect to 'https://3ds-redirect.testmerchant.com/?status=success&session=tds_abc123'. Status can be
success,failure, orerror
3DS on mobile apps
Since the ThreeDSecure components in our React and JavaScript SDKs are built for the web, native mobile apps can instead complete 3DS by loading the challenge directly in a mobile webview. The hosted challenge page handles fingerprinting and the challenge window, and then redirects back to your app through a deep link after authentication is finalized.
1. Create the session and register a deep link
Create a 3DS session on your backend, and pass the session ID to your app. In your app, register a custom URL scheme or universal link (e.g., yourapp://3ds-complete) to receive the result.
2. Load the hosted challenge in an in-app webview
Open the hosted 3DS page in a webview, such as SFSafariViewController or WKWebView on iOS, and Chrome Custom Tabs or WebView on Android. Pass your deep link as the redirect parameter.
3. Handle the redirect and retrieve the 3DS credentials
When the session is finalized, the page redirects to your deep link with status and session appended (e.g., yourapp://3ds-complete?status=success&session=tds_abc123). Status can be success, failure, or error. Intercept the deep link, close the webview, and retrieve the session using the session ID. After a successful authentication is confirmed, you can forward the ECI and cryptogram to your PSP from your backend to finalize the payment.
Verify server-side
Don't rely on the status parameter in the redirect to determine the final outcome of the 3DS session. Instead, retrieve the session from your backend and verify the status and eci from the response to confirm the final result. If successful, you can then forward the cryptogram and ECI to your PSP.