v1

latestOpenAPI 3.1.02026-07-26500375.1 KB

Create Refund

The following endpoint creates an Refund.

post/refunds

Request body

ref_idstring required

Merchant refund reference id. Example: "ref_reference_123"

payment_idstring required

Durianpay payment id used to create refund. Example: "pay_ttqs62k99s"

amountstring required

The refund amount requested. Example: "10000" or "10000.23" for amount with decimal value

notesstring

The refund note. Example: "rejected product"

Response

200

Example response

{
  "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"
  }
}