Example apps
Each example is a complete, working checkout you can download, run locally with a test token and
adapt. They all follow the same rules as the guides: the server prices the cart, the app only
displays those totals, and payment goes through placeOrder.
| Example | Best for | Built with |
|---|---|---|
| Classic cart | Owning a checkout that looks and behaves like Shoppable’s hosted cart | React, Tailwind, React Router |
| Multi-step checkout | A full-page checkout with a cart page and one URL per step | React, plain CSS, React Router |
| Buy it now button | A one-product checkout on any page, with no framework or build step | Plain JavaScript |
Before you run one
- Copy your test token from the Developers page of the Shoppable customer portal
(Get your keys). Test tokens work on
localhostand place no real orders. - Pick a few UPCs (Universal Product Codes) that your cart’s retailers sell.
- Use Node.js 20 or later.
Unzip an example, copy .env.example to .env, fill in the token (and UPCs for the React
examples), then run npm install and npm run dev. Pay with a Stripe test card such as
4242 4242 4242 4242. Each download includes a README with a file tour and a checklist for going
live.
Classic cart
A copy of Shoppable’s hosted cart and checkout rebuilt on the SDK, for teams that want the same flow on their own site and full control of it.
- Cart: products grouped by retailer, a retailer picker on each product (cheapest offer first), quantity controls, coupon entry, free-shipping progress and the cost summary.
- Email step: the opt-in and terms copy from your Cart Builder settings, Apple Pay and Google Pay, and the shopper’s email.
- Payment: shipping address, “billing same as shipping” and card, then Place Order.
- Thank you: the order number, delivery address and totals.
Branding (color and logo) comes from the cart configuration, so the app matches what you set in the Cart Builder.
Multi-step checkout
Download multi-step-checkout.zip
A small storefront with a product grid, a cart page and a checkout split into Contact, Shipping and Payment, each on its own URL so back and refresh work.
- Pricing errors (an item going out of stock, a retailer minimum not met) are shown on the
affected line, using the
errorslist described in Cart and pricing. - The shipping step validates the address before the shopper can continue.
- Steps cannot be skipped, and the confirmation page reads the order from
useCart().lastOrder.
Buy it now button
A drop-in script that turns any button into a one-product checkout dialog. Add three script tags and a button:
<script src="https://js.stripe.com/v3/"></script><script src="https://developer.shoppable.com/sdk/checkout@0/index.global.js"></script><script src="/buy-now.js" data-shoppable-token="YOUR_CART_TOKEN" defer></script>
<button data-shoppable-buy-now data-upc="00012345678905">Buy now</button>On load each button shows its price, or “Unavailable” when no retailer sells the product. The dialog offers Apple Pay, Google Pay and Link first, then a card form, and shows the order number when the order is placed. It is keyboard accessible and works at phone width.