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

Create a card

Issues a virtual or physical card once the customer's application is `approved`. The first card gets the application's ID. Each further card needs a new Idempotency-Key; a customer can hold 10 cards, not counting blocked ones. Gravv sets a PIN for you; read it with `GET /v1/cards/{card_id}/pin`. Fund the card with a transfer whose destination is the card.

POSThttps://api.gravv.xyz/v1/cardsTry it
Api-Key

Headers

NameDescription
Idempotency-Key:stringRequired
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.

Body parameters

NameDescription
customer_id:stringRequired
card_limit:numberRequired
Spending limit in whole USD per day. Decimals are dropped.
card_type:stringRequired
Possible values: virtual, physical
name_on_card:stringRequired
shipping_address:object
Required for a physical card. address_line2 is not read.
Show 7 child attributesobject
funding:object
How the card is funded. shared joins a card group and shares its balance; without card_group_id it joins the cardholder's default group. own gives the card its own balance. Leave it out to use the application's group.
Show 4 child attributesobject

Response

Returns 200 OK. The card is issued

NameDescription
data:object
Show 4 child attributesobject
error:null

Errors

StatusMeaning
200The card is issued
400Invalid field, no approved application, the card cap reached, or the card could not be created. Field errors use names such as CardLimit and CountryISOCode.
Was this page helpful? Yes No
Previous
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl --request POST \
--url 'https://api.gravv.xyz/v1/cards' \
--header 'Api-Key: <api-key>' \
--header 'Idempotency-Key: issue-card-jane-1' \
--header 'Content-Type: application/json' \
--data '{
"customer_id": "9e3cccad-e9ae-47a0-81ee-063af0159310",
"card_limit": 50,
"card_type": "virtual",
"name_on_card": "Jane Doe"
}'
Responseapplication/json
200400OK
{
"data": {
"message": "Card creation request is processing",
"status": true,
"id": "dce0192a-9b3d-440b-9500-33dc9ac8dc20",
"fee_charged": false
},
"error": null
}