Developer reference

FLEXIGIG Reseller API

Data and airtime integration reference.

Coming soon · Draft documentation

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

  1. Create a FLEXIGIG account and secure it with a transaction PIN.
  2. Upgrade to a reseller and fund your wallet.
  3. When the API launches, generate a separate FLEXIGIG API key.
  4. Fetch available plans, submit a unique order reference and check its status.
Reseller account

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/json

Wallet balance

GET/api/v1/balance

Read 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

GET/api/v1/plans?network=mtn

Use 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

POST/api/v1/data

Request 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.

FieldTypeRequired
networkstringYes
plan_codestringYes
phonestringYes
referencestringYes

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

POST/api/v1/airtime

Amount is the airtime face value in naira. The final charge must come from your account's current reseller pricing.

FieldTypeRequired
networkstringYes
amountnumberYes
phonestringYes
referencestringYes

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

GET/api/v1/status/YOUR-UNIQUE-ORDER-REFERENCE

Check 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