Update Subaccount Fees API
This following endpoint allows master accounts to manage fees for subaccounts
Request Attributes
id
Unique identifier of the subaccount, which can be taken from the response of Register subaccount API or Fetch Subaccount API
payment_fees
Details on which payment method will be assigned with the fee, including the fee configuration. Either fixed_fee
or percentage_fee
is mandatory; you must provide one of them, but providing both is not required, If both fee presents, The fee is calculated by accumulating percentage fee (applied to the total amount before the fee) to the fixed fee.
Hide payment_fees object
Field | Type | Description |
---|---|---|
payment_method_idMandatory | string | Payment method which will be updated with the new fee. Possible values: |
fixed_feeOptional | string | Amount of the fixed fee. Example: |
percentage_feeOptional | string | Amount of the percentage fee. Example: |
disbursement_fees
Details on the configuration of disbursement fees.
Hide disbursement_fees object
Field | Type | Description |
---|---|---|
typeMandatory | string | Fee type, possible values: |
feeMandatory | string | Amount of respective fee type |
Example Request to Update Subaccount Fees API
curl -X POST \
https://api.durianpay.id/v1/merchants/subaccount/fee \
-H 'authorization: [Base64({Your_Secret_Key}:)]' \
-H 'content-type: application/json' \
-d '{
"id": "mer_x6EzWyIeVX3831",
"payment_fees": [
{
"payment_method_id": "GOPAY",
"fixed_fee": "500",
"percentage_fee": "3"
},
{
"payment_method_id": "DANA",
"fixed_fee": "1000",
"percentage_fee": "3"
}
],
"disbursement_fees": {
"type": "percentage",
"fee": "30"
}
}'
Response Code
200 - Success
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
{ "message": "Merchant Fee has been updated successfully", "data": { "id": "mer_x6EzWyIeVX3831", "payment_fees": [ { "payment_method_id": "GOPAY", "fixed_fee": "500", "percentage_fee": "3" }, { "payment_method_id": "DANA", "fixed_fee": "1000", "percentage_fee": "3" } ], "disbursement_fees": { "type": "percentage", "fee": "30" } } }
401 - invalid payment method ID
401 - Invalid disbursement fee type
500 - Internal server error