Snap has various optional parameters. These optional parameters can be utilized for more advanced use cases that can help your integration. This section will explain advance features specific for Partner Solutions, other general features can be seen on this docs.
Transaction Split
With this feature, as a partner, you can split the gross amount and MDR fee of a transaction to your merchants.
GlossaryIn this context, gross amount is the amount that will be added on your withdrawable balance.
MDR fee is transaction fee that is deducted for each transaction.
You can add transaction_split_settings parameter to define how will you split the transaction.
{
...
"transaction_split_settings": {
"gross_amount_split": {
"type": "percentage",
"split_rules": [
{
"merchant_id": "G000002",
"value": "85"
},
{
"merchant_id": "G000003",
"value": "15"
}
]
},
"fee_split": {
"type": "percentage",
"split_rules": [
{
"merchant_id": "G000002",
"value": "50"
},
{
"merchant_id": "G000003",
"value": "50"
}
]
}
},
...
}| Parameter | Description | Type | Required |
|---|---|---|---|
gross_amount_split | Define the rules for splitting the transaction amount | Object | Optional*required when fee_split is not defined |
gross_amount_split.type | Type of the split, possible values are percentage and fixed | String | Required |
gross_amount_split.split_rules | Define the detail of the split | Array of Object | Required |
gross_amount_split.split_rules.*.merchant_id | Merchant ID which will receive amount of the transaction | String | Required |
gross_amount_split.split_rules.*.value | Value of the split based on type.
| String | Required |
gross_amount_split.remaining_split_receiver | Determine which merchant that get the remaining amount of transaction after distribution to list of merchant in split_rules | String | Optional*required when gross_amount_split.type is fixed. |
fee_split | Define the rules for splitting the transaction fee | Object | Optional*required when gross_amount_split is not defined |
fee_split.type | Type of the split, possible values are percentage and fixed. | String | Required |
fee_split.split_rules | Define the detail of the split | Array of Object | Required |
fee_split.split_rules.*.merchant_id | Merchant ID which will bear the transaction fee | String | Required |
fee_split.split_rules.*.value | Value of the split based on type.
| String | Required |
fee_split.remaining_split_receiver | Determine which merchant that borne the remaining fee of transaction after distribution to list of merchant in split_rules | String | Optional*required when fee_split.type is fixed. |
Things to Note
- You can split only the gross amount, only the fee, or both.
- When the
typeispercentage, the total value must be equals to 100%. - Specified
merchant_idmust be registered under your Partner setup.
Sample Calculation
With transaction amount Rp 100.000, transaction fee Rp 4.440, and this split configuration:
{
...
"transaction_split_settings": {
"gross_amount_split": {
"type": "percentage",
"split_rules": [
{
"merchant_id": "G000002",
"value": "85"
},
{
"merchant_id": "G000003",
"value": "15"
}
]
},
"fee_split": {
"type": "percentage",
"split_rules": [
{
"merchant_id": "G000002",
"value": "50"
},
{
"merchant_id": "G000003",
"value": "50"
}
]
}
},
...
}The split result will be:
- Merchant
G000002:- Receive Rp 82.780 (85% * 100.000 - 2.220)
- Bear Rp 2.220 of the fee (50% * 4.440)
- Merchant
G000003:- Receive Rp 12.780 (15% * 100.000 - 2.220)
- Bear Rp 2.220 of the fee (50% * 4.440)