Create an e-wallet transaction using a decrypted card.
The authorization with a decrypted card occurs when the store itself decrypts the payload received from the wallet and sends it directly to the Cielo E-commerce API for processing and authorization. In this scenario, send the following request model for authorization:
Environment | Method | Endpoint |
---|---|---|
Sandbox | post | https://apisandbox.cieloecommerce.cielo.com.br/1/sales/ |
Production | post | https://api.cieloecommerce.cielo.com.br/1/sales/ |
Request
-- Envio de cartão
{
"MerchantOrderId": "Loja123456",
"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=="
}
}
}
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": "Loja123456",
"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.cieloecommerce.cielo.com.br/1/sales/e57b09eb-475b-44b6-ac71-01b9b82f2491"
},
{
"Method": "PUT",
"Rel": "capture",
"Href": "https://apisandbox.cieloecommerce.cielo.com.br/1/sales/e57b09eb-475b-44b6-ac71-01b9b82f2491/capture"
},
{
"Method": "PUT",
"Rel": "void",
"Href": "https://apisandbox.cieloecommerce.cielo.com.br/1/sales/e57b09eb-475b-44b6-ac71-01b9b82f2491/void"
}
]
}
}
Property | Description | Type | Size | Format |
---|---|---|---|---|
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 |
WalletKey Table
WalletKey is the identifier used by Cielo to decrypt payloads returned by the wallet.
The formats of WalletKey that should be passed to the Cielo E-commerce API are:
Wallets | Example |
---|---|
Apple Pay | 9zcCAciwoTS+qBx8jWb++64eHT2QZTWBs6qMVJ0GO+AqpcDVkxGPNpOR/D1bv5AZ62+5lKvucati0+eu7hdilwUYT3n5swkHuIzX2KO80Apx/ SkhoVM5dqgyKrak5VD2/drcGh9xqEanWkyd7wl200sYj4QUMbeLhyaY7bCdnnpKDJgpOY6J883fX3TiHoZorb/QlEEOpvYcbcFYs3ELZ7QVtjxyr O2LmPsIkz2BgNm5f+JaJUSAOectahgLZnZR+easdhghrsa/E9A6DwjMd0fDYnxjj0bQDfaZpBPeGGPFLu5YYn1IDc |
Samsung Pay | eyJhbGciOiJSU0ExXzUiLCJraWQiOiIvam1iMU9PL2hHdFRVSWxHNFpxY2VYclVEbmFOUFV1ZUR5M2FWeHBzYXVRPS IsInR5cCI6IkpPU0UiLCJjaGFubmVsU2VjdXJpdHlDb250ZXh0IjoiUlNBX1BLSSIsImVuYyI6IkExMjhHQ00ifQ.cCsGbqgFdzVb1jhXNR --gApzoXH-fdafddfa-Bo_utsmDN_DuGm69Kk2_nh6txa7ML9PCI59LFfOMniAf7ZwoZUBDCY7Oh8kx3wsZ0kxNBwfy LBCMEYzET0qcIYxePezQpkNcaZ4oogmdNSpYY-KbZGMcWpo1DKhWphDVp0lZcLxA6Q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