Welcome to the Whoosh Innovations Pty. Core API — the integration layer for prepaid electricity vending, postpaid bill payments, and AARTO traffic fine management across South African municipalities.
All API requests must include a valid API key in the X-API-KEY request header.
X-API-KEY: your-api-key-hereIf the header is missing or the key is invalid, the API returns HTTP 401 Unauthorized.
Important: Your test environment API key is different from your production API key. Never use a production key against a test environment.
| Environment | Base URL |
|---|---|
| Testing | https://api-test.amabills.co.za/api |
| Production | https://api.amabills.co.za/api |
Prepaid token vending for the following municipalities:
| Municipality | Identifier |
|---|---|
| City of Tshwane | tshwane_prepaid |
| Mogale City | mogale_prepaid |
| Zeerust | zeerust_prepaid |
| Ngwathe | ngwathe_prepaid |
| Thembelihle | thembelihle_prepaid |
Confirm the meter — call
POST /v2/Electricity/ConfirmCustomerwith the meter number and municipality to validate the meter and retrieve customer details. This step is recommended before every purchase to confirm that you are vending for the correct meter.Purchase — call
POST /v2/Electricity/Purchasewith the confirmed meter number, municipality, amount, and payment method to make the actual token purchase.Monitor your balance — call
POST /v1/Merchant/CheckBalanceto check your remaining merchant credit before vending.
Pass a unique idempotency string on each Purchase request. If a request fails and you need to retry, reuse the same value — the system will not generate a duplicate vend.
| Meter No | Result |
|---|---|
| 04243399104 | Normal Vend |
| 07045191942 | FBE (if you want only FBE put an amount of R0) |
| 07027050819 | Key Change |
| 04292145648 | Key Change and FBE |
| 81114325624 | Arrears |
| 14445160626 | Fixed Charges |
| Meter No | Result |
|---|---|
| 81114338999 | Normal Vend |
| 81114326440 | FBE |
| 07600938182 | Key Change |
| Meter No | Result |
|---|---|
| 04265463002 | Normal Vend |
| 07025361416 | FBE |
| 04235758721 | Key Change |
Query and payment services for AARTO-registered traffic infringements, supporting lookups by ID number, business registration number, or notice number.
Look up fines — search by ID number (
ViewByIDnumber), business registration number (ViewByBusinessRegistration), or notice number (ViewByNoticeNumber). Each response includes a list ofInfringementDetailobjects with net amounts, vendor fees, and gross amounts.Validate the payment amount — call
ValidateMarkTrafficFinesAsPaidwith the proposed amount. The response confirms whether the amount is correct (isCorrectAmount: true) and returns the difference if not.Mark as paid — call
MarkTrafficFineAsPaidto declare that the merchant received the gross amount from the customer and to clear the fines with AARTO. The response includes AARTO receipt numbers (receiptNumber) and invoice numbers (invoiceNumber) per fine.
Every fine exposes three amounts:
| Field | Meaning |
|---|---|
netFineAmnt | The base fine amount set by the issuing authority |
vendorFeeAmnt | Whoosh processing fee |
grossAmnt | Total to charge the customer (net + vendor) |
When calling MarkTrafficFineAsPaid, submit the grossAmnt as the amount per fine.
Post paid bill payments for the following municipalities:
| Municipality | Identifier |
|---|---|
| City of Tshwane | tshwane_postpaid |
| Mogale City | mogale_postpaid |
Confirm the meter — call
POST /v2/Bills/ConfirmCustomerwith an account number and municipality to validate the account and retrieve customer details. This step is recommended before every purchase to confirm that you are clearing debts for the correct account.Purchase — call
POST /v2/Bills/Purchasewith the confirmed account number, municipality, amount, and payment method to make the actual debt clarrenca
Airtime, data bundles, lotto, and other value-added services. The Whoosh VAS API integration split into three simple operations: list products, confirm a quote, and purchase.
List products — call
GET /v1/VAS/Productsto retrieve the full product catalogue. Each product includes anid(use asproductID) and areferencearray (pass as-is in subsequent calls).Confirm — call
POST /v1/VAS/Confirmwith theproductID,amount, andreferenceto get a quote. The response includes the fee breakdown, total amount, and optionally aquoteIdto bind to the purchase.Purchase — call
POST /v1/VAS/Purchasewith the same fields. For airtime and data products, value is delivered directly to the recipient. For voucher products, apinandinstructionsare returned to present to the customer.
| Field | Where it comes from | Where it's used |
|---|---|---|
productID | id from List Products | Confirm & Purchase |
reference | reference array from List Products (JSON-encoded) | Confirm & Purchase |
amount | Caller-supplied (open-value) or fixed (from product) | Confirm & Purchase |
quoteId | Returned by Confirm (if present) | Purchase |
| Field | Fixed-amount product | Open-value product |
|---|---|---|
fixedAmount | true | false |
amount | Set by product | Caller-supplied |
minAmount / maxAmount | null | Defines valid range |
Order creation and Mastercard Hosted Checkout payment initiation. Creates an order on the Whoosh platform and returns a payment URL to redirect customers for secure card capture.
Create an order — call
POST /v1/putOrderV2with yourmerchantId, order details, line items, and redirect URLs.Redirect the customer — use the
paymentPageUrlfrom the response to send the customer to the Mastercard Hosted Checkout page for secure card capture.Handle the redirect — after payment, Mastercard redirects the customer to your
redirectSuccessorredirectCancelURL. Use the Whoosh Reconciliation endpoints to verify the final payment status.
Staging environment: Always use
merchantId: stagingwhen calling the test base URL. A productionmerchantIdwill be issued before go-live.
MPGS reconciliation and payment status verification. Retrieve end-of-day transaction ledgers and verify the payment status of individual orders.
End-of-day ledger — call
POST /v1/whooshEndOfDayLedgerV2(no request body required) to retrieve all MPGS transactions for the previous South Africa business day, including totals and any verification errors.Check order payment status — call
POST /v1/whooshCheckOrderPaymentStatusV2with anorderIdto verify the payment status of a specific order.
| Status | Meaning |
|---|---|
PAID | Payment was successfully captured |
PENDING | Payment is in progress |
FAILED | Payment was attempted but failed |
NO_ATTEMPT | No payment attempt was made |
VERIFICATION_ERROR | Status could not be determined — check verificationErrors |
The reconciliation endpoints return different response shapes depending on the HTTP status code:
| Status code | Response shape |
|---|---|
200, 500 | Direct response object |
400, 404 | { status, data } wrapper |
{
"success": true,
"data": { ... },
"error": null,
"errorNo": null
}success is a boolean.
{
"success": 1,
"result": { ... },
"error": null
}success is an integer — 1 for success, 0 for error.
When a Traffic Fine request fails (success: 0), the error field contains an ErrorMessage object:
{
"success": 0,
"error": {
"code": 9,
"message": "No infringement found for the provided ID number.",
"validationMessage": []
}
}| Code | Meaning |
|---|---|
| 1 | Authentication failed |
| 2 | Service unavailable – retry; contact support if it persists |
| 3 | Service error – contact support |
| 5 | Invalid ID |
| 6 | ID must be numeric |
| 7 | ID number check digit must be valid |
| 8 | The identified infringer does not exist |
| 9 | No infringement found for the identification type or number |
| 10 | Check digit of the infringement notice number must be valid |
| 11 | Fine must be payable at a registering authority |
| 12 | Infringement notice number does not exist |
| 13 | Infringement notice number does not exist |
| 14 | Fine may not be in status 10 (court case) |
| 15 | Elected to be tried in court – successful court application status |
| 16 | Transaction not allowed – nomination of driver is pending |
| 17 | Partially paid fine must be settled at a registering authority or DLTS |
| 18 | Fine may not be in status 13 (partially paid) |
| 23 | Validation error – see validationMessage array for details |