TopupNest
Register
TOPUPNEST DEVELOPER API

Sell airtime and data from your product.

Request API access for your business. Once approved, use one wallet and a secure server-side key to retrieve plans, submit purchases and check delivery status.

Bearer authenticationKeys are hashed at rest and can be revoked.
Idempotent ordersReuse a request UUID safely without duplicate charges.
Track every orderRead delivered, pending or refunded status.

Quickstart

All requests use JSON and the base URL https://topupnest.com.ng/api/v1. Send your secret key from a secure backend:

Authorization: Bearer tn_live_your_secret_key
Content-Type: application/json
Keep keys secret. Never include a live API key in browser code, a public repository or a mobile app.
GET

/plans

Return all enabled data plans. Filter with ?network=MTN, Airtel, Glo or T2.

curl "https://topupnest.com.ng/api/v1/plans?network=MTN" \
  -H "Authorization: Bearer $TOPUPNEST_API_KEY"
{
  "success": true,
  "data": [{
    "id": "plan-id", "network": "MTN", "name": "1GB SME",
    "category": "SME", "validity": "30 days", "amount": 550,
    "currency": "NGN"
  }]
}
POST

/orders

Create a purchase. request_id must be a new UUID. Repeating the same UUID returns the original order and does not charge twice.

Data request

{
  "request_id": "550e8400-e29b-41d4-a716-446655440000",
  "service": "data", "network": "MTN",
  "phone": "08012345678", "plan_id": "plan-id"
}

Airtime request

{
  "request_id": "550e8400-e29b-41d4-a716-446655440001",
  "service": "airtime", "network": "Airtel",
  "phone": "08012345678", "amount": 200
}

Amounts are expressed in naira. Airtime supports ₦100 to ₦50,000.

GET

/orders/{reference}

Check an order using the UUID supplied as request_id.

curl "https://topupnest.com.ng/api/v1/orders/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer $TOPUPNEST_API_KEY"
{
  "success": true,
  "data": {
    "reference": "550e8400-e29b-41d4-a716-446655440000",
    "service": "data", "network": "MTN", "phone": "08012345678",
    "amount": 550, "charged_amount": 530, "currency": "NGN", "status": "delivered"
  }
}

Statuses and errors

Orders may be delivered, pending, refunded, failed or insufficient_balance. Pending creation returns HTTP 202; poll the status route until the state changes.

{
  "success": false,
  "error": { "code": "invalid_request", "message": "network must be MTN, Airtel, Glo or T2." }
}
200 Successful request202 Processing400 Invalid request401 Invalid API key402 Low balance503 Sales paused

Need integration help?

Contact support with your request and response reference. Never send your secret API key.

Email support