Withdrawals
Withdraw from a customer’s Deriv Wallet to mobile money.
Withdrawals convert USD from the customer's Deriv Wallet into mobile money in the selected country. Fetch current rates and limits, ask the customer to confirm the phone number and network, and save an idempotency key.
- Send
connection_id,phone_number,amount_usdand the idempotency key toPOST /api/mpesa/withdrawal-verification. Includecountry,operatorandaccount_login_idwhen needed. - Save the returned transaction ID. While the verification email is being prepared, the status can be
pending. Ask the customer for the email code whennext_action.typeisemail_code. - Send
connection_id,transaction_idandverification_codetoPOST /api/mpesa/withdraw. - Monitor the transaction. A successful request can return
processing; wait forcompletedto confirm payout.
To resend the email, call POST /api/mpesa/withdrawal-verification/resend with the same connection and transaction IDs. Keep using that withdrawal. Submit withdrawal email codes to the withdrawal endpoint and deposit codes to the deposit verification endpoint.
If a code is rejected, check the transaction before submitting another. Wait for the delay in Retry-After when present. If an active withdrawal blocks the request, resolve that withdrawal before starting another.
A payout may need reconciliation after funds leave the Wallet. If you receive reconciliation_required, 502 PAYMENT_UNCONFIRMED or 504 OUTCOME_UNKNOWN, keep checking the same transaction. Contact support with its ID if the outcome remains unclear. These responses do not confirm a refund.