Storefronts
A storefront is any client that sells for one business: a website, a mobile app, a kiosk screen or a shopping assistant. It uses only the Storefront API and the business’s publishable key.
What you get
Section titled “What you get”| Area | Endpoints |
|---|---|
| Business, theme and content | GET /store/foulad/tenant |
| Categories (only this business) | GET /store/foulad/categories |
| Products | GET /store/products, GET /store/products/{id} |
| Regions and prices | GET /store/regions (Bahrain, BHD, 10% VAT) |
| Cart | POST /store/carts, line items, promotions, shipping methods |
| Checkout | shipping options, payment collections and sessions, POST /store/carts/{id}/complete |
| Customers | register and log in (/auth/customer/emailpass), profile, addresses |
| Orders | GET /store/orders/{id}, and brand-scoped history at GET /store/foulad/orders |
These are the official Medusa 2.23.1 Store API endpoints that are safe for Sedra’s multi-business setup, plus the Sedra extensions under /store/foulad. Medusa’s own /store/product-categories, /store/collections and order list are not part of the Sedra contract, because they are not limited to one business. Use the Sedra extensions instead.
Checkout flow
Section titled “Checkout flow”POST /store/cartswithregion_id(from the tenant response).POST /store/carts/{id}/line-itemswithvariant_idandquantity.POST /store/carts/{id}with email and shipping address.GET /store/shipping-options?cart_id=…, thenPOST /store/carts/{id}/shipping-methods.POST /store/payment-collectionswithcart_id, thenPOST /store/payment-collections/{id}/payment-sessionswithprovider_id: "pp_foulad-sandbox_foulad-sandbox".POST /store/carts/{id}/complete. The response contains the order.
Payments are sandbox only today. See Payments.
Customer accounts
Section titled “Customer accounts”POST /auth/customer/emailpass/registerreturns a registration token.POST /store/customerswith that token creates the customer.POST /auth/customer/emailpasslogs in and returns a JWT forAuthorization: Bearer.POST /store/foulad/customers/linklinks the signed-in customer to the current business, so the business can see the customer in its own records.
One email means one customer account across all Sedra brands. Order history from GET /store/foulad/orders only includes orders from the business behind your publishable key.
Reference storefront
Section titled “Reference storefront”Sedra’s own demo storefronts (foulad.sedra.one, midad.sedra.one, market.sedra.one) are one server-rendered codebase on Cloudflare Workers, with no client JavaScript. Nothing in the backend depends on it. Next.js, Astro, SwiftUI, Flutter or anything else can use the same API.
Rules for shopping assistants
Section titled “Rules for shopping assistants”An AI shopping assistant is a storefront. It uses the publishable key and, at most, the shopper’s own customer token. It never receives a merchant sdr_int_ or sdr_ai_ credential. See Agentic commerce.