Read the balance a card spends from
/v1/cards/{id}/balanceRequires 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
| Name | Required | Description |
|---|---|---|
| id | required |
Example
curl https://api.rigid.fi/v1/cards/{id}/balance \
-H "Authorization: Bearer $RIGID_API_TOKEN"Responses
200The balance of the funding account the card spends from.
400Validation error
401Authentication required
403Forbidden
404Card not found
409The 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.
500Internal server error