Wallet Withdraw to Mobile
Withdraw funds from your UpesiPay wallet to MPESA or Airtel Money
POST
https://upesipay.com/api/v2/withdraw
Headers
| Parameter | Type | Description |
|---|---|---|
| Authorization* | String | Basic auth token |
| Content-Type* | String | application/json |
Request Body
| Parameter | Type | Description |
|---|---|---|
| external_reference | String | Your unique reference to track this transaction (e.g., INV-009) |
| amount* | Integer | Withdrawal amount (e.g., 100) |
| phone_number* | String | Phone number in international format (e.g., 254787677676). Must start with country code |
| network_code* | String | Mobile money provider code: 63902 (MPESA) or 63903 (Airtel Money) |
| callback_url | String | Your endpoint URL that we will use to send payment status response (e.g., https://example.com/callback.php) |
| channel* | String | Value: mobile |
| channel_id | Integer | Your Payment Wallet Channel ID |
| payment_service | String | Value: b2c |
Responses
201 Created
{
"status": "QUEUED",
"merchant_reference": "W5ZBQBHJOS",
"checkout_request_id": "553125-97e66f37-200d-47ef-84bb-eb9b64ab8ad5",
"response_code": "0",
"conversation_id": "97e66f37-200d-47ef-84bb-eb9b64ab8ad5"
}
Notes
- network_code: 63902 for MPESA, 63903 for Airtel Money
- phone_number: Must start with country code (e.g., 254 for Kenya)
- Callback URL: Will receive payment status updates
Try It Out
Please set your authentication token in the sidebar to test this API.
Headers
Request Body
Code Samples
curl -X POST \
'https://upesipay.com/api/v2/withdraw?wallet_type=service_wallet' \
-H 'Content-Type: application/json' \
-d '{"external_reference":"mpesa101","amount":100,"phone_number":"254787877676","network_code":"63902","callback_url":"https://example.com/callback.php","channel":"mobile","channel_id":12345,"payment_service":"b2c"}'