Topup
POST/topup
Request airtime or bundle purchase for a mobile number. Bearer authentication required.
Use type: TOPUP for direct airtime purchases and type: BUNDLE for network bundle purchases. For iSmart_Global transfers, send network: ISMART_TRANSFER, provider: ISMART, type: AIRTIME, and the iSmart_Global SKU in bundlecode; the service maps these values to iSmart_Global transfer fields (AccountNumber, SendValue, SkuCode, and an internal DistributorRef).
AirtelTigo bundles
For direct AirtelTigo bundle purchases, send network: at (or airteltigo), type: BUNDLE, country: GH, and currency: GHS. bundlecode is required and must contain the exact ProductID/ProductSKU from the ERS product catalogue. It is trimmed and forwarded, case preserved, as SOAP requestTopup.productId; there is no fallback to a configured product. Missing, blank, or non-string values are rejected.
Send the matching catalogue price in amount. Bundle amounts are forwarded unchanged, without the airtime scaling. For example, db_XXL_Family_Pack_130.4GB costs GHS 350 in the supplied catalogue. Confirm current availability and pricing before purchase; the adapter does not validate prices against the stored catalogue. This direct AT flow is separate from AT Data through ISMARTGH_UTILITY, where bundlecode is a utility service ID and extrainfo.bundle selects the package. Direct AirtelTigo airtime continues to use type: TOPUP and does not require a bundlecode.
iSmartGh_Utility
Send network: ISMARTGH_UTILITY, provider: ISMART, country: GH, and currency: USD or currency: GHS. Put the iSmartGh_Utility service ID in bundlecode, not the package code or meter number. Use AIRTIME for airtime and BUNDLE for other services; the service ID selects the iSmartGh_Utility operation.
Paying in USD
amount is expressed in the currency supplied by the caller. USD requests are converted to GHS using the configured active USD-to-GHS exchange rate and rounded to two decimal places before submission to the utility provider. GHS requests use the supplied amount without currency conversion. The destination remains country: GH, including when the customer is abroad.
For illustration only, USD 2 at a rate of GHS 12 per USD sends GHS 24 to the provider. This is not a quoted or guaranteed exchange rate. The original customer amount, the provider's GHS amount, and the wallet debit are recorded separately. The wallet is debited in its own currency using the configured wallet conversion. A USD request does not itself collect a card or bank payment; the account must have sufficient wallet funds.
USD support requires the updated Hubtel initialization and callback functions and an active USD-to-GHS rate. A missing or invalid conversion causes the purchase to fail before provider submission. Amounts must be positive with at most two decimal places. Provider limits and bundle prices are checked in GHS after conversion; the airtime maximum is GHS 100, not USD 100. This conversion is scoped to ISMARTGH_UTILITY and does not change ISMART_TRANSFER, MTN, Telecel or AirtelTigo request handling.
| Service | Service ID (bundlecode) | Destination (mobile) and extra fields |
|---|---|---|
| MTN Airtime | fdd76c884e614b1c8f669a3207b09a98 | Phone |
| Telecel Airtime | f4be83ad74c742e185224fdae1304800 | Phone |
| AT Airtime | dae2142eb5a14c298eace60240c09e4b | Phone |
| MTN Data | b230733cd56b4a0fad820e39f66bc27c | Phone; bundle from query |
| Telecel Data | fa27127ba039455da04a2ac8a1613e00 | Phone; bundle from query |
| AT Data | 06abd92da459428496967612463575ca | Phone; bundle from query |
| Telecel Broadband | b9a1aa246ba748f9ba01ca4cdbb3d1d3 | Landline; broadband account in extrainfo.bundle |
| DSTV | 297a96656b5846ad8b00d5d41b256ea7 | TV account |
| GOtv | e6ceac7f3880435cb30b048e9617eb41 | TV account |
| StarTimes | 6598652d34ea4112949c93c079c501ce | TV account |
| ECG | e6d6bac062b5499cb1ece1ac3d742a84 | Customer phone; meter or postpaid account in extrainfo.bundle |
| Ghana Water | 6c1e8a82d2e84feeb8bfd6be2790d71d | Customer phone; meter account, Email and SessionId in extrainfo |
Select an iSmartGh_Utility example in the request examples below. All destinations, account identifiers and prices are illustrative, not verified test accounts. Replace placeholders before sending a purchase. Keep phone, meter and account identifiers as strings to preserve leading zeros.
- Data services require
extrainfo.bundleequal to the current query result's Value and the matching purchase amount. - Broadband requires the validated broadband account identifier in
extrainfo.bundleand the landline inmobile. - ECG requires
extrainfo.bundlefor the meter or postpaid account. Put the intended customer's phone inmobile, not the meter number. A purchase can link that phone to the meter. - Ghana Water requires
extrainfo.bundle,extrainfo.Email, and a freshextrainfo.SessionIdfrom the service query. Field names are case-sensitive. - The iSmartGh_Utility query helper is internal, not a public endpoint or an automatic purchase step. The existing
/lookupendpoint is not an iSmartGh_Utility meter/session query. Obtain query results through the integration operator before submitting data or Water purchases. - Use positive amounts with no more than two decimal places. Airtime is limited to GHS 100 per request; use current provider pricing for other services.
- The iSmartGh_Utility callback URL is configured by this project. Do not supply iSmartGh_Utility credentials, callback secrets or an iSmartGh_Utility CallbackUrl in the request.
resurl, when used, is the subscriber notification URL, not an iSmartGh_Utility callback override. - An accepted or REQUESTED transaction is pending, not proof of fulfillment. Check the final transaction status after the provider callback.
Telecel Postpaid is not supported by this adapter.
Request
- application/json
Body
request payload
End user phone number. For iSmartGh_Utility TV services use the TV account; for broadband use the landline. For ECG and Ghana Water use the customer phone and put the meter/account in extrainfo.bundle. Preserve identifiers as strings.
Purchase amount in the requested currency. For ISMARTGH_UTILITY, USD is converted to GHS at the configured rate and rounded to two decimals; GHS is sent unchanged. Provider limits apply to the GHS amount. For iSmart_Global this is sent as SendValue.
ISO currency code for the purchase amount. ISMARTGH_UTILITY accepts USD or GHS; provider purchases are sent in GHS. Other networks retain their existing currency rules.
ISO country code for the destination mobile number.
Destination network. Use mtn, telecel, or airteltigo for Ghana network purchases; ISMART_TRANSFER for iSmart_Global; ISMARTGH_UTILITY for the documented iSmartGh_Utility services (country GH, request currency USD or GHS).
Purchase type. Use TOPUP for airtime, BUNDLE for network bundles, and AIRTIME for iSmart_Global transfers.
Optional provider override. Use ISMART for iSmart_Global and iSmartGh_Utility.
Bundle or product code. Required for direct AirtelTigo BUNDLE purchases (network at or airteltigo) as the exact ERS ProductID/ProductSKU; a non-empty string is trimmed and forwarded as productId, with no configured fallback. Required for iSmart_Global as its SKU code. For ISMARTGH_UTILITY this must be the iSmartGh_Utility service ID from the table, not the package or meter number. Required for other network bundle products where a bundle code is available.
extrainfo
object
Service-specific fields. iSmartGh_Utility data, broadband and ECG require bundle; Ghana Water requires bundle, Email and SessionId. Airtime and TV services can use an empty object. See the iSmartGh_Utility examples for each service.
Data query Value, broadband account identifier, ECG meter/postpaid account, or Ghana Water meter account, depending on the service ID.
Customer email, required for Ghana Water.
Fresh session from the Ghana Water service query, required for Water purchases.
Service-specific fields. iSmartGh_Utility data, broadband and ECG require bundle; Ghana Water requires bundle, Email and SessionId. Airtime and TV services can use an empty object. See the iSmartGh_Utility examples for each service.
Optional transaction notes.
Optional client tracking id. The service generates one when it is not supplied.
Optional subscriber URL to asynchronously submit results to.
Responses
- 201
- 400
- 401
- 409
request successful
- application/json
- Schema
- Example (from schema)
Schema
data
object
reference no
request status
additional notes.
{
"success": true,
"code": 0,
"message": "OK",
"data": {
"reference": "string",
"statuscode": "string",
"notes": "string"
},
"trackid": "d290f1ee-6c54-4b01-90e6-d701748f0851",
"stamp": "2016-08-29T09:12:33.001Z"
}
invalid input, object invalid
Access token is missing or invalid
request failed