PriceVariants

Create price variant

Changed on

Creates a new price variant for a product

post/price_variants

Request

  • Base URL
    https://api.crevio.co/v1
  • Auth
    API key in header Authorization

Headers

Idempotency-Key, string

Makes this write safe to retry: a repeat with the same key replays the first response instead of creating a second resource. Scoped to the account, remembered for 24 hours; reusing a key with a different payload is an error.

Request body

PriceVariantRequest required
product, string required

Product ID the variant belongs to

name, string
amount_type, 'free' | 'fixed' | 'custom'
amount, integer nullable
minimum_amount, integer nullable
maximum_amount, integer nullable
preset_amount, integer nullable
currency, string nullable
billing_type, 'subscription' | 'one_time' | 'payment_plan'
recurring_interval, 'day' | 'week' | 'month' | 'year' nullable
interval_count, integer
installment_count, integer nullable
setup_fee_amount, integer nullable
trial_period_days, integer nullable
revoke_after_days, integer nullable
quantity_available, integer nullable
waitlist, boolean
archived, boolean nullable
hidden, boolean nullable
form_id, string nullable

A form (form_...) to ask at every checkout of this variant, including waitlist applications. Its email fields are filled with the buyer's email. null detaches it.

cross_sells, string[]

Up to 2 of your other price variants (price_...) whose products are recommended at checkout when this one is bought. Replaces the whole list; [] clears it.

Response

Price variant created

PriceVariant required
id, string required
object, string required
name, string required
amount, integer nullable required
amount_type, 'free' | 'fixed' | 'custom' required
billing_type, 'subscription' | 'one_time' | 'payment_plan' required
recurring_interval, 'day' | 'week' | 'month' | 'year' | 'null' nullable required
interval_count, integer required
installment_count, integer nullable required
setup_fee_amount, integer nullable required
trial_period_days, integer nullable required
revoke_after_days, integer nullable required
quantity_available, integer nullable required
archived, boolean nullable required
position, integer required
hidden, boolean nullable required
created_at, string date-time required
updated_at, string date-time required
currency, string nullable required
discounted_from_amount, integer nullable required
minimum_amount, integer nullable required
maximum_amount, integer nullable required
preset_amount, integer nullable required
waitlist, boolean required
form_id, string nullable required

The form (form_...) asked at every checkout of this variant, including waitlist applications. Its answers become a form submission on the order or waitlist entry.

benefits, string[]
cross_sells, string[] required

Price variants (price_...) recommended at checkout when this one is bought, at most 2.

purchase_url, string required
product, string required

Changes

    • warning

      the trial_period_days request property's max was set to 730.00

    • warning

      the trial_period_days request property's min was set to 0.00

    • info

      added the new optional request property cross_sells

    1 more change in this revision