Docs / API reference
Wallets
Where your money sits. Assign shortcodes to a wallet and payments to them land there.
The Wallet object
A balance in KES that collections land in and payouts leave from. You can have as many as you need, for example one per shop or a separate payroll float.
Attributes
idstringUnique identifier, starting wal_.
namestringA name you choose.
balanceintegerAvailable balance in the smallest unit.
pendingintegerPending in, not yet available.
heldintegerReserved for payouts that are waiting for approval or still being sent. Not available to spend.
statusstringLocked and suspended wallets cannot send payouts. Dormant wallets have had no activity for 90 days.
One of
active,suspended,locked,dormantfrozenbooleanA frozen wallet takes no payments and sends no payouts.
shortcode_idsstring[]Shortcodes assigned to this wallet.
created_atstringISO 8601 timestamp.
Example object
{
"id": "wal_main",
"object": "wallet",
"name": "Main collections",
"currency": "KES",
"balance": 128450000,
"pending": 4230000,
"held": 0,
"status": "active",
"frozen": false,
"shortcode_ids": [
"sc_4012345",
"sc_5567890"
],
"livemode": false,
"created_at": "2026-06-12T09:00:00+03:00"
}/v1/walletsCreate a wallet
Add a wallet.
Headers
Idempotency-KeystringA unique value per logical request, up to 255 characters. Retrying with the same key returns the original result instead of creating a second one.
Body parameters
namestringrequiredA name you choose.
currencystringAlways KES.
One of
KES
Errors
- 400 invalid_request
- 403 permission_denied
See Errors for what each means.
curl -X POST "$PITISHA_API/v1/wallets" \
-H "Authorization: Bearer $PITISHA_SECRET_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-1042-attempt-1" \
-d '{
"name": "Online shop",
"currency": "KES"
}'{
"id": "wal_main",
"object": "wallet",
"name": "Online shop",
"currency": "KES",
"balance": 0,
"pending": 0,
"held": 0,
"status": "active",
"frozen": false,
"shortcode_ids": [],
"livemode": false,
"created_at": "2026-06-12T09:00:00+03:00"
}/v1/walletsList wallets
All wallets in this mode.
Query parameters
limitintegerHow many items to return, from 1 to 100. Defaults to 20.
starting_afterstringA cursor from a previous response's next_cursor. Returns the next page.
Errors
- 401 authentication_failed
See Errors for what each means.
curl -X GET "$PITISHA_API/v1/wallets" \
-H "Authorization: Bearer $PITISHA_SECRET_KEY"{
"object": "list",
"data": [
{
"id": "wal_main",
"object": "wallet",
"name": "Main collections",
"currency": "KES",
"balance": 128450000,
"pending": 4230000,
"held": 0,
"status": "active",
"frozen": false,
"shortcode_ids": [
"sc_4012345",
"sc_5567890"
],
"livemode": false,
"created_at": "2026-06-12T09:00:00+03:00"
}
],
"has_more": true,
"next_cursor": "cur_9fK2mQ"
}/v1/wallets/{id}Retrieve a wallet
Fetch one wallet and its balance.
Path parameters
idstringrequiredThe wallet id.
Errors
- 404 not_found
See Errors for what each means.
curl -X GET "$PITISHA_API/v1/wallets/ID_FROM_RESPONSE" \
-H "Authorization: Bearer $PITISHA_SECRET_KEY"{
"id": "wal_main",
"object": "wallet",
"name": "Main collections",
"currency": "KES",
"balance": 128450000,
"pending": 4230000,
"held": 0,
"status": "active",
"frozen": false,
"shortcode_ids": [
"sc_4012345",
"sc_5567890"
],
"livemode": false,
"created_at": "2026-06-12T09:00:00+03:00"
}/v1/wallets/{id}Update a wallet
Rename or freeze a wallet.
Path parameters
idstringrequiredThe wallet id.
Body parameters
namestringA new name.
frozenbooleanFreeze or unfreeze.
Errors
- 404 not_found
- 403 permission_denied
See Errors for what each means.
curl -X PATCH "$PITISHA_API/v1/wallets/ID_FROM_RESPONSE" \
-H "Authorization: Bearer $PITISHA_SECRET_KEY" \
-H "Content-Type: application/json" \
-d '{
"frozen": true
}'{
"id": "wal_main",
"object": "wallet",
"name": "Main collections",
"currency": "KES",
"balance": 128450000,
"pending": 4230000,
"held": 0,
"status": "active",
"frozen": true,
"shortcode_ids": [
"sc_4012345",
"sc_5567890"
],
"livemode": false,
"created_at": "2026-06-12T09:00:00+03:00"
}