Skip to main content
The embed opens the checkout over your page. The Checkout Kit puts it in your page, taken apart. The order can sit in your sidebar, the email box under a heading of yours, the ways to pay in your main column and the Pay button where your design ends. Seven pieces in all, each looking the way your site looks. It needs product IDs and no key, and it sells a whole cart.

Live demo

The checkout, as part of this page

Start it and the kit’s one piece that is the whole checkout is put in this page, on the page’s own ground, as it would stand on yours.

Adding it

Or all of it in one place: <div data-shoply-piece="checkout"></div>.

The pieces

A kit has one of checkout and payment: that piece is the checkout itself, and the others are optional. A piece you leave out is drawn inside it, where the checkout would have it. The exceptions are summary and coupon, which are only where you put them. Where a product asks the buyer questions, the payment piece asks them first, on a page of their own, and the pay piece says Continue to Payment. The email and billing pieces stay empty until the buyer goes on to the payment methods, where their answers are one line with Edit.

What it sells

A line that names no variant is given its product’s first. When your own basket changes, name the cart again: kit.set({ items: [...] }). A line can carry what the buyer chose on your page from your upsells: addons, the IDs of the product’s extras they added, and offer, the ID of the offer they added the product through. The storefront SDK gives you both.
The checkout prices them: an extra the product no longer has is left out, and an offer whose condition the cart no longer meets is charged at the product’s own price. An extra you include is in the order whether it is named or not.

How it looks

css is rules of your own, for these classes and nothing else: With :hover, :focus, :focus-within, :disabled, ::placeholder and @media. A rule may set how a thing looks: colours, borders, type, spacing, size, shadows, transitions. It may not fetch anything (no url(), no @import) or move things about (no position, display or transform). Whatever was left out of what you wrote is said in your page’s console.

From your own script

shoply:paid is also sent on window, as the embed sends it.
paid tells your page. It carries no order ID and is no proof of payment. Hand over goods of your own when your server receives the order.paid webhook.

Things to know

  • Your terms are yours to show. The kit asks no buyer to agree to your store’s terms and shows no link to them, since it is on your own site. Put them on your own page.
  • The pieces run on checkout.shoply.gg, in frames. Card details, the buyer’s email and the order never touch your page.
  • Analytics work as they do for the embed: load shoply.js on your pages and start it with your store’s ID.
  • Prices, the buyer’s currency, coupons and stock are the same as on your Shoply store.