Create Refund API
Request Attributes
ref_id
String
Mandatory
Merchant refund reference id. Example: "ref_reference_123"
payment_id
String
Mandatory
Durianpay payment id used to create refund. Example: "pay_ttqs62k99s"
amount
String
Mandatory
The refund amount requested. Example: "10000"
or "10000.23"
for amount with decimal value
notes
String
Optional
The refund note. Example: "rejected product"
use_refund_link
Boolean
Optional
If use_refund_link
is true
then refund link will be sent by us to complete the refund else refund will be completed by the payment provider. Default value is false
, true
is only available for e-wallet and card as the payment method
Example
curl -X POST \
https://api.durianpay.id/v1/refunds \
-H 'authorization: [Base64({Your_Server_Key}:)]' \
-H 'content-type: application/json' \
-d '{
"ref_id": "abc",
"payment_id": "pay_IsL5nOCW4M2790",
"amount": "10000",
"use_refund_link": "true"
"notes": "rejected product"
}'
Response Code
200 - Success
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
{ "data": { "id": "rfn_qfrsL0tlnT0308", "ref_id": "reference_1", "amount": "20000.00", "refund_type": "partial", "status": "approved", "created_at": "2021-07-20T10:43:42.201587Z", "updated_at": "2021-07-20T10:43:42.401256Z", "approved_at": "2021-07-20T10:43:42.401256Z", "source": "api", "customer_name": "joe", "customer_email": "jade@sfs.com", "customer_phone": "" } }
400 - Invalid Request
401 - Unauthorized Access
403 - Invalid Request
505 - Internal Server Error