What this is (and what it is not)
| Use case | Best choice |
|---|---|
| Open checkout in a modal from any page | Checkout Embed SDK (window.Shoppex) |
| Build a full storefront UI (products/cart/state) | Storefront SDK (@shoppexio/storefront) |
Quick Start
Option A: Data attributes (fastest)
Option A2: Group button
Option B: JavaScript API (more control)
Common events
Current behavior to know
- Group embeds are supported through
data-shoppex-group-idorShoppex.open({ groupId }). - Group embeds show a product picker first, then continue into the normal product checkout.
- Multiple
itemsare accepted by the API, but 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 is the setup that caused 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.- Your app still needs product data from somewhere if you want to build custom cards around it.
| What you are building | What you need |
|---|---|
| One buy button on an existing page | Embed SDK only |
| Custom landing page with your own product cards | Embed SDK + product data source |
| Full storefront with cart/state/search | Storefront SDK (@shoppexio/storefront) |
- 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 just app-level code you may add to keep your own project organized.
ProductCard, and Shoppex owns the checkout modal.
Next Steps
Copy/Paste Snippets
Ready-to-use snippets for Next.js, React, WordPress, and Webflow.
Embed SDK Reference
Full config, data attributes, API methods, and event contracts.
Security & Troubleshooting
CSP, origin rules, and production debugging checklist.
Embed Demo
Interactive demo with real embed patterns.
Storefront SDK
Build full storefront UI when modal-only checkout is not enough.