Skip to content

Create payment intent

POSThttps://api.gravv.xyz/v1/collections/cards/payment-intents

Creates a card payment intent and returns a payment link for the hosted checkout UI.

If you provide a card_token, the service automatically initiates a charge after creating the intent.

Body Params

  • customer_idstringrequired
  • client_customer_idstringrequired
  • amountstringrequired
  • currencystringrequired
  • client_referencestringrequired
  • destinationobjectrequired
  • sourceobjectrequired
  • card_tokenstring

    To auto-charge a customer, use the token you got from the webhook response in your first call of this endpoint.

  • metadataobject

Headers

  • Idempotency-Keystring

    A unique key to prevent duplicate requests.

Responses

Language
curl --request POST \
--url 'https://api.gravv.xyz/v1/collections/cards/payment-intents' \
--header 'Api-Key: <Api Key>' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"customer_id": "f827e428-c497-4b21-8855-99d978909c28",
"client_customer_id": "merchant-user-123",
"amount": "3.50",
"currency": "USD",
"client_reference": "order-abc-123",
"destination": {
"destination_type": "internal_crypto_wallet",
"id": "b628ff35-429b-48f7-bcf0-6a49df106fc6"
},
"source": {
"source_type": "external",
"id": "src_80aebb6ea2594a74bc215a64",
"methods": [
"card"
]
},
"metadata": {
"order_id": "ord_123"
}
}'
{
"intent_id": "pi_429f578b-675a-4b68-abe3-856cd976257f",
"client_secret": "pis_a1b2c3d4...",
"client_reference": "order-abc-123",
"status": "created",
"amount": "100.50",
"currency": "USD",
"requires_action": false,
"payment_key": "eyJhbGciOiJIUzI1NiIs...",
"payment_link": "https://your-hosted-ui.com/pi_429f578b-...?session=eyJqd3Q...",
"metadata": {
"order_id": "ord_123"
},
"created_at": "2026-04-08T10:00:00Z",
"expires_at": "2026-04-09T10:00:00Z"
}