Create a debit transaction

ℹ️
  • Send Payment.Type as "DebitCard";
  • Send the Payment.DebitCard node;
  • Do not include the Payment.FraudAnalysis node, as the transaction does not require fraud analysis;
  • The debit transaction must be submitted for authentication. Therefore, send the Payment.ExternalAuthentication node with the data received during the 3DS authentication process. For more details on 3DS integration, visit 3DS authentication manual.

Request

AmbienteMétodoEndpoint
Sandboxhttps://apisandbox.braspag.com.br/v2/sales/
Produçãohttps://api.braspag.com.br/v2/sales/
{
  "MerchantOrderId": "202301131052",
  "Customer": {
    "Name": "Aline De Souza",
    "Identity": "12345678909",
    "IdentityType": "CPF",
    "Email": "[email protected]",
    "Birthdate": "1990-01-01",
    "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": "DebitCard",
    "DoSplit": true,
    "Amount": 10000,
    "capture": true,
    "installments": 1,
    "softdescriptor": "teste",
    "Returnurl": "https://www.UrlDeRetornoDoLojista.com.br/",
    "Authenticate": true,
    "Recurrent": false,
    "Tip": false,
    "DebitCard": {
      "CardNumber": "5200000000002151",
      "Holder": "Aline De Souza",
      "ExpirationDate": "03/2031",
      "SecurityCode": "079",
      "SaveCard": false,
      "Brand": "Master",
      "CardOnFile": {
        "Usage": "Used",
        "Reason": "Unscheduled"
      }
    },
    "ExternalAuthentication": {
      "Cavv": "AAABB2gHA1B5EFNjWQcDAAAAAAB=",
      "Xid": "Uk5ZanBHcWw2RjRCbEN5dGtiMTB=",
      "Eci": 5,
      "Version": "2",
      "ReferenceId": "a24a5d87-b1a1-4aef-a37b-2f30b91274e6"
    },
    "InitiatedTransactionIndicator": {
      "Category": "C1",
      "Subcategory": "Standingorder"
    }
  },
  "splitpayments": [
    {
      "subordinatemerchantid": "f2d6eb34-2c6b-4948-8fff-51facdd2a28f",
      "amount": 5000,
      "fares": {
        "mdr": 5,
        "fee": 30
      }
    },
    {
      "subordinatemerchantid": "9140ca78-3955-44a5-bd44-793370afef94",
      "amount": 5000,
      "fares": {
        "mdr": 4,
        "fee": 15
      }
    }
  ]
}

Below are the header properties for this request:

Header parameters:

PropertyTypeSizeRequiredDescription
Content-TypeText--Yesapplication/json
MerchantIdText36YesStore identifier at Gateway de Pagamento.
MerchantKeyText40YesPublic key for dual authentication at Gateway de Pagamento.
RequestIdText36NoStore-defined request identifier used when the merchant uses different servers for each.

Body parameters:

PropertyTypeSizeRequiredDescription
MerchantOrderIdText50YesOrder ID number.
Customer.NameText255NoCustomer's name.
Warning: Only a-z, A-Z characters are allowed. Special characters and numbers are not allowed.
Customer.IdentityText14NoCustomer's ID number.
Allows submission of alphanumeric CNPJs.
Customer.IdentityTypeText255Noustomer's ID document type (CPF or CNPJ).
Customer.EmailText255NoCustomer's email address.
Customer.IpAddressText45NoCustomer's IP address. IPv4 and IPv6 support.
Customer.Address.StreetText255NoCustomer's address street.
Customer.Address.NumberText15NoCustomer's contact address number.
Customer.Address.ComplementText50NoCustomer's contact address additional information.
Customer.Address.ZipCodeText9NoCustomer's contact address zip code.
Customer.Address.CityText50NoCustomer's contact address city.
Customer.Address.StateText2NoCustomer's contact address state.
Customer.Address.CountryText35NoCustomer's contact address country.
Customer.Address.DistrictText50NoCustomer's neighborhood.
Customer.DeliveryAddress.StreetText255NoDelivery address street.
Customer.DeliveryAddress.NumberText15NoDelivery address number.
Customer.DeliveryAddress.ComplementText50NoDelivery address additional information.
Customer.DeliveryAddress.ZipCodeText9NoDelivery address zip code.
Customer.DeliveryAddress.CityText50NoDelivery address city.
Customer.DeliveryAddress.StateText2NoDelivery address state.
Customer.DeliveryAddress.CountryText35NoDelivery address country.
Customer.DeliveryAddress.DistrictText50NoDelivery address neighborhood.
Payment.ProviderText15YesName of payment method provider.
Payment.TypeText100YesPayment method type. In this case, "DebitCard".
Payment.AmountNumber15YesOrder amount in cents.
Payment.InstallmentsNumber2NoNumber of installments.
Payment.ReturnUrlText1024YesURL to which the user will be redirected at the end of the payment.
Payment.TipBoolean--NoTipping is a type of transaction available for credit or debit card, tokenized or not. If "true", the transaction is identified as a tip, otherwise send Tip as "false".
DoSplitBoolean--YesIndicates whether the transaction will be split among multiple participants.
Possible values: true / false
SplitPayments.SubordinateMerchantIdText36NoMerchantId (identifier) of the seller.
SplitPayments.AmountNumber--NoGross amount of the seller's share in the transaction, in cents. The fee discount will be calculated by the Split.
SplitPayments.Fares.MdrText--NoMDR(%) of the master to be discounted from the value referring to the participation of the seller. Type: decimal.
SplitPayments.Fares.FeeNumber--NoFixed Fee(R$) to be discounted from the value referring to the participation of the seller, in cents.
Payment.DebitCard.CardNumberText16YesCustomer's card number. Size: 16.
Payment.DebitCard.HolderText25YesName of the cardholder printed on the card.
Payment.DebitCard.ExpirationDateText7YesExpiration date printed on the card, in the MM/YYYY format.
Payment.DebitCard.SecurityCodeText4YesSecurity code printed on the back of the card.
Not a required field. To process transactions without CVV, the store must have authorization from the acquirer.
Payment.DebitCard.BrandText10YesCard brand. Click here to access the list of possible values.
Payment.DebitCard.CardOnFile.UsageText--No"First" if the card has been stored and it is your first use.
"Used" if the card has been stored and it has been used previously in another transaction.
Applicable to Cielo, Rede e Safra.
Saiba mais em Card On File.
Payment.DebitCard.CardOnFile.ReasonText--NoIndicates the motive for card storage.
Valid for acquirers: Cielo, Rede e Safra.
If the CardOnFile.Usage field is “Used”.
Possible values:
- "Recurring": programmed recurring transaction (e.g. Subscriptions). If it is a recurring transaction, use Payment.Recurrent = true (merchant recurrence) or Recurrent.Payment = true (scheduled recurrence).
- "Unscheduled":recurring transaction with no fixed date (e.g. service apps).
- "Installments": installments through recurring transactions.

For the acquirer GetNet, the valid values are:
- "NewAuthorizatio": new authorization;
- "Unscheduled": unscheduled payment;
- "DelayedCharge": delayed charge;
- "Incremental": incremental payment;
- "Others": other reasons;
- "Recurring": scheduled recurrence;
- "Resubmission": resubmission;
- "NoShow": for a hotel reservation.
Find out more at Card On File.
Payment.AuthenticateBoolean--YesDefines whether the buyer will be directed to the issuer for card authentication. Yes, if the authentication is validated.
Payment.ExternalAuthentication.CavvText--YesSignature returned in successful authentication scenarios.
⚠️This field is required for transactions authenticated by the issuer or the network and for authorization requests with Data Only.
Payment.ExternalAuthentication.XidText28YesField required only when the 3DS version is “2” or higher. XID returned in the authentication process. Size: 28.
Payment.ExternalAuthentication.EciNumber2YesElectronic Commerce Indicator returned in the authentication process.
Payment.ExternalAuthentication.ReferenceIdText36YesField required only when the 3DS version is “2” or higher. RequestID returned in the authentication process. Size: 36.
* The ReferenceId is not returned in all authentications.
* Sending is recommended if the ReferenceId was returned in the script.
Payment.ExternalAuthentication.DataOnlyText--NoDefines if it is a 3DS authentication transaction of the Data Only type. Submission is required in the case of a Data Only transaction.
Payment.ExternalAuthentication.VersionText5No⚠️ Required for transactions with 3DS authentication. Version of the 3DS protocol applied in the authentication process. Possible values: - Visa and Mastercard: "2.2.0" - Elo and Amex: "2.1.0"
Payment.InitiatedTransactionIndicator.CategoryText2NoTransaction Initiator Indicator category. Valid for brands Mastercard and Hipercard.
Possible values:
- “C1”: transaction initiated by the cardholder;
- “M1”: recurring payment or installment initiated by the merchant
- “M2”: transaction initiated by the merchant.
Payment.InitiatedTransactionIndicator.SubcategoryText--NoIndicator subcategory. Valid for brands Mastercard and Hipercard.
Possible values:
If InitiatedTransactionIndicator.Category = "C1" or "M1"
CredentialsOnFile
StandingOrder
Subscription
Installment
If InitiatedTransactionIndicator.Category = "M2"
PartialShipment
RelatedOrDelayedCharge
NoShow
Resubmission
Please refer to Transaction Initiator Indicator. tables for the full list.

Response

{
    "MerchantOrderId": "30082019",
    "Customer": {
        "Name": "Comprador Accept",
        "Identity": "18160361106",
        "IdentityType": "CPF",
        "Email": "[email protected]",
        "Mobile": "5521995760078"
    },
    "Payment": {
        "DebitCard": {
            "CardNumber": "448153******6111",
            "Holder": "Yamilet Taylor",
            "ExpirationDate": "12/2019",
            "SaveCard": false,
            "Brand": "Visa"
        },
        "Authenticate": true,
        "ExternalAuthentication":{
            "Cavv":"AAABB2gHA1B5EFNjWQcDAAAAAAB=",
            "Xid":"Uk5ZanBHcWw2RjRCbEN5dGtiMTB=",
            "Eci":"5",
            "Version":"2",
            "ReferenceID":"a24a5d87-b1a1-4aef-a37b-2f30b91274e6"
        },
        "ReturnUrl": "https://www.UrlDeRetornoDoLojista.com.br/",        
        "ProofOfSale": "439387",
        "AcquirerTransactionId": "0830110439387",
        "SoftDescriptor": "teste",
        "SplitPayments": [
            {
                "SubordinateMerchantId": "f2d6eb34-2c6b-4948-8fff-51facdd2a28f",
                "Amount": 5000,
                "Fares": {
                    "Mdr": 5.0,
                    "Fee": 30
                },
                "Splits": [
                    {
                        "MerchantId": "f2d6eb34-2c6b-4948-8fff-51facdd2a28f",
                        "Amount": 4720
                    },
                    {
                        "MerchantId": "f43fca07-48ec-46b5-8b93-ce79b75a8f63",
                        "Amount": 280
                    }
                ]
            },
            {
                "SubordinateMerchantId": "9140ca78-3955-44a5-bd44-793370afef94",
                "Amount": 5000,
                "Fares": {
                    "Mdr": 4.0,
                    "Fee": 15
                },
                "Splits": [
                    {
                        "MerchantId": "9140ca78-3955-44a5-bd44-793370afef94",
                        "Amount": 4785
                    },
                    {
                        "MerchantId": "f43fca07-48ec-46b5-8b93-ce79b75a8f63",
                        "Amount": 215
                    }
                ]
            }
        ],
        "PaymentId": "5bb92d7c-4f3e-40dc-9f83-bd09c02fea38",
        "Type": "DebitCard",
        "Amount": 10000,
        "ReceivedDate": "2019-08-30 11:04:33",
        "Currency": "BRL",
        "Country": "BRA",
        "Provider": "Simulado",
        "ReasonCode": 9,
        "ReasonMessage": "Waiting",
        "Status": 0,
        "ProviderReturnCode": "1",
        "Links": [
            {
                "Method": "GET",
                "Rel": "self",
                "Href": "https://apiquerysandbox.braspag.com.br/v2/sales/5bb92d7c-4f3e-40dc-9f83-bd09c02fea38"
            },
            {
                "Method": "PUT",
                "Rel": "void",
                "Href": "https://apisandbox.braspag.com.br/v2/sales/5bb92d7c-4f3e-40dc-9f83-bd09c02fea38/void"
            }
        ]
    }
}