Skip to content
Product Sheet
<sessions-product-sheet>

Buy a single product — a pass, membership, gift card, or physical good — without the catalogue. Point it at a product id (from the GraphQL API or the Products embed) and it opens a checkout sheet: an optional guest name and email, the inline Stripe card form, and the purchase, all themed by your --sessions-* branding. Free products (or ones a code drives to zero) fulfil with no payment step. The checkout opens on mount — your own Buy button already chose the product, so there is no product sheet before it — and closing it emits a sessions:sheet-close event. Supply an auth token (directly or via a wrapping <sessions-context>) to buy on behalf of a signed-in visitor and save their card. Without one, a visitor buys a gift card or physical good as a guest where the business allows it; a pass or membership (or anything, with guest checkout off) opens on its price and terms without the card form, and its Buy button asks the visitor to sign in, then carries on into the checkout.

Install

<script type="module" src="https://assets.sessions.website/embeds/unstable/product-sheet.js"></script>
<sessions-product-sheet
  business="still-water-yoga-demo"
  product="&lt;product-id>"
></sessions-product-sheet>

Attributes

Edit any attribute below — the snippet above and the live preview to the side rebuild in place.

business : string

Handle of the business that sells the product, without the leading @. Optional when a wrapping <sessions-context business="…"> already provides it.

product : string

Id of the product to sell (a Pass, Membership, GiftCard, or PhysicalProduct). Opens the checkout sheet for it.

auth : token

Optional embed-scoped JWT. When set, the purchase is made on behalf of the token holder (and their card can be saved); when omitted, the visitor checks out as a guest where the product and business allow it, and is asked to sign in otherwise.

Events

Each is its own Event subclass, dispatched on the element. Read the state it changed from the element: event.target.selection. What isn’t state, like the booking just made, is on the event itself: event.booking, never event.detail. They bubble and cross shadow roots, so you can listen on the element or any ancestor. Outside a shadow root that holds the element, event.target is that root’s host, so read the element from event.composedPath()[0].

sessions:sheet-close
SessionsSheetCloseEvent
The visitor dismissed the checkout (or, before signing in, the product’s price and terms) — hide its container or restore your own UI. Closing the sign-in sheet doesn’t fire it: that returns the visitor to the product’s price and terms.

Content Security Policy

If your site sets a Content-Security-Policy, allow these origins: the embed loads its files from assets.sessions.website, calls the Sessions API on go.sessions.website, and frames sign-in and maps from embed.sessions.website. It also renders a card-payment form and (for guest checkout) a Cloudflare bot-challenge widget. Allow Cloudflare’s origin too, or they will be blocked.

script-src https://assets.sessions.website https://challenges.cloudflare.com;
connect-src https://assets.sessions.website https://go.sessions.website;
frame-src https://embed.sessions.website https://challenges.cloudflare.com;