JamiDev

Checkout Links & Embed

Shareable checkout URLs, multi-product pickers, an overlay embed for your site, and where buyers land after paying.

Checkout links let you sell without writing a backend. Paste a link in a bio, a message or a button, or open checkout in an overlay on your own site. When you do have a backend, the same links add campaign metadata and return URLs to API checkouts.

Create links in Store → Checkout Links. A link is long-lived, unlike a checkout session, which expires after 30 minutes.

https://jami.bio/jamidev/c/cl_Q4sp2Xr5ybOi
  • One product: the link opens that product's checkout.

  • Several products: buyers pick one per checkout.

  • Metadata: the link's keys are merged into each order's metadata. On a conflict the link's value beats the product's, which makes links good for campaign tracking.

  • Success URL (optional): where buyers go after paying. {CHECKOUT_ID} is replaced with the session id:

    https://yoursite.com/thanks?checkout={CHECKOUT_ID}

Deactivate a link and its URL stops working at once. You can reactivate it later.

Pass the link's token as checkoutLink on POST /checkout to apply its metadata and success URL to an API checkout. It's only applied when the link is active, belongs to your organization and includes the product. Otherwise it's silently ignored, so a stale link never breaks a checkout.

Where buyers land

After paying, buyers see Jami's result page, which forwards them to the first of:

  1. the successUrl passed to POST /checkout (always honored with an API token; without one, only when its host matches one of your registered redirect URLs);
  2. the checkout link's success URL;
  3. your organization's redirect URLs in Settings → Buyer redirect URLs, with separate success, cancel and error URLs;
  4. otherwise, they stay on Jami's result page.

{CHECKOUT_ID} works in all of them. URLs are validated when saved and are never read from query parameters, so the flow can't be used as an open redirect.

A redirect is not a payment

Anyone can open your success URL. Fulfil orders from the order.completed webhook or from GET /checkout/{sessionId}, not from the buyer landing on your page.

Embedded checkout

Open checkout in a centered overlay on your own site, without sending visitors away. Add the script once, then mark any link or button:

<script defer src="https://jami.bio/jamidev-embed.js"></script>

<a href="https://jami.bio/jamidev/c/cl_Q4sp2Xr5ybOi" data-jami-checkout>Buy now</a>
AttributePurpose
data-jami-checkoutRequired. Clicking the element opens the overlay instead of navigating.
data-jami-checkout-urlCheckout URL to open, for elements without an href (like a <button>).
data-jami-checkout-theme"light" or "dark", passed to the checkout as a hint.

Style the element however you like. The script finds it by the attribute.

Events

The embed dispatches CustomEvents on window:

window.addEventListener('jami:checkout:loaded', () => console.log('checkout is visible'));
window.addEventListener('jami:checkout:success', (e) => console.log('paid, order', e.detail.orderId));
window.addEventListener('jami:checkout:close', () => console.log('closed'));

jami:checkout:success fires as soon as the payment confirms, including phone-confirmed payments, so you can update the page right away. Treat it as a UI signal only and confirm the order on your server.

Next

  • Sell from your own site with your own product grid: Storefront.
  • Get the order on your server: Webhooks.

On this page