Gravv docs
Docs Agent Sign in Get API keys

Withdraw from a card

Moves money from an active card back to its card account. Some cards, including every new sandbox card, return the error this card withdraws by transfer. For those, send a POST /v1/transfer from the card to its card account. Retry a failed call with the same Idempotency-Key. Gravv also sends the result as the cards.transaction.withdraw webhook.

POSThttps://api.gravv.xyz/v1/cards/withdraw

Headers

1 to 255 printable ASCII characters. A retry with the same key within 24 hours returns the first response. Use a new key for each new card or withdrawal, and the same key to retry a failed one.

Request Body

USD, as a JSON number with at most 2 decimal places, not more than the card's balance

Request Examples

{
"card_id": "dce0192a-9b3d-440b-9500-33dc9ac8dc20",
"amount": 20
}

Responses

Status Description
200 The withdrawal is done
400 The card is not active, the balance is too low, or the card withdraws by transfer

200 response

{
"data": {
"tx_hash": "0x2e5d0af9189b4b4c23bc64b96295e730609ec91e50e452a5da0a4af4bfe5c192"
},
"error": null
}

400 response

What went wrong

{
"data": null,
"error": "this card withdraws by transfer: send a transfer from the card to its account"
}

Authorization

  • ApiKeyAuth
Was this page helpful?
ESC