Cross-border payouts
Send money from Tanzania to bank accounts and mobile wallets abroad (Nigeria, Kenya, India and more). Payouts are paid from your share of the Swahilies payout wallet and, when you want, funded by your customer's virtual-account deposit.
Scope required: psp:payout-maker (or psp:rafiki-merchant)
How the money moves
Two balances are used for every payout, both kept in the Swahilies ledger:
| Balance | What it is | Currency |
|---|---|---|
| Customer funds | Your customer's virtual-account deposit | TZS |
| Wallet share | What you have funded into the payout wallet | The wallet's currency, e.g. USD or NGN |
You price the exchange. You tell us how much TZS to take from the customer
(debit_minor) and the payout amount. If the wallet currency differs from the
payout currency, you also tell us how much of your wallet it uses
(wallet_debit).
| When | Customer funds | Wallet share |
|---|---|---|
| You create the payout | Held | Reserved |
| Payout succeeds | Becomes your balance (you sold the currency) | Spent |
| Payout fails | Released back to the customer, on the same deposit and expiry | Released |
| Paid, then reversed | Returned to the customer | Returned |
The flow
Check the recipient
curl -X POST https://engine.swahilies.net/api/psp/rafiki/lookup \
-H "Authorization: Bearer swh_live_<prefix>_<secret>" \
-H "Content-Type: application/json" \
-d '{ "account_number": "0123456789", "payment_account_type": "BANK_ACCOUNT", "bank_id": "bnk-…" }'Bank ids come from GET /api/psp/rafiki/banks?country=NG. For mobile money use
"payment_account_type": "MOBILE_MONEY" with country and optionally
operator (e.g. SAFARICOM); local numbers are converted to international
format for you.
Create the payout
curl -X POST https://engine.swahilies.net/api/psp/rafiki/payouts \
-H "Authorization: Bearer swh_live_<prefix>_<secret>" \
-H "Content-Type: application/json" \
-d '{
"merchant_txn_ref": "pay_1042",
"amount": { "currency": "NGN", "value": "100000.00" },
"payment_account": {
"type": "BANK_ACCOUNT", "country": "NG",
"holder": { "type": "INDIVIDUAL", "name": "Ada Obi" },
"bank_account": { "bank_id": "bnk-…", "number": "0123456789" }
},
"customer_ref": "user_8812",
"debit_minor": 250000,
"purpose": "P2P_TRANSFER"
}'| Field | Notes |
|---|---|
merchant_txn_ref | Your id. Idempotent: repeating it returns the same payout and never pays twice. |
amount | What the recipient gets, as a decimal string in their currency. |
payment_account | BANK_ACCOUNT, MOBILE_MONEY, BANK_ACCOUNT_ROUTE (IFSC) or ALIAS (UPI). |
customer_ref + debit_minor | Optional: TZS to take from that customer's virtual-account funds. |
wallet_currency + wallet_debit | Only when paying from a wallet in another currency (e.g. a USD wallet paying NGN). |
on_behalf_of | Your registered legal name: who the payout is made for. |
purpose, source_of_funds, sender | Optional compliance fields; sender defaults to your registered business. |
201 returns the payout with status submitted. 409 with code
insufficient_customer_funds or insufficient_wallet means nothing was held.
We call you back
payout.completed (with the recipient bank's receipt), payout.failed, or
payout.reversed, signed like every webhook:
{
"event": "payout.completed",
"id": "SWARFK-…:payout.completed",
"data": {
"rail": "rafiki", "reference": "SWARFK-…", "merchant_txn_ref": "pay_1042",
"customer_ref": "user_8812", "status": "completed",
"amount": { "currency": "NGN", "value": "100000.00" },
"debit_minor": 250000, "debit_currency": "TZS",
"wallet_currency": "NGN", "wallet_debit_minor": 10000000,
"receipt": "NIP-…", "completed_at": "2026-10-30T10:12:00Z"
}
}A payout that fails for a temporary reason (the destination bank is briefly
down) is retried automatically before we report payout.failed.
Check status and your wallet
curl https://engine.swahilies.net/api/psp/rafiki/payouts/pay_1042 -H "Authorization: Bearer …"
curl https://engine.swahilies.net/api/psp/rafiki/wallet -H "Authorization: Bearer …"The wallet shows, per currency, what you hold, what in-flight payouts reserve, and what is available.
To fund your wallet share, send the funds as agreed with Swahilies operations; it is credited once the money reaches the payout wallet.