Skip to main content
POST
/
v1
/
ucp
/
tokens
Create a UCP checkout token
curl --request POST \
  --url https://api.getsly.ai/v1/v1/ucp/tokens \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "merchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "items": [
    {
      "sku": "<string>",
      "quantity": 123,
      "unit_price": "<string>",
      "currency": "<string>"
    }
  ],
  "settlement_preferences": {
    "accepted_rails": [
      "usdc"
    ],
    "settlement_window": "T+1"
  },
  "expires_in": 900,
  "metadata": {}
}
'
{
  "data": {
    "id": "<string>",
    "token": "<string>",
    "total": "<string>",
    "currency": "<string>",
    "expires_at": "2023-11-07T05:31:56Z",
    "settlement_url": "<string>",
    "status": "pending"
  }
}

Authorizations

Authorization
string
header
required

API key (pk_test_* or pk_live_), JWT session, agent token (agent_), Ed25519 session (sess_), or portal token (portal_).

Body

application/json
merchant_id
string<uuid>
required
items
object[]
required
Minimum array length: 1
settlement_preferences
object
required
expires_in
integer
default:900
Required range: x <= 86400
metadata
object

Response

Token created

data
object
required