Skip to main content
POST
Typescript (SDK)

Authorizations

Authorization
string
header
required

API key in the format: Bearer {api_token}

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.

Maximum string length: 255

Body

application/json
product
string
required

Product ID the variant belongs to

name
string
amount_type
enum<string>
Available options:
free,
fixed,
custom
amount
integer | null
minimum_amount
integer | null
maximum_amount
integer | null
preset_amount
integer | null
currency
string | null
billing_type
enum<string>
Available options:
subscription,
one_time,
payment_plan
recurring_interval
enum<string> | null
Available options:
day,
week,
month,
year
interval_count
integer
installment_count
integer | null
setup_fee_amount
integer | null
trial_period_days
integer | null
revoke_after_days
integer | null
quantity_available
integer | null
waitlist
boolean
archived
boolean | null
hidden
boolean | null
form_id
string | null

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.

Response

Price variant created

id
string
required
object
string
required
name
string
required
amount
integer | null
required
amount_type
enum<string>
required
Available options:
free,
fixed,
custom
billing_type
enum<string>
required
Available options:
subscription,
one_time,
payment_plan
recurring_interval
enum<string> | null
required
Available options:
day,
week,
month,
year,
null
interval_count
integer
required
installment_count
integer | null
required
setup_fee_amount
integer | null
required
trial_period_days
integer | null
required
revoke_after_days
integer | null
required
quantity_available
integer | null
required
archived
boolean | null
required
position
integer
required
hidden
boolean | null
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
currency
string | null
required
discounted_from_amount
integer | null
required
minimum_amount
integer | null
required
maximum_amount
integer | null
required
preset_amount
integer | null
required
waitlist
boolean
required
form_id
string | null
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.

purchase_url
string
required
product
string
required
benefits
string[]