Skip to main content
The Storefront API is built around five entities: merchants, locations, menus, carts, and orders. This page explains how they relate to each other and what data each one carries.

Merchants

A merchant represents a restaurant brand. Each merchant has a name, logo, and one or more locations.
Use merchant.getBySlug() to resolve a brand slug into its list of locations. Each location in the response includes an id, display name, address, logo, and a methodsStatus object indicating which fulfillment methods are enabled.

Locations

A location is a single restaurant site. All storefront operations — menus, carts, payments — are scoped to a location.

Location identifiers

You can reference a location by either its UUID or slug. Both work in storefront location endpoints:

Fulfillment methods

Each location enables a subset of these fulfillment methods: Check methodsStatus on the merchant location response to determine which options to show:

Order times

Locations define when they accept orders. Fetch the available time slots before showing a schedule picker:
Each location has one or more menus. A menu contains categories, and each category links to products. The active menu depends on the time of day.

Products

A product represents a single orderable item:

Modifiers

Modifiers let customers customize a product (e.g., size, toppings, extras). Each modifier group has selection rules:
Modifier items can have nested child groups for multi-level customization (e.g., “Choose your protein” > “Choose your preparation”).

Carts

A cart holds the customer’s selections and computes all pricing automatically. You create a cart by starting an ordering session:
marketplaceId is optional source attribution, such as "web" or "mobile"; it is not a location identifier.

Cart lifecycle

Automatic pricing

Every time you modify the cart, the API recalculates all totals: Price fields are decimal strings. Format them using the cart currency and the customer’s locale.

Cart items

Each item in the cart tracks its product, quantity, modifier selections, special instructions, and computed totals:

Fulfillment configuration

Before checkout, set the fulfillment method on the cart. Each method requires different data:

Payments

Crave processes payments through Stripe Connect. You create a PaymentIntent via the API and confirm it on the client with Stripe.js:

Orders

Orders are created automatically when a payment succeeds — you do not create them via the API. After payment, the order appears in the restaurant’s merchant dashboard for fulfillment. Poll storefront.checkout.getOrderResult() after payment. It distinguishes payment_pending, order_pending, completed, and failed. Signed-in customers can list and read only their own orders through storefront.customer.orders.

Analytics events

Track key funnel events to measure storefront performance:
Every public analytics event requires authorization for its cart. ORDER_PLACED is recorded by the API during authoritative order creation and is not accepted from clients.

Currencies and countries

The API supports these currencies and countries: Currency is set at the merchant level and applies to all locations under that merchant.

Next steps

Display Menu

Fetch menus, categories, and products for a location.

Manage Cart

Add items, apply modifiers, and manage the cart lifecycle.

Checkout Flow

Collect customer details, set order time, and process payment.

Fulfillment Methods

Configure delivery, table-side, and room service.