References & idempotency
Your reference
Every money-movement request carries a reference you control — a unique
string (1–100 characters) that identifies the operation in your own system. For
collections and payouts this is merchant_txn_ref; for card payments it is
reference.
{ "merchant_txn_ref": "order_1042", "...": "..." }Idempotency
A reference is accepted once per account. If you send a second request with a
reference you have already used, Swahilies does not create a duplicate — it
rejects the request with 409 Conflict.
This makes retries safe. If a request times out or you are unsure whether it
succeeded, retry with the same reference: either the original went through
(you get the 409, confirming it exists) or it didn't (the retry creates it
once). Either way you never double-charge a customer or double-pay a payout.
Use a reference that is meaningful in your system (an order ID, an invoice number). You can then look the transaction up by that same reference later.
Amounts
Money is always expressed as an integer amount_minor in the currency's
minor unit — there are no floats. Always pair an amount with its currency.
| Currency | Minor unit | Example |
|---|---|---|
TZS, UGX, RWF | none: whole units | amount_minor: 50000 = 50,000 TZS |
USD, KES, EUR, … | cents (÷ 100) | amount_minor: 1999 = 19.99 USD |
Statuses
Money-movement objects progress through statuses such as pending →
successful / failed. The initial API response is usually pending; the final
state arrives asynchronously via a webhook. Never
treat pending as a completed payment.