Create a credit or debit transaction with the seller's MCC

⚠️

To submit a Split de Pagamento transaction via Gateway de Pagamento, send the Payment.DoSplit parameter as true and add the Payment.SplitPayments node.

Some business activities performed by merchants require sending specific information for transaction authorization. In this case, the merchant is considered the main participant in the transaction.

For cases that require using a specific business activity for transaction authorization, request an analysis from Split de Pagamento Support to work with the main merchant.

After the functionality is enabled, you must send the MainSubordinateMerchantId property in the SplitTransaction node.

ℹ️

This type of transaction can only have one merchant.

The following example shows how to create a credit card transaction with the main merchant.

ℹ️

Debit card transaction with the merchant's MCC

Send Payment.Type as DebitCard and, instead of the PaymentCreditCard node, send the Payment.DebitCard node.

Request

EnvironmentMethodEndpoint
Sandboxhttps://apisandbox.braspag.com.br/v2/sales
Productionhttps://api.braspag.com.br/v2/sales
{  
   "MerchantOrderId":"2017051002",
   "Customer":{  
      "Name":"Nome do Comprador",
      "Identity":"12345678909",
      "IdentityType":"CPF",
      "Email":"[email protected]",
      "Birthdate":"1991-01-02",
      "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",
      "DoSplit":true,
      "CreditCard":{  
         "CardNumber":"4481530710186111",
         "Holder":"Nome do Portador",
         "ExpirationDate":"12/2021",
         "SecurityCode":"123",
         "Brand":"Master",
         "SaveCard":"true",
         "Alias":"teste123",
         "CardOnFile":{
            "Usage": "Used",
            "Reason":"Unscheduled"
         }
      },
      "ExtraDataCollection":[  
         {  
            "Name":"Nome do Comprador",
            "Value":"Valor"
         }
      ],
       "Splitpayments": [
            {
                "SubordinateMerchantId": "328C41CA-2478-44D3-AB2F-7A801639A8EA",
                "Amount": 10000,
                "Fares": {
                    "Mdr": 5,
                    "Fee": 30
                }
            }
        ]
        ,
        "SplitTransaction":{
            "MainSubordinateMerchantId": "328C41CA-2478-44D3-AB2F-7A801639A8EA"
        }
   }
}

Below are the details of the request parameters:

Property (Header)TypeSizeRequiredDescription
MerchantIdGuid36YesMerchant identifier in Split de Pagamento
MerchantKeyText40YesPublic key for dual authentication in Split de Pagamento
Content-TypeHeader40YesApplication/json
PROPERTYTYPESIZEREQUIREDDESCRIPTION
SplitTransaction.MainSubordinateMerchantIdGUID36NoIdentification of the main merchant. Same value as SubordinateMerchantId.
Payment.TypeText100YesPayment method type. Possible values: "CreditCard" or "DebitCard".

Response

{
    "MerchantOrderId": "2017051002",
    "Customer": {
        "Name": "Nome do Comprador",
        "Identity": "12345678909",
        "IdentityType": "CPF",
        "Email": "[email protected]",
        "Birthdate": "1991-01-02",
        "Address": {
            "Street": "Alameda Xingu",
            "Number": "512",
            "Complement": "27 andar",
            "ZipCode": "12345987",
            "City": "São Paulo",
            "State": "SP",
            "Country": "BRA",
            "District": "Alphaville",
            "AddressType": "NotInformed"
        },
        "DeliveryAddress": {
            "Street": "Alameda Xingu",
            "Number": "512",
            "Complement": "27 andar",
            "ZipCode": "12345987",
            "City": "São Paulo",
            "State": "SP",
            "Country": "BRA",
            "District": "Alphaville",
            "AddressType": "NotInformed"
        }
    },
    "Payment": {
        "ServiceTaxAmount": 0,
        "Installments": 1,
        "Interest": "ByMerchant",
        "Capture": true,
        "Authenticate": false,
        "Recurrent": false,
        "CreditCard": {
            "CardNumber": "448153******6111",
            "Holder": "Nome do Portador",
            "ExpirationDate": "12/2021",
            "SaveCard": true,
            "Alias": "teste123",
            "Brand": "Visa",
            "CardOnFile": {
                "Usage": "Used",
                "Reason": "Unscheduled"
            }
        },
        "ProofOfSale": "420681",
        "AcquirerTransactionId": "0708031257406",
        "AuthorizationCode": "658591",
        "SoftDescriptor": "Mensagem",
        "SentOrderId": "20220708151256DB8D2D",
        "DoSplit": true,
        "SplitPayments": [
            {
                "SubordinateMerchantId": "328c41ca-2478-44d3-ab2f-7a801639a8ea",
                "Amount": 10000,
                "Fares": {
                    "Mdr": 5.0,
                    "Fee": 30
                },
                "Splits": [
                    {
                        "MerchantId": "328c41ca-2478-44d3-ab2f-7a801639a8ea",
                        "Amount": 9470
                    },
                    {
                        "MerchantId": "58e41291-6445-4a32-b801-c00f773ab00b",
                        "Amount": 530
                    }
                ]
            }
        ],
        "SplitTransaction": {
            "MainSubordinateMerchantId": "328c41ca-2478-44d3-ab2f-7a801639a8ea"
        },
        "PaymentId": "db1d37cb-0f57-405c-bb68-12959d9aa3ab",
        "Type": "CreditCard",
        "Amount": 10000,
        "ReceivedDate": "2022-07-08 15:12:56",
        "CapturedAmount": 10000,
        "CapturedDate": "2022-07-08 15:12:57",
        "Currency": "BRL",
        "Country": "BRA",
        "Provider": "Simulado",
        "ExtraDataCollection": [
            {
                "Name": "Nome do Comprador",
                "Value": "Valor"
            }
        ],
        "ReasonCode": 0,
        "ReasonMessage": "Successful",
        "Status": 2,
        "ProviderReturnCode": "6",
        "ProviderReturnMessage": "Operation Successful",
        "Links": [
            {
                "Method": "GET",
                "Rel": "self",
                "Href": "https://apiquerysandbox.braspag.com.br/v2/sales/db1d37cb-0f57-405c-bb68-12959d9aa3ab"
            },
            {
                "Method": "PUT",
                "Rel": "void",
                "Href": "https://apisandbox.braspag.com.br/v2/sales/db1d37cb-0f57-405c-bb68-12959d9aa3ab/void"
            }
        ]
    }
}