1. Create the app
2. Configure public values
EXPO_PUBLIC_ variable.
3. Create the client
crave-customer template from the active
Clerk Expo session. Clerk owns the session and token refresh; do not copy the
JWT into SecureStore.
4. Load the merchant and create a cart
., -, and _; the example encodes every dynamic component before composing dot-delimited keys. The environment, merchant, and location scopes prevent capabilities from crossing applications or deployment tiers. Store only the small cart session and receipt capability there—not customer JWTs, cart contents, or API caches.
Clear the guest cart capability after claim, deletion, expiry, or terminal checkout handling; retain only the returned revision when a claimed cart remains customer-authenticated. Let Clerk clear the customer session on logout. Store a deep-link receipt capability with receiptTokenStore.set(receiptId, token) only when resume support requires it, and remove it after terminal display or expiry. If the API returns CART_CONFLICT, fetch the latest cart before asking the customer to retry.
Native requests normally send no browser Origin header, so they do not require CORS registration. If you also ship an Expo web build, register that exact browser origin with Crave; never use a wildcard workaround.
marketplaceId is optional attribution for the app source, such as "mobile";
it is not a location ID. The route already scopes the cart to locationId.
For a signed-in shopper who still has a guest-capability cart, set the named
includeCustomerContext option to true on discount or payment-session calls
that need customer-aware validation or provider customer association. Omit it for
guest checkout; a claimed cart uses the customer JWT automatically.
Next steps
Manage Cart
Learn the capability and revision lifecycle.
Checkout Flow
Integrate payment and authoritative order-result polling.
Slack Community
Ask questions and get help from the Crave team and community.
Email Support
Reach out to hello@craveup.com for direct support.
