API reference
Payments
Start a payment, verify it, and simulate it in test mode.
Start a payment
POST/payments/initialize
Create a payment and get a hosted pay page plus a one-time account number. The same reference and amount returns the same payment. A different amount for that reference is rejected.
amountKobointegerrequired
Amount in kobo. ₦2,500 is 250000. The default minimum is 10000 (₦100).
referencestringrequired
Your unique reference, 3–100 letters, digits, or . _ : -.
customerEmailstring
Your customer's email. Optional.
customerNamestring
Your customer's name. Optional.
callbackUrlstring
Where the pay page sends the customer after they pay. http or https.
metadataobject
Returned unchanged on verify and on the webhook. 4 KB or less.
{
"amountKobo": 250000,
"reference": "order_10023",
"customerEmail": "ngozi@example.com",
"customerName": "Ngozi Eze",
"callbackUrl": "https://yourshop.ng/thanks",
"metadata": {
"orderId": "10023"
}
}{
"statusCode": 201,
"message": "Success",
"error": null,
"timestamp": 1762440000000,
"version": "v2",
"path": "/api/v1/pg/v1/payments/initialize",
"data": {
"reference": "order_10023",
"sessionId": "9f2a1c0e-4b18-4c2a-9d11-0a1b2c3d4e5f",
"status": "pending",
"amountKobo": 250000,
"pricing": {
"methods": [
"transfer"
],
"feeBearer": "business",
"rateBps": 0,
"capKobo": 0,
"baseKobo": 250000,
"feeKobo": 0,
"totalKobo": 250000,
"netKobo": 250000
},
"currency": "NGN",
"accountNumber": "9930112478",
"accountName": "CSwitch / Ngozi Eze",
"bankName": "CSwitch Test Bank (simulated)",
"expiresAt": "2026-11-06T15:30:00.000Z",
"paidAt": null,
"channel": null,
"coreStatus": null,
"settled": false,
"settlesAt": null,
"settledAt": null,
"customer": {
"name": "Ngozi Eze",
"email": "ngozi@example.com"
},
"metadata": {
"orderId": "10023"
},
"environment": "test",
"payUrl": "https://www.staging.cswitch.com/dashboard/checkout/session/9f2a1c0e-4b18-4c2a-9d11-0a1b2c3d4e5f"
}
}Verify a payment
GET/payments/verify/{reference}
Read a payment by your reference. Fulfil an order only when status is paid and amountKobo is what you charged.
referencestringrequired
The reference you sent to initialize.
{
"statusCode": 200,
"message": "Success",
"error": null,
"timestamp": 1762440000000,
"version": "v2",
"path": "/api/v1/pg/v1/payments/verify/order_10023",
"data": {
"reference": "order_10023",
"sessionId": "9f2a1c0e-4b18-4c2a-9d11-0a1b2c3d4e5f",
"status": "paid",
"amountKobo": 250000,
"pricing": {
"methods": [
"transfer"
],
"feeBearer": "business",
"rateBps": 0,
"capKobo": 0,
"baseKobo": 250000,
"feeKobo": 0,
"totalKobo": 250000,
"netKobo": 250000
},
"currency": "NGN",
"accountNumber": "9930112478",
"accountName": "CSwitch / Ngozi Eze",
"bankName": "CSwitch Test Bank (simulated)",
"expiresAt": "2026-11-06T15:30:00.000Z",
"paidAt": "2026-11-06T15:04:12.000Z",
"channel": "transfer",
"coreStatus": "skipped",
"settled": false,
"settlesAt": null,
"settledAt": null,
"customer": {
"name": "Ngozi Eze",
"email": "ngozi@example.com"
},
"metadata": {
"orderId": "10023"
},
"environment": "test",
"payUrl": "https://www.staging.cswitch.com/dashboard/checkout/session/9f2a1c0e-4b18-4c2a-9d11-0a1b2c3d4e5f"
}
}Simulate a test payment
POST/test/payments/{reference}/simulate
Test keys only. Marks the payment paid and sends payment.success. No money moves and core is not credited.
referencestringrequired
The reference of a test payment that is still open.
{
"statusCode": 200,
"message": "Success",
"error": null,
"timestamp": 1762440000000,
"version": "v2",
"path": "/api/v1/pg/v1/test/payments/order_10023/simulate",
"data": {
"reference": "order_10023",
"sessionId": "9f2a1c0e-4b18-4c2a-9d11-0a1b2c3d4e5f",
"status": "paid",
"amountKobo": 250000,
"pricing": {
"methods": [
"transfer"
],
"feeBearer": "business",
"rateBps": 0,
"capKobo": 0,
"baseKobo": 250000,
"feeKobo": 0,
"totalKobo": 250000,
"netKobo": 250000
},
"currency": "NGN",
"accountNumber": "9930112478",
"accountName": "CSwitch / Ngozi Eze",
"bankName": "CSwitch Test Bank (simulated)",
"expiresAt": "2026-11-06T15:30:00.000Z",
"paidAt": "2026-11-06T15:04:12.000Z",
"channel": "transfer",
"coreStatus": "skipped",
"settled": false,
"settlesAt": null,
"settledAt": null,
"customer": {
"name": "Ngozi Eze",
"email": "ngozi@example.com"
},
"metadata": {
"orderId": "10023"
},
"environment": "test",
"payUrl": "https://www.staging.cswitch.com/dashboard/checkout/session/9f2a1c0e-4b18-4c2a-9d11-0a1b2c3d4e5f"
}
}