Withdraw from card
Move money off a card back to its linked card account or linked wallet, with one call for every card.
Withdrawing moves money from a card back to where the card is linked: its card account (account_id), or, for a card issued without one, its linked wallet (wallet_id). One call works for every card. Gravv picks how to move the money, and the answer tells you which.
You can withdraw from an active, frozen (freeze) or blocked card. Only an inactive card is refused.
A money example. Tunde leaves his employer, and his card holds 435.80 USD. His employer blocks the card so it cannot spend, then withdraws 435.80 USD. The money lands in the business's card account, or in its linked wallet as 435.80 USDC, and the card holds 0 USD.
If the card's balance is shared (see Check card balance), it belongs to several cards. Withdrawing takes money the other cards can spend.
After a block, Gravv may return a card's balance to its linked account or wallet by itself, once every card sharing that balance is blocked and the amount is at least 1 USD. Read the balance before you withdraw from a blocked card, and withdraw only what is still available.
POST /v1/cards/withdraw
amount is a JSON number in US dollars with at most 2 decimals, and not more than the card's available balance. The money always goes to the card's linked account or wallet. You cannot send it anywhere else.
The answer
Some cards pay the money out straight away. The answer is then completed, with the chain transaction:
Other cards pay the money out with a transfer. The answer is then pending, and the money arrives a few seconds later:
Either way, Gravv sends the cards.transaction.withdraw webhook when the withdrawal ends, and the card's balance drops by the amount.
Retrying
Send a new Idempotency-Key for each withdrawal. Gravv keeps the answer to a key for 24 hours, errors included, so sending the same key again returns the same answer and does not run the withdrawal again.
A withdrawal can answer with an error and still go through. Before you retry with a new key, read the card's balance and check for the cards.transaction.withdraw webhook. Retry only if the money did not move. Otherwise you withdraw twice.
What can go wrong
| Response | Why | Fix |
|---|---|---|
400 cannot withdraw from an inactive card | The card was never activated | Activate the card first |
400 insufficient balance | The amount is more than the card's balance. On a blocked card, Gravv may have returned it already | Read the balance again, and check for cards.transaction.withdraw |
400 you can withdraw up to 1.02 USD; the other 43.98 USD is refund credit, which stays on the card and cannot be withdrawn | The amount is within the card's balance, but part of that balance is merchant refunds, which can be spent on an active card but never withdrawn. The two figures are the card's own | Withdraw no more than the card's available balance. See Refunds can be spent, not withdrawn |
503 unable to verify the card's withdrawable balance, please try again | Gravv could not read how much can leave the card | Nothing moved, so retry with a new Idempotency-Key |
400 amount must be greater than zero | The amount is 0 or negative | Send a positive amount |
400 card has no account or wallet to withdraw to | The card has neither a card account nor a linked wallet | Contact support |
400 a withdrawal for this idempotency key is already in progress; retry shortly | An earlier call with this key is still running | Wait for the webhook or read the balance. Do not start another withdrawal until you know the outcome |
400 card withdrawal did not start, retry with the same idempotency key | Gravv could not start the transfer | Read the balance. If the money did not move, retry with a new key |
400 the card withdrawal could not be confirmed in time and may still complete; check the card's transactions before trying again with a new idempotency key | Gravv started the withdrawal but could not confirm it within about 40 seconds. The money may still move | Wait a minute, then read the balance and your webhooks. Retry with a new key only if the money did not move |
400 the request could not be completed or internal server error | The call failed or timed out. The money may still have moved | Read the balance and your webhooks before you retry. If the money did not move, retry with a new key |