Create a payment with e-wallet using a decrypted card
Environment | Method | Endpoint |
---|---|---|
Sandbox | post | https://apisandbox.braspag.com.br/v2/sales/ |
Production | post | https://api.braspag.com.br/v2/sales/ |
Request
{
"MerchantOrderId": "6242-642-723",
"Customer": {
"Name": "Guilherme Gama",
"Identity": "11225468954",
"IdentityType": "CPF"
},
"Payment": {
"Type": "CreditCard",
"Amount": 1100,
"Provider": "Cielo",
"Installments": 1,
"CreditCard": {
"CardNumber":"4532********6521",
"Holder":"Guilherme Gama",
"ExpirationDate":"12/2021",
"SecurityCode":"123",
"Brand":"Master"
},
"Wallet": {
"Type": "Tipo de wallet",
"Eci":"7",
"Cavv":"AM1mbqehL24XAAa0J04CAoABFA=="
}
}
}
Below is the list of request fields:
Property | Type | Size | Required | Description |
---|---|---|---|---|
MerchantId | Guid | 36 | Yes | Store identifier atCielo. |
MerchantKey | Text | 40 | Yes | Public key for dual authentication at Cielo. |
RequestId | Guid | 36 | No | Request identifier, used when the merchant uses different servers for each GET/POST/PUT. |
MerchantOrderId | Text | 50 | Yes | Order ID number. |
Customer.Name | Text | 255 | No | Customer's name. |
Customer.Status | Text | 255 | No | Customer's registration status ("NEW" / "EXISTING"). |
Payment.Type | Text | 100 | Yes | Payment method type. |
Payment.Amount | Number | 15 | Yes | Order amount in cents. |
Payment.Installments | Number | 2 | Yes | Number of installments. |
CreditCard.CardNumber. | Text | 19 | Yes | Customer's card number |
CreditCard.SecurityCode | Texto | 4 | Não | Security code printed on the back of the card. |
CreditCard.Brand | Text | 10 | Yes | Card brand (Visa / Master / Amex / Elo / Aura / JCB / Diners / Discover / Hipercard / Hiper). |
Wallet.Type | Text | 255 | Yes | Wallet type: AndroidPay / ApplePay / SamsungPay |
Wallet.Walletkey | Text | 255 | Yes | Cryptographic key representing card data. Consult the table WalletKey for more information. |
Wallet.Eci | Text | 3 | Yes | The ECI (Electronic Commerce Indicator) represents how safe a transaction is. This value must be taken into account by the merchant when deciding on capturing the transaction. |
Wallet.Cavv | Text | 255 | Yes | Validation field returned by Wallet and used as authorization basis. |
Response
{
"MerchantOrderId": "2014111703",
"Customer": {
"Name": "[Guest]"
},
"Payment": {
"ServiceTaxAmount": 0,
"Installments": 1,
"Interest": 0,
"Capture": false,
"Authenticate": false,
"Recurrent": false,
"CreditCard": {
"CardNumber": "453211******1521",
"Holder": "Gama Gama",
"ExpirationDate": "08/2020",
"SaveCard": false,
"Brand": "Visa"
},
"Tid": "0319040817883",
"ProofOfSale": "817883",
"AuthorizationCode": "027795",
"Wallet": {
"Type": "TIPO DE WALLET",
"Eci": 0
},
"SoftDescriptor": "123456789ABCD",
"Amount": 100,
"ReceivedDate": "2018-03-19 16:08:16",
"Status": 1,
"IsSplitted": false,
"ReturnMessage": "Operation Successful",
"ReturnCode": "4",
"PaymentId": "e57b09eb-475b-44b6-ac71-01b9b82f2491",
"Type": "CreditCard",
"Currency": "BRL",
"Country": "BRA",
"Links": [
{
"Method": "GET",
"Rel": "self",
"Href": "https://apiquerysandbox.braspag.com.br/v2/sales/e57b09eb-475b-44b6-ac71-01b9b82f2491"
},
{
"Method": "PUT",
"Rel": "capture",
"Href": "https://apisandbox.braspag.com.br/v2/sales/e57b09eb-475b-44b6-ac71-01b9b82f2491/capture"
},
{
"Method": "PUT",
"Rel": "void",
"Href": "https://apisandbox.braspag.com.br/v2/sales/e57b09eb-475b-44b6-ac71-01b9b82f2491/void"
}
]
}
}
Below is the list of response fields:
Property | Type | Size | Required | Description |
---|---|---|---|---|
ProofOfSale | Authorization number, identical to NSU. | Text | 6 | Alphanumeric |
Tid | Transaction ID in the acquirer. | Text | 20 | Alphanumeric |
AuthorizationCode | Authorization code. | Text | 6 | Alphanumeric |
SoftDescriptor | Text to be printed on customer’s invoice. Note: Does not allow special characters. Available for VISA/MASTER only. | Text | 13 | Alphanumeric |
PaymentId | Order identifier field. | Guid | 36 | xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
ECI | Eletronic Commerce Indicator. Represents how secure a transaction is. | Text | 2 | E.g.: 7 |
Status | Transaction status. | Byte | - | 2 |
ReturnCode | Return code from acquirer. | Text | 32 | Alphanumeric |
ReturnMessage | Return message from acquirer. | Text | 512 | Alphanumeric |
Type | Wallet type: ApplePay| , GooglePay or SamsungPay | Text | 255 | Alphanumeric |
Walletkey | Cryptographic key representing card data. Consult the table WalletKey for more information. | Text | 255 | Check the WalletKey table |