Payouts API
Send money to bank accounts or M-PESA. Supports single payouts and batch processing.
Bank Transfers
- • EFT - 1-2 business days
- • RTGS - Same day (KES 1M+)
- • PesaLink - Instant
M-PESA B2C
- • Instant delivery
- • Up to KES 150,000 per transaction
- • Real-time confirmation
Bank Transfer
/api/v1/payoutsSend Bank Transfer
Send money to any bank account in Kenya via EFT, RTGS, or PesaLink.
| Parameter | Type | Description |
|---|---|---|
amountrequired | number | Amount to send Example: |
currency | string | Currency (KES, USD, EUR) Default: |
referencerequired | string | Your unique reference (1-50 chars) Example: |
description | string | Payout description (max 255 chars) Example: |
destination.typerequired | string | Destination type: "bank" or "mpesa" Example: |
destination.accountNumberrequired | string | Bank account number (if type=bank) Example: |
destination.bankCoderequired | string | Bank code (if type=bank) Example: |
destination.accountName | string | Account holder name Example: |
callbackUrl | string | Webhook URL for status updates Example: |
Code Examples
const response = await fetch('https://api.serixpay.com/api/v1/payouts', {
method: 'POST',
headers: {
'Authorization': 'Bearer pk_test_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 10000,
currency: 'KES',
reference: 'PAYOUT-001',
description: 'Vendor payment',
destination: {
type: 'bank',
accountNumber: '1234567890',
bankCode: 'KCB',
accountName: 'John Doe'
},
callbackUrl: 'https://your-site.com/webhook'
})
});
const data = await response.json();
console.log(data.payoutId);M-PESA B2C
/api/v1/payoutsSend M-PESA Payout
Send money directly to a customer's M-PESA account.
| Parameter | Type | Description |
|---|---|---|
amountrequired | number | Amount to send Example: |
currency | string | Currency (KES, USD, EUR) Default: |
referencerequired | string | Your unique reference (1-50 chars) Example: |
description | string | Payout description (max 255 chars) Example: |
destination.typerequired | string | Destination type: "bank" or "mpesa" Example: |
destination.accountName | string | Account holder name Example: |
destination.phoneNumberrequired | string | M-PESA number (if type=mpesa) Example: |
callbackUrl | string | Webhook URL for status updates Example: |
Code Examples
const response = await fetch('https://api.serixpay.com/api/v1/payouts', {
method: 'POST',
headers: {
'Authorization': 'Bearer pk_test_your_api_key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
amount: 5000,
currency: 'KES',
reference: 'B2C-001',
description: 'Commission payment',
destination: {
type: 'mpesa',
phoneNumber: '254712345678',
accountName: 'John Doe'
},
callbackUrl: 'https://your-site.com/webhook'
})
});
const data = await response.json();
console.log(data.payoutId);Supported Banks
Use these bank codes for the destination.bankCode field:
KCBKCB Bank
EQUITYEquity Bank
COOPCo-operative Bank
ABSAAbsa Bank
STANBICStanbic Bank
NCBANCBA Bank
DTBDiamond Trust Bank
STANDARDStandard Chartered
Batch Payouts
Note
/api/v1/payouts/batchUpload Batch File
Upload a CSV or Excel file with payout data. Maximum file size: 10MB.
CSV Format
reference,amount,destination_type,account_number,bank_code,phone_number,account_name,description PAY-001,10000,bank,1234567890,KCB,,John Doe,Salary payment PAY-002,5000,mpesa,,,254712345678,Jane Smith,Commission PAY-003,15000,bank,0987654321,EQUITY,,Bob Wilson,Vendor payment
/api/v1/payouts/:idGet Payout Details
Retrieve the status and details of a payout by its ID.
{
"success": true,
"payout": {
"id": "pay_xyz789abc",
"reference": "PAYOUT-001",
"amount": 10000,
"currency": "KES",
"status": "completed",
"destination": {
"type": "bank",
"accountNumber": "****7890",
"bankCode": "KCB",
"accountName": "John Doe"
},
"createdAt": "2024-01-15T10:30:00Z",
"completedAt": "2024-01-15T10:35:00Z"
}
}Payout Statuses
Payout Webhook
Receive status updates at your callback URL:
{
"event": "payout.completed",
"timestamp": "2024-01-15T10:35:00Z",
"data": {
"payoutId": "pay_xyz789abc",
"reference": "PAYOUT-001",
"amount": 10000,
"currency": "KES",
"status": "completed",
"destination": {
"type": "bank",
"bankCode": "KCB",
"accountNumber": "****7890"
}
}
}