Create a card
Issue the first card after a live approval, or an extra card for a cardholder, with its daily limit and balance mode.
Create card issues a card for a cardholder whose card application is approved. Use it in two cases:
approved.Gravv sometimes issues the first virtual card during activation: always in sandbox, and in live when the cardholder's verification was already approved. You do not need to call this endpoint for that card. If you call it anyway, the first call within 24 hours of activation that asks for that card returns it instead of issuing a second one. A call asks for that card when it sets card_type virtual, the same name_on_card (case and spacing do not matter), and no funding.mode own or other group. In sandbox the name does not count, because sandbox cards print the cardholder's own name whatever you send. The answer's id is that card, it takes the card_limit you sent, and no second issuance fee is charged. A call that asks for something else, such as a physical card, issues a new card, and the activation card can still be returned by a later call that asks for it. Every later call issues a new card, and so does a first call after 24 hours or once that card is blocked.
A money example. Ada's live application is approved. You issue her a virtual card with card_limit 300, so she can spend up to 300 USD a day. Later you give her a second card for subscriptions with its own balance and a 50 USD daily limit, and move 30 USD onto it. Her main card's balance is unchanged.
Issue a card
| Field | Rule |
|---|---|
customer_id | The cardholder |
card_type | virtual. physical is Not yet available. See Physical card shipping |
card_limit | Daily limit in whole US dollars, a JSON number above 0. Gravv drops decimals (300.99 becomes 300). Change it later with Manage card status |
name_on_card | Up to 100 characters |
funding | Optional. {"mode": "own"} gives the card its own balance. {"mode": "shared"} or no funding spends from the cardholder's existing balance |
shipping_address | Physical cards only |
The first card's id equals the application id. Each card gets a 4-digit PIN at creation. Read it with Get card PIN. Gravv sends no webhook for a new card, so read the card with Get card.
Extra cards
Each extra card needs its own new Idempotency-Key, because the key identifies that issuance. The API refuses a request without a key, and it refuses the same key with a different body with 422 idempotency_key_reused.
A cardholder can hold up to 10 cards that are not blocked. A replacement that you send without funding spends from the same balance as the card it replaces. Create the replacement before you block the old card. In sandbox, blocking the last card on a balance sends that balance back to the card account (see Manage card status), so a replacement created after the block starts at 0.
What can go wrong
| Response | Why | Fix |
|---|---|---|
400 card application is not yet approved! | Live application still under review | Wait for approved, then retry with a new key |
400 card application not found! | You never activated cards for this customer | Activate cards first |
400 customer already holds the maximum of 10 cards | The customer has reached the 10-card limit | Block a card the customer no longer uses |
400 CardLimit is required, NameOnCard is required, CardType must be one of: physical virtual | A missing or wrong field. The error uses internal names, so CardLimit is card_limit | Fix the field and use a new key |
400 internal server error | Usually a number sent as a string ("card_limit": "300") | Send numbers as numbers and use a new key |
400 funding.mode must be "shared" or "own" | Bad mode | Use one of the two |
409 a card is already being issued for this customer, retry shortly | Another first-card request for this customer is still running, such as a double click | Wait a few seconds, then retry with the same key to get that card |
400 funding.card_group_id is only valid when funding.mode is "shared" | card_group_id with own | Drop it |
400 this card's balance is a new provider account whose application is <status>; retry with the same Idempotency-Key once it is approved | In live, a card with funding.mode own needs its own approval | Wait for the approval, then retry with the same key and body once 24 hours have passed since the first attempt (Gravv replays the 400 for 24 hours). A new key starts another card. If 24 hours is too long, contact support |