RevolunoCloud

Taking USD and ZWG card payments at the till

Zimbabwean tills often price in two currencies. How to send the right currency and amount to the card terminal, and what to store for reconciliation.

Updated · Revoluno

Many Zimbabwean businesses price and take payment in both US dollars and Zimbabwe Gold (ZWG). The card terminal has to charge in the currency the customer chose, and your till has to record exactly what was charged. Here is how to do both with the Revoluno Cloud API.

Send the currency with every payment

Every checkout carries its own currency, so one terminal can take a USD payment and then a ZWG payment:

{ "total_amount": { "currency": "ZWG", "minor_unit": 2, "value": 38550 } }
  • currency is USD or ZWG. Anything else is refused with 400 INVALID_REQUEST.
  • minor_unit is always 2: amounts are in cents.
  • value is a whole number of cents: 38550 is ZWG 385.50.

Never use floating point for money

Store prices and totals as integer cents, or as a fixed-precision decimal type, from the start. Converting 385.50 to cents with floating point can give 38549.99999, which rounds to the wrong amount. Most languages have a safe type: decimal in C#, BigDecimal in Java, Decimal in Python.

Do the exchange in the till, not on the terminal

If a sale is priced in USD and the customer pays in ZWG, your till converts using the rate your business applies, shows the ZWG amount to the cashier, and sends that amount in ZWG. The terminal charges exactly what it is sent. That keeps the rate decision, and the audit trail, in your till.

Store alongside the sale:

  • the original price and currency;
  • the rate used and when it was taken;
  • the charged currency and amount, as returned in the webhook's total_amount;
  • the client_transaction_id, auth_code and rrn for the payment.

Receipts

Print the charged currency and amount from the webhook, not the amount you intended to charge. The two should match, but the webhook is what the bank processed. Include the masked card number (535522******1234), the entry mode (chip, contactless or swipe) and the authorisation code.

End-of-day reconciliation

List the day's successful checkouts and total them per currency:

GET /v0.1/merchants/{merchant_code}/checkouts?status=successful&size=100

Compare each currency total with the till's card takings, and investigate any foreign_transaction_id that appears on one side only. The console's Transactions page shows the same list, filterable by reader and status.

More detail is in the create checkout reference.