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.
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 any random CVC number, to create a successful payment.
CVV: Use any number with three digits, except for American Express whose CVV has four digits;
Expiration date (due date): Use any date in the future.