Create a payment with a card token

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

The CreditCard node within the Payment node will change as shown in the example.

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": "Simulado",
      "Type": "CreditCard",
      "Amount": 10000,
      "Currency": "BRL",
      "Country": "BRA",
      "Installments": 1,
      "Interest": "ByMerchant",
      "Capture": true,
      "Authenticate": false,
      "Recurrent": false,
      "SoftDescriptor": "Mensagem",
      "CreditCard": {
         "CardToken":"250e7c7c-5501-4a7c-aa42-a33d7ad61167",
         "SecurityCode":"123",
         "Brand":"Visa"
      },
      "Credentials":{  
         "Code":"9999999",
         "Key":"D8888888",
         "Password":"LOJA9999999",
         "Username":"#Braspag2018@NOMEDALOJA#",
         "Signature":"001"
      },
      "ExtraDataCollection":[  
         {  
            "Name":"NomeDoCampo",
            "Value":"ValorDoCampo"
         }
      ]
   }
}
PropertyDescriptionTypeSizeRequired?
Payment.ProviderName of the payment method provider.Text15Yes
Payment.TypePayment method type.Text100Yes
Payment.AmountOrder amount in cents.Number15Yes
Payment.InstallmentsNumber of installments.Number2Yes
CreditCard.CardTokenCartão Protegido token, representing the card data.GUID36xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
CreditCard.SecurityCodeSecurity code printed on the back of the card. To make transactions without the CVV, you must request permission with your acquirer.Text4No
CreditCard.BrandCard brand.Text10Yes

Response

{
   [...]
   },
     "Payment":{
        "Provider":"Simulado",
        "Type":"CreditCard",
        "Amount":10000,
        "Currency":"BRL",
        "Country":"BRA",
        "Installments":1,
        "Interest":"ByMerchant",
        "Capture":true,
        "Authenticate":false,
        "Recurrent":false,
        "SoftDescriptor":"Message",
        "CreditCard":{
            "CardToken":"250e7c7c-5501-4a7c-aa42-a33d7ad61167",
            "SecurityCode":"123",
            "Brand":"Visa"
            },
    "ProofOfSale": "124305",
    "AcquirerTransactionId": "0511030124305",
    "AuthorizationCode": "065964",
    "PaymentId": "23cd8bf5-2251-4991-9042-533ff5608788",
    "Type":"CreditCard",
    "Amount":10000,
    "ReceivedDate": "2017-05-11 15:01:24",
    "Currency":"BRL",
    "Country":"BRA",
    "Provider":"Simulado",
    "ReasonCode": 0,
    "ReasonMessage": "Successful",
    "Status": 1,
    "ProviderReturnCode": "4",
    "ProviderReturnMessage": "Operation Successful",
   [...]
  }
}
PropertyDescriptionTypeSizeFormat
AcquirerTransactionIdTransaction ID of the payment method provider.Text40Alphanumeric
ProofOfSaleProof of sale reference.Text20Alphanumeric
AuthorizationCodeAuthorization code from the acquirer.Text300Alphanumeric text
PaymentIdOrder identifier field.GUID36xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
ReceivedDateDate the transaction was received by Braspag.Text19YYYY-MM-DD HH:mm:SS
ReasonCodeOperation return code.Text32Alphanumeric
ReasonMessageOperation return message.Text512Alphanumeric
StatusTransaction status.Byte2E.g.: 1
ProviderReturnCodeCode returned by the payment provider (acquirer or issuer).Text3257
ProviderReturnMessageMessage returned by the payment provider (acquirer or issuer).Text512Transaction Approved