Skip to main content
A checkout is a single pay-for-this session; a checkout link is a reusable, shareable URL that opens one. Both turn your published price variants into money. You can ask Crevio to “send Jane a checkout for the $99 course with the LAUNCH20 code” and the agent builds it through the same API below. For programmatic flows — custom websites, “buy now” buttons, invoicing — you’ll create checkouts directly.

Creating a checkout

POST /checkouts takes one or more line items, each pointing at a price variant by id:
The response is a checkout ("object": "checkout", id like co_...) with a URL the buyer visits to pay. When they complete it, an order is created.

Checkout fields

Multiple line items

Pay-what-you-want items

For a price variant with amount_type: "custom", pass the buyer’s chosen unit price in amount (smallest currency unit, e.g. cents). The checkout total, each item’s amount in checkout_items, discount eligibility, and the resulting order all use it.
  • Omit amount and the item uses the variant’s preset_amount, then its minimum_amount, then the smallest price Crevio charges in that currency.
  • An amount below minimum_amount, above maximum_amount, between zero and the currency’s smallest chargeable price, or that is not an integer returns 400 with code invalid_parameter. 0 is accepted only when minimum_amount is 0.
  • An amount on a fixed or free price variant returns 400.
  • The buyer can still change the amount on the hosted checkout page (purchase_url) within the same bounds before paying.

Paying an invoice

Instead of line items, pass an invoice id to create a checkout that settles that invoice:
See Subscriptions & billing for creating and managing invoices.

Worked example: sell to a customer end-to-end

When the buyer pays, listen for the order.paid webhook event to fulfill the purchase. To run that whole path without charging a card, complete the checkout with POST /v1/checkouts/{id}/test_purchase, or open the purchase_url while signed in as the store’s owner and complete a test purchase. See Testing a paid order end to end. When you want one durable URL to share — in a bio link, an email, a “buy now” button — create a checkout link with POST /checkout_links:
The response includes an id (cl_...) and the shareable URL. Checkout links support full CRUD — update, list, retrieve, and delete them like any other resource.
Use a checkout for a one-off, often personalized sale (you know the buyer), and a checkout link for an evergreen, shareable offer (anyone can open it).

Account-wide checkout settings

The defaults every checkout inherits — tax, address collection, which inputs the buyer sees — live on a single account-wide resource at /v1/checkout_configuration. It is a singleton: no id, GET to read and PATCH to change.
Changing this configuration expires every open checkout on the account (except changes to the two abandoned_checkout_* fields), so buyers mid-purchase get a fresh session on the new settings rather than one priced under the old ones. Expect to re-create any checkout id you were holding on to. When collect_tax or tax_behavior changes, your Stripe tax settings are updated to match.

Next steps

Discounts

Build the promo codes you apply via discount_code and discount.

Subscriptions & billing

Orders, invoices, refunds, and managing recurring revenue after checkout.

Products & pricing

Create the price variants your checkouts and links reference.

Webhooks

React to checkout.created, order.paid, and other events in real time.