Monetary Fields
Monetary values in purchase receipts and lookup receipts are returned in cents (the smallest ZAR unit), as integers. For example, 10037 means R100.37.
- Requests (for example
amountonPOST /transactions/purchase) are sent in rands, e.g.100.37. - Receipt monetary fields in responses are returned in cents, e.g.
10037.
To show a customer an amount in rands, divide the receipt value by 100 and format it to two decimals:
const rands = (cents / 100).toFixed(2); // 10037 -> "100.37"
Which fields are monetary?
Not every number in a receipt is an amount (account numbers, unit counts and reference numbers are not). The category metadata tells you exactly which receipt paths hold money, in the monetaryFields array returned by GET /products/categories/{categoryId}/fields:
{
"receiptFields": ["amount", "voucher.pin", "voucher.amount", "details[0].productAmount"],
"monetaryFields": ["amount", "voucher.amount", "details[0].productAmount"]
}
Use monetaryFields to decide which values to divide by 100. If a category has no monetaryFields (or the key is absent), treat its receipt values as returned by the provider and do not convert them.
Monetary field reference
The paths below use the same notation as receiptFields. A field only appears in a response when the product returns it.
Purchase receipt (receipt)
| Path | Description | Typical products |
|---|---|---|
amount | Amount of the transaction | All categories |
amountDue | Amount due on the account | Pay Bills, Money Transfer |
voucher.amount | Face value of the voucher | Voucher, Gaming, Entertainment, Lifestyle |
voucher.voucherBalance | Remaining balance on the voucher | Voucher, Gaming, Entertainment, Lifestyle |
details[0].productAmount | Amount of the purchased product | Airtime, Data, SMS, Minutes, Vouchers |
mma.amount | Amount of the money-movement sub-transaction | Where returned |
Lookup receipt (lookUpReceipt)
Lookup receipts flatten nested fields.* entries to their last key (for example fields.Amount Due is returned as Amount Due).
| Key / Path | Description |
|---|---|
amount | Outstanding or payable amount |
amountDue | Amount due on the account |
correctAmount | Exact amount that must be paid |
minAmount | Minimum amount accepted |
maxAmount | Maximum amount accepted |
Amount Due (fields.Amount Due) | Amount due, as reported for the account |
Example
Receipt returned by a purchase:
{
"successful": true,
"receipt": {
"amount": 10037,
"voucher": { "pin": "1234567890", "amount": 10037 },
"accountNumber": "00123"
}
}
Display values:
Amount: R100.37
Voucher value: R100.37
Account number: 00123 (not monetary; shown as-is)
Best practices
- Always drive conversion from
monetaryFields. Do not guess by field name or by whether a value looks numeric. - Convert only for display. Keep amounts as integer cents in your own logic to avoid floating-point rounding errors.
- Values can be
0or negative. Format them like any other amount (for example a zero balance isR0.00). - Missing fields are normal. Skip any path that is absent or
nullin a given response.
Last updated: October 2026