Gravv
/Docs
Search docs or ask a question⌘K
DocsAgent
ChangelogTry sandbox
Guides Cards Manage card status

Manage card status

Freeze, unfreeze or block a card, and change its daily limit, with one update that always sends both status and limit.

3 min read

This page shows how to freeze, unfreeze or block a card and how to change its daily limit. Update card status changes a card's status, its daily limit, or both. It takes no Idempotency-Key.

A money example. Ada's card has a 300 USD daily limit. For a trip, she needs to pay a 750 USD hotel, so you send {"status": "active", "limit": 1000}. After the trip, you send {"status": "active", "limit": 300}. When she loses her phone, you send {"status": "freeze", "limit": 300}, and the card keeps its limit.

Warning

Send status and limit on every call. An update without limit saves the limit as 0. In live, a limit of 0 declines every payment. In sandbox, 0 means no limit, so the card loses its cap. Read the current limit first with Get card (spending_controls.daily_transaction_limit).

StatusMeaning
activeThe card can spend
freezeThe card is stopped for now. balance reads 0 while the card is frozen
blockedThe card is closed for good. You cannot unblock it. See What happens to the balance

You can change a card's status in these ways:

•
From active to freeze or blocked
•
From freeze to active or blocked
•
From inactive to active or blocked
freeze a card and keep its limit
curl --request PATCH \
--url https://api.gravv.xyz/v1/cards/a14ec356-f33d-4384-ba68-4d9bfa19765b/update \
--header 'Api-Key: <API_KEY>' \
--header 'Content-Type: application/json' \
--data '
{
"status": "freeze",
"limit": 300
}
'

The response is the whole card, as Get card returns it. To change only the limit, send the card's current status with the new limit. limit is a whole number of US dollars per day (an integer, such as 1000).

When the status changes, Gravv sends the cards.status.update webhook with event_data.card.status. Gravv sends no webhook for a limit-only change, or for an update that sends the status the card already has.

If you use a scoped API key, it needs the card:freeze or card:terminate scope.

What happens to the balance when you block a card

In sandbox, when you block the last card that spends from a balance, Gravv sends that balance back to your card account. It is a normal card withdrawal:

•
You receive the usual card withdrawal webhooks. The transfer's client_reference starts with block-return: (you never sent it), and its description is "Balance returned after card block".
•
The card withdrawal fee is charged, as for any withdrawal.
•
Only the money that is free moves. An amount still held for a pending payment follows once that payment settles or its hold ends.
•
A balance under 1 USD stays on the card, so the fee cannot cost more than the return.
The balance's other cardsWhat happens on block
None, or every other card is blockedThe balance goes back to the card account
An active cardNothing moves. The other card still spends the balance
A freeze cardNothing moves. A freeze can be undone
An inactive card, such as a physical card in the postNothing moves

A money example. Ada's only card holds 45 USD, and your card withdrawal fee is 1 USD. You block the card. 45 USD goes to your card account, and the 1 USD fee is charged to it.

To keep the balance for a replacement card, create the replacement first, then block the old card. The replacement shares the balance, so nothing moves.

In live, blocking a card does not move its balance yet. Withdraw the money before you block the card. See Withdraw from card.

What can go wrong

ResponseWhyFix
400 status is requiredYou sent only limit, or you left out the Content-Type: application/json header, so the API did not read the bodySend both fields with the header
400 json: cannot unmarshal number 1000.5 into Go struct field Body.limit of type intlimit was a decimal or a stringSend a whole number
400 card is blocked and cannot be updatedThe card is blockedIssue a new card
400 invalid status selectedThe status is not active, freeze or blockedUse one of those values
400 internal server error on a freezeThe status change is not allowed, such as inactive to freezeUse an allowed change. Read the card back, and contact support if it looks wrong
400 card status changed concurrently, please retryTwo updates arrived at the same timeRetry
400 card does not existThe card id is wrongCheck the id
Was this page helpful? Yes No