API Reference · Payments
Refunds
Full or partial refunds of succeeded charges.
The refund object
Represents a refund entity in the rafiqPay system.
| Field | Type & Flags | Description |
|---|---|---|
| id | string | Unique refund ID (rfn_...). |
| chargeId | stringExpandable | ID of the original charge. |
| amount | string | Refunded Naira amount. |
| status | enum | pending | succeeded | failed. |
Example refund JSON
refund example payload
{
"id": "rfn_01J9KANZU11",
"object": "refund",
"chargeId": "pay_01J9KANZU881",
"amount": "15000.00",
"status": "succeeded"
}Endpoints & Operations
POST/v1/refundsProposed
Create a refund
Initiates a full or partial refund against a succeeded charge.
Request Example
POST /v1/refunds
cURL · v1
curl -X POST "https://api.rafiqpay.net/v1/refunds" \
-H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a" \
-H "Idempotency-Key: idem_create-refund_01" \
-H "Content-Type: application/json" \
-d '{
"chargeId": "pay_01J9KANZU881",
"amount": "15000.00",
"reason": "requested_by_customer"
}'Response (200 OK)
Response payload
{
"id": "rfn_01J9KANZU11",
"status": "succeeded",
"amount": "15000.00"
}GET/v1/refunds/:idProposed
Retrieve a refund
Retrieves a refund by ID.
Request Example
GET /v1/refunds/:id
cURL · v1
curl -X GET "https://api.rafiqpay.net/v1/refunds/:id" \
-H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a"Response (200 OK)
Response payload
{
"id": "rfn_01J9KANZU11",
"status": "succeeded",
"amount": "15000.00"
}GET/v1/refundsProposed
List refunds
Lists refunds.
Request Example
GET /v1/refunds
cURL · v1
curl -X GET "https://api.rafiqpay.net/v1/refunds" \
-H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a"Response (200 OK)
Response payload
{
"object": "list",
"data": [],
"hasMore": false,
"nextCursor": null
}Related Webhook Events
These events are dispatched to your webhook endpoints when actions occur on this resource: