Skip to main content
POST
/
intents
Create a payment intent
curl --request POST \
  --url https://api.cherp.dev/v1/intents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "chain": "solana:5eykt4UsFv8P8NJdTREpY1vzqKq2Kvdp",
  "token": "USDC",
  "amount": "10.50",
  "requestor": "<string>",
  "idempotencyKey": "order_982734",
  "fulfiller": "<string>",
  "direction": "request",
  "ttlSeconds": 86400,
  "metadata": {
    "orderId": "982734"
  }
}
'
{
  "intent": {
    "id": "pi_abc123def456ghij",
    "chain": "solana:5eykt4UsFv8P8NJdTREpY1vzqKq2Kvdp",
    "token": "USDC",
    "amount": "10.50",
    "requestor": "<string>",
    "direction": "request",
    "state": "created",
    "reference": "<string>",
    "expiresAt": "2023-11-07T05:31:56Z",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "livemode": true,
    "idempotencyKey": "<string>",
    "tokenAddress": "<string>",
    "amountBaseUnits": "<string>",
    "fulfiller": "<string>",
    "retryRequired": true,
    "pendingAtExpiry": true,
    "txSignature": "<string>",
    "detectedAt": "2023-11-07T05:31:56Z",
    "ataRentLamports": 123,
    "ttlSeconds": 86400,
    "confirmedAt": "2023-11-07T05:31:56Z",
    "finalizedAt": "2023-11-07T05:31:56Z",
    "metadata": {},
    "refundedBy": "<string>",
    "refundOf": "<string>"
  }
}

Authorizations

Authorization
string
header
required

API key. Use pk_live_* for production or pk_test_* for test mode.

Body

application/json
chain
string
required

CAIP-2 chain identifier

Example:

"solana:5eykt4UsFv8P8NJdTREpY1vzqKq2Kvdp"

token
string
required

Canonical symbol or chain-specific address

Example:

"USDC"

amount
string
required

Decimal string amount

Example:

"10.50"

requestor
string
required

Wallet address of the requestor

idempotencyKey
string
required

Caller-supplied idempotency key, unique per account per 24h

Example:

"order_982734"

fulfiller
string

Optional wallet address of the fulfiller

direction
enum<string>
default:request
Available options:
request,
send
ttlSeconds
number
default:86400

Time-to-live in seconds (min 300, max 2592000)

metadata
object

Custom key-value pairs, max 20 keys

Example:
{ "orderId": "982734" }

Response

Payment Intent created

intent
object