Skip to content

Balances API

Account balance operations. Access via payd.balances.

Methods

getAll(username?)

Fetch all account balances including fiat (local currency) and USD wallets.

Endpoint: GET /api/v1/accounts/{username}/all_balances

typescript
const result = await payd.balances.getAll(
  username?: string
): Promise<BalancesResponse>;

Parameters

FieldTypeRequiredDescription
usernamestringNo*Payd account username

*Falls back to defaultUsername if not provided.

BalancesResponse

FieldTypeDescription
fiatBalanceWalletBalanceLocal currency wallet (e.g., KES)
onchainBalanceWalletBalanceUSD wallet
_rawRecord<string, unknown>Raw API response

WalletBalance

FieldTypeDescription
balancenumberCurrent balance
convertedBalancenumberBalance converted to base currency
currencystringCurrency code (e.g., "KES", "USD")

Released under the MIT License.