Refund Fetch API
The following endpoint retrieves list of all Refunds created
/refunds
Query parameters
Following are the parameters to be sent:
Field | is required? | Description |
---|---|---|
from | optional | integer Timestamp (in Unix format) from when the refunds should be fetched |
to | optional | integer Timestamp (in Unix format) up till when refunds are to be fetched |
skip | optional | integer The number of refunds to be skipped. The default value is 0. This can be used for pagination, in combination with count |
limit | optional | integer Number of refunds to be fetched. Default value is 25. This can be used for pagination, in combination with the skip parameter |
Example
curl -X GET \
'https://api.durianpay.id/v1/refunds?skip=0&limit=10&search=&from=2021-01-19&to=2021-12-19&filter=%5B%5D' \
-H 'authorization: [Base64({Your_Server_Key}:)]' \
-H 'content-type: application/json' \
Response Code : 200
Here is an example of success response
{
"data": {
"refund": [
{
"id": "rfn_lCs4X0M9gB0135",
"merchant_id": "mer_MsCtIPhqRc8045",
"status": "approved",
"disbursement_id": null,
"total_amount": "10000.00",
"created_at": "2021-06-29T15:43:49.998179Z",
"updated_at": "2021-06-29T15:43:54.634024Z",
"approved_at": "2021-06-29T15:43:54.634024Z",
"payment_id": "pay_jkQXIs4Zhw7801",
"refund_ref_id": null,
"is_live": false,
"type": "instant",
"order_id": "",
"customer_id": "cus_0lyb30V7O16812",
"refund_partial": "partial",
"refund_notes": "",
"payment_paid_amount": "",
"payment_details_type": "",
"payment_method_id": "",
"customer_name": "Ar",
"customer_email": "arifiseng@gmail.com",
"customer_phone": "8572281712",
"destination": null,
"ewallet_name": null,
"account_name": null,
"account_number": null,
"created_by": 50,
"created_by_name": "Arif Bud",
"updated_by": 50,
"updated_by_name": "Arif Bud",
"history": null,
"source": "",
"allow_retrigger": false
},
{
"id": "rfn_10rCPdp09a3775",
"merchant_id": "mer_MsCtIPhqRc8045",
"status": "approved",
"disbursement_id": null,
"total_amount": "10000.00",
"created_at": "2021-06-29T14:47:41.204717Z",
"updated_at": "2021-06-29T14:47:46.704391Z",
"approved_at": "2021-06-29T14:47:46.704391Z",
"payment_id": "pay_jkQXIs4Zhw7801",
"refund_ref_id": null,
"is_live": false,
"type": "instant",
"order_id": "",
"customer_id": "cus_0lyb30V7O16812",
"refund_partial": "partial",
"refund_notes": "",
"payment_paid_amount": "",
"payment_details_type": "",
"payment_method_id": "",
"customer_name": "Ar",
"customer_email": "arifiseng@gmail.com",
"customer_phone": "8572281712",
"destination": null,
"ewallet_name": null,
"account_name": null,
"account_number": null,
"created_by": 50,
"created_by_name": "Arif Bud",
"updated_by": 50,
"updated_by_name": "Arif Bud",
"history": null,
"source": "",
"allow_retrigger": false
}
],
"total_data": 2
}
}
Error Response Code : 400
Here is an example error response for invalid request
{
"error": "invalid skip and limit parameter",
"error_code": "DPAY_INVALID_REQUEST",
"request_id": "dp_Ue6hHUM6TB1425"
}
Error Response Code : 401
Here is an example error response for unauthorized access
{
"error": "invalid Authorization header in request",
"error_code": "DPAY_UNAUTHORIZED_ACCESS"
}