Money movement
POST/v1/deposits

Asks a customer to pay. Morzepay sends a prompt to their phone; the wallet is credited only after they approve it with their PIN and the network confirms.

The answer comes back straight away with status: "processing". Wait for the deposit.succeeded or deposit.failed webhook, or check the transaction.

Permissiondeposits:write

Headers#

Idempotency-Keystringheader

8–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_idstringrequired

The wallet to credit.

msisdnstringrequired

The payer’s number. +256771234567, 256771234567 and 0771234567 all work.

amountintegerrequired

Whole UGX, from 500 to 5,000,000.

referencestringrequired

Your own unique reference, 8–36 characters, such as your order id. Using it twice returns 409 DUPLICATE_REFERENCE.

fee_bearerstring

wallet: the customer is asked for amount, and the wallet receives it minus the fee. customer: the fee is added to what the customer is asked for. Defaults to the wallet’s setting.

descriptionstring

Up to 100 characters. Shown in your dashboard.

metadataobject

Up to 20 keys of your own, with simple values. Returned on the object and in webhooks.

Returns#

A transaction with type: "deposit". customer_charged is what the customer is asked for. fee_estimated is known now; fee and net are set when it succeeds.

Errors#

StatusCodeWhen
409DUPLICATE_REFERENCEYou already used this reference. details.transaction_id is the first one.
409WALLET_NOT_ACTIVEThe wallet is frozen.
422VALIDATION_ERRORA field is wrong, such as an amount outside 500–5,000,000 or a number that isn’t MTN or Airtel.
429MSISDN_RATE_LIMITEDThis number already had 5 payment requests in 10 minutes. Wait details.retry_after_seconds.

The common codes, such as UNAUTHENTICATED and RATE_LIMITED, can come from any endpoint. See Errors.

Statuses#

StatusMeaning
processingThe prompt is on the customer’s phone.
successPaid. The wallet has net more.
failedDeclined, timed out or cancelled. See failure_reason.
reviewThe network reported something unexpected, such as a different amount. Our team is checking it, and nothing is credited until it’s resolved.

Rather not build the payment screen yourself? A checkout session gives you a hosted page that handles the prompt, waiting, retries and the receipt.