API Reference · Payments
Payments (Charges)
The canonical record of every payment attempt across Checkout, Direct Debit Mandates, and Virtual Account inflows.
The charge object
Represents a charge entity in the rafiqPay system.
| Field | Type & Flags | Description |
|---|---|---|
| id | string | Unique charge identifier (pay_...). |
| amount | string | Gross charge amount in NGN. |
| fee | string | Processing fee in NGN: 1.5% capped at ₦2,000, or 0.5% capped at ₦500 from a rafiqPay wallet. |
| net | string | What reaches your balance: amount less fee. |
| status | enum | pending | succeeded | failed | refunded. |
Example charge JSON
charge example payload
{
"id": "pay_01J9KANZU881",
"object": "charge",
"amount": "35000.00",
"fee": "525.00",
"net": "34475.00",
"status": "succeeded"
}Endpoints & Operations
GET/v1/charges/:idProposed
Retrieve a charge
Retrieves a charge by ID.
Request Example
GET /v1/charges/:id
cURL · v1
curl -X GET "https://api.rafiqpay.net/v1/charges/:id" \
-H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a"Response (200 OK)
Response payload
{
"id": "pay_01J9KANZU881",
"object": "charge",
"amount": "35000.00",
"status": "succeeded"
}GET/v1/chargesProposed
List charges
Lists charges with optional status, customerId, and date filters.
Request Example
GET /v1/charges
cURL · v1
curl -X GET "https://api.rafiqpay.net/v1/charges" \
-H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a"Response (200 OK)
Response payload
{
"object": "list",
"data": [
{
"id": "pay_01J9KANZU881",
"amount": "35000.00"
}
],
"hasMore": false,
"nextCursor": null
}GET/v1/charges/:id/ledgerProposed
Show a charge's ledger postings
Returns the immutable double-entry DEBIT and CREDIT journal lines created by this charge.
Request Example
GET /v1/charges/:id/ledger
cURL · v1
curl -X GET "https://api.rafiqpay.net/v1/charges/:id/ledger" \
-H "Authorization: Bearer rp_test_sk_kanzu_9f8a7b6c5d4e3f2a"Response (200 OK)
Response payload
{
"object": "list",
"balanced": true,
"totalDebit": "35300.00",
"totalCredit": "35300.00",
"data": []
}Related Webhook Events
These events are dispatched to your webhook endpoints when actions occur on this resource: