---
page_source: https://juspay.io/in/docs/hyper-checkout/web/mandates-subscriptions/split-settlements
page_title: Split Settlements
---


# Split Settlement



Split settlements are a financial transaction mechanism designed to distribute funds from a single payment among multiple recipients or entities. This method is commonly employed in various industries, including e-commerce, travel, and marketplaces, where transactions involve multiple stakeholders or partners.

A split settlement begins with a primary transaction, typically a purchase or payment made by a customer. The total amount of this transaction is divided or split among different beneficiaries, each entitled to a specific portion of the total sum.

It’s an efficient, transparent and scalable solution, and  are particularly relevant for businesses operating in industries with complex transaction structures involving various stakeholders.

> **Note**
> Please check this [link](https://docs.juspay.in/api-reference/docs/split-settlement/split-settlement) for better information about Split Settlement



**There are two flows available in Split Settlements** 


### Flow 1 When we know the split details before the order is created


This flow will be used when we have all the necessary required information for split details before the order is created at Juspay.

To do a split settlement order along with mandates, pass the below extra parameter of the split settlement in the **Session API** and in the**Mandate Execution** call


### Payload
- **Metadata.split_settlement_details**:
  - Description: This will include the split details that need to be passed , which will include total amount to be split as well as the details regarding the split.
  - Value: {"marketplace":{"amount":0},"mdr_borne_by":"ALL","vendor":{"split":[{"amount":3,"merchant_commission":0,"sub_mid":"Vendor1"},{"amount":2,"merchant_commission":0,"sub_mid":"Vendor2"}]}}'
  - Tags: String, Mandatory





### Flow 2  When we don’t know the details of split before the order is created 


When we do not have the required information of split data in this case, this flow can be used.In Such cases, no need for sending additional details, post completion of transaction, you can call Fulfilment API to perform split settlement later. 

> **Note**
> In case of Yes_Biz or Axis_Biz, additional parameter would be required in session API callmetadata.AXIS_BIZ:splitType : “LATER”





## Sample Code Snippets:
### Top Header:

#### Split In Mandate Registration Code Snippet:

```split in mandate registration
curl --location --request POST 'https://api.juspay.in/session' \
    --header 'x-merchantid: yourMerchantId' \
    --header 'Authorization: Basic base64encodedkey==' \
    --header 'Content-Type: application/json' \
    --data-raw '{
    "amount":"10.00",
    "order_id":"yourUniqueOrderId",
    "customer_id":"yourUniqueCustId",
    "customer_phone":"9876543210",
    "customer_email":"dummyemail@gmail.com",
    "payment_page_client_id":"picasso",
    "return_url": "https://shop.merchant.com",
    "action":"paymentPage",
    "options.create_mandate":"OPTIONAL/REQUIRED",
    "mandate.max_amount":"1000.00",
    "metadata.split_settlement_details":"{\"marketplace\":{\"amount\":1},\"mdr_borne_by\":\"ALL\",\"vendor\":{\"split\":[{\"amount\":1,\"merchant_commission\":0,\"sub_mid\":\"Vendor1\"},{\"amount\":1,\"merchant_commission\":0,\"sub_mid\":\"Vendor2\"}]}}\"
}"
```

#### Split In Mandate Execution Code Snippet:

```split in mandate execution
curl --location 'https://api.juspay.in/txns' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic <base64 of key:>' \
--data-urlencode 'order.order_id=unique_order_id' \
--data-urlencode 'order.amount=1.00' \
--data-urlencode 'order.customer_id=customer_id' \
--data-urlencode 'order.metadata.split_settlement_details={\"mdr_borne_by\":\"MARKETPLACE\",\"marketplace\":{\"amount\":1999},\"vendor\":{\"split\":[{\"sub_mid\":\"powertrade\",\"amount\":7996,\"merchant_commission\":0,\"notes\":\"{\\\"note\\\":{\\\"billId\\\":\\\"65d5922b2312b56cd477644c\\\",\\\"billVersion\\\":1}}\"}]}}' \
--data-urlencode 'merchant_id=merchantid' \
--data-urlencode 'mandate_id=mandate_id' \
--data-urlencode 'mandate.execution_date=1622369936' \
--data-urlencode 'format=json'

```

### Bottom Header:

#### Fullfillment API:
```json
curl --location --request POST 'https://sandbox.juspay.in/orders/yourUniqueOrderId/fulfillment' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Postman-Token: 98866fa8-de08-4b18-b46e-1b0e73f2b00d' \
--header 'cache-control: no-cache' \
--header 'Authorization: Basic base64encodedkey==' \
--data-urlencode 'fulfillment_status=SUCCESS' \
--data-urlencode 'fulfillment_command=POST_TXN_SPLIT_SETTLEMENT' \
--data-urlencode 'split_settlement_details={"marketplace":{"amount":0},"mdr_borne_by":"ALL","vendor":{"split":[{"amount":5,"merchant_commission":0,"sub_mid":"test_sub_account_1"}]}}'
```

