SprintPay collection API for external websites
Use this guide when you want another website, store, mobile app, or backend to collect customer payments through SprintPay.
Production website: https://web.sprintpay.online
API base URL: https://web.sprintpay.online/api
1. What SprintPay provides
SprintPay lets an external merchant website:
- Create or show a payment page for a customer.
- Generate a virtual account for bank transfer collection.
- Verify whether a transaction has completed.
- Receive a webhook / fund notification on the merchant's configured callback URL.
You identify your merchant account with your webkey (key). Keep this key server-side where possible.
2. Basic integration flow
Customer checks out on your website
↓
Your backend creates a unique reference (`ref`)
↓
Your website redirects customer to SprintPay payment page
OR your backend requests dynamic virtual account details
↓
Customer pays into the account shown by SprintPay
↓
SprintPay confirms payment and credits the merchant wallet
↓
SprintPay calls your configured fund URL / webhook
↓
Your backend verifies the transaction reference
3. Required merchant setup
Before collecting payments:
| Item | Description |
|---|---|
key |
Your public SprintPay webkey from Settings → Webkeys. |
| Fund URL | Your backend webhook URL where SprintPay should notify completed payments. |
| Verify URL | Optional URL used by your website to verify / redirect customers. |
| SprintPay webhook secret | Secret used when SprintPay calls your fund URL and for other authenticated merchant APIs. |
Your webkey must be active.
4. Option A — Redirect customer to SprintPay payment page
This is the simplest integration. Build a URL and redirect the customer.
Endpoint
GET https://web.sprintpay.online/pay?amount={amount}&key={key}&ref={ref}&email={email}
Query parameters
| Field | Required | Description |
|---|---|---|
amount |
Yes | Amount in Naira, e.g. 5000. |
key |
Yes | Your SprintPay webkey. |
ref |
Yes | Your unique transaction/order reference. Do not reuse refs. |
email |
Recommended | Customer email. |
Example
https://web.sprintpay.online/pay?amount=5000&key=YOUR_WEBKEY&ref=ORDER-10001&email=customer@example.com
Your customer sees SprintPay's payment page and follows the instructions to pay.
5. Option B — Create a payment link through API
Your backend can ask SprintPay to generate the payment page URL.
Endpoint
POST https://web.sprintpay.online/api/pay
Content-Type: application/json
Request body
{
"key": "YOUR_WEBKEY",
"amount": 5000,
"email": "customer@example.com",
"ref": "ORDER-10001"
}
Success response
{
"status": true,
"data": "https://web.sprintpay.online/pay?amount=5000&key=YOUR_WEBKEY&ref=ORDER-10001&email=customer@example.com"
}
Redirect the customer to the URL in data.
6. Option C — Get a dynamic virtual account by API
Use this if you want to show account details directly on your own checkout page instead of redirecting to SprintPay.
Endpoint
POST https://web.sprintpay.online/api/get-account/wvn
Content-Type: application/json
Request body
{
"key": "YOUR_WEBKEY",
"email": "customer@example.com",
"amount": 5000,
"ref": "ORDER-10001"
}
Success response
{
"status": true,
"account_no": "8897582852",
"account_name": "Payment YourSite",
"bank_name": "Nomba",
"amount_to_pay": 5100
}
Show account_no, account_name, bank_name, and amount_to_pay to the customer.
The amount to pay can include the merchant/customer fee configured on SprintPay.
7. Option D — Create a static virtual account
Use a static virtual account when you want a reusable account for a customer.
Endpoint
POST https://web.sprintpay.online/api/virtual-account/static
Content-Type: application/json
Request body
{
"key": "YOUR_WEBKEY",
"email": "customer@example.com",
"account_name": "John Doe",
"bank": "nomba"
}
bank can be:
| Value | Provider |
|---|---|
palmpay |
PalmPay |
nomba |
Nomba |
Success response
{
"status": true,
"message": "Virtual account created successfully.",
"data": {
"account_name": "John Doe - YourSite",
"account_number": "7409563864",
"bank_name": "Nomba",
"status": "Active",
"type": "static"
}
}
8. Verify payment status
After showing a payment page or virtual account, your backend should verify the reference.
Endpoint
GET https://web.sprintpay.online/api/verify-transaction?ref=ORDER-10001
You can also use:
POST https://web.sprintpay.online/api/verify-transaction
Content-Type: application/json
{
"ref": "ORDER-10001"
}
Completed response
{
"status": true,
"message": "completed",
"data": {
"amount": 5000,
"ref": "ORDER-10001",
"email": "customer@example.com"
}
}
Not completed / not found
{
"status": false,
"message": "Transaction not found",
"data": {
"amount": 0,
"ref": "NA",
"email": "NA"
}
}
9. Validate your webkey
Use this to confirm a webkey and get the merchant/site name.
GET https://web.sprintpay.online/api/check-vendor?key=YOUR_WEBKEY
Success
{
"status": true,
"data": "Your Site Name"
}
10. Webhook / fund URL notification
When payment is received, SprintPay posts a notification to the fund URL configured for your webkey.
Your webhook should:
- Accept JSON
POST. - Verify the
Authorization/ webhook secret if configured. - Check that the
order_id/refhas not already been processed. - Mark the order as paid on your website.
- Return HTTP
200.
Typical webhook payload
{
"amount": 5000,
"amount_settled": 4900,
"email": "customer@example.com",
"order_id": "ORDER-10001",
"session_id": "API-VACT_TRA-FF1C3...",
"account_no": "8897582852",
"event": "pay_in",
"key": "YOUR_WEBKEY"
}
Headers
SprintPay may send:
Authorization: Bearer YOUR_SPRINTPAY_WEBHOOK_SECRET
Content-Type: application/json
11. Recommended backend implementation
Create checkout
const ref = `ORDER-${Date.now()}`;
const params = new URLSearchParams({
amount: "5000",
key: process.env.SPRINTPAY_WEBKEY,
ref,
email: "customer@example.com"
});
const checkoutUrl = `https://web.sprintpay.online/pay?${params.toString()}`;
Redirect your customer to checkoutUrl.
Verify before delivering value
const res = await fetch(`https://web.sprintpay.online/api/verify-transaction?ref=${ref}`);
const data = await res.json();
if (data.status === true && data.message === "completed") {
// mark order paid and deliver value
}
Webhook handler
app.post("/sprintpay/webhook", express.json(), (req, res) => {
const auth = req.headers.authorization || "";
if (auth !== `Bearer ${process.env.SPRINTPAY_WEBHOOK_SECRET}`) {
return res.status(401).json({ status: false });
}
const payload = req.body;
const ref = payload.order_id || payload.ref || payload.session_id;
// Check idempotency: do not process the same ref twice.
// Mark your local order as paid.
return res.json({ status: true });
});
12. Error handling
| Error | What to check |
|---|---|
Invalid key / Webkey is invalid |
Confirm the key exists and is active in SprintPay. |
| Payment stays pending | Confirm the customer paid the exact account / amount and verify using ref. |
| No webhook received | Confirm fund URL is set correctly on the webkey and returns HTTP 200. |
| Duplicate order | Do not reuse ref. Always generate one unique reference per order. |
13. Quick test checklist
- Create a unique
ref. - Open
/pay?amount=...&key=...&ref=...&email=.... - Pay into the account shown.
- Confirm your fund URL receives a webhook.
- Call
/api/verify-transaction?ref=.... - Mark the order paid only after webhook or successful verify response.