MDR Fees Calculation API
The following endpoint retrieves the calculated MDR fees for each payment method
/merchants/mdr_fees
Query Parameters
Following are the parameters to be sent in the request body:
Field | is required? | Description | Notes |
---|---|---|---|
amount | mandatory | string The amount paid by the customer | |
payment_method | optional | string The payment method by which you want to calculate the MDR fees | If left blank, the response will return calculation of all payment methods. To get a specific payment method fee, you can use any of the value listed: GOPAY , DD_CIMB , QRIS , SHOPEEPAY , OTHERS , INDOMARET , BRI , ALFAMART , JENIUSPAY , BCA , DD_BRI , CARD , BNI , OVO , DANA , MANDIRI , PERMATA , LINKAJA , DANAMON , CIMB , SYARIAH |
Response Payload
For each of the payment method we will get a key representing payment_method_id
and the value will be an object listed below:
Field | Type | Description |
---|---|---|
actual_amount | float | The total amount which has been added to the topup balance |
fees | float | The amount to be paid as a service fee for the top up |
total_amount | float | The complete amount which was paid by the customer |
Example
curl -u [Base64({Your_Server_Key}:)] \
-X GET https://api.durianpay.id/v1/merchants/mdr_fees?amount=500000&payment_method=all \
-H "content-type: application/json"'
Response Code : 200
Here is an example of success response
{
"data": {
"OVO": {
"actual_amount": 492500,
"fees": 7500,
"total_amount": 500000
},
"SHOPEEPAY": {
"actual_amount": 492500,
"fees": 7500,
"total_amount": 500000
}
}
}
Error Response Code : 401
Here is an example of error response for invalid request
{
"error": "invalid Authorization header in request"
}