curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.stateset.com/api/v1/x402/intents' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"amount": 49,
"asset": "string",
"cart_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"description": "Two-person tent, green — replacement for damaged pole set.",
"idempotency_key": "req_01J9X4Q8M2ZK7V3N",
"invoice_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"merchant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"metadata": "string",
"network": "string",
"nonce": 1,
"order_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"payee_address": "548 Market St",
"payer_address": "548 Market St",
"resource_method": "string",
"resource_uri": "string",
"signature_scheme": "string",
"validity_seconds": 250
}'
{
"amount": 49,
"amount_decimal": "string",
"asset": "string",
"block_number": 1001,
"cart_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"chain_id": 1001,
"created_at": "2026-08-31T14:22:05Z",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"invoice_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"network": "string",
"nonce": 1,
"order_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"payee_address": "548 Market St",
"payer_address": "548 Market St",
"status": "pending",
"tx_hash": "string",
"updated_at": "2026-08-31T14:22:05Z",
"valid_until": 1
}
Create an intent
Returns 409 when the cart or order already has a claiming intent, and 400 when the amount does not reconcile against it.
POST
/
api
/
v1
/
x402
/
intents
curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.stateset.com/api/v1/x402/intents' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"amount": 49,
"asset": "string",
"cart_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"description": "Two-person tent, green — replacement for damaged pole set.",
"idempotency_key": "req_01J9X4Q8M2ZK7V3N",
"invoice_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"merchant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"metadata": "string",
"network": "string",
"nonce": 1,
"order_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"payee_address": "548 Market St",
"payer_address": "548 Market St",
"resource_method": "string",
"resource_uri": "string",
"signature_scheme": "string",
"validity_seconds": 250
}'
{
"amount": 49,
"amount_decimal": "string",
"asset": "string",
"block_number": 1001,
"cart_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"chain_id": 1001,
"created_at": "2026-08-31T14:22:05Z",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"invoice_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"network": "string",
"nonce": 1,
"order_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"payee_address": "548 Market St",
"payer_address": "548 Market St",
"status": "pending",
"tx_hash": "string",
"updated_at": "2026-08-31T14:22:05Z",
"valid_until": 1
}
Confirm your deployment before running this request. This page describes an API contract;
a published reference does not establish hosted availability. Check the dated
host report and obtain your deployment URL and credentials.
Replace the example host if your provisioned service uses a different URL.
409 when the cart or order already has a claiming intent, and
400 when the amount does not reconcile against it.
Request body
CreateIntentRequest
integer (int64)
required
Amount in the asset’s smallest unit (e.g. 1000000 = 1 USDC). Minimum:
0.string
required
Asset symbol, e.g.
usdc, usdt, dai, ss_usd.string,null (uuid)
Cart this intent pays for. At most one claiming intent may exist per cart, and the amount must equal the cart’s
grand_total.string,null
string,null
string,null (uuid)
string,null
string,null
string
required
Network name, e.g.
set_chain, base, ethereum.integer,null (int64)
Minimum:
0.string,null (uuid)
Order this intent pays for, under the same contract as
cart_id.string
required
string
required
string,null
string,null
string,null
Preferred signature scheme (
ed25519, ml_dsa65, ed25519_ml_dsa65); absent keeps the intent default.integer,null (int64)
Minimum:
0.Response
IntentResponse
integer (int64)
required
Minimum:
0.string
required
Exact decimal amount, rendered as a string.
string
required
integer,null (int64)
Minimum:
0.string,null
integer (int64)
required
Minimum:
0.string
required
string
required
string,null
string
required
integer (int64)
required
Minimum:
0.string,null
string
required
string
required
string
required
string,null
string
required
integer (int64)
required
Minimum:
0.Status codes
| Code | Meaning |
|---|---|
201 | — |
400 | — |
409 | — |
Using this contract
Read the source OpenAPI document for declared schemas and alternatives. This page also includes documented corrections from the spec overlays. Example IDs and values are illustrative; replace them with records from your workspace.curl --silent --show-error --fail-with-body --request POST \
--url 'https://api.stateset.com/api/v1/x402/intents' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"amount": 49,
"asset": "string",
"cart_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"description": "Two-person tent, green — replacement for damaged pole set.",
"idempotency_key": "req_01J9X4Q8M2ZK7V3N",
"invoice_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"merchant_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"metadata": "string",
"network": "string",
"nonce": 1,
"order_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"payee_address": "548 Market St",
"payer_address": "548 Market St",
"resource_method": "string",
"resource_uri": "string",
"signature_scheme": "string",
"validity_seconds": 250
}'
{
"amount": 49,
"amount_decimal": "string",
"asset": "string",
"block_number": 1001,
"cart_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"chain_id": 1001,
"created_at": "2026-08-31T14:22:05Z",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"invoice_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"network": "string",
"nonce": 1,
"order_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"payee_address": "548 Market St",
"payer_address": "548 Market St",
"status": "pending",
"tx_hash": "string",
"updated_at": "2026-08-31T14:22:05Z",
"valid_until": 1
}
Last modified on October 20, 2026