Merchant Account
|
PayWay Merchant
API Documentation
PayWay API reference for integrations
Local Payments
Initiate a local payment (e.g. M-Pesa or SasaPay) via the PayWay API.
REQUEST
POST
https://payway.co.ke/api/v2/payments
HEADERS
| Header | Description |
|---|---|
| Content-Type | application/json |
| Authorization | Basic <base64_credentials> |
REQUEST BODY
| Parameter | Type | Description |
|---|---|---|
| amount | number | Payment amount |
| phone_number | string | Customer phone number (e.g. 0708344101) |
| provider | string | Payment provider (e.g. m-pesa or sasapay) |
| network_code | string | Network code (e.g. 63902 for M-Pesa) |
| channel_id | number | Payment channel ID |
| account_id | number | Account ID |
| external_reference | string | Your reference (e.g. order ID, invoice number) |
| callback_url | string | URL to receive payment status callbacks |
CURL EXAMPLE
curl --location 'https://payway.co.ke/api/v2/payments' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <your_base64_credentials>' \
--data '{
"amount": 19,
"phone_number": "0708255202",
"provider": "m-pesa",
"network_code": "63902",
"channel_id": 100,
"account_id": 5,
"external_reference": "test_ext",
"callback_url": "https://your-callback-url.com/webhook"
}'
API RESPONSE
200
{
"success": true,
"status": "QUEUED",
"reference": "VAD142727727.iI",
"CheckoutRequestID": "ws_CO_31012026172729943708344101",
"external_reference": "test_ext"
}
WEBHOOK CALLBACK RESPONSE
Example payload sent to your
callback_url when the payment is processed.{
"success": true,
"status": "success",
"message": "The service request is processed successfully.",
"reference": "VAD142727727.iI",
"external_reference": "test_ext",
"amount": 19,
"currency": "KES",
"transaction_id": "",
"transaction_date": "2026-01-31T14:27:27Z",
"transaction_type": "inbound_payment",
"provider_reference": "UAV7B5BQT2",
"provider": "mpesa_dc",
"callback_urls": null
}
Local Withdrawals
Initiate a local withdrawal (e.g. M-Pesa or bank) via the PayWay API.
REQUEST
POST
https://payway.co.ke/api/v2/withdraw
HEADERS
| Header | Description |
|---|---|
| Content-Type | application/json |
| Authorization | Basic <base64_credentials> |
REQUEST BODY
| Parameter | Type | Description |
|---|---|---|
| external_reference | string | Your reference (e.g. order ID, transaction ref) |
| account_id | number | Account ID |
| channel_id | number | Withdrawal channel ID |
| amount | number | Withdrawal amount |
| phone_number | string | Recipient phone number (e.g. 0708344101) |
| account_number | string | Optional account number (required if channel is bank) |
| network_code | string | Network code (e.g. 63902 for M-Pesa) |
| channel | string | Channel type (e.g. mobile, bank) |
| callback_url | string | URL to receive withdrawal status callbacks |
CURL EXAMPLE
curl --location 'https://payway.co.ke/api/v2/withdraw' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic <your_base64_credentials>' \
--data '{
"external_reference": "71627617216",
"account_id": 5,
"channel_id": 1523,
"amount": 21,
"phone_number": "0708344101",
"account_number": "optional account no if channel is bank",
"network_code": "63902",
"channel": "mobile",
"callback_url": "https://your-callback-url.com/webhook"
}'
API RESPONSE
200
{
"status": "QUEUED",
"merchant_reference": "VAD145207801.eO",
"checkout_request_id": "VAD145207801.eO",
"external_reference": ""
}