List Channels
The List Channels endpoint allows you to retrieve all available payment channels supported by JPay. Use this to display channel options to users or to validate channel codes before initiating transactions.
Endpoint
GET /channels
Authentication
Required: Yes (Bearer Token)
Authorization: Bearer YOUR_ACCESS_TOKEN
Request
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
type | string | No | - | Filter by channel type: bank, mobile_money, or internal |
active_only | boolean | No | true | Only return active channels |
page | integer | No | 1 | Page number for pagination |
page_size | integer | No | 100 | Number of items per page |
Example Request
curl -X GET "https://sandbox.api.jpay.africa/api/v1/channels?type=bank&page=1&page_size=100" \
-H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..." \
-H "Content-Type: application/json"
Response
Success Response (200 OK)
{
"items": [
{
"code": 0,
"name": "JPay",
"type": "internal",
"type_display": "Internal",
"is_active": true
},
{
"code": 1,
"name": "KCB",
"type": "bank",
"type_display": "Bank",
"is_active": true
},
{
"code": 7,
"name": "NCBA",
"type": "bank",
"type_display": "Bank",
"is_active": true
},
{
"code": 68,
"name": "Equity Bank",
"type": "bank",
"type_display": "Bank",
"is_active": true
},
{
"code": 63902,
"name": "MPesa",
"type": "mobile_money",
"type_display": "Mobile Money",
"is_active": true
},
{
"code": 63903,
"name": "AirtelMoney",
"type": "mobile_money",
"type_display": "Mobile Money",
"is_active": true
},
{
"code": 63907,
"name": "T-Kash",
"type": "mobile_money",
"type_display": "Mobile Money",
"is_active": true
}
],
"pagination": {
"count": 40,
"page": 1,
"page_size": 100,
"total_pages": 1
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
items | array | List of channel objects |
pagination | object | Pagination information |
Channel Object
| Field | Type | Description |
|---|---|---|
code | integer | Unique channel code used in transactions |
name | string | Human-readable channel name |
type | string | Channel type: mobile_money, bank, or internal |
type_display | string | Display-friendly channel type: "Mobile Money", "Bank", or "Internal" |
is_active | boolean | Whether the channel is currently active |
Pagination Object
| Field | Type | Description |
|---|---|---|
count | integer | Total number of channels matching the filters |
page | integer | Current page number |
page_size | integer | Number of items per page |
total_pages | integer | Total number of pages |
Status Codes
| Code | Status | Description |
|---|---|---|
| 200 | Success | Channels retrieved successfully |
| 401 | Unauthorized | Invalid or expired token |
| 500 | Server Error | Internal server error |
Error Responses
401 Unauthorized
{
"detail": "Invalid or expired token"
}
Examples
- cURL
- Python
- JavaScript
curl -X GET "https://sandbox.api.jpay.africa/api/v1/channels?page=1&page_size=100" \
-H "Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9..." \
-H "Content-Type: application/json"
import requests
def get_channels(access_token, channel_type=None, page=1, page_size=100):
headers = {
'Authorization': f'Bearer {access_token}',
'Content-Type': 'application/json'
}
params = {
'page': page,
'page_size': page_size
}
if channel_type:
params['type'] = channel_type
response = requests.get(
'https://sandbox.api.jpay.africa/api/v1/channels',
headers=headers,
params=params
)
if response.status_code == 200:
data = response.json()
channels = data['items']
pagination = data['pagination']
print(f"Page {pagination['page']} of {pagination['total_pages']} ({pagination['count']} total)")
for channel in channels:
print(f"{channel['name']} ({channel['code']}) - {channel['type_display']}")
return data
else:
print(f"Error: {response.status_code}")
print(response.json())
return None
# Usage
data = get_channels('your_access_token')
# Filter by type
bank_channels = get_channels('your_access_token', channel_type='bank')
async function getChannels(accessToken, channelType = null, page = 1, pageSize = 100) {
const params = new URLSearchParams({
page: page.toString(),
page_size: pageSize.toString()
});
if (channelType) {
params.append('type', channelType);
}
const response = await fetch(
`https://sandbox.api.jpay.africa/api/v1/channels?${params}`,
{
method: 'GET',
headers: {
'Authorization': `Bearer ${accessToken}`,
'Content-Type': 'application/json'
}
}
);
const data = await response.json();
if (response.ok) {
const { items: channels, pagination } = data;
console.log(`Page ${pagination.page} of ${pagination.total_pages} (${pagination.count} total)`);
console.log('Available Channels:');
channels.forEach(channel => {
console.log(`${channel.name} (${channel.code}) - ${channel.type_display}`);
});
return data;
} else {
console.error('Error:', data);
throw new Error(data.detail);
}
}
// Usage
try {
const data = await getChannels('your_access_token');
// Filter by type
const bankChannels = await getChannels('your_access_token', 'bank');
} catch (error) {
console.error('Failed to get channels:', error);
}
Channel Types
Mobile Money Channels
Mobile money channels are used for payments to/from mobile wallets. These are the most common payment method in Kenya.
| Code | Name | Description |
|---|---|---|
| 63902 | MPesa | Safaricom's mobile money service |
| 63903 | AirtelMoney | Airtel Kenya's mobile money service |
| 63907 | T-Kash | Telkom Kenya's mobile money service |
Collections only support mobile money channels. When initiating a collection, you must use a mobile money channel or let the system auto-infer based on the phone carrier.
Bank Channels
Bank channels are used for payouts to bank accounts.
| Code | Name | Description |
|---|---|---|
| 01 | KCB | Kenya Commercial Bank |
| 02 | Standard Chartered Bank KE | Standard Chartered Bank Kenya |
| 03 | Absa Bank | Absa Bank Kenya (formerly Barclays) |
| 07 | NCBA | NCBA Bank Kenya |
| 10 | Prime Bank | Prime Bank Kenya |
| 11 | Cooperative Bank | Co-operative Bank of Kenya |
| 12 | National Bank | National Bank of Kenya |
| 14 | M-Oriental | M-Oriental Bank |
| 16 | Citibank | Citibank Kenya |
| 18 | Middle East Bank | Middle East Bank Kenya |
| 19 | Bank of Africa | Bank of Africa Kenya |
| 23 | Consolidated Bank | Consolidated Bank of Kenya |
| 25 | Credit Bank | Credit Bank Kenya |
| 31 | Stanbic Bank | Stanbic Bank Kenya |
| 35 | ABC Bank | African Banking Corporation |
| 36 | Choice Microfinance Bank | Choice Microfinance Bank |
| 43 | Eco Bank | Ecobank Kenya |
| 50 | Paramount Universal Bank | Paramount Universal Bank |
| 51 | Kingdom Bank | Kingdom Bank Kenya |
| 53 | Guaranty Bank | Guaranty Trust Bank Kenya |
| 54 | Victoria Commercial Bank | Victoria Commercial Bank |
| 55 | Guardian Bank | Guardian Bank Kenya |
| 57 | I&M Bank | I&M Bank Kenya |
| 61 | HFC Bank | HFC Bank Kenya |
| 63 | DTB | Diamond Trust Bank Kenya |
| 65 | Mayfair Bank | Mayfair Bank Kenya |
| 66 | Sidian Bank | Sidian Bank Kenya |
| 68 | Equity Bank | Equity Bank Kenya |
| 70 | Family Bank | Family Bank Kenya |
| 72 | Gulf African Bank | Gulf African Bank |
| 74 | First Community Bank | First Community Bank |
| 75 | DIB Bank | Dubai Islamic Bank Kenya |
| 76 | UBA | United Bank for Africa Kenya |
| 78 | KWFT Bank | Kenya Women Finance Trust Bank |
| 89 | Stima Sacco | Stima Deposit Taking Sacco |
Payouts support both mobile money and bank channels. When paying to a bank account, you must specify the bank channel code.
Internal Channels
Internal channels are used for transferring funds between JPay merchant accounts.
| Code | Name | Description |
|---|---|---|
| 00 | JPay | Internal transfers between JPay merchant accounts |
Internal channels are used exclusively for moving funds between JPay merchant accounts. These are not available for external collections or payouts.
Auto-Inference for Phone Numbers
When initiating a transaction with a phone number and no channel specified, JPay automatically infers the channel based on the phone carrier:
| Phone Prefix | Carrier | Auto-Selected Channel |
|---|---|---|
| +2547xx | Safaricom | M-Pesa (63902) |
| +2541xx | Safaricom | M-Pesa (63902) |
| +25473x | Airtel | Airtel Money (63903) |
| +25478x | Airtel | Airtel Money (63903) |
| +25477x | Telkom | T-Kash (63907) |
Best Practice: For phone number transactions, you can omit the channel field and let JPay auto-detect the appropriate mobile money channel. This ensures customers always use the correct channel for their carrier.
Important Notes
Channel Availability:
- Channels may be temporarily disabled for maintenance
- Always check the
is_activefield before using a channel - Some channels may have transaction limits or restrictions
Integration Tips:
- Cache the channel list to reduce API calls
- Implement fallback handling if a channel becomes unavailable
- Display user-friendly channel names (use
namefield, notcode)
Next Steps
- Initiate Collection - Use channels for collections
- Initiate Payout - Use channels for payouts
- Best Practices - Integration best practices