This page's content:

This page explains how to add Debit Card, using 3DS 2, to your existing Direct API integration. Direct API integration is basically the same for all payment methods, only varying the payment_type_code and some additional required fields.

3D Secure 2 with EBANX Authentication

Our client SDK enables you to securely collect payment information from your customers. Add the following script to your webpage:

And initialize it with your Merchant’s Configuration:

Create an object with your order information:

Create an object with your payment information

Create an object with your customer’s information

Call the EBANX.threeDSecure.authenticate function using the objects created in previous steps . During this step, if deemed necessary by the issuing bank, additional authentication will be requested

EBANX.threeDSecure.authenticate returns a Promise object, so, make sure you handle the asynchrounous call properly by using a callback function. A successful authentication response contains the following fields. The values will vary for each authentication:

Add the 3DS Authentication values to your payment. Include the values acquired in the payments.card object in your Direct API call.

The payment_type_code must be debitcard.

Test Scenarios

Below you can find test card numbers and other information to make sure your integration is working as planned! You can use any of the following test card numbers, a valid expiration date in the future, and CVC number, to create a successful payment.

  • CVV: CVV should always be 123;
  • Expiration date (due date): Use 01/yyyy, where yyyy=current year+3; For example: if the current year is 2020, the due date should be 01/2023.
Scenario Brand Card
Authentication successful (Without challange) Visa 4000000000001000
Mastercard 5200000000001005
Elo 6505050000001000
Authentication failed (Without challange) Visa 4000000000001018
Mastercard 5200000000001015
Elo 6505050000001018
Authentication attempt failed (Without challange) Visa 4000000000001026
Mastercard 5200000000001021
Elo 6505050000001026
Authentication unavailable with Issuer Visa 4000000000001034
Mastercard 5200000000003035
Elo 6505050000001034
Authentication unavailable with Issuer (Without challange) Visa 4000000000001042
Mastercard 5200000000003043
Elo 3400000000001049
Authentication unavailable in search Visa 4000000000001059
Mastercard 5200000000003054
Elo 6505050000001059
Authentication attempt error Visa 4000000000001067
Mastercard 5200000000001062
Elo 6505050000001067
Authentication attempt timeout Visa 4000000000001075
Mastercard 5200000000001070
Elo 6505050000001075
Ignored authentication Visa 4000000000001083
Mastercard 5200000000001088
Elo 6505050000001083
Authentication successful (With challenge) Visa 4000000000001091
Mastercard 5200000000001096
Elo 6505050000001091
Authentication failed (With challenge) Visa 4000000000001109
Mastercard 5200000000001104
Elo 6505050000001109
Challenge not available Visa 4000000000001117
Mastercard 5200000000001112
Elo 6505050000001117
Authentication with error Visa 4000000000001125
Mastercard 5200000000001120 or 5200000000002011
Elo 6505050000001125
To capture payments, use the cards listed in Test Card Numbers.