What this is (and what it is not)
Quick start
Common events
Current behavior to know
- Group embeds work through
data-shoppex-group-idorShoppex.open({ groupId }). - Group embeds show a product picker first, then continue into the normal product checkout.
- The API accepts multiple
items, but the current modal flow uses the first valid item. - Quantity is normalized to
1..999. - Invalid or empty
itemsdo not open checkout, unless a validgroupIdis provided.
If you already have your own product cards
This setup causes the most confusion in real projects, so here is the simple rule.- Use the Checkout Embed SDK when you only need Shoppex to open checkout.
- Use a product data source when you also render your own product list, prices, images, stock, or categories.
window.Shoppexhandles the modal checkout.- If you want to build custom cards around it, your app still needs product data from somewhere.
Typical product data sources:
- Shoppex Storefront API
- Storefront SDK (
@shoppexio/storefront) - Your own backend that already proxies Shoppex product data
data-shoppex-product-idis part of the public Embed SDK integration.data-shoppex-group-idis also part of the public Embed SDK integration.- Local helpers, TypeScript types, or
lib/shoppex.ts-style files are not required by Shoppex itself. - Those files are app-level code you can add to keep your own project organized.
ProductCard, and Shoppex owns the checkout modal.
Framework snippets
Replace all placeholder values:
PRODUCT_ID, GROUP_ID, VARIANT_ID, and https://your-site.com/thank-you.Next.js
React SPA
WordPress
Paste this into a Custom HTML block.Webflow
Add an Embed element and paste this.Bonus: programmatic multi-item button
The current modal flow uses the first valid item when multiple items are passed.
Group embed button
Hybrid: your own product cards + Shoppex checkout
Use this when you already render your own catalog UI and only want Shoppex for the checkout modal. Fetch product data however you want, render your own cards, and putdata-shoppex-product-id on the CTA button. Shoppex handles the rest.
- The product card layout is yours, not Shoppex’s.
- The checkout modal is Shoppex’s.
- You can get
productsfrom the Storefront API,@shoppexio/storefront, or your own backend. - You do not need to copy any specific
lib/shoppex.tsfile from another project. That kind of helper is one possible app structure.
Event snippet (analytics)
Embed SDK reference
Full config, data attributes, API methods, event contracts, CSP, and the production checklist.
Embed demo
Interactive demo with real embed patterns.