Create an e-wallet payment using a decrypted card

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:

EnvironmentMethodEndpoint
Sandboxhttps://apisandbox.cieloecommerce.cielo.com.br/1/sales/
Productionhttps://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=="
    }
  }
}
PropertyTypeSizeRequiredDescription
MerchantIdGuid36YesStore identifier atCielo.
MerchantKeyText40YesPublic key for dual authentication at Cielo.
RequestIdGuid36NoRequest identifier, used when the merchant uses different servers for each GET/POST/PUT.
MerchantOrderIdText50YesOrder ID number.
Customer.NameText255NoCustomer's name.
Customer.StatusText255NoCustomer's registration status ("NEW" / "EXISTING").
Payment.TypeText100YesPayment method type.
Payment.AmountNumber15YesOrder amount in cents.
Payment.InstallmentsNumber2YesNumber of installments.
CreditCard.CardNumber.Text19YesCustomer's card number
CreditCard.SecurityCodeTexto4NãoSecurity code printed on the back of the card.
CreditCard.BrandText10YesCard brand (Visa / Master / Amex / Elo / Aura / JCB / Diners / Discover / Hipercard / Hiper).
Wallet.TypeText255YesWallet type: AndroidPay / ApplePay / SamsungPay
Wallet.WalletkeyText255YesCryptographic key representing card data. Consult the table WalletKey for more information.
Wallet.EciText3YesThe 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.CavvText255YesValidation 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"
      }
    ]
  }
}
PropertyDescriptionTypeSizeFormat
ProofOfSaleAuthorization number, identical to NSU.Text6Alphanumeric
TidTransaction ID in the acquirer.Text20Alphanumeric
AuthorizationCodeAuthorization code.Text6Alphanumeric
SoftDescriptorText to be printed on customer's invoice. Note: Does not allow special characters. Available for VISA/MASTER only.Text13Alphanumeric
PaymentIdOrder identifier field.Guid36xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
ECIEletronic Commerce Indicator. Represents how secure a transaction is.Text2E.g.: 7
StatusTransaction status.Byte***2
ReturnCodeReturn code from acquirer.Text32Alphanumeric
ReturnMessageReturn message from acquirer.Text512Alphanumeric
TypeWallet type: ApplePay, GooglePay or SamsungPayText255Alphanumeric
WalletkeyCryptographic key representing card data. Consult the table WalletKey for more information.Text255Check 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:


WalletsExample
Apple Pay9zcCAciwoTS+qBx8jWb++64eHT2QZTWBs6qMVJ0GO+AqpcDVkxGPNpOR/D1bv5AZ62+5lKvucati0+eu7hdilwUYT3n5swkHuIzX2KO80Apx/
SkhoVM5dqgyKrak5VD2/drcGh9xqEanWkyd7wl200sYj4QUMbeLhyaY7bCdnnpKDJgpOY6J883fX3TiHoZorb/QlEEOpvYcbcFYs3ELZ7QVtjxyr
O2LmPsIkz2BgNm5f+JaJUSAOectahgLZnZR+easdhghrsa/E9A6DwjMd0fDYnxjj0bQDfaZpBPeGGPFLu5YYn1IDc
Samsung PayeyJhbGciOiJSU0ExXzUiLCJraWQiOiIvam1iMU9PL2hHdFRVSWxHNFpxY2VYclVEbmFOUFV1ZUR5M2FWeHBzYXVRPS
IsInR5cCI6IkpPU0UiLCJjaGFubmVsU2VjdXJpdHlDb250ZXh0IjoiUlNBX1BLSSIsImVuYyI6IkExMjhHQ00ifQ.cCsGbqgFdzVb1jhXNR
--gApzoXH-fdafddfa-Bo_utsmDN_DuGm69Kk2_nh6txa7ML9PCI59LFfOMniAf7ZwoZUBDCY7Oh8kx3wsZ0kxNBwfy
LBCMEYzET0qcIYxePezQpkNcaZ4oogmdNSpYY-KbZGMcWpo1DKhWphDVp0lZcLxA6Q25K78e5AtarR5whN4HUAkurQ.CFjWpHkAVoLCG8q0.NcsTuauebemJXmos_mLMTyLhEHL-
p5Wv6J88WkgzyjAt_DW7laiPMYw2sqRXkOiMJLwhifRzbSp8ZgJBM25IX05dKK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