curl -X POST https://api.autumnai.com/products \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": "Pro Product",
"name": "Pro Plan",
"is_add_on": false,
"is_default": false,
"items": [
{
"price": 20,
"interval": "month"
},
{
"feature_id": "messages",
"included_usage": 1000,
"price": 0.5,
"interval": "month",
"usage_model": "pay_per_use"
}
],
"free_trial": {
"duration": "day",
"length": 7,
"unique_fingerprint": false,
"card_required": true
}
}'
import { Autumn } from '@autumnai/node-sdk';
const autumn = new Autumn({
apiKey: process.env.AUTUMN_API_KEY,
});
const product = await autumn.products.create({
id: 'Pro Product',
name: 'Pro Plan',
is_add_on: false,
is_default: false,
items: [
{
price: 20,
interval: 'month',
},
{
feature_id: 'messages',
included_usage: 1000,
price: 0.5,
interval: 'month',
usage_model: 'pay_per_use',
},
],
free_trial: {
duration: 'day',
length: 7,
unique_fingerprint: false,
card_required: true,
},
});
from autumn import Autumn
autumn = Autumn(api_key="YOUR_API_KEY")
product = autumn.products.create(
id="Pro Product",
name="Pro Plan",
is_add_on=False,
is_default=False,
items=[
{
"price": 20,
"interval": "month",
},
{
"feature_id": "messages",
"included_usage": 1000,
"price": 0.5,
"interval": "month",
"usage_model": "pay_per_use",
},
],
free_trial={
"duration": "day",
"length": 7,
"unique_fingerprint": False,
"card_required": True,
},
)
{
"id": "Pro Product",
"name": "Pro Plan",
"group": null,
"env": "sandbox",
"is_add_on": false,
"is_default": false,
"archived": false,
"version": 1,
"created_at": 1761296829908,
"items": [
{
"type": "price",
"feature_id": null,
"interval": "month",
"interval_count": 1,
"price": 20,
"display": {
"primary_text": "$20",
"secondary_text": "per month"
}
},
{
"type": "priced_feature",
"feature_id": "messages",
"included_usage": 1000,
"interval": "month",
"interval_count": 1,
"price": 0.5,
"usage_model": "pay_per_use",
"billing_units": 1000,
"reset_usage_when_enabled": true,
"entity_feature_id": null,
"display": {
"primary_text": "1,000 Messages",
"secondary_text": "then $0.5 per 1,000 Messages"
}
}
],
"free_trial": {
"duration": "day",
"length": 7,
"unique_fingerprint": false,
"card_required": true
},
"base_variant_id": null,
"scenario": "new"
}
Products
Create Product
POST
/
products
curl -X POST https://api.autumnai.com/products \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": "Pro Product",
"name": "Pro Plan",
"is_add_on": false,
"is_default": false,
"items": [
{
"price": 20,
"interval": "month"
},
{
"feature_id": "messages",
"included_usage": 1000,
"price": 0.5,
"interval": "month",
"usage_model": "pay_per_use"
}
],
"free_trial": {
"duration": "day",
"length": 7,
"unique_fingerprint": false,
"card_required": true
}
}'
import { Autumn } from '@autumnai/node-sdk';
const autumn = new Autumn({
apiKey: process.env.AUTUMN_API_KEY,
});
const product = await autumn.products.create({
id: 'Pro Product',
name: 'Pro Plan',
is_add_on: false,
is_default: false,
items: [
{
price: 20,
interval: 'month',
},
{
feature_id: 'messages',
included_usage: 1000,
price: 0.5,
interval: 'month',
usage_model: 'pay_per_use',
},
],
free_trial: {
duration: 'day',
length: 7,
unique_fingerprint: false,
card_required: true,
},
});
from autumn import Autumn
autumn = Autumn(api_key="YOUR_API_KEY")
product = autumn.products.create(
id="Pro Product",
name="Pro Plan",
is_add_on=False,
is_default=False,
items=[
{
"price": 20,
"interval": "month",
},
{
"feature_id": "messages",
"included_usage": 1000,
"price": 0.5,
"interval": "month",
"usage_model": "pay_per_use",
},
],
free_trial={
"duration": "day",
"length": 7,
"unique_fingerprint": False,
"card_required": True,
},
)
{
"id": "Pro Product",
"name": "Pro Plan",
"group": null,
"env": "sandbox",
"is_add_on": false,
"is_default": false,
"archived": false,
"version": 1,
"created_at": 1761296829908,
"items": [
{
"type": "price",
"feature_id": null,
"interval": "month",
"interval_count": 1,
"price": 20,
"display": {
"primary_text": "$20",
"secondary_text": "per month"
}
},
{
"type": "priced_feature",
"feature_id": "messages",
"included_usage": 1000,
"interval": "month",
"interval_count": 1,
"price": 0.5,
"usage_model": "pay_per_use",
"billing_units": 1000,
"reset_usage_when_enabled": true,
"entity_feature_id": null,
"display": {
"primary_text": "1,000 Messages",
"secondary_text": "then $0.5 per 1,000 Messages"
}
}
],
"free_trial": {
"duration": "day",
"length": 7,
"unique_fingerprint": false,
"card_required": true
},
"base_variant_id": null,
"scenario": "new"
}
Creates a new product with pricing plans and feature configurations.
Request Body
string
required
The ID of the product. Used to identify the product in other API calls like checkout or update product.Must match the pattern:
^[a-zA-Z0-9_-]+$string
required
The name of the product.
string
The description of the product.
boolean
default:false
Whether the product is an add-on. Add-on products can be attached multiple times and don’t go through upgrade/downgrade flows.
boolean
default:false
Whether the product is the default product. Default products are enabled by default for new customers.
string
Product group which this product belongs to. Products within a group have upgrade/downgrade logic when the customer moves between them.
array
Array of product items that define the product’s features and pricing.
Show Product Item Object
Show Product Item Object
enum
The type of the product item.
price- Fixed price itempriced_feature- Feature with pricingfeature- Feature without pricing
string
The feature ID of the product item. Should be null for fixed price items.
number | 'inf'
The amount of usage included for this feature (per interval).
enum
The reset or billing interval of the product item. If null, feature will have no reset date, and if there’s a price, it will be billed one-off.
dayweekmonthyear
number
Interval count of the feature (e.g.,
3 for every 3 months).number
The price of the product item. Should be null if tiered pricing is set.
enum
Whether the feature should be prepaid upfront or billed for how much they use at the end of billing period.
prepaid- Customer pays upfront for a set quantitypay_per_use- Customer pays based on actual usage
number
The billing units of the product item (e.g., $1 for 30 credits).
array
enum
The type of tiered pricing: graduated or volume-based.
graduated- Split across bandsvolume- Flat rate for the matched tier
boolean
Whether the usage should be reset when the product is enabled.
string
The feature ID of the entity (like seats) to track sub-balances for.
object
Configuration for rollover and proration behavior.
Show Config Object
Show Config Object
object
enum
Behavior when quantity increases.
prorateno_prorate
enum
Behavior when quantity decreases.
prorateno_prorate
object
Free trial configuration for this product.
Show Free Trial Object
Show Free Trial Object
enum
default:"day"
required
The duration type of the free trial.
daymonthyear
number
required
The length of the duration type specified (e.g.,
7 for 7 days).boolean
default:false
Whether the free trial is limited to one per customer fingerprint.
boolean
default:true
Whether the free trial requires a card. If false, the customer can attach the product without going through a checkout flow or having a card on file.
Response
string
The ID of the product you set when creating the product.
string
The name of the product.
string
Product group which this product belongs to.
string
The environment of the product (
sandbox or production).boolean
Whether the product is an add-on and can be purchased alongside other products.
boolean
Whether the product is the default product.
boolean
Whether this product has been archived and is no longer available.
number
The current version of the product.
number
The timestamp of when the product was created in milliseconds since epoch.
array
Array of product items that define the product’s features and pricing.
Show Product Item Object
Show Product Item Object
enum
The type of the product item (
price, priced_feature, or feature).string
The feature ID of the product item. If the item is a fixed price, will be
null.enum
Single use features are used once and then depleted, like API calls or credits. Continuous use features are those being used on an ongoing basis, like storage or seats.
single_usecontinuous_usebooleanstatic
number | 'inf'
The amount of usage included for this feature.
enum
The reset or billing interval of the product item.
number
The interval count of the product item.
number
The price of the product item.
array
Tiered pricing for the product item.
enum
How tiers are applied: graduated (split across bands) or volume (flat rate for the matched tier).
enum
Whether the feature should be prepaid upfront or billed based on usage.
number
The amount per billing unit (e.g., $9 / 250 units).
boolean
Whether the usage should be reset when the product is enabled.
string
The entity feature ID of the product item if applicable.
object
object
Configuration for rollover and proration behavior of the feature.
object
string
ID of the base variant this product is derived from.
enum
Scenario for when this product is used in attach flows.
newupgradedowngradecrossgrade
object
Additional product properties.
Show Properties Object
Show Properties Object
boolean
True if the product has no base price or usage prices.
boolean
True if the product only contains a one-time price.
string
The billing interval group for recurring products (e.g., ‘monthly’, ‘yearly’).
boolean
True if the product includes a free trial.
boolean
True if the product can be updated after creation.
curl -X POST https://api.autumnai.com/products \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"id": "Pro Product",
"name": "Pro Plan",
"is_add_on": false,
"is_default": false,
"items": [
{
"price": 20,
"interval": "month"
},
{
"feature_id": "messages",
"included_usage": 1000,
"price": 0.5,
"interval": "month",
"usage_model": "pay_per_use"
}
],
"free_trial": {
"duration": "day",
"length": 7,
"unique_fingerprint": false,
"card_required": true
}
}'
import { Autumn } from '@autumnai/node-sdk';
const autumn = new Autumn({
apiKey: process.env.AUTUMN_API_KEY,
});
const product = await autumn.products.create({
id: 'Pro Product',
name: 'Pro Plan',
is_add_on: false,
is_default: false,
items: [
{
price: 20,
interval: 'month',
},
{
feature_id: 'messages',
included_usage: 1000,
price: 0.5,
interval: 'month',
usage_model: 'pay_per_use',
},
],
free_trial: {
duration: 'day',
length: 7,
unique_fingerprint: false,
card_required: true,
},
});
from autumn import Autumn
autumn = Autumn(api_key="YOUR_API_KEY")
product = autumn.products.create(
id="Pro Product",
name="Pro Plan",
is_add_on=False,
is_default=False,
items=[
{
"price": 20,
"interval": "month",
},
{
"feature_id": "messages",
"included_usage": 1000,
"price": 0.5,
"interval": "month",
"usage_model": "pay_per_use",
},
],
free_trial={
"duration": "day",
"length": 7,
"unique_fingerprint": False,
"card_required": True,
},
)
{
"id": "Pro Product",
"name": "Pro Plan",
"group": null,
"env": "sandbox",
"is_add_on": false,
"is_default": false,
"archived": false,
"version": 1,
"created_at": 1761296829908,
"items": [
{
"type": "price",
"feature_id": null,
"interval": "month",
"interval_count": 1,
"price": 20,
"display": {
"primary_text": "$20",
"secondary_text": "per month"
}
},
{
"type": "priced_feature",
"feature_id": "messages",
"included_usage": 1000,
"interval": "month",
"interval_count": 1,
"price": 0.5,
"usage_model": "pay_per_use",
"billing_units": 1000,
"reset_usage_when_enabled": true,
"entity_feature_id": null,
"display": {
"primary_text": "1,000 Messages",
"secondary_text": "then $0.5 per 1,000 Messages"
}
}
],
"free_trial": {
"duration": "day",
"length": 7,
"unique_fingerprint": false,
"card_required": true
},
"base_variant_id": null,
"scenario": "new"
}
⌘I