availability

Our 3D Secure 2 integration is now available in production, and all merchants can integrate and test basic transaction processing flows using the latest versions of our client SDKs.

Minor changes were made to parameter names since the previous preview releases, so please make sure to verify your integration.

Some more advanced features documented on this page are still under development, and we'll continue to update our SDKs as issuing banks begin supporting 3DS 2. If you have questions about feature availability, contact us.

Start here

  • 3D Secure 2 (3DS 2) is the next iteration of the 3DS authentication protocol.
  • It satisfies the Strong Customer Authentication (SCA) requirements going into effect in 2019 for European merchants transacting with European customers.
    • Although SCA requirements will not be enforced for European merchants until September 14, 2019, we recommend integrating 3DS 2 and testing as soon as possible.
  • 3DS 2 support is available in the latest major versions of our client SDKs: JavaScript v3, iOS v4, and Android v3.
  • This migration guide will walk you through upgrading a legacy 3D Secure integration to 3DS 2.

If you already use 3DS

Use this migration guide to update your existing 3DS integration to 3DS 2.

If you do not use 3DS yet

Use our updated 3D Secure integration guide to add 3DS 2 to your Braintree integration.

About 3DS 2

This new version of 3DS is designed to primarily do two things:

First and foremost, the protocol allows more data elements to be passed to issuing banks, which in turn allows them to perform a much more effective risk assessment of a given authentication. As a result, issuing banks will be able to allow more authentications to proceed without challenging the cardholder.

Second, the authentication challenges themselves are designed to be more effective and secure, especially for mobile devices, resulting in fewer authentication challenges and less friction during checkout workflows. You can find a lot more details and context in our blog post about 3DS 2.

Getting ready for 3DS 2

To minimize the need for issuing banks to present authentication challenges to customers, update your integration to collect as many of these customer data fields as possible. These new fields are not strictly required, but without them, you and your customers won't get the most out of 3DS 2.

Field Name Description
givenName Customer's first name.
surname Customer's last name.
streetAddress Customer's billing street address.
extendedAddress Customer's billing extended address when available (e.g. Apt. #3).
locality Customer's billing city.
region Customer's billing state, county, or province, if applicable.
postalCode Customer's billing postal code.
countryCodeAlpha2 Customer's ISO 3166-1 alpha-2 country code for their billing address.
billingPhoneNumber Customer's billing phone number.
email Customer's email.

Enabling 3DS 2

In addition to collecting the customer data elements above, you'll need to update your Braintree client SDK as well as your Braintree integration code.

Update your SDK version

3DS 2 support requires version 3.47.0 or higher. If you're using <script> tags to load files, be sure to at least include:

HTML
<!-- Load the client component. -->
<script src="https://js.braintreegateway.com/web/3.48.0/js/client.min.js"></script>

<!-- Load the Hosted Fields component.. -->
<script src="https://js.braintreegateway.com/web/3.48.0/js/google-payment.min.js"></script>

<!-- Load the 3D Secure component. -->
<script src="https://js.braintreegateway.com/web/3.48.0/js/three-d-secure.min.js"></script>

Configure 3DS version

Specify version: 2 in your options object when calling threeDSecure.create(). This allows your transactions to route through the 3DS 2 protocol whenever possible, and automatically fall back to 3DS 1 as needed.

var threeDSecure;

braintree.client.create({
  // Use the generated client token to instantiate the Braintree client.
  authorization: 'CLIENT_TOKEN_FROM_SERVER'
}, function (clientErr, clientInstance) {
  if (clientErr) {
    // Handle error in client creation
    return;
  }

  braintree.threeDSecure.create({
    version: 2, // Will use 3DS 2 whenever possible
    client: clientInstance
  }, function (threeDSecureErr, threeDSecureInstance) {
    if (threeDSecureErr) {
      // Handle error in 3D Secure component creation
      return;
    }

    threeDSecure = threeDSecureInstance;
  });
});

Pass new parameters on verify card calls

important

Changes to these new parameters were introduced in 3.46.0-beta-3ds.8. Double-check that you are using the correct parameters shown below.

To reduce the need for issuing banks to challenge cardholders to authenticate with 3DS 2, pass as many of the following new parameters when calling verifyCard() as possible:

  • bin: The numeric Bank Identification Number (BIN) associated with the nonce. This can be retrieved from the tokenize payload in the details object.
  • email: The email for the customer.
  • billingAddress: The billing address for the customer.
  • additionalInformation: Additional customer data elements to pass to the issuing bank; see code snippet below for details. For best results, provide as many of these elements as possible. This may require updating your UI to collect more information.
  • onLookupComplete: Required callback that will be invoked before the challenge flow. Accepts two parameters:
    • data: 3DS data lookup response object; see code snippet below for details.
    • next: Callback function to execute after consuming the 3DS data response.
threeDSecure.verifyCard({
  amount: '500.00',
  nonce: NONCE_FROM_INTEGRATION, // Example: hostedFieldsTokenizationPayload.nonce
  bin: BIN_FROM_INTEGRATION, // Example: hostedFieldsTokenizationPayload.details.bin
  email: 'test@example.com',
  billingAddress: {
    givenName: 'Jill',
    surname: 'Doe',
    phoneNumber: '8101234567',
    streetAddress: '555 Smith St.',
    extendedAddress: '#5', // When available
    locality: 'Oakland',
    region: 'CA',
    postalCode: '12345',
    countryCodeAlpha2: 'US'
  },
  additionalInformation: {
    workPhoneNumber: '8101234567',
    shippingGivenName: 'Jill',
    shippingSurname: 'Doe',
    shippingPhone: '8101234567',
    shippingAddress: {
      streetAddress: '555 Smith St.',
      extendedAddress: '#5', // When available
      locality: 'Oakland',
      region: 'CA',
      postalCode: '12345',
      countryCodeAlpha2: 'US'
    }
  },
  /**
  * @function onLookupComplete
  * Newly required in `verifyCard` options object, will be called after receiving ThreeDSecure
  * response, before completing the flow.
  * @param {object} data - ThreeDSecure data to consume before continuing
  * @param {string} data.paymentMethod.nonce - payment nonce
  * @param {object} data.threeDSecureInfo
  * @param {boolean} data.threeDSecureInfo.liabilityShifted
  * @param {boolean} data.threeDSecureInfo.liabilityShiftPossible
  * @param {function} next - callback to continue flow
  * */
  onLookupComplete: function (data, next) {
    // use `data` here, then call `next()`
    next();
  }
}, function (err, response) {
  // Handle response
});

Client-side sandbox testing

The table below includes test cards for scenarios where the cardholder is given a challenge by their issuing bank (Challenge) or where the card issuer determines a challenge is not needed (No Challenge).

important

Use the card numbers below to test 3DS 2 on your client side in sandbox. Any other test cards will result in 3DS verification results that are not in the 3DS 2 format.

For expiration year values for all test cards in the table below, use the current year +3. The expiration month should always be 01. For example, if the current year is 2019, a valid test value for the expiration date would be 01/2022.

Status and Scenario Card brand specific test values
"Successful No-Challenge Authentication"
Cardholder enrolled, authentication successful, and signature verification successful.
Visa
  • 4000000000001000
  • 01/20**
Mastercard
  • 5200000000001005
  • 01/20**
Amex
  • 340000000001007
  • 01/20**
"Failed No-Challenge Authentication"
Cardholder enrolled, authentication unsuccessful. Merchants should prompt customers for another form of payment.
Visa
  • 4000000000001018
  • 01/20**
Mastercard
  • 5200000000001013
  • 01/20**
Amex
  • 340000000001015
  • 01/20**
"Attempt No-Challenge Authentication"
The provided card brand authenticated this 3D Secure transaction without password confirmation from the customer.
Visa
  • 4000000000001026
  • 01/20**
Mastercard
  • 5200000000001021
  • 01/20**
Amex
  • 340000000001023
  • 01/20**
"Unavailable No-Challenge Authentication from the Issuer"
Authentication unavailable for this transaction.
Visa
  • 4000000000001034
  • 01/20**
Mastercard
  • 5200000000001039
  • 01/20**
Amex
  • 340000000001031
  • 01/20**
"Rejected No-Challenge Authentication by the Issuer"
Authentication unsuccessful. Merchants should prompt customers for another form of payment.
Visa
  • 4000000000001042
  • 01/20**
Mastercard
  • 5200000000001047
  • 01/20**
Amex
  • 340000000001049
  • 01/20**
"Authentication Not Available on Lookup"
Authentication unavailable for this transaction.
Visa
  • 4000000000001059
  • 01/20**
Mastercard
  • 5200000000001054
  • 01/20**
Amex
  • 340000000001056
  • 01/20**
"Error on Lookup"
An error occurred while attempting to lookup enrollment.
Visa
  • 4000000000001067
  • 01/20**
Mastercard
  • 5200000000001062
  • 01/20**
Amex
  • 340000000001064
  • 01/20**
"Timeout on Lookup"
Attempting to lookup enrollment resulted in a timeout.
Visa
  • 4000000000001075
  • 01/20**
Mastercard
  • 5200000000001070
  • 01/20**
Amex
  • 340000000001072
  • 01/20**
"Bypassed Authentication"
Bypass used to simulate a scenario where merchant has elected to bypass the consumer authentication flow via CardinalCommerce Rules Engine configuration.
Visa
  • 4000000000001083
  • 01/20**
Mastercard
  • 5200000000001088
  • 01/20**
Amex
  • 340000000001080
  • 01/20**
"Successful Challenge Authentication"
Cardholder enrolled, authentication successful, and signature verification successful.
Visa
  • 4000000000001091
  • 01/20**
Mastercard
  • 5200000000001096
  • 01/20**
Amex
  • 340000000001098
  • 01/20**
"Failed Challenge Authentication"
Cardholder enrolled, authentication unsuccessful. Merchants should prompt customers for another form of payment.
Visa
  • 4000000000001109
  • 01/20**
Mastercard
  • 5200000000001104
  • 01/20**
Amex
  • 340000000001106
  • 01/20**
"Challenge Authentication is Unavailable"
Authentication unavailable for this transaction.
Visa
  • 4000000000001117
  • 01/20**
Mastercard
  • 5200000000001112
  • 01/20**
Amex
  • 340000000001114
  • 01/20**
"Error on Authentication"
An error occurred while attempting to authenticate. Alternatively, merchants can ask customers for an alternative form of payment.
Visa
  • 4000000000001125
  • 01/20**
Mastercard
  • 5200000000001120
  • 01/20**
Amex
  • 340000000001122
  • 01/20**

Server-side sandbox testing

If you call Transaction.Sale() without doing a 3DS authentication on the client-side, the issuing bank may return a soft decline indicating that the transaction requires 3DS authentication. In this case, 2099 - Cardholder Authentication Required will be returned. You can simulate this scenario by creating a test transaction in sandbox with an amount of 2099.

Verifications and recurring billing

Recurring transactions

The recommended flow for recurring billing would be to request a cardholder challenge to establish SCA when the card is first authorized as part of storing it to the Braintree vault. This can be with a verification, or the first transaction of a recurring billing event. By applying 3D Secure to the first transaction or verification, you signal to the card issuer that you have established a mandate between you and your customer to charge their payment method for subsequent recurring payments as detailed in your terms and conditions. Such subsequent transactions are exempt from PSD2 SCA requirements.

Establishing SCA on verifications will be useful for scenarios where the cardholder will not be present when the charge is issued, and the amount isn’t known when the payment method is stored. For example, if you have a metered billing flow and invoice customers at the end of a month based on their usage, you can use 3D Secure on your initial card verification to establish a mandate to create future merchant initiated transactions (MIT).

For subsequent transactions from that payment method, use the recurring value in the transaction_source parameter of the Transaction.Sale() API call.

Other merchant initiated transactions (MIT)

Other MIT transactions will be processed much the same way that recurring transactions would be. You would again request a cardholder challenge to establish SCA when the card is first authorized, establishing a mandate between you and your customer.

For subsequent transactions from that payment method, which would be out of scope for SCA, use the unscheduled value in the transaction_source parameter of the Transaction.Sale() API call.

Requesting a cardholder challenge

To override the default behavior of 3DS 2 and request the cardholder's bank to issue an authentication challenge, pass challengeRequested: true on the verifyCard() call.

Exceptions for already-stored payment methods

Exceptions would apply for payment methods stored before September 14, 2019, or subscriptions started before that date. For these payment methods, SCA would not have to be applied to the first authorization for subsequent transactions to be out of scope for PSD2.

As long as your payment methods are stored with Braintree, Braintree will automatically indicate to the card networks and issuers that these payment methods were stored before the PSD2 SCA enforcement date.

We expect, however, that you will have a lower decline rate if there has been at least one transaction or verification before September 14. This transaction history, in conjunction with the indicators Braintree will pass, will more clearly indicate to issuers that they will not be under regulatory pressure to decline recurring/MIT transactions from these payment methods. However, the transaction history is not expressly required.

What to expect after adopting 3DS 2

After adopting 3DS 2, you may still see 3DS 1 authentications using your updated integration. This is to be expected – 3DS 2 is an industry-wide initiative, requiring many parties' participation in order for a 3DS 2 authentication to be possible. Each party has steps to complete, and 3DS verification will use the 3DS 2 protocol once all parties involved in a given transaction have made the appropriate upgrades:

  1. You must update your integration to pass the necessary information to support 3DS 2 cardholder verifications.
  2. Braintree must work with acquirers to enable merchant accounts for 3DS 2.
  3. Cardholders' issuing banks must upgrade their systems to support 3DS 2 cardholder verifications.

By completing the steps in this guide, you ensure that everything on the merchant side is ready to go. You will start seeing 3DS 2 authentications as other parties complete their part of the protocol.

While the rest of the industry completes their work, Braintree’s integration will automatically fall back to a 3DS 1 authentication path on a transaction-by-transaction basis when 3DS 2 is not available from all parties involved.

Common questions

Can merchants customize the presentation of the bank challenge?

No. The presentation will be controlled by the issuing bank. This means that unlike prior versions, you will not need to provide the iframe or utilize the addFrame and removeFrame callbacks.

What happens if some of the additional parameters are not present?

The bank will decide if a challenge is necessary. Sending all additional parameters will result in the best chance for a frictionless experience.

Will vaulted credit cards be supported?

Yes, create a nonce from a vaulted credit card as usual.

Advanced features

Authentication Insight

Authentication Insight provides you with more details about the regulatory environment and applicable customer authentication regulation for a potential transaction. This empowers you to make an informed decision whether to perform 3D Secure authentication. This feature is currently under development and will be available soon.

There are two ways to request Authentication Insight:

  • When gathering the customer's payment information for the first time, you can request it client-side when getting a nonce via hosted fields.
  • When you already have a customer's payment method stored in your vault, you can request it on the server-side via the Server SDKs.

You can use the regulation environment information contained in the Authentication Insight to make a decision about whether to perform 3D Secure authentication, or continue without authentication. If you choose to perform 3D Secure authentication, proceed as usual using the nonce. The possible values for a regulation environment are currently psd2, unregulated, and unavailable. A value of psd2 would indicate that the potential transaction is subject to PSD2 SCA regulation, and you should perform 3D Secure authentication. As regulations evolve we will continue to update these values.

PSD2 SCA exemptions

Merchants can request exemptions for certain transactions from requiring SCA. Exemptions are granted completely at the discretion of the issuer, and are never guaranteed. If an exemption is requested, and then granted by the issuer, authentication will not be required. However, in this case, the liability remains with the merchant and is not shifted to the issuer.

Braintree's client SDKs provide the ability to request an exemption for a given authentication. If you request an exemption, Braintree will automatically request the most appropriate exemption from the issuer.

Please note that issuers are currently upgrading their systems to support 3DS 2 as well as PSD2 SCA exemptions; many issuers may not support some or all exemptions until well into 2020.

For more information on exemptions, please read our blog on PSD2 SCA exemptions.

Client-side implementation

To request an exemption, set exemptionRequested: true in the verifyCard() parameters.

Server-side implementation

If you perform a 3D Secure authentication, the exemption request along with any exemption granted by the issuer will automatically be applied to the associated transaction; no exemption information is then required in the Transaction.sale() call.

In the future we will expand the options to allow you to specify the particular exemption you are requesting. This will be primarily useful for Forward API merchants.

Using your own 3D Secure MPI provider

If you perform a 3D Secure authentication with your own MPI provider and receive an SCA exemption from the issuer via 3D Secure, you'll need to specify which exemption was obtained in the Transaction.sale() call. This feature is currently under development and not yet available.

Recurring billing with an external vault

If you maintain your own vault, you will be able to provide a static network transaction identifier (NTI) in the previous_network_transaction_id field. You'll use a static NTI field in subsequent transactions in order to indicate that the initial transaction occurred before September 14, 2019, the PSD2 SCA enforcement date. We are currently working with the card networks to obtain the proper static NTI values and we will provide them when they are available.