Bill Payments
Pay utility bills, TV subscriptions, and other services on behalf of users. Validate accounts before payment and receive confirmation.
Supported Providers
- KPLC (Prepaid & Postpaid)
- Nairobi Water
- DSTV / GOtv
- Safaricom Airtime
- And more...
API Reference
Get Bill Providers
Validate Bill Account
POST
/partner/bills/validatePay Bill
POST
/partner/billsFee
Bill payments have a flat fee of 10 KES per transaction.
Code Examples
bills.js
const BASE = 'https://api.wasaapay.com/api/v1/partner';const headers = { 'X-API-Key': process.env.WASAAPAY_API_KEY };// 1. Validate the account before payingconst validation = await fetch(`${BASE}/bills/validate`, {method: 'POST',headers: { ...headers, 'Content-Type': 'application/json' },body: JSON.stringify({providerCode: 'KPLC_PREPAID',accountNumber: '54321098765',}),});const { data: account } = await validation.json();if (!account.isValid) throw new Error('Invalid account');console.log('Customer:', account.customerName);// 2. Pay the billconst res = await fetch(`${BASE}/bills`, {method: 'POST',headers: { ...headers, 'Content-Type': 'application/json', 'X-Idempotency-Key': crypto.randomUUID() },body: JSON.stringify({walletId: 'wallet_abc123',providerCode: 'KPLC_PREPAID',accountNumber: '54321098765',amount: 500,}),});const { data: bill } = await res.json();console.log('Bill paid. Receipt:', bill.receiptNumber);