Create Cart

Creates a shopping cart. The cart is the first step of the online payment
flow: add items, then create a payment request on the cart to obtain a
checkout URL.

Important Notes

  • Requires carts:write scope.
  • Online payments must be enabled for the company to complete the flow. Carts can be created regardless, but payment request creation fails when online payments are disabled.
  • The cart always belongs to the authenticated company; any company_id sent in the body is ignored.
  • To sell a service and book it in the same flow, send an item with item_type: "service" and a single instance { "instance_type": "booking", "reference_id": null, "data": { "start_time": "...", "provider_id": ... } }. The booking is created automatically when the payment request is created, and released automatically if the payment request expires or is cancelled.
  • data.start_time must be an ISO 8601 datetime in UTC (Z or +00:00, e.g. 2026-08-01T13:00:00Z). Other offsets are accepted here but rejected when the booking is reserved at payment-request time (invalid_start_time).
  • data.creative_source cannot be set: it is always connect for the public API (any value sent is overridden).
  • Carts expire after 24 hours.
  • Item validation errors (400/422) from platform-sales are passed through unchanged; see the platform-sales carts documentation for the full dictionary.
  • Business errors proxied from platform-sales use legacy single-key codes (e.g. cart_not_found, invalid_start_time, creative_source_not_public) rather than the {error, detail} shape used by connect-level errors (auth, scope, rate limit).

Errors Dictionary

StatusErrorDetailDescription
401unauthorizedinvalid_api_keyMissing or invalid Bearer token.
401unauthorizedapi_config_inactiveAPI access is inactive for this company.
403forbiddenscope_deniedAPI key lacks carts:write scope.
400, 422(upstream)Item validation errors from platform-sales are passed through with legacy single-key codes (e.g. item_invalid_type, invalid_start_time, creative_source_not_public); see the platform-sales carts documentation for the full list.
429rate_limitedburst_limit_exceededPer-minute request limit exceeded.
429rate_limiteddaily_quota_exceededDaily request quota exceeded.
502upstream_unavailableThe upstream service is unavailable.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

Cart creation payload. The company is taken from the API key.

integer | null

Client the cart (and resulting sale/booking) belongs to.

integer | null
string | null
items
array of objects
required
length ≥ 1
items*

Cart item payload. Validation rules per item_type live in platform-sales.

integer
required

Catalog ID of the item (service, product, plan, etc.).

string
enum
required
string | null
string | null
string
required

Unit price as decimal string.

integer
required
string | null
string | null
instances
array of objects

Per-unit instances. For service bookings, exactly one instance with
instance_type: "booking". Use reference_id for an existing
booking, or reference_id: null plus data.start_time and
data.provider_id to create the booking on the fly when the
payment request is created. data.creative_source defaults to
connect when omitted.

instances
Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json