If you need to automatically charge a commission fee against your partners or your own platform each time transactions happen, Platform Fee might be the right feature for you.
Please be informed that the application of Fee Rule currently is not able to be facilitated through Dashboard and would need to be done via API.
Here is the tutorial to use Fee Rule to charge Platform Fee:
1. Fee Rule Creation via API
Fee Rule is a feature from xenPlatform that allows you to automatically charge a commission fee (Platform Fee) each time a transaction happens on your partners’ sub accounts, or on your platform.
Follow the tutorial on this link to create a Fee Rule:
https://developers.xendit.co/api-reference/#create-fee-rule
- The endpoint that will be used is as follows:
POST https://api.xendit.co/fee_rules
- Make sure that you have inputted the correct Master Account’s API Key on the right place;
- Input the name of your fee rule on the request body under parameter "name";
- Input the unit of your commission fee on the request body under parameter "unit", under “routes”;
- Input “percent” if your commission fee will be applied based on a certain percentage of the total transaction amount;
- Input “flat” if your commission fee will be applied on a set amount regardless of the total transaction amount;
- Input the amount of your commission fee on the request body under parameter "amount", under “routes”;
- Input the percentage in numbers if your unit of fee rule is “percent”
- Input the flat amount in numbers if your unit of fee rule is “flat”
- Input either “IDR” or “PHP” on the body request under parameter "currency", based upon your national currency;
- Input the BID to which the commission fee is going to be settled on the body request under parameter "destination_account_id", under “routes”
- If this parameter is not inputted the platform fee will be settled to your master account by default
- Click Send;
Here is the tutorial video for Fee Rule creation to charge a flat commission fee per transaction that happened on sub account, to be settled into the master account:
Here is the tutorial video for Fee Rule creation to charge a percentage of the amount of transaction happened on master account, to be settled into a sub account:
2. Application of Fee Rule via API to Charge Platform Fee
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-fee-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 platform fee will be charged from transactions made by your master account by default
- Copy the ID from fee 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 > Platform Fee > Fee 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 > Platform Fee > Fee Rules
- Paste the Fee Rule ID on header, under parameter "with-fee-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, either on:
Here is the tutorial video for platform fee routing for transaction that happened on sub account, to be settled into the master account:
Here is the tutorial video for platform fee routing for transaction that happened on master account, to be settled into the sub account: