Read the organization's wallet

The prepaid balance the billing provider keeps for the organization: credits paid for and given, drawn from first by every invoice.

GET/v1/billing/wallet

The prepaid balance the billing provider keeps for the organization: credits paid for and given, drawn from first by every invoice. state: none until a first top-up. Read from the billing provider at the time of the call; the billing provider not answering is upstream. With billing off, a wallet in state none.

For people only: a signed-in person's token makes this call. An API key is refused with person_required. The person's role must be one that may read billing.

Request

curl "https://api.pod.mapier.ai/v1/billing/wallet" \
  -H "Authorization: Bearer $POD_PERSON_TOKEN"

Answer

200. The wallet.

200
{
  "state": "none",
  "currency": "example",
  "balance_cents": 1,
  "ongoing_balance_cents": 1,
  "paid_credits_cents": 0,
  "granted_credits_cents": 0
}
FieldTypeAlwaysWhat it is
state"none" | "active" | "terminated"Yes
currencystringYesISO 4217.
balance_centsintegerYes
ongoing_balance_centsintegerYesThe balance once the month's usage so far is drawn from it, as the billing provider estimates it.
paid_credits_centsintegerYesAt least 0.
granted_credits_centsintegerYesAt least 0.

Errors

The refusals this call is known for: person_required, upstream. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.

In the SDKs

ClientCall
TypeScriptpod.billing.wallet()
Pythonpod.billing.wallet()