If you need to automatically charge a commission fee against your partners or your own platform each time transactions happen, Split Payment might be the right feature for you.
Limitation
- The application of Split Payment currently is not able to be facilitated through Dashboard and would need to be done via API.
- Currently, Split Rule that has been made would not be able to be deleted.
- If the Split Rule is no longer to be used, simply delete the split rule ID from the "with-split-rule" header of your API Request.
- This feature is automatically enabled for Indonesia and Philippines;
- For Thailand, Malaysia, and Vietnam, please reach out to us to activate this feature for your account!
- Make sure your master account's API Key have "Write" permission for xenPlatform > Split Payments
- Click here to learn more about API Key generation
Tutorial
You can route and split payments automatically in 2 steps
No | Steps | Descriptions |
1. | Create the fee rules |
Set your rate and routes with fee rule objects by create the fee rule via Fee rules API and retrieve the ID from the response. |
2. | Applying the with-fee-rule |
Then applying the fee rule to a specific transaction. Use the ID on with-fee-rule parameter on any Money-in charges API |
1. Split Rule Creation via API
Split Rule is a feature from xenPlatform that allows you to automatically charge a commission fee (Splits) each time a transaction happens on your partners’ sub accounts, or on your platform.
Follow the tutorial on this link to create a Split Rule:
https://developers.xendit.co/api-reference/#create-split-rule
-
The endpoint that will be used is as follows:
POST https://api.xendit.co/split_rules
- Make sure that you have inputted the correct Master Account’s API Key on the right place;
- Input the name of your split rule on the request body under parameter "name";
-
Configure your split payments on the request body under “routes”;
-
Amount
-
Input “percent_amount” if your commission fee will be applied based on a certain percentage of the total transaction amount;
- “percent_amount” have to be between 0 and 100
- Splits are rounded off to the nearest monetary unit (e.g. 0.50 IDR will be rounded to 1 IDR; 0.49 IDR will be rounded to 0 IDR)
- example: "10" for split payments amounting to 10% of the total transaction amount;
-
Input “flat_amount” if your commission fee will be applied on a set amount regardless of the total transaction amount;
- example: "10000" for split payments amounting to IDR 10,000 per transaction.
- You need to input either “percent_amount” or “flat_amount” on every "route", and not both
- You can input both “percent_amount” and “flat_amount” if it is on the different "route"
-
Input “percent_amount” if your commission fee will be applied based on a certain percentage of the total transaction amount;
-
Currency
- Input either “IDR”, “PHP”, "THB", "MYR", or "VND" on the body request under parameter "currency", based upon your national currency;
-
Destination Account
- Input the BID to which the split payment is going to be settled on the body request under parameter "destination_account_id"
- If this parameter is not inputted the platform fee will be settled to your master account by default
-
Reference
- Input a unique "reference_id" to identify the route.
- You can input up to 5 different "route" to do Split Payment to 5 different accounts.
-
Amount
-
Click Send;
- Review the detail of your Split Rule on xenPlatform Tab > Split Payment > Split Rules on Dashboard
Here is the tutorial video for Split Rule creation to charge a commission fee per transaction that happened on sub account, to be settled into the 3 different accounts, with the application of “percent_amount” and “flat_amount” on three different "route":
2. Application of Split Rule via API to Charge Splits
Follow the tutorial on this link to create the desired transaction via API;
https://developers.xendit.co/api-reference/id/
-
Look for transaction on API Reference that allows you to have “with-split-rule” parameter on the Request Header;
- Make sure that you have inputted the correct API Key of Master Account on the right place;
-
Input the Business ID of your Sub Account on header, under parameter "for-user-id";
- If this parameter is not inputted, the splits will be charged to transactions made by your master account by default
-
Copy the ID from split rule that you have created on Step 1;
-
You can find the ID either from the API Response that you have retreived from Step 1, and/or the Dashboard of your Master Account, under the menu xenPlatform > Split Payment > Split Rules
-
You can find the ID either from the API Response that you have retreived from Step 1, and/or the Dashboard of your Master Account, under the menu xenPlatform > Split Payment > Split Rules
-
Paste the Split Rule ID on header, under parameter "with-split-rule";
- Generate the transaction via API as per usual, in accordance with tutorial on the respective API Reference;
- After the transaction has passed the settlement time, you can see the Platform Fee on the Dashboard of your Master Account, under channel "SPLIT" either on:
Here is the tutorial video for platform fee routing for transaction that happened on sub account, to be settled into three different accounts: