Skip to main content

Split a payment to a seller

Rootline offers next-generation splitting and routing of funds through the Payment API. Now you can:

  • Route a payment to a seller your platform;
  • Split a payment to multiple sellers;
  • Split a payment through to sub-entities of your sellers through multi-layer splits: splits nested in splits;
  • Easily interact with split payments for payment operations like refunds of fee updates;
  • Charge fees on split payments and have them reported back to you transparently.

Good to know

  • The splits array is an extension of the Payment request, and serves as a routing instruction for crediting the funds to the designated accounts;
  • The top-level account_id remains to be your own platform account's id;
  • Any amount that is not split will be credited to your platform account.

Single seller splits

Splits allow you to credit funds to your sellers, even if it concerns only one seller.

POST /payments
curl 'http://payment-api.staging.rootline.com/v1/payments' \
--request POST \
--header 'content-type: application/json' \
--header 'x-api-key: [paste-your-api-key]' \
--header 'rootline-version: 2024-04-23' \
--data '{
"account_id": "[platform-account-id]",
"reference": "your-reference",
"amount": {
"currency": "EUR",
"quantity": "10.00"
},
"return_url": "https://rootline.com/[PAYMENT_ID]",
"splits": [
{
"account_id": "[hotel-account-id]",
"amount": {
"currency": "EUR",
"quantity": "10.00"
},
"reference": "your-reference"
}
]
}'

Payment IDs

In Rootline, every split becomes a payment, each with its own unique payment_id, as can be seen from the Payment response. This design provides several key advantages over traditional split-payment implementations:

  • Since each split is treated as an individual payment, you can perform actions such as refunds, cancellations, and fee updates on each part of the split independently. Giving you full operational control of your payment operations;
  • All payments, whether the root payment or split payment, follow the same structure and behavior. This uniformity simplifies payment reporting and makes financial reconciliation more straightforward and consistent;
  • As each split has a dedicated payment_id it makes it incredibly easy to track and trace how funds are distributed across multiple parties.

Net payment balance

The way Rootline calculates the balance for an account in the payment is as follows:

From gross amounts to net amounts
+ Gross amount of the payment or payment split
- Platform fees paid to the parent payment's account
- Rootline fees (only if it concerns a Rootline partner account like your platform account)
- Split payment amounts going to downstream accounts
+ Platform revenue: fees coming in from split payments
+ Any remaining payment balance
--------------------------------------------------------------------------------------------
= Net payment balance

To illustrate, the calculation for the platform account from the Single seller splits example is:

Platform account: pmt_12HnRked1N2kTTWHomseno
+ Gross amount: 		€ 10.00
- Platform fees: € 0.00
- Rootline fees*: € 0.30
- Split amounts: € 10.00 -
+ Platform revenue: € 0.00
+ Remaining balance: € 0.00
--------------------------------------------------------------------------------------------
= Net payment balance € 0.30 -
info

As not all fees are known upon or right after payment processing, Rootline fees are reported through the settlement reports.

While the hotel-account is left with:

Hotel account: pmt_12HnRked1N2kTTWHomsenp
+ Gross amount: 		€ 10.00
- Platform fees: € 0.00
- Split amounts: € 0.00
+ Platform revenue: € 0.00
+ Remaining balance: € 0.00
--------------------------------------------------------------------------------------------
= Net payment balance € 10.00

Multiple seller splits

If you have more than one seller that the payment should be split to, simply expand the splits array and provide multiple instructions. Depending on your platform business, you can provide your splits at the same or deeper levels.

For instance, if you are a marketplace the splits will likely be on the same level, while if you are a hospitality platform you are likely to create an extra layer of splits. Consider for instance a restaurant that has tips go directly to employees. With Rootline's split payments you can scale both horizontally and vertically.

POST /payments
curl 'http://payment-api.staging.rootline.com/v1/payments' \
--request POST \
--header 'content-type: application/json' \
--header 'x-api-key: [paste-your-api-key]' \
--header 'rootline-version: 2024-04-23' \
--data '{
"account_id": "[platform-account-id]",
"reference": "your-reference",
"amount": {
"currency": "EUR",
"quantity": "10.00"
},
"return_url": "https://rootline.com/[PAYMENT_ID]",
"splits": [
{
"account_id": "[seller-shoes-account-id]",
"amount": {
"currency": "EUR",
"quantity": "7.00"
},
"reference": "your-reference"
},
{
"account_id": "[seller-shirts-account-id]",
"amount": {
"currency": "EUR",
"quantity": "3.00"
},
"reference": "your-reference"
}
]
}'

Charge platform fees

In the payment example on this page, the platform account ends up with a negative of € 0.30. Rootline enables you to earn revenue, and turn payments into a revenue driver while reporting fees and revenue transparantly on transaction level. Go the next section to learn how to charge platform fees.