Skip to main content
POST
/
v1
/
ucp
/
checkouts
/
batch
Batch-create checkouts
curl --request POST \
  --url https://api.getsly.ai/v1/v1/ucp/checkouts/batch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "checkouts": [
    {
      "merchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "items": [
        {
          "sku": "<string>",
          "quantity": 123,
          "unit_price": "<string>",
          "currency": "<string>",
          "description": "<string>"
        }
      ],
      "currency": "USD",
      "style": "modal",
      "success_url": "<string>",
      "cancel_url": "<string>",
      "expires_in": 900,
      "metadata": {}
    }
  ],
  "idempotency_key": "<string>"
}
'
{
  "batch_id": "<string>",
  "total": 123,
  "created": 123,
  "failed": 123,
  "checkouts": [
    {
      "id": "<string>",
      "merchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "status": "created",
      "items": [
        {
          "sku": "<string>",
          "quantity": 123,
          "unit_price": "<string>",
          "currency": "<string>",
          "description": "<string>"
        }
      ],
      "total": "<string>",
      "currency": "<string>",
      "style": "modal",
      "expires_at": "2023-11-07T05:31:56Z",
      "created_at": "2023-11-07T05:31:56Z",
      "session_url": "<string>",
      "success_url": "<string>",
      "cancel_url": "<string>",
      "metadata": {}
    }
  ]
}

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
checkouts
object[]
required
Required array length: 1 - 100 elements
idempotency_key
string

Response

201 - application/json

Batch created

batch_id
string
required
total
number
required
created
number
required
failed
number
required
checkouts
object[]
required