Skip to main content
A product is the listing; a price variant is how it’s priced and billed — and a product needs at least one price variant before it can go live. Get the creation order right and the rest is a small, predictable set of fields. You can hand all of this to the agent — “create a 49course,monthlyoptionat49 course, monthly option at 19, and a 3-payment plan” — and Crevio builds the product and its price variants for you. The model below is what those tools operate on, and what your own integrations will use directly.

The product lifecycle

A product moves through three states via its status field:
You cannot publish in one call. Creating a product with status: "active" and no price variants returns 422 validation_failed. The required sequence is:
  1. POST /products → creates a draft.
  2. POST /price_variants (one or more) → attach pricing via product: "prod_...".
  3. PATCH /products/{id} with status: "active" → publish.

Step 1 — Create the draft product

The response is a product with "status": "draft" and an id like prod_abc123. Other fields you can set at creation: body_html, button_cta, available_from / available_until (date-times for scheduled availability), tax_code, and images (covered below).

Step 2 — Attach a price variant

Every price variant must reference its product:

Step 3 — Publish

With the @crevio/sdk the same flow reads naturally:

The price variant model

A single product can carry several price variants (a “monthly” and an “annual”, say), and each is defined by two key enums plus a handful of modifiers.

amount_type — what the buyer pays

billing_type — how often they pay

Modifier fields

The response also returns discounted_from_amount (for showing a strike-through “was” price), benefits, purchase_url, and position (ordering among a product’s variants).

Worked examples

Each example below assumes you’ve already created a draft product prod_abc123 and shows just the price variant. Remember to PATCH the product to active once at least one variant exists.
A single $49 charge — the simplest sellable thing.

Adding images

A product’s gallery is set by passing an array of MediaLibrary file ids in images. The first id is the cover.
Get those file_... ids by uploading via POST /files, or by generating artwork with POST /images/generate (generated images land in your MediaLibrary automatically). Passing an empty array ("images": []) clears the gallery.
You can ask Crevio to do this end-to-end: “generate cover art for the guitar course and set it as the product image.” The agent generates the image, persists it to the MediaLibrary, and patches the product’s images for you.

Next steps

Checkouts

Turn published price variants into payments with checkouts and checkout links.

Subscriptions & billing

Manage the subscriptions, invoices, and refunds your price variants generate.

Discounts

Add promo codes scoped to specific price variants.

Commerce overview

Step back to the full mental model of how the primitives connect.