# Split Settlement

Split Settlement is a feature that enables to define your settlement rule for a payment. This is a good solution for a merchant that need customized settlement rule such as, marketplace, platforms, franchise, business with various branches, and many more. Split Settlement will help you to manage your complex payment flows.

### Preparation <a href="#preparation" id="preparation"></a>

1. This feature only works for Aggregator Merchant, meaning that your funds are settled from acquiring to DOKU, then DOKU will forward the funds to your account.
2. You have activated the split settlement service when onboarding to DOKU. If not activated, we will settle all settlement amounts to your default bank account. You can activate split settlement service through menu **Setting > Service.**

<figure><img src="/files/NSjwRPTMtB2qBHdoNEh4" alt=""><figcaption></figcaption></figure>

3. Create new bank account on DOKU Back Office from menu **Setting  > Bank Account** and click the **Add** button, then fill the form and click Submit button.

<figure><img src="/files/aiCFRuHTdQxgaou5JACz" alt=""><figcaption></figcaption></figure>

3. We will verify your data and after the status is `Verified` then you can retrieve the `settlement_bank_account_id` from Bank Settlement ID column to put into your Split Settlement Rule
4. Split settlement currently only works for integration with:
   * Checkout
   * Direct API

Then you are good to go!

### Implementation <a href="#implementation" id="implementation"></a>

Split settlement done when payment request success. To do split settlement, please add this `additional_info.settlement` object into your payment request:

```json
{
...
    "additional_info": {
        "settlement": [
            {
                "bank_account_settlement_id": "SBA-0001-123123123",
                "value": 10,
                "type": "PERCENTAGE"
            },
            {
                "bank_account_settlement_id": "SBS-0002-321321321",
                "value": 90,
                "type": "PERCENTAGE"
            }
        ]
    }
...
}
```

<table><thead><tr><th>Parameter</th><th width="119">Type</th><th width="118">Mandatory</th><th>Description</th></tr></thead><tbody><tr><td><code>additional.info.settlement</code></td><td><code>array</code></td><td>Mandatory</td><td>Include this object to do split settlement for the transaction</td></tr><tr><td><code>additional_info.settlement[].</code><br><code>bank_account_settlement_id</code></td><td><code>string</code></td><td>Mandatory</td><td>The <code>bank_account_settlement_id</code> that you retrieved from the DOKU Back Office</td></tr><tr><td><code>additional_info.settlement[].value</code></td><td><code>string</code></td><td>Mandatory</td><td>The value of the settlement can be in IDR or percentage based on the <code>type</code> defined. If you are using <code>FIX</code> type then the value should be the exact amount. If you are using <code>PERCENTAGE</code> type then the value should be the percentage</td></tr><tr><td><code>additional_info.settlement[].type</code></td><td><code>string</code></td><td>Mandatory</td><td>The type of the splitting funds<br>Possible value: <code>FIX</code>, <code>PERCENTAGE</code></td></tr></tbody></table>

{% hint style="info" %}
Please be aware that the object names in this system are **case sensitive**. This means that "ObjectName" and "objectname" would be treated as two distinct objects. Be sure to use the exact case as specified to avoid any errors or issues in your implementation
{% endhint %}

#### Sample Usage <a href="#sample-usage" id="sample-usage"></a>

Let's assume you are using the Checkout integration. You can simply add these parameters into your API Initiate Payment:

```json
{
    "order": {
        "invoice_number": "INV-20210231-0001",
        "amount": 90000,
        "line_items": [
            {
                "name": "T-Shirt Red",
                "price": 30000,
                "quantity": 2
            },
            {
                "name": "Polo Navy",
                "price": 30000,
                "quantity": 1
            }
        ],
        "currency": "IDR",
        "callback_url": "https://merchant.com/return-url"
    },
    "payment": {
        "payment_due_date": 60,
        "payment_method_types": [
            "VIRTUAL_ACCOUNT_BCA",
            "VIRTUAL_ACCOUNT_BANK_MANDIRI",
            "VIRTUAL_ACCOUNT_BANK_SYARIAH_MANDIRI",
            "VIRTUAL_ACCOUNT_DOKU",
            "ONLINE_TO_OFFLINE_ALFA",
            "CREDIT_CARD",
            "DIRECT_DEBIT_BRI"
        ]
    },
    "customer": {
        "id": "CUST-0001",
        "name": "Anton Budiman",
        "email": "anton@example.com",
        "phone": "6285694566147",
        "address": "Menara Mulia Lantai 8",
        "country": "ID"
    },
    "additional_info": {
        "settlement": [
            {
                "bank_account_settlement_id": "SBA-0001-123123123",
                "value": 15,
                "type": "PERCENTAGE"
            },
            {
                "bank_account_settlement_id": "SBS-0002-321321321",
                "value": 85,
                "type": "PERCENTAGE"
            }
        ]
    }
}
```

***

{% hint style="success" %}
**NOTES**

The split settlement is calculated based on the Net Settlement amount, not the order amount. This means you must deduct the Total Fee from the order amount to determine the Net Settlement value.
{% endhint %}

**Here is the illustration:**

Let's assume that the `order.amount` is `Rp104,500` and the Total Fee that being charged by DOKU for this transaction is `Rp4,500` and you want to split the amount into two bank accounts with percentage of `15%` into the first bank account (`SBA-0001-123123123`) and `85%` into the second bank account (`SBA-0002-321321321`).

| Name                             | Percentage | Amount      |
| -------------------------------- | ---------- | ----------- |
| `order.amount`                   | -          | 104,500     |
| Total Fee by DOKU                | -          | 4,500       |
| **Amount that will be splitted** | **100%**   | **100,000** |
| SBA-0001-123123123               | 15%        | 15,000      |
| SBA-0002-321321321               | 85%        | 85,000      |

Therefore, the first bank account will receive `Rp15,000` and second bank account will receive `Rp85,000`.

***

### Split Settlement Information <a href="#split-settlement-information" id="split-settlement-information"></a>

You can see the split settlement bank account information from each success transaction, follow the steps given below:

1. Login to DOKU Back Office and go to **Report  > Reconciled Transaction**

<figure><img src="/files/27f9X9pKYL7myBKQzX5L" alt=""><figcaption></figcaption></figure>

2. Click the icon on the Action column at the transaction you wish to see

***

### FAQs <a href="#faqs" id="faqs"></a>

#### What if the settlement amount defined incorrectly? <a href="#what-if-the-settlement-amount-defined-incorrectly" id="what-if-the-settlement-amount-defined-incorrectly"></a>

The transaction will still be processed, but the split settlement mechanism will not be executed. The funds will settled to the primary bank account that you set in the settlement configuration.

#### Can I use this feature with hold & release settlement or custom settlement report? <a href="#can-i-use-this-feature-with-hold--release-settlement-or-custom-settlement-report" id="can-i-use-this-feature-with-hold--release-settlement-or-custom-settlement-report"></a>

Of course, you can!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.doku.com/accept-payments/finance-and-settlement/split-settlement.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
