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:
StatusMeaning
draftCreated but not visible or purchasable. The starting state.
activePublished and available for purchase. Requires at least one price variant.
archivedRetired — no longer listed or purchasable, but kept for history.
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

ValueBehavior
freeNo charge. Used for lead magnets and free tiers.
fixedA set price in amount (cents).
customPay-what-you-want. The buyer chooses, bounded by minimum_amount / maximum_amount, with preset_amount as the suggested default.

billing_type — how often they pay

ValueBehavior
one_timeA single charge.
subscriptionRecurring billing on recurring_interval (day | week | month | year) × interval_count.
payment_planA fixed number of installments (installment_count) — pay in parts, then it ends.

Modifier fields

FieldTypeApplies toNotes
amountint (cents)fixedThe price. 4900 = $49.00.
currencystringallLowercase ISO, e.g. "usd".
recurring_intervalenumsubscriptionday | week | month | year.
interval_countintsubscriptionMultiplier — e.g. month × 3 = quarterly.
installment_countintpayment_planNumber of installments.
setup_fee_amountint (cents)subscription / payment_planOne-time fee charged up front.
trial_period_daysintsubscriptionFree trial length before first charge.
revoke_after_daysintallAuto-revoke access N days after purchase.
minimum_amount / maximum_amountint (cents)custom (PWYW)Bounds on what a buyer may pay.
preset_amountint (cents)custom (PWYW)Suggested default amount.
quantity_availableintallCaps how many can be sold — e.g. seats in a cohort or limited spots.
waitlistboolallCollect interest when sold out.
hiddenboolallHide this variant from the website (still purchasable by link).
archivedboolallRetire this variant.
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.