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.

  1. 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.

  2. 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).

  3. 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:

  1. Create the session
  2. Run the session on your frontend
  3. 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:

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:

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
  • qualifiedboolean

    Whether you supplied every data point the program requires, so the transaction was submitted to Visa for DCAP.

  • acceptedboolean

    Whether Visa reported your data as meeting the program's quality requirements. A session can be qualified but not accepted — 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:

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:

  1. If your request includes an acquirer object, those details are used.
  2. If your request includes an ID of an acquirer configuration in the acquirer field, that configuration is used.
  3. If no acquirer details are provided in the request, Evervault uses the default acquirer configuration for the card's network, if available.
  4. 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.

NumberBrand

3D Secure challenge flow

The 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 flow

The 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 flow

The 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 authentication

In 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 enrolled

The 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 reasonMeaningWhat you can try
acs-unavailableThe Access Control Server (ACS) associated with the card issuer was unavailable.Try again later.
authentication-timed-outThe authentication timed out.No action needed. This is likely because the cardholder abandoned the transaction.
cancelledThe cardholder cancelled the transaction.No action needed.
card-not-enrolledThe 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-requiredThe 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-unavailableThe Directory Server associated with the card network was unavailable.Try again later.
failed-authenticationThe authentication failed. Typically this is because the cardholder didn't provide the correct 3DS authentication details.Consider this transaction potentially fraudulent.
invalid-acquirer-detailsThe acquirer details are invalid.Check the acquirer object for the correct details. See Configuring acquirer details.
invalid-card-detailsThe card details are invalid.Check the card object for the correct details, and make sure the card isn't expired.
no-card-recordThe issuer has no record of the card.Verify the card details with the cardholder before retrying.
protocol-errorA protocol error occurred.This is likely due to a technical issue with the 3DS authentication process. Try again later.
required-data-element-missingA required data element is missing.Check the card object for the correct details, and make sure all required data elements are present.
suspected-fraudThe transaction is suspected to be fraudulent.Don't process this transaction.
transaction-not-permittedThe 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-failureA transient system failure occurred.This is likely due to a technical issue with the 3DS authentication process. Try again later.
unsupported-versionThe 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.

CodeMeaningWhat you can try
YAuthentication successfulProceed with the transaction, you have liability shift.
NNot authenticated; transaction deniedDon't proceed with the transaction unless you're deliberately accepting the risk without a shift. Check transStatusReason for why.
UCouldn't be performed (technical or other issue)Usually not a fraud signal. Check transStatusReason, and consider retrying or falling back depending on the cause.
AAttempts processing performedYou 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.
CChallenge requiredRun the challenge flow (CReq/CRes).
DChallenge required, decoupledRun a decoupled authentication flow instead of a standard challenge.
RRejected by the issuerDon't attempt authorization. The issuer has explicitly asked you not to.
IInformational onlyNo action needed. This just confirms the issuer acknowledged your challenge preference.
SChallenge using SPCHandle 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


CodeCauseWhat you can try
02, 03Unknown or unsupported deviceConfirm the 3DS Method and device data collection are running correctly, and check for SDK or browser compatibility issues.
06Invalid card numberValidate the card number format (possibly doing a Luhn check if you want) before sending the request, and confirm your BIN data is current.
07Invalid transactionAudit the specific fields in the request. This is often a malformed or inconsistent request rather than a true decline.
20Non-payment transaction not supportedOnly 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.
213RI transaction not supportedConfirm 3RI support for the specific issuer or BIN range.

Card and account status issues


CodeCauseWhat you can try
01Card authentication failedA 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.
05Expired cardPrompt the customer to update their card details, or use a card account updater to keep stored cards current.
08No card recordConfirm the card details with the customer. This can also indicate a data entry error or attempted fraud.
09Security failureTreat this similar to a fraud-related code, and possibly route it for manual review (don't retry).
10Stolen cardThe issuer rejected the request because the card used was stolen. Don't retry, and don't attempt authorization. Possibly flag the account for review.
11Suspected fraudThe issuer rejected the request because of suspected fraud. Don't retry, and don't attempt authorization. Possibly flag the account for review.
12Transaction not permitted to cardholderThe card or account is restricted from this type of transaction. Confirm with the customer, or offer an alternate payment method.
13Cardholder not enrolled in 3DSDecide 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


CodeCauseWhat you can try
14Transaction timed out at the ACSConfigure fallback logic for timeouts (proceed without authentication, or decline), and monitor timeout rates by issuer.
19Exceeds ACS maximum challengesReduce challenge frequency for that cardholder, and review whatever logic is triggering repeated challenges.
22ACS technical issueRetry 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


CodeCauseWhat you can try
04Exceeds authentication frequency limitThrottle retry logic. Retrying failed authentications too aggressively can trip this on its own.
23, 24, 25Decoupled authentication mismatch or timeoutOnly request decoupled authentication where you actually support the out-of-band flow, and give cardholders a realistic response window.
26Authentication attempted but not completed by the cardholderThis 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)


CodeMeaningWhat you can try
80Identity Check Insights usedInformational. Confirms the transaction was processed through Mastercard's Identity Check Insights program. No action needed.
81Acquirer exemption acceptedConfirms your exemption request succeeded (3DS protocol 2.1 specific). Proceed with authorization.
82Challenge mandate requested, but couldn't be performed by Smart Authentication Stand-InThe ACS was unavailable when a challenge was mandated. Retry, and escalate with the issuer if it's persistent.
83Directory Server dropped the reason code received from the ACSThe 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.
84Challenge Cancellation Indicator populated; didn't route to Smart Authentication Stand-InThe transaction wasn't processed because the challenge was cancelled. Treat this like challenge abandonment and review your challenge UX.
85, 86Reserved for future Mastercard useNot currently defined. Shouldn't appear in production.
87Device Channel is 3RI; didn't route to Smart Authentication Stand-inApplies only to 3DS Requestor Initiated transactions. Informational, not something to fix.
88Prior transaction authentication data not found or expiredShows 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)


CodeMeaningWhat you can try
80Error connecting to the ACSRetry. If this is persistent for one issuer, it may indicate a broader outage on their end.
81ACS timed outConfigure fallback logic for timeouts, and monitor timeout rates by issuer.
82Invalid response from the ACSA malformed response on the ACS side. Escalate to your provider or the network if it recurs.
83System error response from the ACSAn ACS-side system error. Retry after a short delay.
84Internal error generating the CAVVAn error on the issuer or ACS side generating the cryptographic proof. Not something you can fix directly; escalate if it's persistent.
85Visa Merchant ID (VMID) not eligible for the requested programYour VMID isn't provisioned for that specific program or feature. Check enrollment with your acquirer.
86Protocol version not supported by the ACSUsually means your 3DS Server needs fallback logic to negotiate an earlier protocol version with that issuer.
87Transaction 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.
88Requested program not supported by the ACSThe specific program or feature you requested isn't supported by that issuer's ACS. Fall back to the standard flow.
89CAVV is included in the responseInformational, not an error. Confirms a CAVV was returned.
90Issuer SCA requiredTells 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
  • team

    The Team ID found in the Evervault Dashboard.

  • app

    The App ID found in the Evervault Dashboard.

  • session

    The 3D Secure session ID.

  • redirect

    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, or error

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.


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.