Environment | Method | Endpoint |
---|---|---|
Sandbox | post | https://apisandbox.braspag.com.br/v2/sales/ |
Production | post | https://apiquerysandbox.braspag.com.br/v2/sales/ |
Request
{
"MerchantOrderId":"2017051001",
"Customer":{
"Name":"Nome do Comprador",
"Identity":"12345678909",
"IdentityType":"CPF",
"Email":"[email protected]",
"Birthdate":"1991-01-02",
"IpAddress":"127.0.0.1",
"Address":{
"Street":"Alameda Xingu",
"Number":"512",
"Complement":"27 andar",
"ZipCode":"12345987",
"City":"São Paulo",
"State":"SP",
"Country":"BRA",
"District":"Alphaville"
},
"DeliveryAddress":{
"Street":"Alameda Xingu",
"Number":"512",
"Complement":"27 andar",
"ZipCode":"12345987",
"City":"São Paulo",
"State":"SP",
"Country":"BRA",
"District":"Alphaville"
}
},
"Payment": {
"Provider": "Cielo30",
"Type": "DebitCard",
"Amount": 10000,
"Currency": "BRL",
"Country": "BRA",
"Installments": 1,
"Capture": true,
"Authenticate": false,
"DebitCard":{
"CardNumber":"5067220000000001",
"Holder":"Nome do Portador",
"ExpirationDate":"12/2021",
"SecurityCode":"123",
"Brand":"Elo"
"CardOnFile":{
"Usage":"Used",
"Reason":"Unscheduled"
},
[...]
}
}
Property | Description | Type | Size | Required? |
---|---|---|---|---|
Payment.Provider | Name of payment method provider. Applicable to "Cielo30" only. | Text | 15 | Yes |
Payment.Type | Payment method type. In this case, "DebitCard". | Text | 100 | Yes |
Payment.Amount | Order amount in cents. | Number | 15 | Yes |
Payment.Installments | Number of installments. For this type, always use "1". | Number | 2 | Yes |
DeditCard.CardNumber | Customer's card number. | Text | 16 | Yes |
DeditCard.Holder | Name of cardholder printed on the card. | Text | 25 | Yes |
DebitCard.ExpirationDate | Expiration date printed on the card, in the MM/YYYY format. | Text | 7 | Yes |
DebitCard.SecurityCode | Security code printed on the back of the card. | Text | 4 | Yes |
DebitCard.Brand | Card brand. For this type, always use "Elo". | Text | 10 | Yes |
DebitCard.CardOnFile.Usage | "First" if the card has been stored and it is your first use. "Used" if the card has been stored and it has been used previously in another transaction. Applicable to Provider Cielo only. | Text | - | No |
DebitCard.CardOnFile.Reason | Indicates the purpose of the card storage, in case the Usage field is "Used"."Recurring" - Scheduled recurring purchase (e.g.: subscription services). "Unscheduled" - Unscheduled recurring purchase (e.g.: services apps). "Installments" - Installment through recurrence. Applicable to Provider Cielo only. | Text | - | Conditional |
Response
{
[...]
"Payment": {
"DebitCard": {
"CardNumber": "506722******0001",
"Holder": "Nome do Portador",
"ExpirationDate": "12/2021",
"SaveCard": false,
"Brand": "Elo"
"CardOnFile":{
"Usage":"Used",
"Reason":"Unscheduled"
},
"AcquirerTransactionId": "10069930690009D366FA",
"PaymentId": "21423fa4-6bcf-448a-97e0-e683fa2581ba",
"Type": "DebitCard",
"Amount": 10000,
"ReceivedDate": "2017-05-11 15:19:58",
"Currency": "BRL",
"Country": "BRA",
"Provider": "Cielo30",
"ReasonCode": 0,
"ReasonMessage": "Successful",
"Status": 2,
"ProviderReturnCode": "6",
"ProviderReturnMessage": "Operation Successful",
[...]
}
}
Property | Description | Type | Size | Format |
---|---|---|---|---|
AcquirerTransactionId | Transaction ID of the payment method provider. | Text | 40 | Alphanumeric |
ProofOfSale | Proof of sale reference. | Text | 20 | Alphanumeric |
AuthorizationCode | Authorization code from the acquirer. | Text | 300 | Alphanumeric text |
PaymentId | Order identifier field. | GUID | 36 | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
ReceivedDate | Date the transaction was received by Braspag. | Text | 19 | YYYY-MM-DD HH:mm:SS |
ReasonCode | Operation return code. | Text | 32 | Alphanumeric |
ReasonMessage | Operation return message. | Text | 512 | Alphanumeric |
Status | Transaction status. | Byte | 2 | E.g.: 1 |
ProviderReturnCode | Code returned by the payment provider (acquirer or issuer). | Text | 32 | 57 |
ProviderReturnMessage | Message returned by the payment provider (acquirer or issuer). | Text | 512 | Transaction Approved |