Skip to main content
Use these snippets to integrate the Checkout Embed SDK quickly.
Replace all placeholder values:
  • PRODUCT_ID
  • GROUP_ID
  • VARIANT_ID
  • https://your-site.com/thank-you


Bonus: Programmatic Multi-Item Button

Current modal flow uses the first valid item when multiple items are passed.

Group Embed Button

Use this when you want buyers to choose one product from a Shoppex group inside the modal. The group view opens first, and when the buyer picks a product, Shoppex continues into the normal product checkout flow.

Hybrid Example: 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 put data-shoppex-product-id on the CTA button — Shoppex handles the rest.
Notes:
  • The product card layout is yours, not Shoppex’s.
  • The checkout modal is Shoppex’s.
  • You can get products from the Storefront API, @shoppexio/storefront, or your own backend.
  • You do not need to copy any specific lib/shoppex.ts file from another project. That kind of helper is just one possible app structure.

Event Snippet (Analytics)


Embed SDK Overview

Start here for concept and quick setup.

Embed SDK Reference

Full options and behavior reference.

Security & Troubleshooting

CSP and production debugging.

Embed Demo

Interactive demo page.