Wallets
Wallets store user funds. Each wallet has a unique account number and supports KES currency.
Sandbox Wallets
In sandbox mode, newly created wallets are automatically funded with 0 KES balance. You need to make a deposit to fund your wallet before testing test withdrawals, transfers, and other operations without needing to first deposit funds.
API Reference
Create Wallet
Get Wallet Balance
GET
/partner/wallets/:walletId/balanceGet Wallet Transactions
GET
/partner/wallets/:walletId/transactionsCode Examples
wallets.js
const BASE = 'https://api.wasaapay.com/api/v1/partner';const headers = { 'X-API-Key': process.env.WASAAPAY_API_KEY };// Create a walletconst res = await fetch(`${BASE}/wallets`, {method: 'POST',headers: { ...headers, 'Content-Type': 'application/json', 'X-Idempotency-Key': crypto.randomUUID() },body: JSON.stringify({ externalUserId: 'user_001', currency: 'KES' }),});const { data: wallet } = await res.json();// Get balanceconst bal = await fetch(`${BASE}/wallets/${wallet.id}/balance`, { headers });const { data: balance } = await bal.json();console.log('Balance:', balance.availableBalance, 'KES');// Transactionsconst txns = await fetch(`${BASE}/wallets/${wallet.id}/transactions?limit=20`, { headers });const { data: transactions } = await txns.json();