Contract 4d1e0ad · updated 2026-11-11
Lissen Ticketing
GuidesCheckout

Drop-in checkout

Embed Lissen's checkout component in your own page with one script and one mount

The drop-in checkout is the same component the hosted page is, mounted inside your page instead of served as ours. You keep your catalogue, your cart page and your design; the component takes the payment.

Everything inside it is ours: the cart summary, the contact step, Pay with Lissen, the card fields, the confirmation and the wait for the tickets to be issued. You write two lines and listen for what happens.

Mount it

Create a checkout session on your server, then hand the browser the session's client secret and your organizer slug:

<div id="checkout"></div>
<script src="https://tickets.lissen.com/checkout.js"></script>
<script>
  const checkout = window.LissenCheckout.mount("#checkout", {
    session: clientSecret,
    organizer: "your-organizer-slug",
  });

  checkout.on("paid", ({ order_id }) => {
    window.location.assign(`/thanks?order=${order_id}`);
  });
</script>

mount returns an instance with on(event, handler), update({ appearance }) and destroy(). on returns a function that removes that handler.

OptionRequiredMeaning
sessionyesThe checkout session's client secret
organizeryesThe organizer slug the session belongs to
appearancenoYour own look; see below
localenoA BCP-47 tag for copy and formatting

The component mounts an iframe on Lissen's origin. The client secret travels in that frame's URL fragment, so it is not part of the initial iframe request and never appears in a referrer or in any message. The component reads it inside the frame and presents it to the buyer API as a bearer credential — to Lissen's origin and to nowhere else. Nothing you subscribe to carries it either.

Load it before the session exists (optional)

Mounting waits for the session: the frame only starts loading once your server has answered. If your page knows the checkout is coming — the buyer has opened your ticket picker — it can make the frame first, and hand it the session when there is one:

const preloaded = window.LissenCheckout.preload("#checkout", {
  organizer: "your-organizer-slug",
});

// Later, once your server has created the session:
const checkout = preloaded.start({ session: clientSecret });
checkout.on("paid", ({ order_id }) => {
  /* … */
});

preload takes what describes the checkout — organizer, appearance, locale and, in host mode, identity and contact — and shows nothing until it is started. start takes what belongs to the session — session and, in host mode, attestation and checkoutToken — and returns the same instance mount does; the client secret still travels only in the frame's URL fragment. A preloaded checkout starts once — a new session is a new checkout — and preloaded.destroy() removes one you no longer need. Make it where it will be shown: moving an iframe in the page reloads it. It may be out of sight until then.

Nothing requires it: mount remains the whole integration.

Register the origins that may embed you

The component refuses to be framed by a page it does not expect. Add every origin your checkout appears on — including staging and preview hosts — to your organizer's embed origins: in your admin under Selling → Embedding, or with PATCH /v1/organizer. Until an origin is registered the frame stays blank and the browser reports a framing refusal in its console.

An origin is a scheme, a host and a port: https://events.example.com, not https://events.example.com/tickets.

This call replaces the whole set and takes no Idempotency-Key (one is refused with invalid_request): repeating it is safe without one.

Events

EventPayloadWhen
ready—The component is mounted and listening
session{ expires_at }The cart is loaded; the hold ends at this RFC 3339 instant, for a countdown of your own
contact{ email }The buyer's address has been captured
paying—The buyer pressed pay; the component is confirming, then issuing. A failed that follows means it is back on the form
focus{ top, bottom }A field took focus, at these CSS pixels from the top of the component. Scroll it clear of the keyboard if your page is the scroll container; Safari does this itself, Chrome on iOS does not
paid{ order_id, payment_intent_id, status }The order exists and payment is settled, including zero-total completion
failed{ message, code }A payment or a step did not go through
expired—The cart's hold ended
closed—The instance was destroyed

failed is informational. The component already shows the buyer what happened and offers them the retry, so you do not need to render the message; use it for your own logging.

Wait for paid before treating the purchase as done. The order confirmation and admission details are delivered by your notification configuration, as they are for every other checkout.

Appearance

The organizer's stored branding is the default: mount the component with no appearance at all and it already looks like your checkout. Anything you pass overrides it, part by part.

window.LissenCheckout.mount("#checkout", {
  session: clientSecret,
  organizer: "your-organizer-slug",
  appearance: {
    colors: {
      background: "#081218",
      surface: "#1a2b30",
      text: "#ddd5c0",
      muted: "#8fa0a2",
      accent: "#e3765d",
      onAccent: "#081218",
      danger: "#c83b35",
      border: "#234247",
    },
    fontFamily: "Josefin Sans, system-ui, sans-serif",
    radius: 20,
    spacing: 8,
    buttons: { primary: { fontWeight: 700, padding: "14px 22px" } },
    input: { border: "#3e6e74", placeholder: "#8fa0a2" },
    stripe: { theme: "night" },
  },
});

Reference

Every value is a plain CSS value. A number is read as pixels.

KeyApplies to
colors.backgroundThe component's backdrop
colors.surfacePanels and fields on that backdrop
colors.textBody text
colors.mutedSecondary text and hints
colors.accentPrimary actions and focus
colors.onAccentText on the accent; derived for contrast when unset
colors.dangerErrors
colors.borderRules and field borders
fontFamilyThe whole component, and the card fields
fontSizeBase size; everything else is relative
radius, radiusSmall, radiusLargeCorners; the two variants derive from radius
spacingOne step of the spacing scale; every gap is a multiple
borderWidth, borderStyleRules and field borders
shadows.card, shadows.focusRaised surfaces and focus rings
buttons.primary, buttons.secondarybackground, text, border, radius, padding, fontWeight, shadow
inputbackground, text, placeholder, border, radius, padding, focusBorder, focusShadow
parts.cart, parts.contact, parts.payment, parts.terminalbackground, text, border, radius, padding, gap, shadow for one part only
stripe.theme, stripe.labelsThe card fields' base theme and label placement
stripe.backgroundAn opaque hex colour Stripe is told sits under the card fields. Stripe's colour variables refuse translucent values, so give this when colors.surface or input.background is one; the translucent value still paints the fields

Change it live without remounting:

checkout.update({ appearance: { colors: { accent: "#7c3aed" } } });

A value that is not a single CSS value is ignored rather than applied — a declaration cannot be smuggled through a colour.

What does not theme

Very little. The chip that shows a buyer Lissen recognised wears the Lissen app icon's colours, and the Lissen mark is the Lissen mark; those are how a buyer recognises their own wallet at every organizer. The rest of the identity pieces — the email field, the six-slot code, the saved cards, the "Pay with Lissen" button, the "Remember me with Lissen" tick — are drawn from your appearance like everything else on the page.

Apple Pay and Google Pay are drawn by Stripe in their own brands' dress, as their guidelines require, at the standard control height and your input radius. The logo-only wallet buttons share a row when both are available; a single available wallet fills the width. Each wallet has its own column, without an overflow menu. The Pay with Lissen button remains on its own full-width row above them; Link in Bio gives it the same radius as the card fields.

Buyers who already have Lissen

A buyer whose browser Lissen recognises skips the contact form: the component shows their saved card and one button. A buyer who types an address Lissen already knows is offered a code and then their saved card. A buyer who is neither pays exactly as before, and may ask to be remembered for next time.

With the saved card selected, the card fields show its masked number, expiry and a masked security code. No new card details are needed to pay. Pressing one of those values or focusing a card field switches to entering another card; the saved-card chip lets the buyer select their saved card again.

None of this is yours to build or to configure. It happens inside the component, on every organizer, and a buyer can always decline it and pay as a guest.

The hosted page

Hosted checkout is the same component rendered full-page with the organizer's header around it. Use it when you would rather link a buyer away than embed anything; use the drop-in when the purchase should finish on your own page. There is one cart renderer either way.

For complete control of the interface, the buyer plane remains available with the same session credential — but you then own contact and payment yourself, and Pay with Lissen is not something you can integrate: the wallet belongs to this component.

For zero-total checkout, the shared component shows Get tickets without payment fields. Its paid event has an empty payment_intent_id because no payment was needed.

On this page