API Reference — Data, Airtime & Get User
This documentation covers the three endpoints to be implement on your server. Each section contains headers, request shape, examples and expected responses.
Data API — Purchase data
Endpoint: POST https://my.9jasubplug.com.ng/api/data.php
Reserves user funds, calls vendor and returns success / pending / failed. The API generates a reference string and returns it in responses.
Request
Headers
- Accept:
application/json - Content-Type:
application/json - Authorization:
ApiKey <YOUR_API_KEY>orBearer <YOUR_API_KEY>
Body (JSON)
{
"network": 1,
"phone": "08130405344",
"data_plan": 8,
"bypass": true
}Example (curl)
curl --location 'https://my.9jasubplug.com.ng/api/data.php' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: ApiKey YOUR_API_KEY' \
--data '{
"network": 1,
"phone": "08130405344",
"data_plan": 1
}'Responses
200 OK — Success
{
"status": "success",
"reference": "Ref||1234567890||1700000000",
"old_balance": 5000.00,
"new_balance": 4887.00,
"time": "2026-02-27 12:34:56"
}202 Accepted — Pending
{
"status": "pending",
"reference": "Ref||1234567890||1700000000",
"message": "Request pending with vendor"
}400 / 500 — Failure
{
"status": "error",
"message": "Purchase failed",
"reference": "Ref||1234567890||1700000000"
}Airtime API — Buy airtime
Endpoint: POST https://my.9jasubplug.com.ng/app/api/airtime.php
Request
{
"network": 2,
"phone": "08130405344",
"amount": 500
}Example (curl)
curl --location 'https://my.9jasubplug.com.ng/app/api/airtime.php' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: ApiKey YOUR_API_KEY' \
--data '{
"network": 2,
"phone": "08130405344",
"amount": 500
}'Responses
{
"status":"success",
"data": {
"reference":"REF123456789",
"network":"Airtel",
"phone":"08130405344",
"amount":500.0,
"discount":10.0,
"total_cost":510.0,
"old_balance":2000.0,
"new_balance":1490.0,
"timestamp":"2026-02-27 12:34:56"
}
}Get User — Retrieve account details
Endpoint: POST https://my.9jasubplug.com.ng/app/api/get_user.php
Request
No body required — API key identifies the user.
curl --location 'https://my.9jasubplug.com.ng/app/api/get_user.php' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: ApiKey YOUR_API_KEY' \
--data '{}'Response
{
"status": "success",
"data": {
"fname": "John",
"lname": "Doe",
"bal": 1500.5,
"phone": "08130405344",
"email": "john@example.com",
"level": "user"
}
}