Connected Accounts
Application Fees
Keep part of each charge you create for a connected account.
An application fee is the part of a charge a platform account keeps when it charges on behalf of a connected account. Set it per charge with application_fee_amount, together with the On-Behalf-Of header:
curl -X POST "https://api.kingsplatform.net/api/api/v1/payments/charges" \
-H "Authorization: Bearer YOUR_PLATFORM_API_KEY" \
-H "On-Behalf-Of: 0197a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b" \
-H "Content-Type: application/json" \
-d '{
"payment_method": "qris",
"currency": "idr",
"amount": 100000,
"application_fee_amount": 5000,
"customer_details": { "email": "[email protected]" }
}'Where the money goes
When the charge succeeds:
- The connected account receives the charge. Its
feeis the processing fee plus the application fee, and both are taken out of the amount it receives. - The platform account receives the application fee as its own balance transaction. It becomes available when the charge settles, and the platform gets an
application_fee.createdevent.
No application fee is created for a charge that does not succeed.
Rules
| Rule | Error |
|---|---|
Only allowed with On-Behalf-Of for a connected account | invalid_application_fee |
| Must be greater than 0 | invalid_application_fee_amount |
Must not exceed amount | invalid_application_fee_amount |
Together with the processing fee, must not exceed amount | invalid_application_fee_amount |