Developer API
Connect your website to NetPac
All reseller API orders use the reseller's own wallet, pricing group and admin permissions. Every spending request requires your own order_id so retries are idempotent.
Authentication
Send your reseller key in the X-API-Key header.
X-API-Key: np_live_xxxxxxxxx
Content-Type: application/json
Content-Type: application/json
GET Products
GET https://mynetpac.com/api/v1/products
Returns MTN, MTN Special, AirtelTigo, Telecel and AFA with your prices, product availability and API/Excel route.
GET Balance
GET https://mynetpac.com/api/v1/balance
POST Order
POST https://mynetpac.com/api/v1/order
{
"order_id": "my-site-10001",
"product_code": "MTN",
"package": "5",
"phone_number": "0241234567"
}
{
"order_id": "my-site-10001",
"product_code": "MTN",
"package": "5",
"phone_number": "0241234567"
}
product_code: MTN, MTN_SPECIAL, AT, TELECEL, AFA.
If the same reseller sends the same order_id again, the existing order is returned and the wallet is not charged twice.
AFA API order
{
"order_id":"afa-1002",
"product_code":"AFA",
"phone_number":"0241234567",
"fullname":"Ama Mensah",
"id_type":"Ghana Card",
"id_number":"GHA-...",
"region":"Ashanti",
"location":"Kumasi",
"dob":"2000-01-01"
}
"order_id":"afa-1002",
"product_code":"AFA",
"phone_number":"0241234567",
"fullname":"Ama Mensah",
"id_type":"Ghana Card",
"id_number":"GHA-...",
"region":"Ashanti",
"location":"Kumasi",
"dob":"2000-01-01"
}
GET Status
GET https://mynetpac.com/api/v1/status?order_id=my-site-10001
GET Transactions
GET https://mynetpac.com/api/v1/transactions?limit=50
Typical success response
{"success":true,"data":{"order_id":"my-site-10001","reference_id":"AG-...","status":"Processing","wallet_balance":120.50}}
