FLEXIGIG Reseller API
Data and airtime integration reference.
These reseller endpoints and API-key generation are not live yet. Examples are proposed contracts, not working checkout links. Keep using your FLEXIGIG wallet on the website until launch.
Overview
The planned API lets approved reseller accounts place orders from their own websites. Charges come from the reseller's FLEXIGIG wallet, not directly from their customers' bank accounts. Amounts are in Nigerian naira (NGN).
Quickstart
- Create a FLEXIGIG account and secure it with a transaction PIN.
- Upgrade to a reseller and fund your wallet.
- When the API launches, generate a separate FLEXIGIG API key.
- Fetch available plans, submit a unique order reference and check its status.
Authentication
Proposed authentication uses a FLEXIGIG reseller key in the Authorization header. Store it on your server. Your PjSub token, Paystack secret and transaction PIN must never be used as a reseller API key.
Authorization: Bearer YOUR_FLEXIGIG_API_KEY\nContent-Type: application/jsonWallet balance
/api/v1/balanceRead the available wallet balance before placing an order.
Example request · cURL
curl --request GET 'https://flexigig-hub.lovable.app/api/v1/balance' \
--header 'Authorization: Bearer YOUR_FLEXIGIG_API_KEY' \
--header 'Content-Type: application/json'Illustrative response
{
"status": "success",
"balance": 15250,
"currency": "NGN"
}Data plans
/api/v1/plans?network=mtnUse the returned plan code and reseller price. PjSub plan IDs are not FLEXIGIG plan codes.
Example request · cURL
curl --request GET 'https://flexigig-hub.lovable.app/api/v1/plans?network=mtn' \
--header 'Authorization: Bearer YOUR_FLEXIGIG_API_KEY' \
--header 'Content-Type: application/json'Illustrative response
{
"status": "success",
"plans": [
{
"code": "EXAMPLE-MTN-1GB-30D",
"name": "1GB",
"validity": "30 days",
"price": 440
}
]
}Buy data
/api/v1/dataRequest a data bundle for a Nigerian mobile number. Reuse the same reference when checking this order; do not create a new purchase while the outcome is unknown.
| Field | Type | Required |
|---|---|---|
| network | string | Yes |
| plan_code | string | Yes |
| phone | string | Yes |
| reference | string | Yes |
Example request · cURL
curl --request POST 'https://flexigig-hub.lovable.app/api/v1/data' \
--header 'Authorization: Bearer YOUR_FLEXIGIG_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"network": "mtn",
"plan_code": "EXAMPLE-MTN-1GB-30D",
"phone": "08012345678",
"reference": "YOUR-UNIQUE-ORDER-REFERENCE"
}'Illustrative response
{
"status": "pending",
"reference": "YOUR-UNIQUE-ORDER-REFERENCE",
"amount": 440
}Buy airtime
/api/v1/airtimeAmount is the airtime face value in naira. The final charge must come from your account's current reseller pricing.
| Field | Type | Required |
|---|---|---|
| network | string | Yes |
| amount | number | Yes |
| phone | string | Yes |
| reference | string | Yes |
Example request · cURL
curl --request POST 'https://flexigig-hub.lovable.app/api/v1/airtime' \
--header 'Authorization: Bearer YOUR_FLEXIGIG_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"network": "mtn",
"amount": 500,
"phone": "08012345678",
"reference": "YOUR-UNIQUE-ORDER-REFERENCE"
}'Illustrative response
{
"status": "pending",
"reference": "YOUR-UNIQUE-ORDER-REFERENCE"
}Order status
/api/v1/status/YOUR-UNIQUE-ORDER-REFERENCECheck an existing order by reference. A request being accepted is not proof of delivery.
Example request · cURL
curl --request GET 'https://flexigig-hub.lovable.app/api/v1/status/YOUR-UNIQUE-ORDER-REFERENCE' \
--header 'Authorization: Bearer YOUR_FLEXIGIG_API_KEY' \
--header 'Content-Type: application/json'Illustrative response
{
"status": "success",
"reference": "YOUR-UNIQUE-ORDER-REFERENCE",
"amount": 440
}Statuses & errors
- pending
- Delivery is not confirmed. Check the existing order; never blindly resend.
- success
- The provider has confirmed delivery.
- failed
- The order failed. Verify the refund and ledger before any further action.
- refunded
- The recorded charge has been returned to the wallet.
Planned error categories: invalid credentials, insufficient balance, invalid plan or recipient, duplicate reference, unavailable service and rate limiting. Exact error codes and rate limits will be published with the live API.
Integration safety
- Never retry an unresolved purchase with a new reference.
- Use current plan prices rather than hardcoding example prices.
- Only display success after confirmed delivery.
- PjSub webhooks are currently unavailable; don't depend on them for reconciliation.
- Automatic polling, duplicate-request handling and reseller key controls must be verified before the reseller API launches.
Integration support
Send your order reference and a redacted error response. Never send a secret key or PIN.
Contact FLEXIGIG