Skip to main content

Creating session with splits

With Dintero Payout, you can split the funds between any number of payout destinations. For example, when a customer pays on your platform, you can split the funds so that a part goes to your own payout destination as platform fee and the sale amount goes to the sales location payout destination

Providing split information

You can provide split information:

To split the payment, you will need to include the splits array in the session order items. For each split object in the array, you need to specify the following fields:

  • payout_destination_id: The destination that will receive the split
  • amount: The split amount

For example, a customer pays for goods for 399,90 NOK, you can split the payment such that:

  • 299,90 NOK goes to one payout destination
  • 100,00 NOK goes to another payout destination
{
"order": {
"items": [
{
"splits": [
{
"payout_destination_id": "pid1",
"amount": 29990
},
{
"payout_destination_id": "pid2",
"amount": 10000
}
]
}
]
}
}

Validating split information

The Checkout service only validate the format of the split data. The payout destination in the splits will not be validated.

If you provide split data with a payout destination that does not exist or the payout destination is not approved for payout, the payout for the destination will be postponed until the issue with the payout destination has been resolved

Providing fee split information

The default behaviour when splits is used is to let the fees be shared proportional with all split destinations.

The default behaviour can be overridden by including fee_split when setting splits

Override default fee split

Example under shows how a split destination can be configured to handle the fees.

{
"order": {
"items": [
{
"splits": [
{
"payout_destination_id": "pid1",
"amount": 29990
},
{
"payout_destination_id": "pid2",
"amount": 10000
}
],
"fee_split": {
"type": "proportional",
"destinations": [
"pid1"
]
}
}
]
}
}

info

Payout destination that are excluded from fees will receive the whole amount when the payout is settled

Full example

When put together, we can call https://checkout.dintero.com/v1/sessions-profile with a payload with the following content.

If you want non-standard fee splits, see "Override default fee split" above.

{
"url": {
"return_url": "https://example.com/accept",
"callback_url": "https://example.com/callback?method=GET",
"merchant_terms_url": "https://example.com/terms.html"
},
"customer": {
"email": "john.doe@example.com",
"phone_number": "+4799999999"
},
"order": {
"amount": 29990,
"currency": "NOK",
"vat_amount": 6000,
"items": [
{
"id": "item_01",
"line_id": "1",
"description": "Stablestol",
"quantity": 1,
"amount": 29990,
"vat_amount": 6000,
"vat": 25,
"splits": [
{
"payout_destination_id": "pid1",
"amount": 19990
},
{
"payout_destination_id": "pid2",
"amount": 10000
}
]
}
],
"merchant_reference": "merchants_unique_id"
},
"profile_id": "default"
}
info

Most new accounts should have the default profile_id available. If you have an old account, go here to learn how to create one.