Documentation
Feedback
Guides
API Reference

Guides
Integration Guides
PaymentsSplit Payouts on Payment Provider Protocol
Split Payouts on Payment Provider Protocol

Split payouts are a common requirement for payment providers used by marketplaces, since it allows marketplaces to not only process the payment for an order, but also collect their commission and pay sellers for their products. This leads to improved operational efficiency when managing payouts for a large marketplace.

The VTEX platform allows the merchant to register sellers, configure commission percentages (total order and freight values), and specific commissions by seller category. Check on Adding a Seller.

Cart Scenarios

When an order is placed, one of three scenarios are present in the cart:

  1. Products only from the Marketplace.
  2. Products from the Marketplace, and one or more sellers.
  3. Products only from seller(s).

Marketplace Products only

As the order contains products only from the Marketplace, there is no split of payment, calculation of commissioning, or split payload to be sent. The Marketplace will receive the full order payment value.

Marketplace and Sellers Products only

When an order contains products from the Marketplace and sellers (or only from sellers), a split payout is required. In this scenario, the VTEX gateway is responsible for:

  • Calculate commissioning per seller of each order.
  • Send split payload data to the payment processor.
  • Process the complete or partial refund in split operations, if required.

The split payload is sent only if the payment provider supports this scenario.

An illustrative example is shown below to explain how a calculation breakdown for split is performed:

  1. The registered commission is: a. 16% for the marketplace when buying the product from seller X. b. 20% for the marketplace when buying products from seller Y.
  2. The cart is made up of products from sellerX, sellerY, and the Marketplace itself.
  3. An Order with the value of 199.62 is registered. See below:

_23
"items": [
_23
{
_23
"id": "25807",
_23
"name": "marketplace product",
_23
"sellerId": "markeplace",
_23
"value": 69.90,
_23
"comission": 0
_23
},
_23
{
_23
"id": "29052",
_23
"name": "SellerX product",
_23
"sellerId": "sellerX",
_23
"value": 87.12,
_23
"comission": 13.94
_23
},
_23
{
_23
"id": "48760",
_23
"name": "SellerY product",
_23
"sellerId": "sellerY",
_23
"value": 42.60,
_23
"comission": 8.52
_23
}
_23
]

  1. The following containers will be sent with these values: a. 92.36 for the marketplace. b. 73.18 for seller X. c. 34.08 for seller Y.

Calculation Breakdown

IDItem ValueMarketplace ComissionRecipient
SellerX87.1213.9473.18
SellerY42.608.5234.08
Marketplace69.90-(69.90+13.94+8.52) = 92.36

Split Time Settings

It is also possible to configure the following characteristics of the split process:

  • Automatic Capture Time: The payment processor has the permission to control if the automatic capture will occur before or after approval of anti-fraud (setting the fields as delayToAutoSettle or delayToAutoSettleAfterAntifraud).

  • Split Payload Sending Time: This moment can be set according to each method of payment associated with the transaction. For processors within the PPP (Payment Provider Protocol), it can be done through setting the field on the manifest as onAuthorize, onCapture or disabled.

    If not specified by the processor, the default behavior is:

    • Credit card transaction: The sending of the split is in the capture call.
    • Transaction with boleto: The sending of the split is in the authorization call.

Split Payout Solution for Payment Provider Protocol

Our Split Payout solution consists of adding an array of objects in the Payment Provider Protocol that we call recipients.

Each item of this array informs the necessary data so that the provider can perform the split between the recipients involved in that transaction (marketplace/sellers). The following fields are part of the recipient’s object:

FieldTypeDescription
idstringRecipient identifier
namestringRecipient name
documentTypestringRecipient document type
documentstringRecipient document number
rolestringIndicates if the recipient is the seller or the marketplace
chargeProcessingFeebooleanIndicates whether or not this recipient is charged for processing fees
chargebackLiablebooleanIndicates whether or not this recipient is liable to chargebacks
amountfloatAmount due to this recipient
comissionAmountfloatAmount received by the Marketplace

Payment Protocol modifications

In this section, we will describe modifications applied to our payment protocol at each stage (e.g., authorization, capture, etc.) when the split payout is active.

Authorization Stage

For transactions where the split in authorization is enabled, we send the recipients in the authorization payload. The “recipient’s” object array contains data on the values to be passed on to each seller and the marketplace involved in the order.

See below an example of the authorization request:


_125
curl --location --request POST 'https://{{providerApiEndpoint}}/payments' \\
_125
--header 'X-VTEX-API-AppKey: {{X-VTEX-API-AppKey}}' \\
_125
--header 'X-VTEX-API-AppToken: {{X-VTEX-API-AppToken}}' \\
_125
--header 'Content-Type: application/json' \\
_125
--header 'Accept: application/json' \\
_125
--data-raw '{
_125
"value": 199.62,
_125
"reference": "22590454",
_125
"orderId": "v22590454abc",
_125
"transactionId": "888EC956B26A4F53B3A8F2D420271195",
_125
"paymentId": "FAD57B4061034026A78545DD3FC6A85D",
_125
"paymentMethod": "Visa",
_125
"merchantName": "mystore",
_125
"card": {
_125
"holder": "John Doe",
_125
"number": "4682185088924788",
_125
"csc": "021",
_125
"expiration": {
_125
"month": "06",
_125
"year": "2029"
_125
}
_125
},
_125
"currency": "BRL",
_125
"installments": 1,
_125
"deviceFingerprint": "12ade389087fe",
_125
"miniCart": {
_125
"buyer": {
_125
"id": "3287c060-2e43-4dc7-b730-4b8d2a9bd114",
_125
"firstName": "Mary",
_125
"lastName": "Rose",
_125
"document": "11112222333",
_125
"documentType": "cpf",
_125
"email": "mary.rose@example.com",
_125
"phone": "+5521978888888"
_125
},
_125
"shippingAddress": {
_125
"country": "BRA",
_125
"street": "Praia de Botafogo",
_125
"number": "300",
_125
"complement": "3rd Floor",
_125
"neighborhood": "Botafogo",
_125
"postalCode": "22250040",
_125
"city": "Rio de Janeiro",
_125
"state": "RJ"
_125
},
_125
"billingAddress": {
_125
"country": "BRA",
_125
"street": "Brigadeiro Faria Lima Avenue",
_125
"number": "4440",
_125
"complement": "10tth Floor",
_125
"neighborhood": "Itaim Bibi",
_125
"postalCode": "04538132",
_125
"city": "Rio de Janeiro",
_125
"state": "RJ"
_125
},
_125
"items": [
_125
{
_125
"id": "25807",
_125
"name": "SellerX product",
_125
"price": 71.2,
_125
"quantity": 1,
_125
"discount": 0,
_125
"categoryId": "1000097",
_125
"sellerId": "sellerX"
_125
},
_125
{
_125
"id": "29052",
_125
"name": "marketplace product",
_125
"price": 69.9,
_125
"quantity": 1,
_125
"discount": 0,
_125
"categoryId": "1000148",
_125
"sellerId": "1"
_125
},
_125
{
_125
"id": "48760",
_125
"name": "SellerY product",
_125
"price": 19.2,
_125
"quantity": 1,
_125
"discount": 0,
_125
"categoryId": "1000104",
_125
"sellerId": "SellerY"
_125
}
_125
],
_125
"shippingValue": 39.32,
_125
"taxValue": 0,
_125
"url": "<https://admin.mystore.example.com/admin/checkout/#/orders?q=v22590454abc>"
_125
},
_125
"callbackUrl": "<https://api.example.com/some-path/to-notify/status-changes?an=mystore>",
_125
"returnUrl": "<https://mystore.example.com/checkout/order/v22590454abc>",
_125
"recipients": [
_125
{
_125
"id": "mystore",
_125
"name": "Company XPTO",
_125
"documentType": "CNPJ",
_125
"document": "01239313000160",
_125
"role": "marketplace",
_125
"chargeProcessingFee": true,
_125
"chargebackLiable": true,
_125
"amount": 92.36
_125
},
_125
{
_125
"id": "sellerX",
_125
"name": "Company X",
_125
"documentType": "CNPJ",
_125
"document": "88888888000173",
_125
"role": "seller",
_125
"chargeProcessingFee": false,
_125
"chargebackLiable": false,
_125
"amount": 73.18,
_125
"commissionAmount": 13.94
_125
},
_125
{
_125
"id": "sellerY",
_125
"name": "Company Y",
_125
"documentType": "CNPJ",
_125
"document": "99.999.999/0001-26",
_125
"role": "seller",
_125
"chargeProcessingFee": false,
_125
"chargebackLiable": false,
_125
"amount": 34.08,
_125
"commissionAmount": 8.52
_125
}
_125
]
_125
}'

For transactions where the split in authorization is disabled, there are no changes in the normal authorization payload.

Capture Stage

The list of recipients involved in the transaction will be sent in this stage when the split is configured for the capture step (according to the payment method).

Split example:

  1. The registered commission is 16% for the Marketplace when buying the product from sellerA.
  2. The cart is made up of products from sellerA.
  3. An order with the value of 45.00 is registered.
  4. The following containers will be sent with these values: a. 7.2 for the marketplace. b. 37.8 for seller A.

For transactions where the split in authorization is disabled, there are no changes in the normal catch payload.

See below the capture request for this split example:


_36
curl --location --request POST 'https://{{providerApiEndpoint}}/payments/{{paymentId}}/settlements' \\
_36
--header 'X-VTEX-API-AppKey: {{X-VTEX-API-AppKey}}' \\
_36
--header 'X-VTEX-API-AppToken: {{X-VTEX-API-AppToken}}' \\
_36
--header 'Content-Type: application/json' \\
_36
--header 'Accept: application/json' \\
_36
--data-raw '{
_36
"transactionId": "D3AA1FC8372E430E8236649DB5EBD08E",
_36
"requestId": "2019-02-04T22:53:42-40000",
_36
"paymentId": "F5C1A4E20D3B4E07B7E871F5B5BC9F91",
_36
"value": 45.00,
_36
"authorizationId": "5784589",
_36
"tid": "5784589",
_36
"recipients": [
_36
{
_36
"id": "mystore",
_36
"name": "Company XPTO",
_36
"documentType": "CNPJ",
_36
"document": "05314972000174",
_36
"role": "marketplace",
_36
"chargeProcessingFee": true,
_36
"chargebackLiable": true,
_36
"amount": 7.2
_36
},
_36
{
_36
"id": "sellerA",
_36
"name": "Company ABC",
_36
"documentType": "CNPJ",
_36
"document": "24830098000172",
_36
"role": "seller",
_36
"chargeProcessingFee": true,
_36
"chargebackLiable": true,
_36
"amount": 37.8,
_36
"commissionAmount": 7.2
_36
}
_36
]
_36
}'

Complete Refund Stage

There is no change in the normal complete refund payload.

See below an example of the complete refund request:


_12
curl --location --request POST 'https://{{providerApiEndpoint}}/payments/{{paymentId}}/refunds' \\
_12
--header 'X-VTEX-API-AppKey: {{X-VTEX-API-AppKey}}' \\
_12
--header 'X-VTEX-API-AppToken: {{X-VTEX-API-AppToken}}' \\
_12
--header 'Content-Type: application/json' \\
_12
--header 'Accept: application/json' \\
_12
--data-raw '{
_12
"paymentId": "F5C1A4E20D3B4E07B7E871F5B5BC9F91",
_12
"transactionId": "D3AA1FC8372E430E8236649DB5EBD08E",
_12
"settleId": "Q5C1A4E20D3B4E07B7E871F5B5BC9F91",
_12
"value": 45.0,
_12
"requestId": "LA4E20D3B4E07B7E871F5B5BC9F91"
_12
}'

Partial Refund Stage

To allow the use of the split partial refund functionality, you must request the Partner Support team to enable the acceptSplitPartialRefund parameter as true during the payment provider homologation process.

The “recipient’s” object array will contain the sellers involved in the chargeback. If the chargeback is only applicable for Marketplace items, the “recipient’s” object array will be sent containing only the Marketplace data.

Split example of a partial refund of a seller item:

  1. Sending the array of recipient objects with the Marketplace value to be refunded and the seller value to be refunded.
  2. The registered commission is 16% for the Marketplace when buying the product from sellerA.
  3. The cart was made up of items from sellerA.
  4. The value to be refunded from sellerA item is 20.00.
  5. The following containers will be sent with these values: a. 3.2 for the marketplace. b. 16.8 for seller A.

See below the partial refund request for this split example:


_31
curl --location --request POST 'https://{{providerApiEndpoint}}/payments/{{paymentId}}/refunds' \\
_31
--header 'X-VTEX-API-AppKey: {{X-VTEX-API-AppKey}}' \\
_31
--header 'X-VTEX-API-AppToken: {{X-VTEX-API-AppToken}}' \\
_31
--header 'Content-Type: application/json' \\
_31
--header 'Accept: application/json' \\
_31
--data-raw '{
_31
"requestId": "LA4E20D3B4E07B7E871F5B5BC9F91",
_31
"settleId": "Q5C1A4E20D3B4E07B7E871F5B5BC9F91",
_31
"paymentId": "F5C1A4E20D3B4E07B7E871F5B5BC9F91",
_31
"tid": "10022005181543584603",
_31
"value": 20.00,
_31
"transactionId": "D3AA1FC8372E430E8236649DB5EBD08E",
_31
"recipients": [
_31
{
_31
"id": "mystore",
_31
"name": "Company XPTO",
_31
"documentType": "CNPJ",
_31
"document": "05314972000174",
_31
"role": "marketplace",
_31
"amount": 3.2
_31
},
_31
{
_31
"id": "sellerA",
_31
"name": "Company ABC",
_31
"documentType": "CNPJ",
_31
"document": "24830098000172",
_31
"role": "seller",
_31
"amount": 16.8
_31
}
_31
]
_31
}'

Split example of a partial refund of a Marketplace item:

  1. Sending the array of recipient objects with the Marketplace value to be refunded.
  2. The value to be refunded from the Marketplace item is 20.00.
  3. A recipient object with a value of 20.00 will be sent to the Marketplace.

See below the partial refund request for this split example:


_23
curl --location --request POST 'https://{{providerApiEndpoint}}/payments/{{paymentId}}/refunds' \\
_23
--header 'X-VTEX-API-AppKey: {{X-VTEX-API-AppKey}}' \\
_23
--header 'X-VTEX-API-AppToken: {{X-VTEX-API-AppToken}}' \\
_23
--header 'Content-Type: application/json' \\
_23
--header 'Accept: application/json' \\
_23
--data-raw '{
_23
"requestId": "LA4E20D3B4E07B7E871F5B5BC9F91",
_23
"settleId": "Q5C1A4E20D3B4E07B7E871F5B5BC9F91",
_23
"paymentId": "F5C1A4E20D3B4E07B7E871F5B5BC9F91",
_23
"tid": "10022005181543584603",
_23
"value": 20.00,
_23
"transactionId": "D3AA1FC8372E430E8236649DB5EBD08E",
_23
"recipients": [
_23
{
_23
"id": "mystore",
_23
"name": "Company XPTO",
_23
"documentType": "CNPJ",
_23
"document": "05314972000174",
_23
"role": "marketplace",
_23
"amount": 20.00
_23
}
_23
]
_23
}'

Cancellation Stage

In this version of the Split Payouts, there are no changes in the normal cancellation payload.

See below an example of the cancellation request:


_10
curl --location --request POST 'https://{{providerBaseUrl}}/payments/{{paymentId}}/cancellations' \\
_10
--header 'X-VTEX-API-AppKey: {{X-VTEX-API-AppKey}}' \\
_10
--header 'X-VTEX-API-AppToken: {{X-VTEX-API-AppToken}}' \\
_10
--header 'Content-Type: application/json' \\
_10
--header 'Accept: application/json' \\
_10
--data-raw '{
_10
"paymentId": "F5C1A4E20D3B4E07B7E871F5B5BC9F91",
_10
"requestId": "D12D9B80972C462980F5067A3A126837"
_10
}'

For more information about payment splits on VTEX, see Split Payment.

Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
On this page