Gravv
/Docs
Search docs or ask a question⌘K
DocsAgent
ChangelogTry sandbox
Collections Initiate a collection

Initiate a collection

Starts a collection from a payer. Card methods return a `payment_link` for the payer. `bank_transfer` returns payment instructions and bank details. The funds settle in stablecoin to the destination.

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

Starts a collection from a payer. Card methods return a payment_link for the payer. bank_transfer returns payment instructions and bank details. The funds settle in stablecoin to the destination.

Card amounts are charged in USD. Bank transfer works in BJ, BW, BF, CM, CI, CG, GA, ML, MW, NG, RW, ZA, TZ, TG, UG and ZM, chosen by the customer's address country. For saved cards and repeat charges, use payment intents.

Headers

NameDescription
Idempotency-Key:stringRequired
Required for POST requests. Reuse it only to retry the same request. Gravv stores a 400 with the key for 24 hours, so use a new key after you fix a rejected body.
X-Device-Id:string
Optional ID of the payer's device. On a payment intent, Gravv stores it and reuses it for later saved-card charges.

Body parameters

NameDescription
customer_id:stringRequired
Your Gravv customer. The customer record must have a phone number and a date of birth. Its address country decides which methods are available; there is no country field.
client_customer_id:stringRequired
Your own reference for the customer
amount:stringRequired
Amount in major units, as a string with at most 2 decimal places. For card methods it is a USD amount, whatever currency you send.
currency:stringRequired
Three-letter ISO 4217 code in upper case. For bank_transfer, use the local currency of the customer's country.
asset:string
Stablecoin to settle in, such as USDC or USDT. If you leave it out, USD settles as USDC, and a local currency settles as its tokenized asset where there is one.
network:string

Settlement network. If you send it, it must match the destination network.

Possible values: polygon, ethereum, base, stellar, solana, avalanche

client_reference:string
Your reference. It must be unique across your collections and payment intents. Gravv generates one if you leave it out.
is_anonymous:boolean
When true, Gravv does not send the payer's name and email to the card checkout
Defaultfalse
save_card:boolean
When true, asks the card checkout to save the card
Defaultfalse
metadata:object
Your own data, returned in webhooks for this collection. At most 50 keys. The keys provider_response, internal_transaction_id and system_metadata are reserved. For bank_transfer, put the payer's bank account number in bank_account_number.
Show 1 child attributesobject
source:objectRequired
Show 2 child attributesobject
destination:oneOfRequired
One of the following variants:
Show 5 child attributesoneOf

Response

Returns 200 OK. The collection was created

NameDescription
data:object
The new collection. Card methods return payment_link. bank_transfer returns instruction, bank_info, account, converted_amount and rate.
Show 17 child attributesobject
error:null

Errors

StatusMeaning
200The collection was created
400The request failed. The error names the field, such as source.methods: payment method 'pix' is not available for country 'BR'. The API rejects a customer without a phone number or a date of birth.
Was this page helpful? Yes No
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl --request POST \
--url 'https://api.gravv.xyz/v1/collections' \
--header 'Api-Key: <api-key>' \
--header 'Idempotency-Key: order_789_attempt_1' \
--header 'X-Device-Id: device-7f3a9c' \
--header 'Content-Type: application/json' \
--data '{
"amount": "50.00",
"currency": "USD",
"customer_id": "04dfb2e5-1274-4214-b5fd-3415fde7dc17",
"client_customer_id": "checkers_user",
"client_reference": "order-1001",
"source": {
"source_type": "external",
"methods": [
"card"
]
},
"destination": {
"destination_type": "internal_crypto_wallet",
"id": "bccb74d8-9715-478d-bcac-9d8184a19530"
}
}'
Responseapplication/json
200400OK
{
"data": {
"transaction_id": "07b655cc-3dbd-4f6c-a16c-4657946d2e08",
"payment_link": "https://checkout.example.com/payment/07b655cc-3dbd-4f6c-a16c-4657946d2e08",
"client_reference": "order-1001",
"status": "created",
"onramp_status": "initialized",
"new_onramp_status": "initialized",
"status_transition_deadline": "2026-10-31T23:59:59Z",
"country": "NG",
"currency": "USD",
"amount": "50.00",
"asset": "USDC",
"network": "polygon",
"converted_amount": "0.00",
"rate": "0.00"
},
"error": null
}