Payment Channels
Create Payment Channel
Register an M-Pesa shortcode as a payment channel.
POST
Register a Paybill or Till shortcode to route payments through a specific M-Pesa account.
What is a payment channel?
A payment channel maps an M-Pesa shortcode to your PalPluss account. When initiating an STK Push, specify achannelId to route the payment through that shortcode.
Use channels when:
- You operate multiple M-Pesa shortcodes (e.g. different products or business units)
- You need to direct specific transaction types to dedicated shortcodes
Default channel
SetisDefault: true to use a channel automatically when no channelId is supplied on payment requests. Only one channel can be the default at a time — setting a new default removes the flag from the previous one.
Channel types
| Type | Description |
|---|---|
PAYBILL | M-Pesa Paybill shortcode. Requires an accountNumber. |
TILL_NUMBER | M-Pesa Till Number (Buy Goods). No account number needed. |
SEND_MONEY | Direct M-Pesa send money. |
Authorizations
Use your API key as the username. Leave the password field empty.
Authorization: Basic <base64(apikey:)>You can also pass the raw API key:
Authorization: Basic <apikey>Body
application/json
Human-readable label for the channel.
Example:
"Main Collections Paybill"
Available options:
PAYBILL, TILL_NUMBER, SEND_MONEY M-Pesa shortcode (Paybill number or Till number).
Example:
"123456"
Account number for Paybill channels (not used for Till).
Example:
"ACCOUNT001"
Set this channel as the default for payment requests that do not
specify a channelId.