Skip to main content
This guide puts one checkout block on your page, runs a test purchase and then switches it to live. You need a Shoppex shop with at least one public product. You need two values from the dashboard:
  • Your shop ID. Your shop’s slug.
  • Your product ID. Open Store → Channels → Embed Hub → Elements and pick the product under Add to your site. The code there already has both values filled in.
1

Add your site

Open Store → Channels → Embed Hub → Elements. Under Allowed sites, enter the address of your site, for example https://shop.example.com, click Add Site, then Save Changes.Only listed sites can show a live checkout. Enter the exact origin: https://www.example.com and https://example.com are two different sites. Changes reach your site within a minute. See Allowed sites for every rule.
Working on http://localhost or http://127.0.0.1? Test mode runs there without a list entry, so you can skip this step until you go live.
2

Place the checkout

Put the <div> where buyers should pay, and the script once before </body>. Pages that already have Shoppex buy buttons already have the script.
index.html
Replace YOUR_SHOP and YOUR_PRODUCT_ID. The block fills the width of the <div> and grows with its content.If your site sends a Content-Security-Policy header, add the Shoppex sources first. See Security and CSP.
3

Test a purchase

Open the page. The block shows the product and a Test mode badge. Enter an email, pick a payment method and click Pay … · Test.The block shows the success screen, and the browser console prints Order placed test_…. Test mode creates no invoice and charges nothing. See Test mode to simulate errors.
4

Go live

Change data-shoppex-mode="test" to data-shoppex-mode="live" and publish the page on a site from your list.
Live is also the default when you leave out data-shoppex-mode.
5

Deliver the order

Shoppex delivers the product itself, as for every other checkout. If your own system has to act on the order, use the order:paid webhook or the Developer API. Do not deliver from the success event: it is a browser event, and any script on the page can send one.

The block does not load

Add debug: true to Shoppex.mount to log every message between the page and the block. See Mount and options.