Clavem

Stripe Checkout

Stripe Checkout is a payment page hosted by Stripe that collects payment details, takes a one-time payment or starts a subscription, and sends the customer back to your site, so you do not build or secure the form yourself.

How it works

Your server creates a Checkout Session with the items to buy, and the customer is redirected to the Stripe-hosted page. When the payment completes, Stripe sends the customer back and emits an event your backend can act on. As of November 2026, Stripe’s documentation lists three modes: payment for one-time payments, subscription for recurring items and setup for saving payment details to charge later. Checkout can be a hosted page, an embedded page or a form built with Stripe Elements.

A Payment Link is the no-code version: a shareable URL that opens a Stripe-hosted page, created in the Dashboard or with the API.

Discounts are optional. Setting allow_promotion_codes=true on a session adds a field where customers can type a promotion code.

Example: two copies in one order

Creating a session for two units of one price, as in Stripe’s API reference (the price id is a placeholder):

curl https://api.stripe.com/v1/checkout/sessions \
  -u "$STRIPE_SECRET_KEY:" \
  -d success_url="https://example.com/success" \
  -d "line_items[0][price]=$PRICE_ID" \
  -d "line_items[0][quantity]=2" \
  -d mode=payment

The response has a url to send the customer to, a status of open and a payment_status of unpaid until the customer pays.

Use Checkout Sessions when your code decides the price or quantity per buyer, attaches your own order id, or needs a different session each time. Use a Payment Link when one fixed offer on a shareable URL is enough, such as a product page button. Both end the same way for a seller who listens to events: a completed session.

How Clavem handles it

Clavem does not provide a checkout. It uses yours, and acts when Stripe reports a paid session. The rules from the Clavem docs:

What Stripe reports What Clavem does
checkout.session.completed, paid, with an email Creates the order, issues a license for each mapped line item, emails the buyer the keys and the order link
Paid, but no email address Issues nothing
Delayed payment method, not yet paid Issues nothing until checkout.session.async_payment_succeeded
Quantity 3 on a mapped line item Three keys, up to 100 per line item
Line item with no mapping Left alone; if nothing in the session is mapped, it is logged as unmapped

A purchase issues a license only for a Stripe product you mapped to a Clavem product. A mapping to a single price wins over a mapping to its whole product, so a monthly and a lifetime price of one Stripe product can issue different licenses. Subscription licenses expire at the end of the paid period plus three days. Details are in Connecting Stripe and how to add license keys to Stripe. The event side is explained under webhook.

Questions

What is the difference between Stripe Checkout and a Payment Link?

Both use a Stripe-hosted page. With Checkout your server creates a Checkout Session for each purchase through the API. A Payment Link is a reusable shareable URL you create in the Dashboard or API without writing server code.

Can Checkout sell several copies in one order?

Yes. Each line item takes a price and a quantity. Clavem issues one license per unit, up to 100 per line item.

Sources

  1. Stripe Docs, How Checkout works (checked November 2026)
  2. Stripe API Reference, Create a Checkout Session (checked November 2026)
  3. Stripe Docs, Payment Links (checked November 2026)
  4. Stripe Docs, Add discounts to Checkout (checked November 2026)