Marketplace
Get Merchant Balance
Retrieve wallet balances for a sub-merchant across all currencies.
GET
Intro
Returns a sub-merchant’s Khaime wallet balances, broken out by currency — the number to check before requesting or approving a payout.Context
This reads the wallet side of the payout flow: it’s what a merchant (or the operator, on their behalf) should check before calling Initiate Merchant Payout, and what an operator can use to sanity-check a request before calling Approve Merchant Payout. Balances build up from settled charges made against the merchant and go down from payouts and refunds.Hows
Path parameters
string
required
The ID of the sub-merchant to retrieve balances for.
Response
balances array rather than an error.
Response fields
Balance calculation
balance does not subtract funds already reserved by a pending payout request — check List Payout Requests if you need to account for in-flight reservations, since Initiate Merchant Payout itself calculates and enforces that separately.
Currency units
All amounts are in the smallest currency unit:Error cases
Whys
Broken out by currency instead of one combined number. A merchant selling in multiple currencies has genuinely separate, non-fungible balances — there’s no meaningful single “total” across NGN and USD without an exchange rate assumption Khaime isn’t going to make on your behalf. Returning an array keeps each currency’s numbers exact. Both raw and formatted balance.balance (smallest unit, integer) is what you should use for any arithmetic or comparison against amounts sent to other endpoints like Initiate Merchant Payout; formatted_balance exists purely so you’re not writing your own smallest-unit-to-major-unit formatting logic for a quick display.
Why nots
- Not a live ledger view. This reflects settled wallet transactions — it doesn’t show pending/in-flight charges still working their way through a payment gateway.
- Doesn’t account for pending payout reservations. A merchant with
balance: 1250000and a pending payout request for1000000doesn’t have1250000genuinely available — the reservation isn’t subtracted here. Cross-reference List Payout Requests if you need the true available amount ahead of calling Initiate Merchant Payout (which enforces the reservation itself). - Doesn’t cover Stripe connected-account balances. For merchants settling via Stripe direct-charge marketplace payments, funds can sit in their Stripe connected account rather than a Khaime wallet — this endpoint only reports the Khaime wallet side.
- Not a transaction history endpoint. You get aggregate totals and a count, not the underlying list of transactions — that’s a separate concern outside this endpoint’s scope.
