Create a card application
A card needs an approved application, and activating virtual_cards creates it. Follow the application in sandbox and in live.
You cannot create a card on its own. Every card needs an approved card application behind it, where Gravv's card program runs its own checks on the cardholder. You create the application by activating the card feature for the customer.
A money example. You activate cards for Ada with a daily limit of 300 USD in mind. In sandbox, the card program approves her application at once, and a virtual card with a 300 USD daily limit appears about 4 seconds later. In live, the card program reviews her application first. Once it is approved, you issue the card and fund it with 150 USD.
Before you start
active. Its id is the account_id below. With no card account, use one of your wallets as wallet_id instead (see below).feature:read and feature:activate.Activate the card feature
Call Activate feature with feature_id virtual_cards:
| Field | Rule |
|---|---|
annual_remuneration | Yearly income in USD, a JSON number of at least 1000 |
estimated_monthly_limit | A JSON number of at least 1. When a card is issued during activation (sandbox), it becomes that card's daily limit |
account_id | Your card account's id, the same for every cardholder. Send this or wallet_id |
wallet_id | Only with no card account: the id of one of your wallets, linked to the card. Send this or account_id |
No card account? Send wallet_id instead of account_id: one of your wallets becomes the card's linked wallet. Withdrawals go back to that wallet. It must be active, not a savings wallet, the wallet of one of your accounts, or a card's own balance wallet (named card-group-…, or card-… for older cards), have an address, and be on the chain your cards are issued on. Another business's wallet is refused. Send one of the two, never both.
Gravv fills in ip_address from the address your request comes from.
status active means Gravv submitted the application. It does not mean a card exists, and the response carries no application id. If the customer has no liveness check yet, the response has status pending_liveness and a websdk_url. See Activate feature.
Find the application
status active. You do not need to call Create a card. If you do, the first call within 24 hours that asks for a virtual card in the same name returns this card, and other calls issue more cards.status "" (no card yet). Its id is the application id, and it will also be the first card's id.Live: follow the approval
Only List card applications shows application_status. The list has no customer filter, so page through it and match customer_id. Get card application returns the card status. That status stays "" until a card exists, so never poll it for approval.
| application_status | What to do |
|---|---|
pending, manual_review | Wait for cards.application.update |
needs_verification, needs_information | Show the cardholder the application_link, then wait for cards.application.update |
approved | Create the card |
denied, locked, canceled | Stop and contact support |
In sandbox, application_link is always "".
What can go wrong
| Response | Why | Fix |
|---|---|---|
400 cards service: internal server error | Neither account_id nor wallet_id sent, a number sent as a string, or the card program refused | Send account_id or wallet_id, and send numbers as numbers. If the error persists, contact support with the customer id |
400 failed to check liveness requirement: customer KYC must be completed before activating cards feature | KYC not finished | Wait for customer.kyc.status.completed |
200 with message Feature activation already exists with status: active | Already activated | Find the card with GET /v1/cards?customer_id=… |
400 card application is not yet approved! on POST /v1/cards | Live application still under review | Wait for approved, then send a new Idempotency-Key |
400 this customer already has a card application linked to card account … ; a card's link cannot be changed, so send that account_id (or … linked to wallet …; … send that wallet_id) | The customer already has an application, linked to another account or wallet. A card's link cannot change after it is filed | Send the account_id or wallet_id the message names, or leave both out when activating |
400 wallet … is the wallet of account …, so it cannot be a card's linked wallet; use a stand-alone wallet, or a card account with account_id | The wallet_id is the wallet behind one of your accounts. Money in it is counted on the account, so a card cannot use it | Send a wallet that has no account, or your card account as account_id |
400 a card's own balance wallet cannot be a card's linked wallet; use one of the business's other wallets | The wallet_id is a card's balance wallet (named card-group-…, or card-… for older cards) | Send one of your other wallets |
Gravv stores every failed request against its Idempotency-Key for 24 hours. After you fix a request, send it with a new key.
The application route
Create card application (POST /v1/cards/applications/new) works today only for business cards in sandbox. Live does not support it. Use activation for every individual cardholder.