Skip to content

Purchase / Pay Bill

Request

Pays down a postpaid municipal account's running balance. Unlike Electricity/Purchase, no token or kWh amount is returned — only the account's remaining balance. The account is identified by accountNumber rather than meterNumber, and the request carries none of the prepaid/POS-only fields (arrears, sgc, tarrifIndex, krn) accepted by Electricity/Purchase. Use the idempotency field to safely retry failed requests without risk of duplicate payments.

Security
ApiKeyAuth
Bodyapplication/jsonrequired
accountNumberstringrequired

Account number of the postpaid bill to pay.

Example:"04235758721"
municipalitystring(BillMunicipality)required

Postpaid municipal account issuer. Accepted by the Bills endpoints only.

Enum:"mogale_postpaid""tshwane_postpaid"
amountnumberrequired
Example:400
methodstringrequired
Enum:"cash""card"
Example:"cash"
idempotencystringrequired

Unique string to prevent duplicate payments. A second request with the same value will not result in a second transaction.

Example:"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
curl -i -X POST \
  https://docs.amabills.co.za/_mock/openapi/v2/Bills/Purchase \
  -H 'Content-Type: application/json' \
  -H 'X-API-KEY: YOUR_API_KEY_HERE' \
  -d '{
    "accountNumber": "04235758721",
    "municipality": "mogale_postpaid",
    "amount": 400,
    "method": "cash",
    "idempotency": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }'

Responses

Bill payment response.

Bodyapplication/json
successboolean

true - action successful, result is in data. false - error occurred, details are in error and errorNo.

Example:true
dataobject or null(PurchaseElectricityResult)

Result payload. null when success is false.

errorstring or null

Human-readable error message. null when success is true.

Example:"999 - Internal server error"
errorNointeger or null

Error code. null when success is true.

Example:999
Response
{ "success": true, "data": { "name": "MR. A J KWINDA", "amount": 400, "account_number": "04235758721", "date": "22 Mar 2026 3:24:11 PM", "timestamp": 1774193051166, "balance": 1850, "address": "72 MONOKANE CRESCENT, LOTUS GARDENS X02", "municipality": "mogale_postpaid" } }