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:

Fieldis required?DescriptionNotes
amountmandatorystring The amount paid by the customer
payment_methodoptionalstring The payment method by which you want to calculate the MDR feesIf 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:

FieldTypeDescription
actual_amountfloatThe total amount which has been added to the topup balance
feesfloatThe amount to be paid as a service fee for the top up
total_amountfloatThe 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"
}