Skip to navigation

Get the organization wallet

Returns the wallet balance of the API token’s organization. Amounts are integers in the currency’s minor unit (paise for INR, cents for USD). The wallet belongs to the organization, so any workspace of the organization returns the same wallet. Read-only: an organization without a wallet gets 404 wallet_not_found and nothing is created. The token’s principal also needs permission to view the organization’s billing. Requires scope: billing.read.

# Example request with curl (set IBEE_API_TOKEN to a platform API token and WORKSPACE_ID to the workspace first).
curl "https://api.ibee.ai/v1/billing/wallet?workspace_id=$WORKSPACE_ID" \
-H "Authorization: Bearer $IBEE_API_TOKEN"

Authentication

AuthorizationBearer

IBEE platform API token. Production tokens start with ibee_prod_key_; development tokens start with ibee_dev_key_. Use a token only with its matching gateway environment.

Query parameters

workspace_idstringRequiredformat: "^[1-9][0-9]*$">=1 character

The positive numeric workspace ID to scope this request to. Zero, negative, and non-numeric values are rejected.

Response

Wallet returned successfully.
organization_idstring
The API token's organization.
currencystring or null

ISO 4217 currency of every amount, such as INR or USD.

statusstring or null

Wallet status, ACTIVE, FROZEN or CLOSED.

available_paid_balance_minorinteger or null
Purchased credit available to spend.
available_promo_balance_minorinteger or null
Promotional credit available to spend.
held_paid_balance_minorinteger or null

Purchased credit reserved for in-progress usage.

total_balance_minorinteger or null
Available paid, held paid and available promotional credit together.
low_balance_threshold_minorinteger or nullOptional
Balance below which the organization is warned, when set.
updated_atdatetime or nullOptional
When the wallet last changed.

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error
502
Bad Gateway Error
503
Service Unavailable Error
504
Gateway Timeout Error