Skip to main content

3DS Payment

API data

API Gateway
This API is used for payment gateway operations:

Perform 3DS payment

To create a transaction that will use a debit card, send a POST request to v1/payments/3ds. Make sure the Anti-fraud and 3DS libraries are correctly implemented. See the corresponding sections in this documentation for more information.

POST /v1/payments/3ds

Via REST request with the following body:

Request
  {
"cardInfo": {
"cardholderName": "string",
"expirationMonth": "string",
"expirationYear": "string",
"numberToken": "string",
"securityCode": "string",
"encryptedCard": "string"
},
"customer": {
"documentNumber": "string",
"address": "string",
"city": "string",
"complement": "string",
"country": "string",
"email": "string",
"firstName": "string",
"ipAddress": "string",
"lastName": "string",
"mobilePhoneNumber": "string",
"phoneNumber": "string",
"state": "string",
"zipCode": "string"
},
"deviceInfo": {
"httpAcceptBrowserValue": "string",
"httpAcceptContent": "string",
"httpBrowserColorDepth": 0,
"httpBrowserJavaEnabled": "string",
"httpBrowserJavaScriptEnabled": true,
"httpBrowserLanguage": "string",
"httpBrowserScreenHeight": 0,
"httpBrowserScreenWidth": 0,
"httpBrowserTimeDifference": 0,
"ipAddress": "string",
"userAgentBrowserValue": "string"
},
"payment": {
"amount": 0,
"installments": 0,
"productType": "string",
"recurrent": true,
"transactionType": "string"
},
"referenceTransaction": "string",
"urlCallBack": "string",
"sellerInfo": {
"code3DS": "string",
"codeAntiFraud": "string",
"urlSite3DS": "string"
},
"configSplit": [
{
"documentNumberBeneficiary": "string",
"percent": 0,
"type": "string"
}
]
}

Data dictionary - Parameters

PROPERTYDESCRIPTIONTYPELOCATIONREQUIREDSIZE
Payment.TransactionTypeTransaction type.stringbodyyesfixed
Payment.AmountOrder amount (in cents).integerbodyyes10
Payment.ProductTypeProduct type – avista / lojista.stringbodyyesfixed
Payment.InstallmentsNumber of installments.integerbodyyes2
ReferenceTransactionPayment reference provided by the integrator (returned in reconciliation).stringbodyno50
UrlCallBackMerchant callback URL for the payment/3DS flow.stringbodyno500
SellerInfo.codeAntiFraudCode obtained via the anti-fraud library.guidbodyyes36
SellerInfo.code3DSCode obtained via the 3DS library.stringbodyyes36
SellerInfo.urlSite3DSMerchant site URL used for 3DS.stringbodyyes2048
ConfigSplitPayment split configuration list (splits the amount between multiple beneficiaries).arraybodyno-
ConfigSplit[].documentNumberBeneficiaryBeneficiary CPF/CNPJ (numbers only, no mask).stringbodyno14
ConfigSplit[].percentSplit percentage (0–100).decimalbodyno5,2
ConfigSplit[].typeSplit type: bruto (gross amount) or liquido (after fees).stringbodyno10
CardInfo.NumberTokenTokenized card identifier.stringbodynofixed
CardInfo.CardholderNameCardholder name printed on the card.stringbodyyes30
CardInfo.SecurityCodeSecurity code (CVV).stringbodyno4
CardInfo.BrandCard brand (optional).stringbodynofixed
CardInfo.ExpirationMonthCard expiration month (two digits).stringbodyno2
CardInfo.ExpirationYearCard expiration year (two digits).stringbodyno2
CardInfo.EncryptedCardCard data encrypted with the RSA public key obtained from /cards/public-key (safe alternative to sending card data in plain text).stringbodyno2048
Customer.DocumentNumberCustomer document number (numbers only, no mask).stringbodyno20
Customer.FirstNameCustomer first name.stringbodyno60
Customer.LastNameCustomer last name.stringbodyno60
Customer.EmailCustomer email.stringbodyno255
Customer.PhoneNumberCustomer phone number.stringbodyno15
Customer.MobilePhoneNumberCustomer mobile phone number.stringbodyno25
Customer.AddressCustomer address.stringbodyno60
Customer.ComplementAddress complement.stringbodyno60
Customer.CityCustomer city.stringbodyno50
Customer.StateCustomer state.stringbodyno2
Customer.ZipCodeCustomer ZIP/postal code.stringbodyno10
Customer.IpAddressCustomer device IP address.stringbodyno48
Customer.CountryCustomer country.stringbodyno2
DeviceInfo.httpAcceptBrowserValue3DS - Browser Accept header value (required for 3DS).stringbodyno255
DeviceInfo.httpAcceptContent3DS - Exact HTTP Accept header value (required for 3DS).stringbodyno256
DeviceInfo.httpBrowserLanguage3DS - Browser language (IETF language tag). See: https://www.techonthenet.com/js/language_tags.phpstringbodyno8
DeviceInfo.httpBrowserJavaEnabled3DS - Whether Java is enabled (Y or N).stringbodyno1
DeviceInfo.httpBrowserJavaScriptEnabled3DS - Whether JavaScript is enabled (Y or N).stringbodyno1
DeviceInfo.httpBrowserColorDepth3DS - Screen color depth in bits.stringbodyno3
DeviceInfo.httpBrowserScreenHeight3DS - Screen height in pixels.stringbodyno4
DeviceInfo.httpBrowserScreenWidth3DS - Screen width in pixels.stringbodyno4
DeviceInfo.httpBrowserTimeDifference3DS - Timezone offset in minutes between GMT and the browser.stringbodyno4
DeviceInfo.userAgentBrowserValue3DS - Exact User-Agent header value (required for 3DS).stringbodyno255
Note

Installment payments: For installment payments, use productType as lojista. For one-time payments (single installment), use avista.

Domains

PROPERTYVALUES
Payment.TransactionTypedebit
Payment.ProductTypedebito
CardInfo.Brandvisa, mastercard, amex, elo, hipercard
Customer.DocumentTypecpf, cnpj
Internal error
[ 
{
"tag": "",
"description": "Não foi possível executar comando. Erro desconhecido."
}
]

Data dictionary - Response

PROPERTYDESCRIPTIONTYPE
tagError tag.string
descriptionError description.string