Send a payout
Sends money from a wallet to an MTN or Airtel number. The wallet pays the network fee.
Before sending, Morzepay holds the amount plus an estimated fee with a small margin (amount_held). When the payout succeeds, the real fee is charged and the rest of the hold goes back. If it fails, the whole hold goes back.
payouts:writeHeaders#
Idempotency-Keystringheader8–80 letters, digits, - or _. Lets you retry safely: the same key and body return the first answer and never move money twice. See Idempotency.
Body#
JSON, with Content-Type: application/json.
wallet_idstringrequiredThe wallet, such as wal_Zq4Hn8YtV2kPm6RbX3cLw9.
msisdnstringrequiredThe recipient’s number.
amountintegerrequiredWhole UGX, from 500 to 5,000,000.
referencestringrequiredYour own unique reference, 8–36 characters, such as your order id. Using it twice returns 409 DUPLICATE_REFERENCE.
descriptionstringUp to 100 characters. Shown in your dashboard.
metadataobjectUp to 20 keys of your own, with simple values. Returned on the object and in webhooks.
Returns#
A transaction with type: "payout" and amount_held.
Errors#
| Status | Code | When |
|---|---|---|
| 402 | INSUFFICIENT_FUNDS | The wallet can’t cover the amount plus the estimated fee. Nothing was sent. |
| 403 | IP_NOT_ALLOWED | Live keys that send payouts only work from their allowed IPs. |
| 403 | WEEKLY_LIMIT_REACHED | This would go over your 7-day live payout limit. details.remaining shows what’s left. |
| 409 | DUPLICATE_REFERENCE | You already used this reference. |
| 429 | MSISDN_RATE_LIMITED | Too many payment requests to this number in 10 minutes. |
The common codes, such as UNAUTHENTICATED and RATE_LIMITED, can come from any endpoint. See Errors.
A payout is never marked failed just because the network is slow. If the outcome is unclear, it stays processing until the network confirms, and moves to review after 24 hours. Don’t send it again with a new reference while it’s processing.