Cart and checkout
Retail carts, guest addresses, shipping, in-chat payment and store checkout links.
Cart
addToCart reuses or creates a cart. An Openfront cart is created with createActiveCart, which returns an id and a proof. The browser saves both per store ID. The cart card lets the buyer change quantities (updateCartItem) or remove items (removeCartItem).
Quantity must be greater than 0(useremoveCartItemto remove)Quantity cannot exceed <MAX_QUANTITY> items per line
Address and shipping
setShippingAddress creates a guest user if needed. If the email already has an account, an email conflict card offers login, a different email, or the store checkout. setShippingMethod picks a shipping option from the store.
Pay in the chat
validateCartForCheckout.getAvailablePaymentMethods.initiatePaymentSessionfor Stripe or PayPal.- The browser renders Stripe elements or PayPal buttons with the store's publishable key.
completeCartturns the cart into an order.
Checkout link
getCheckoutLink returns <baseUrl>/<country>/account/checkout-link?cartId=... on the store. Restaurant links are <baseUrl>/checkout?cart_id=....
Login
loginUser shows a login form card. The form calls authenticateUser. The session token is saved per store ID.