# Test your EMV 3-D Secure Integration
source: https://developer.mastercard.com/mastercard-gateway/documentation/security-and-fraud/authentication/3d-secure-auth/test-3ds-int/index.md

You can validate your EMV 3-D Secure Authentication integration by using the EMV 3-D Secure Emulator provided by the payment gateway. To begin testing, log in with your test merchant profile. This profile should include the "TEST" prefix, as supplied by your payment service provider.

The emulator supports a variety of test card scenarios to simulate different EMV 3-D Secure outcomes. These test cards do not replicate the behavior of Access Control Servers (ACS).

The gateway supports EMV 3-D Secure testing for both browser-based (web authentications) and SDK or in-app (mobile integrations) channels. This guide covers the following topics:

* [Browser-based EMV 3-D Secure testing](https://developer.mastercard.com/mastercard-gateway/documentation/security-and-fraud/authentication/3d-secure-auth/test-3ds-int/index.md#test-emv-3-d-secure-functionality-browser-integration)
* [Mobile integration EMV 3-D Secure testing](https://developer.mastercard.com/mastercard-gateway/documentation/security-and-fraud/authentication/3d-secure-auth/test-3ds-int/index.md#test-emv-3-d-secure-functionality-mobile-integration)
* [FAQs](https://developer.mastercard.com/mastercard-gateway/documentation/security-and-fraud/authentication/3d-secure-auth/test-3ds-int/index.md#faqs)

## Test EMV 3-D Secure functionality: Browser integration {#test-emv-3-d-secure-functionality-browser-integration}

Follow these steps to test EMV 3-D Secure functionality:

1. Use a test card from the EMV 3-D Secure Test Cards table when submitting the [INITIATE AUTHENTICATION](https://developer.mastercard.com/mastercard-gateway/documentation/api-reference/v100/rest/api-ops/index.md#transaction) request for your TEST merchant profile.  
   Use the expiry code "01/39" to get a successful authorization or payment in an end-to-end testing flow.
2. Set `authentication.channel` = PAYER_BROWSER and `authentication.purpose` = 'PAYMENT_TRANSACTION'.
3. Check if the authentication is available (`authentication.version`=3DS2).
4. Submit an [AUTHENTICATE PAYER](https://developer.mastercard.com/mastercard-gateway/documentation/api-reference/v100/rest/api-ops/index.md#transaction) request.
5. Insert the contents of the `authentication.redirect.html` field into the page displayed to the payer, which redirects the payer's browser to the EMV 3-D Secure Emulator challenge page.  
   The EMV 3-D Secure Emulator redirects the payer's browser back to your website when the authentication is complete.
6. Select a specific EMV 3-D Secure authentication result from the drop-down menu in the EMV 3-D Secure Emulator. See the values in the following Transaction Status Options in the EMV 3-D Secure Emulator table.
7. Select a successful authentication result if you want to reference this authentication transaction in a subsequent AUTHORIZE or PAY request and want the financial transaction to be successful.
8. Use the transaction ID for this EMV 3-D Secure authentication in the `authentication.transactionId` field of a subsequent [AUTHORIZE](https://developer.mastercard.com/mastercard-gateway/documentation/api-reference/v100/rest/api-ops/index.md#transaction) or [PAY](https://developer.mastercard.com/mastercard-gateway/documentation/api-reference/v100/rest/api-ops/index.md#transaction) transaction request.

## Browser integration EMV 3-D Secure test cards {#browser-integration-emv-3-d-secure-test-cards}

In the table,

* The ACS Method Call column defines whether the card supports the ACS method.
* The `transStatus` and `transStatusReason` columns define the values returned in the `authentication.3ds2.transactionStatus` and `authentication.3ds2.statusReasonCode` fields, respectively.

The following table lists the cards that you can use to test the EMV 3-D Secure functionality.

|                                                                    Test Cards                                                                     |              Purpose              |            Card Number            | 3DS2 Enrolled |    ACS Method Call    | tranStatus  | tranStatusReason |             ECI              | Authentication Token |
|                                                                    Mastercard                                                                     |             Challenge             | 5123450000000008 2223000000000007 |      Yes      |          Yes          |      C      |        -         |              -               |          -           |
|                                                                    Mastercard                                                                     |
|                                                                    Mastercard                                                                     |
|                                                                    Mastercard                                                                     |
|                                                                    Mastercard                                                                     |
|                                                                    Mastercard                                                                     |
|                                                                    Mastercard                                                                     |
|                                                                    Mastercard                                                                     |
|                                                                    Mastercard                                                                     |
|---------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------|-----------------------------------|---------------|-----------------------|-------------|------------------|------------------------------|----------------------|
| Frictionless                                                                                                                                      | 5123456789012346                  | Yes                               | Yes           | Y                     | -           | 02               | mHyn+7YFi1EUAREAAAAvNUe6Hv8= |
| Frictionless                                                                                                                                      | 5555555555000018                  | Yes                               | No            | Y                     | -           | 02               | mHyn+7YFi1EUAREAAAAvNUe6Hv8= |
| Authentication Attempted                                                                                                                          | 5500005555555559                  | Yes                               | No            | A                     | -           | 01               | nHyn+7YFi1EUAREAAAAvNUe6Hv8= |
| Authentication Rejected                                                                                                                           | 5506900140100503                  | Yes                               | No            | R                     | 04          | -                | -                            |
| Error during INITIATE AUTHENTICATION operation resulting in Generic Error Response                                                                | 5210760000000004                  | Exception                         | -             | -                     | -           | -                | -                            |
| Error during AUTHENTICATE PAYER operation resulting in Generic Error Response                                                                     | 5455031257390496                  | Yes                               | No            | Exception             | -           | -                | -                            |
| Error during AUTHENTICATE PAYER operation resulting in Generic Error Response                                                                     | 5455031252665454                  | Yes                               | No            | Exception             | -           | -                | -                            |
| Authentication Unavailable Error during Authenticate Payer operation resulting in a response of authenticationStatus = AUTHENTICATION_UNAVAILABLE | 5123459999998221                  | Yes                               | No            | Recoverable Exception | -           | -                | -                            |
| Frictionless                                                                                                                                      | 4440000042200014                  | Yes                               | Yes           | Yes                   | -           | 05               | mHyn+7YFi1EUAREAAAAvNUe6Hv8= |
| Authentication Attempted                                                                                                                          | 4440000042200022                  | Yes                               | No            | A                     | -           | 06               | nHyn+7YFi1EUAREAAAAvNUe6Hv8= |
| Frictionless                                                                                                                                      | 371881887105009                   | Yes                               | Yes           | Yes                   | -           | 05               | mHyn+7YFi1EUAREAAAAvNUe6Hv8= |
| Challenge                                                                                                                                         | 3528249999991748                  | Yes                               | No            | C                     | -           | -                | -                            |
| Frictionless                                                                                                                                      | 3528249999991821                  | Yes                               | Yes           | Yes                   | -           | 05               | mHyn+7YFi1EUAREAAAAvNUe6Hv8= |
| Authentication Rejected                                                                                                                           | 3528249999981236                  | Yes                               | Yes           | R                     | -           | -                | -                            |
| Challenge                                                                                                                                         | 3600000000000123                  | Yes                               | No            | C                     | -           | -                | mHyn+7YFi1EUAREAAAAvNUe6Hv8= |
| Frictionless                                                                                                                                      | 3600000000000131                  | Yes                               | Yes           | Yes                   | -           | 05               | AAICBycxlQAAAAAAGTGVAAAAAAA= |
| Frictionless                                                                                                                                      | 36721601220030                    | Yes                               | Yes           | Yes                   | -           | 05               | AJkBBGBIJGhlhpFBFEgkAAAAAAA= |
| Authentication Rejected                                                                                                                           | 3600000000000172                  | Yes                               | Yes           | R                     | -           | -                | -                            |
| Challenge                                                                                                                                         | 6445644564456460                  | Yes                               | No            | C                     | -           | -                | mHyn+7YFi1EUAREAAAAvNUe6Hv8= |
| Frictionless                                                                                                                                      | 6445644564456411                  | Yes                               | Yes           | Yes                   | -           | 05               | mHyn+7YFi1EUAREAAAAvNUe6Hv8= |
| Frictionless                                                                                                                                      | 6587060001006370                  | Yes                               | Yes           | Yes                   | -           | 05               | AJkBBGBIJGhlhpFBFEgkAAAAAAA= |
| Authentication Rejected                                                                                                                           | 6445644564456155                  | Yes                               | Yes           | R                     | -           | -                | -                            |
| Challenge                                                                                                                                         | 5297649999999000                  | Y                                 | No            | C                     | -           | -                | -                            |
| Authentication Attempted                                                                                                                          | 5391979999999048                  | Y                                 | No            | A                     | -           | -                | mHyn+7YFi1EUAREAAAAvNUe6Hv8= |
| Not Authenticated                                                                                                                                 | 5391979999999055                  | Y                                 | No            | N                     | 04          | -                | -                            |
| Mastercard ITMX Frictionless V220                                                                                                                 | 5391979999999014                  | Y                                 | No            | Y                     | -           | -                | mHyn+7YFi1EUAREAAAAvNUe6Hv8= |
| Challenge                                                                                                                                         | 4943129999999004                  | Y                                 | No            | C                     | -           | -                | -                            |
| Authentication Attempted                                                                                                                          | 4013679999999045                  | Y                                 | No            | A                     | -           | -                | mHyn+7YFi1EUAREAAAAvNUe6Hv8= |
| Not Authenticated                                                                                                                                 | 4013679999999052                  | Y                                 | No            | N                     | 04          | -                | -                            |
| Visa ITMX Frictionless V220                                                                                                                       | 4013679999999011                  | Y                                 | No            | Y                     | -           | -                | mHyn+7YFi1EUAREAAAAvNUe6Hv8= |
| 3DS2 - Challenge Payer Browser                                                                                                                    | 6201089999991455                  | Y                                 | Yes           | C                     | -           | -                | -                            |
| 3DS2 - Challenge Payer Browser -19 digit                                                                                                          | 6213249999999991208               | Y                                 | Yes           | C                     | -           | -                | -                            |
| 3DS2 - Authentication Attempted                                                                                                                   | 6201089999994020                  | Y                                 | No            | A                     | -           | 06               | ABCQAwUANHQYQoQYARWTUEFnAAA= |
| 3DS2 - Unavailable Authentication                                                                                                                 | 6201080999990852                  | Y                                 | No            | U                     | 01          | 07               | -                            |
| 3DS2 -Not authenticated                                                                                                                           | 6201080999990423                  | Y                                 | No            | N                     | 04          | -                | -                            |
| Challenge                                                                                                                                         | 2205589999999485 2205819999992101 | Yes                               | No            | C                     | -           | -                | -                            |
| Frictionless                                                                                                                                      | 2205939999992560                  | Yes                               | Yes           | Y                     | -           | 02               | mHyn+7YFi1EUAREAAAAvNUe6Hv8= |
| Frictionless                                                                                                                                      | 2205789999999978 2205729999994371 | Yes                               | No            | Y                     | -           | 02               | mHyn+7YFi1EUAREAAAAvNUe6Hv8= |
| Authentication Attempted                                                                                                                          | 2206409999999295                  | Yes                               | No            | A                     | -           | 01               | nHyn+7YFi1EUAREAAAAvNUe6Hv8= |
| Authentication Rejected                                                                                                                           | 2206389999998630                  | Yes                               | No            | R                     | 04          | -                | -                            |
| Error during INITIATE AUTHENTICATION operation resulting in Generic Error Response                                                                | 2205919999999930                  | Exception                         | -             | -                     | -           | -                | -                            |
| Error during AUTHENTICATE PAYER operation resulting in Generic Error Response                                                                     | 2205609999999655                  | Yes                               | No            | Exception             | -           | -                | -                            |
| Authentication Unavailable Error during Authenticate Payer operation resulting in a response of authenticationStatus = AUTHENTICATION_UNAVAILABLE | 2205689999997123                  | Yes                               | No            | Recoverable Exception | -           | -                | -                            |
| 3DS2 - Frictionless Payer Browser                                                                                                                 | 6690109000011008                  | Yes                               | Yes           | Y                     | -           | 05               | ABCQAwUANHQYQoQYARWTUEFnAAA= |
| 3DS2 - Challenge Payer Browser                                                                                                                    | 6690109000011008                  | Yes                               | No            | Y                     | -           | 05               | ABCQAwUANHQYQoQYARWTUEFnAAA= |
| 3DS2 - Authentication Attempted                                                                                                                   | 6690109000011024                  | Yes                               | Yes           | A                     | Not present | 06               | ABCQAwUANHQYQoQYARWTUEFnAAA= |
| 3DS2 - Unavailable Authentication                                                                                                                 | 6690109000011032                  | Yes                               | No            | U                     | 01          | 07               | not present                  |
| 3DS2 - Not authenticated                                                                                                                          | 6690109000011040                  | Yes                               | Yes           | N                     | 04          | not present      | not present                  |
| Challenge                                                                                                                                         | 5175540000050099                  | Yes                               | Yes           | C                     | -           | -                | -                            |
| Challenge                                                                                                                                         | 5175540000050099                  | Yes                               | Yes           | C                     | -           | -                | -                            |
| Challenge                                                                                                                                         | 4439130000050011                  | Yes                               | Yes           | C                     | -           | -                | -                            |
| Challenge                                                                                                                                         | 4439130000050011                  | Yes                               | Yes           | C                     | -           | -                | -                            |

For a "C" **transStatus**, the following table lists the options that are available on the drop-down menu in the EMV 3-D Secure Emulator and the resulting values in the response.

|          Options          | transStatus | challengeCancel |   eci   |
|---------------------------|-------------|-----------------|---------|
| Successful authentication | Y           | -               | 05 / 02 |
| Failed authentication     | N           | -               | 07 / 00 |
| Cancelled authentication  | N           | 01              | 07 / 00 |
| Unable to authenticate    | U           | -               | 07 / 00 |
| Authentication rejected   | R           | -               | 07 / 00 |

## Test EMV 3-D Secure functionality: Mobile integration {#test-emv-3-d-secure-functionality-mobile-integration}

For more information, refer to [Mobile integration](https://developer.mastercard.com/mastercard-gateway/documentation/integrations-types/mobile-integration/index.md).  

Follow these steps to test EMV 3-D Secure functionality:

1. Use a test card from the following EMV 3-D Secure Test Cards table when submitting the [INITIATE AUTHENTICATION](https://developer.mastercard.com/mastercard-gateway/documentation/api-reference/v100/rest/api-ops/index.md#authentication) request for your TEST merchant profile.  
   Use the expiry code "01/39" to get a successful authorization or payment in an end-to-end testing flow.
2. Set `authentication.channel = PAYER_APP` and `authentication.purpose = 'PAYMENT_TRANSACTION'`.
3. Check if the authentication is available (`authentication.version=3DS2`).
4. Submit an [AUTHENTICATE PAYER](https://developer.mastercard.com/mastercard-gateway/documentation/api-reference/v100/rest/api-ops/index.md#authentication) request.
5. After the authentication is complete, the Mobile SDK receives a response:  
   **a.** Frictionless flow: If the test card supports frictionless authentication, the Authenticate Payer response returns `authenticationStatus = AUTHENTICATION_SUCCESSFUL`, and you can proceed to step 6.  
   **b.** Challenge flow: If the test card requires a challenge, the Authenticate Payer response returns `authenticationStatus = AUTHENTICATION_PENDING` while the authentication process occurs. Once the challenge is completed, the Mobile SDK provides a recommendation to your application on whether to proceed with the transaction.
6. Once you are ready to process your payment, use the transaction ID for this EMV 3-D Secure authentication in the `authentication.transactionId` field of a subsequent [AUTHORIZE](https://developer.mastercard.com/mastercard-gateway/documentation/api-reference/v100/rest/api-ops/index.md#transaction) or [PAY](https://developer.mastercard.com/mastercard-gateway/documentation/api-reference/v100/rest/api-ops/index.md#transaction) transaction request.

## Mobile SDK integration EMV 3-D Secure test cards {#mobile-sdk-integration-emv-3-d-secure-test-cards}

| Test Cards |         Purpose         |   Card Number    | tranStatus | tranStatusReason | ECI |     Authentication Token     |
|------------|-------------------------|------------------|------------|------------------|-----|------------------------------|
| Mastercard | Frictionless            | 2223000000000023 | Y          | -                | 02  | xgQYYgZVAAAAAAAAAAAAAAAAAAAA |
|            | Challenged-(OTP HTML)   | 5123450000000008 | C          | -                | -   | -                            |
|            | Challenged-(OTP Native) | 2223000000000007 | C          | -                | -   | -                            |
|            | Not Authenticated       | 5111111111111118 | N          | 01               | 0-  | -                            |

## FAQs {#faqs}

The gateway returns error messages from the authentication servers. You can use error messages to identify which fields are causing your integration to break when an authentication request is sent. For example,

* Error Message:  
  An authentication scheme indicates that your acquirer does not onboard the authentication scheme for EMV 3-D Secure. Contact your acquirer or Payment Service provider (PSP).
* Error Cause:  
  Before you can start using the EMV 3-D Secure functionality, your acquirer needs to onboard you with the respective authentication scheme. Contact your acquirer or PSP to check these values.
You can see the authentication details in the Merchant Administrator only when the payer authentication is complete. If the payer is still going through the challenge flow or abandons the process, there can be a delay before that transaction is visible on the Merchant Administration.

To see the current state of the authentication without delay, use the [RETRIEVE ORDER](https://developer.mastercard.com/mastercard-gateway/documentation/api-reference/v100/rest/api-ops/index.md#transaction) or [RETRIEVE TRANSACTION](https://developer.mastercard.com/mastercard-gateway/documentation/api-reference/v100/rest/api-ops/index.md#transaction) operation.
