- Send
Payment.Typeas "DebitCard";
- Send the
Payment.DebitCardnode;- Do not include the
Payment.FraudAnalysisnode, as the transaction does not require fraud analysis;- The debit transaction must be submitted for authentication. Therefore, send the
Payment.ExternalAuthenticationnode with the data received during the 3DS authentication process. For more details on 3DS integration, visit 3DS authentication manual.
Request
| Ambiente | Método | Endpoint |
|---|---|---|
| Sandbox | post | https://apisandbox.braspag.com.br/v2/sales/ |
| Produção | post | https://api.braspag.com.br/v2/sales/ |
{
"merchantorderid": "30082019",
"customer": {
"Name": "Comprador Accept",
"email": "[email protected]",
"Identity": "18160361106",
"identitytype": "CPF",
"Mobile": "5521995760078"
},
"payment": {
"Provider": "Simulado",
"type": "Debitcard",
"DoSplit": "True",
"amount": 10000,
"capture": true,
"installments": 1,
"softdescriptor": "teste",
"ReturnUrl": "https://www.UrlDeRetornoDoLojista.com.br/",
"DebitCard": {
"cardNumber": "4481530710186111",
"holder": "Yamilet Taylor",
"ExpirationDate": "12/2019",
"SecurityCode": "693",
"Brand": "Visa",
"SaveCard": "false"
},
"ExternalAuthentication":{
"Cavv":"AAABB2gHA1B5EFNjWQcDAAAAAAB=",
"Xid":"Uk5ZanBHcWw2RjRCbEN5dGtiMTB=",
"Eci":"5",
"Version":"2",
"ReferenceID":"a24a5d87-b1a1-4aef-a37b-2f30b91274e6"
},
"splitpayments": [
{
"subordinatemerchantid": "f2d6eb34-2c6b-4948-8fff-51facdd2a28f",
"amount": 5000,
"fares": {
"mdr": 5,
"fee": 30
}
},
{
"subordinatemerchantid": "9140ca78-3955-44a5-bd44-793370afef94",
"amount": 5000,
"fares": {
"mdr": 4,
"fee": 15
}
}
]
}
}Below are the header properties for this request:
| Property (header) | Description | Type | Size | Required |
|---|---|---|---|---|
MerchantId | Merchant identifier | GUID | 36 | Yes |
MerchantKey | Public key for dual authentication | string | 40 | Yes |
Content-Type | Application/json | string | 40 | Yes |
| Property (body) | Description | Type/Size | Required |
|---|---|---|---|
Payment.DoSplit | Indicates whether the transaction will be split among multiple participants. | Boolean ("true" / "false") | Yes |
Payment.Authenticate | Defines whether the shopper will be redirected to the issuer for card authentication. | Boolean ("true" / "false") | Yes, if the authentication is validated. |
Payment.ExternalAuthentication.Cavv | Signature returned in successful authentication scenarios. | Text | ⚠️This field is required for transactions authenticated by the issuer or brand, and for authorization requests with Data Only. |
Payment.ExternalAuthentication.Xid | XID returned during the authentication process. | Text / 28 | Field required only when the 3DS version is "2" or higher. |
Payment.ExternalAuthentication.Eci |
| Number / 1 | Sim. |
Payment.ExternalAuthentication.Version | 3DS version applied during the authentication process. Possible values: - Visa and Mastercard: "2.2.0" - Elo and Amex: "2.1.0" | Alphanumeric / 5 | Required for transactions with 3DS authentication |
Payment.ExternalAuthentication.ReferenceId | RequestID returned during the authentication process | GUID / 36 | Required only when the 3DS version is "2" or higher |
Payment.ExternalAuthentication.DataOnly | Defines whether it is a 3DS authentication transaction of the Data Only type. | Boolean ("true" / "false") | Required for Data Only transactions |
Response
{
"MerchantOrderId": "30082019",
"Customer": {
"Name": "Comprador Accept",
"Identity": "18160361106",
"IdentityType": "CPF",
"Email": "[email protected]",
"Mobile": "5521995760078"
},
"Payment": {
"DebitCard": {
"CardNumber": "448153******6111",
"Holder": "Yamilet Taylor",
"ExpirationDate": "12/2019",
"SaveCard": false,
"Brand": "Visa"
},
"Authenticate": true,
"ExternalAuthentication":{
"Cavv":"AAABB2gHA1B5EFNjWQcDAAAAAAB=",
"Xid":"Uk5ZanBHcWw2RjRCbEN5dGtiMTB=",
"Eci":"5",
"Version":"2",
"ReferenceID":"a24a5d87-b1a1-4aef-a37b-2f30b91274e6"
},
"ReturnUrl": "https://www.UrlDeRetornoDoLojista.com.br/",
"ProofOfSale": "439387",
"AcquirerTransactionId": "0830110439387",
"SoftDescriptor": "teste",
"SplitPayments": [
{
"SubordinateMerchantId": "f2d6eb34-2c6b-4948-8fff-51facdd2a28f",
"Amount": 5000,
"Fares": {
"Mdr": 5.0,
"Fee": 30
},
"Splits": [
{
"MerchantId": "f2d6eb34-2c6b-4948-8fff-51facdd2a28f",
"Amount": 4720
},
{
"MerchantId": "f43fca07-48ec-46b5-8b93-ce79b75a8f63",
"Amount": 280
}
]
},
{
"SubordinateMerchantId": "9140ca78-3955-44a5-bd44-793370afef94",
"Amount": 5000,
"Fares": {
"Mdr": 4.0,
"Fee": 15
},
"Splits": [
{
"MerchantId": "9140ca78-3955-44a5-bd44-793370afef94",
"Amount": 4785
},
{
"MerchantId": "f43fca07-48ec-46b5-8b93-ce79b75a8f63",
"Amount": 215
}
]
}
],
"PaymentId": "5bb92d7c-4f3e-40dc-9f83-bd09c02fea38",
"Type": "DebitCard",
"Amount": 10000,
"ReceivedDate": "2019-08-30 11:04:33",
"Currency": "BRL",
"Country": "BRA",
"Provider": "Simulado",
"ReasonCode": 9,
"ReasonMessage": "Waiting",
"Status": 0,
"ProviderReturnCode": "1",
"Links": [
{
"Method": "GET",
"Rel": "self",
"Href": "https://apiquerysandbox.braspag.com.br/v2/sales/5bb92d7c-4f3e-40dc-9f83-bd09c02fea38"
},
{
"Method": "PUT",
"Rel": "void",
"Href": "https://apisandbox.braspag.com.br/v2/sales/5bb92d7c-4f3e-40dc-9f83-bd09c02fea38/void"
}
]
}
}