Preview: the API is being built and these endpoints may change
GET/api/v1/pricing/plans
List plans
The plans on sale for each network, with their face value and the flat fee per sale.
Returns every plan on sale, or one network's plans with ?network=. Each plan has the product_code you send to Buy data or Send airtime.
Query
| Field | Type | Required | Notes |
|---|---|---|---|
network | string | no | mtn, airtel, glo or 9mobile |
service | string | no | data or airtime |
How a sale is charged
You pay SimConnectNG a flat fee for each sale, set per plan or per data type, and the same in test and live. That fee is the plan's charges, and it is what your wallet is held and charged; a failed sale costs nothing. amount is the plan's face value, shown as a guide for your own prices; the data or airtime itself goes out from your lines. What you charge your customers is yours to set.
Request
curl "https://api.simconnectng.com/api/v1/pricing/plans?network=mtn&service=data" \
-H "Authorization: Bearer $SIMCONNECT_KEY"Response
groups holds the plans by data type and validity, each with its fee. items is the same plans as one flat list, with face values. The sample is trimmed to one data type.
{
"success": true,
"data": {
"mode": "live",
"groups": [
{
"code": "data_share",
"name": "Datashare",
"network": "mtn",
"service": "data",
"data_type_charges": 10.00,
"validity_groups": [
{
"label": "30 days",
"validity_days": 30,
"plans": [
{ "product_code": "MTN-SHARE-1GB-30D", "name": "Datashare 1GB, monthly", "kind": "fixed_denomination", "validity_days": 30, "amount": 350.00, "charges": 10.00, "charges_source": "data_type" },
{ "product_code": "MTN-SHARE-20GB-30D", "name": "Datashare 20GB, monthly", "kind": "fixed_denomination", "validity_days": 30, "amount": 7000.00, "charges": 30.00, "charges_source": "plan" }
]
}
]
}
],
"items": [
{ "product_code": "MTN-SHARE-1GB-30D", "plan_name": "Datashare 1GB, monthly", "network": "mtn", "service": "data", "validity_days": 30, "amount": 350.00 },
{ "product_code": "MTN-SHARE-20GB-30D", "plan_name": "Datashare 20GB, monthly", "network": "mtn", "service": "data", "validity_days": 30, "amount": 7000.00 }
]
},
"message": "OK",
"code": "OK"
}charges_source says whether the fee is the plan's own (plan) or its data type's (data_type); a plan's own fee wins. A plan with no charges cannot be sold from lines yet. Airtime products (?service=airtime) carry min_amount and max_amount instead of a fixed face value. The figures shown here are placeholders.
For the plan list alone, without fees, use GET /api/v1/catalog/products?network=mtn&service=data. It answers data.items, each with code (the product code), name, network, service, kind and validity_days.
Error
{ "success": false, "data": null, "message": "API key required", "code": "AUTH_REQUIRED" }Give this to your coding agent
Read https://simconnectng.com/docs/api/list-data-plans.md and implement "List plans" (GET /api/v1/pricing/plans) in this project.
Read the API key from the SIMCONNECT_KEY environment variable.
Every response is { success, data, message, code }; on an error data is null (or carries data.errors), so branch on code.