Skip to content

Read the balance a card spends from

GET/v1/cards/{id}/balance

Requires an API client bearer token.

Resolves the funding account the card draws on and returns its balance, read straight from the ledger. For a person card that account belongs to the card's CARDHOLDER, so cards that draw on it report the SAME balance — this is not a per-card balance. A business card spends from its business's shared account: an API client reads that balance only through GET /v1/businesses/{id}/balance, and this route answers it 409 business_card_balance_refused. Not every card has one: a card issued before funding accounts were required (pre-#214); while the ledger module was off, or switched on but not yet known to the cards service, and before its cardholder had an account; or, for a card issued before issuance began refusing the case, before its programme's configuration had reached the cards service — has none, never gains one later, and is answered 409 here. For a programme-scoped caller another programme's card is answered 404, exactly as one that does not exist.

Parameters

Path parameters

NameRequiredDescription
idrequired

Example

curl https://api.rigid.fi/v1/cards/{id}/balance \
  -H "Authorization: Bearer $RIGID_API_TOKEN"

Responses

200

The balance of the funding account the card spends from.

card_idstringrequired
funding_account_idstringrequired
asset"EUR" | "GBP" | "USD"required
ledgerstringrequired
availablestringrequired
pending_instringrequired
heldstringrequired
400

Validation error

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
401

Authentication required

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
403

Forbidden

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
404

Card not found

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
409

The card has no funding account: it was issued before funding accounts were required (pre-#214); while the ledger module was off, or switched on but not yet known to the cards service, and before its cardholder had one; or, for a card issued before issuance began refusing the case, before its programme's configuration had reached the cards service. Re-issue it with the ledger module on. Also 409 business_card_balance_refused for an API client's read of a business card.

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring
500

Internal server error

typestringrequired
titlestringrequired
statusintegerrequired
detailstring
instancestring