The Checkout APIs provide RESTful endpoints to manage cart state programmatically: create a cart, retrieve it, manage line items, apply/remove coupons, and assign cart ownership.This collection focuses on cart operations that feed checkout. It does not include payment submission or full checkout-step orchestration endpoints in this module.Quick Start#
Make your first cart in three steps:Who is this for?#
This API collection is designed for developers building integrations that need to control cart and checkout-entry flows outside of the standard storefront, including:Headless storefronts — Custom front-end implementations that manage their own cart and checkout UI
Mobile applications — Native iOS and Android apps with in-app purchasing flows
Mini-apps — Lightweight embedded experiences (e.g. social commerce, chat-based shopping)
Third-party integrations — Merchant tools, POS systems, and partner platforms that interact with the store's cart pipeline
Internal services — Backend systems that orchestrate cart creation, synchronization, and checkout handoff
What can you do?#
| Capability | Description |
|---|
| Cart lifecycle | Create, retrieve, and manage shopping carts scoped to a specific store |
| Line items | Add, update, and remove products using flexible identifiers (product ID, variant ID, or SKU) |
| Coupons & discounts | Apply and remove promotional coupon codes with real-time total recalculation |
| Ownership | Assign guest carts to authenticated Customers when transitioning from guest to logged-in state |
| Product options | Configure items with size, color, and other variant selections, plus notes and bundle payloads |
Endpoint Reference#
All paths are relative to https://api.salla.dev/store/v2/checkout.| Method | Path | Name | Auth | Description |
|---|
| POST | /generate | Generate cart | Optional | Creates a new cart (guest or authenticated) |
| GET | /{cartId} | Get cart | Optional | Retrieves cart state (include_items=true for line items) |
| POST | /{cartId}/items | Add cart item | Optional | Adds a product by ID, variant ID, or SKU |
| PATCH | /{cartId}/items/{item} | Update cart item | Optional | Updates quantity, options, or notes |
| DELETE | /{cartId}/items/{item} | Delete cart item | Optional | Removes a line item |
| POST | /{cartId}/coupon | Apply cart coupon | Optional | Applies a coupon code |
| DELETE | /{cartId}/coupon | Remove cart coupon | Optional | Removes the current coupon |
| POST | /{cartId}/guest | Save guest cart data | Optional | Saves guest contact details for checkout |
| POST | /{cartId}/assign | Assign cart to Customer | Required | Transfers cart to authenticated Customer |
Design principles#
Store-scoped — Every request is scoped to a single store via the Store-Identifier header, ensuring clear multi-tenancy
Stateful responses — Every mutating operation returns the updated cart, so the client can remain synchronized without extra reads
Flexible identification — Products can be referenced by ID, variant ID, or SKU, reducing the need for preliminary lookups
Consistent error handling — All errors follow a uniform envelope format with machine-readable codes and field-level validation details
Guest + auth aware — Cart generation supports both guest and authenticated contexts; guest carts can be assigned later when needed
Authentication#
The Store-Identifier header is required on all requests. Bearer token authentication is optional for guest cart operations and required for Customer-scoped operations like assigning a cart. See the Authentication guide for details.
Documentation Index#
| Document | Description |
|---|
| Authentication | Auth headers and security scheme |
| Key Concepts | Product identification, response structure, ownership, and errors |
| Usage Flows | Typical integration patterns and error recovery |
Modified at 2026-06-15 18:49:41