Decrypted card

EnvironmentMethodEndpoint
Sandboxhttps://apisandbox.braspag.com.br/v2/sales/
Productionhttps://api.braspag.com.br/v2/sales/

Authorization with a decrypted card occurs when the store itself decrypts the payload received from the wallet and sends it on its own to the Gateway de Pagamento for processing and authorization. In this scenario, send the following request model for authorization:

ℹ️

For MIT transactions, there is no need to send the cryptogram, because the token was already validated in the original CIT transaction. In other words:

  • in CIT transactions, the CAVV must be sent in the Payment.Wallet.Cavv field;
  • in MIT transactions, the CAVV must not be sent.

See more about CIT and MIT transactions at Transaction Initiator Indicator.

Request

{
  "MerchantOrderId": "6242-642-723",
  "Customer": {
    "Name": "Aline de Souza",
    "Identity": "58154781050",
    "IdentityType": "CPF"
  },
  "Payment": {
    "Type": "CreditCard",
    "Amount": 1100,
    "Provider": "Cielo",
    "Installments": 1,
    "CreditCard": {
      "CardNumber":"4091688625337641",
      "Holder":"Aline de Souza",
          "ExpirationDate":"12/2035",
          "SecurityCode":"333",
          "Brand":"Visa"
    },
    "Wallet": {
      "Type": "Tipo de wallet",
      "Eci":"7",
      "Cavv":"AM1mbqehL24XAAa0J04CAoABFA=="
    }
  }
}

Below is the list of request fields:

PropertyTypeSizeRequiredDescription
MerchantIdGuid36YesStore identifier at Braspag.
MerchantKeyText40YesPublic key for dual authentication at Braspag.
RequestIdGuid36NoRequest identifier, used when the merchant uses different servers for each GET/POST/PUT.
MerchantOrderIdText50YesOrder ID number.
Customer.NameText255NoCustomer's name.Size: 255.
Warning: Only a-z, A-Z characters are allowed. Special characters and numbers are not allowed.
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.HolderText25NoCardholder name printed on the card (cardholder). Does not accept special characters or accents. Important: the cardholder's name is provided by the wallet. If the merchant has received the cardholder's name, we recommend including it in the request to Cielo. If the merchant does not have the cardholder's name, do not send the CreditCard.Holder field or send it with a null value.
CreditCard.SecurityCodeText4NoSecurity code printed on the back of the card.
CreditCard.BrandText10YesCard brand (Visa / Master / Amex / Elo / Aura / JCB / Diners / Discover).
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": "2014111703",
  "Customer": {
    "Name": "Aline de Souza"
  },
  "Payment": {
    "ServiceTaxAmount": 0,
    "Installments": 1,
    "Interest": 0,
    "Capture": false,
    "Authenticate": false,
    "Recurrent": false,
    "CreditCard": {
      "CardNumber": "4091688625337641",
      "Holder": "Aline de Souza",
      "ExpirationDate": "12/2035",
      "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:

PropertyTypeSizeRequiredDescription
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, GooglePayorSamsungPayText255Alphanumeric
WalletkeyCryptographic key representing card data. Consult the table WalletKey for more information.Text255Check the WalletKey table