Skip to main content

Creating session with splits

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

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 499,90 NOK, you can split the payment such that:

  • 399,90 NOK goes to the merchant
  • 70,00 NOK goes to the platform
  • 30,00 NOK is a donation to a charity
info

Dintero supports as many sellers as you need, but there might be limitations based on item amounts.

{
"order": {
"items": [
{
"splits": [
{
"payout_destination_id": "merchant",
"amount": 39990
},
{
"payout_destination_id": "platform",
"amount": 7000
},
{
"payout_destination_id": "charitable_organization",
"amount": 3000
}
]
}
]
}
}

Validating split information

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

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

Providing fee split information

The default behaviour when splits are 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": "merchant",
"amount": 39990
},
{
"payout_destination_id": "platform",
"amount": 7000
},
{
"payout_destination_id": "charitable_organization",
"amount": 3000
}
],
"fee_split": {
"type": "proportional",
"destinations": [
"platform"
]
}
}
]
}
}

info

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

Full example of creating a session

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": 49990,
"currency": "NOK",
"vat_amount": 6000,
"items": [
{
"id": "item_01",
"line_id": "1",
"description": "Stablestol",
"quantity": 1,
"amount": 49990,
"vat_amount": 9998,
"vat": 25,
"splits": [
{
"payout_destination_id": "merchant",
"amount": 39990
},
{
"payout_destination_id": "platform",
"amount": 7000
},
{
"payout_destination_id": "charitable_organization",
"amount": 3000
}
]
}
],
"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.

Capture and Refund

When capturing or refunding a split-payment you can do a full capture or full refund using only the total order amount defined in the payment session. For full captures and refunds the capture and refund operation will use the splits as defined in the payment session.

If you want to do a partial capture or a partial refund, the operation request body will also need to include the items and the splits for the items that are captured or refunded. It is also possible to use a different split from what is defined in the payment session when the items with splits are defined in the capture and refund operations. It is also possible to capture and refund asymmetrically, for instance it is possible to define that one party in the split will cover the entire refund.