Products
List sellable products and packages for your API key.
How to use
- Call
GET /productswith scopeproducts:read. - Take
productId(andpackageId/packageCodefor data) from the response — do not hard-code. - Optional:
GET /products/{productId}for one product’s packages and prices. - Pass those ids into POST /transactions (or the product-specific pages).
A network can return more than one data product (e.g. data-mtn-up2u and data-mtn-standard). Each has its own packages. You can expose one or all in your app.
List products
Scope: products:read
GET
https://confident-elephant-309.convex.site/v1/productsRequest
curl -sS https://confident-elephant-309.convex.site/v1/products \ -H "Authorization: Bearer $KEY"200 OK (illustrative)
{ "products": [ { "name": "MTN Airtime", "operatorCode": "MTN", "productId": "airtime-mtn", "soldByAmount": true, "type": "airtime" }, { "name": "MTN Data · Up2U", "operatorCode": "MTN", "productId": "data-mtn-up2u", "soldByAmount": false, "type": "data" }, { "name": "MTN Data · Standard", "operatorCode": "MTN", "productId": "data-mtn-standard", "soldByAmount": false, "type": "data" }, { "name": "Telecel Data", "operatorCode": "TELECEL", "productId": "data-telecel", "soldByAmount": false, "type": "data" }, { "name": "ECG", "operatorCode": "ECG", "productId": "ecg-ecg", "soldByAmount": true, "type": "ecg" } ], "packages": [ { "packageId": "mtn-1gb", "packageCode": "mtn-1gb", "productId": "data-mtn-up2u", "operatorCode": "MTN", "name": "1GB", "price": 4.5, "currency": "GHS" } ], "operators": [ { "code": "MTN", "name": "MTN" }, { "code": "TELECEL", "name": "Telecel" }, { "code": "ECG", "name": "ECG" } ]}Product codes
| productId | type | Use |
|---|---|---|
airtime-mtn | airtime | MTN airtime |
data-mtn-up2u | data | MTN Up2U |
data-mtn-standard | data | MTN Standard data |
data-telecel | data | Telecel data |
voice-mtn | voice | MTN voice |
afa-mtn | afa | AFA |
ecg-ecg | ecg | ECG |
Product detail
GET
https://confident-elephant-309.convex.site/v1/products/{id}Request
curl -sS https://confident-elephant-309.convex.site/v1/products/data-mtn-up2u \ -H "Authorization: Bearer $KEY"200 OK
{ "product": { "name": "MTN Data · Up2U", "operatorCode": "MTN", "productId": "data-mtn-up2u", "type": "data", "soldByAmount": false, "packages": [ { "packageId": "mtn-1gb", "packageCode": "mtn-1gb", "name": "1GB", "price": 4.5, "currency": "GHS" } ] }}Fields
| Field | Type | Notes |
|---|---|---|
productId | string | Partner code; legacy ids still work |
type | string | airtime | data | voice | afa | ecg |
name | string | Display title |
operatorCode | string | e.g. MTN, ECG |
soldByAmount | boolean | Send amount when true |
packages | array | Bundles for data / AFA |
price | number | Developer/API GHS on packages |
Alias: GET /catalog. Data · Transactions