Guides
Cross-border payouts

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:

BalanceWhat it isCurrency
Customer fundsYour customer's virtual-account depositTZS
Wallet shareWhat you have funded into the payout walletThe 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).

WhenCustomer fundsWallet share
You create the payoutHeldReserved
Payout succeedsBecomes your balance (you sold the currency)Spent
Payout failsReleased back to the customer, on the same deposit and expiryReleased
Paid, then reversedReturned to the customerReturned

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"
  }'
FieldNotes
merchant_txn_refYour id. Idempotent: repeating it returns the same payout and never pays twice.
amountWhat the recipient gets, as a decimal string in their currency.
payment_accountBANK_ACCOUNT, MOBILE_MONEY, BANK_ACCOUNT_ROUTE (IFSC) or ALIAS (UPI).
customer_ref + debit_minorOptional: TZS to take from that customer's virtual-account funds.
wallet_currency + wallet_debitOnly when paying from a wallet in another currency (e.g. a USD wallet paying NGN).
on_behalf_ofYour registered legal name: who the payout is made for.
purpose, source_of_funds, senderOptional 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.