Dark Mode

Update Subaccount Fees API


This following endpoint allows master accounts to manage fees for subaccounts

/merchants/subaccount/fee

Request Attributes

id

String
Mandatory

Unique identifier of the subaccount, which can be taken from the response of Register subaccount API or Fetch Subaccount API

payment_fees

Object
Optional
array json object

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

FieldTypeDescription

payment_method_idMandatory

string

Payment method which will be updated with the new fee. Possible values: BCA, BNI For the complete list of the supported payment methods and its payment_method_id (code) please refer here: Supported Payment Method

fixed_feeOptional

string

Amount of the fixed fee. Example: "1000"

percentage_feeOptional

string

Amount of the percentage fee. Example: "10"

disbursement_fees

Object
Optional
json object

Details on the configuration of disbursement fees.

Hide disbursement_fees object

FieldTypeDescription

typeMandatory

string

Fee type, possible values: fixed, percentage

feeMandatory

string

Amount of respective fee type

Example Request to Update Subaccount Fees API

Example
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