API reference
Refunds
The Refund object and the /v1/refunds endpoints.
The Refund object
| Field | Type | Description |
|---|---|---|
id | string | re_… |
object | "refund" | |
payment_id | string | The refunded payment |
amount | integer | Minor units |
currency | LKR | USD | Same as the payment |
status | enum | requires_approval, pending, processing, succeeded, failed, canceled |
reason | string | null | Your note |
failure_message | string | null | Why the acquirer rejected it |
approval_request_id | string | null | Set when the refund needed approval |
created_at | timestamp | |
succeeded_at | timestamp | null |
Create a refund
POST/v1/refundsscope refunds:write
Headers: Idempotency-Key (recommended).
| Body parameter | Type | Description |
|---|---|---|
payment_id | string, required | A succeeded or partially_refunded payment |
amount | integer | Minor units; default = everything still refundable |
reason | string ≤ 500 |
curl https://beta.api.epay.lk/v1/refunds \
-H "Authorization: Bearer $EPAY_SECRET_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: refund-1042-1" \
-d '{ "payment_id": "pay_8Hq2LxV0cT4mZr7N", "amount": 25000 }'{
"id": "re_5Tn0QeK8dW1pXy3B",
"object": "refund",
"payment_id": "pay_8Hq2LxV0cT4mZr7N",
"amount": 25000,
"currency": "LKR",
"status": "succeeded",
"reason": null,
"failure_message": null,
"approval_request_id": null,
"created_at": "2026-11-23T08:02:11.000Z",
"succeeded_at": "2026-11-23T08:02:12.000Z"
}Refunds above the approval threshold (default LKR 100,000.00) return status: "requires_approval".
Errors: 400 parameter_missing (payment_id), 400 payment_not_refundable, 400 refund_exceeds_payment, 404 resource_missing, 422 idempotency_key_reused.
Retrieve a refund
GET/v1/refunds/:idscope refunds:read
curl https://beta.api.epay.lk/v1/refunds/re_5Tn0QeK8dW1pXy3B -H "Authorization: Bearer $EPAY_SECRET_KEY"List refunds
GET/v1/refundsscope refunds:read
| Query parameter | Description |
|---|---|
payment_id | Only refunds of this payment |
limit | 1–100, default 20 |
cursor | From next_cursor |
curl "https://beta.api.epay.lk/v1/refunds?payment_id=pay_8Hq2LxV0cT4mZr7N" -H "Authorization: Bearer $EPAY_SECRET_KEY"Returns a list of Refund objects, newest first.

