How to activate a product for a customer
attach
from your application with:
customer_id
(your internal user ID)product_id
(defined when the product was created).customer_id
you send doesn’t already exist, Autumn will automatically
create a new customer. You can optionally set the properties of this new
customer through the customer_data
object.attach
method), Autumn will handle upgrades and downgrades between different pricing tiers.
scheduled
to start at the end of the current period.
A customer can cancel the scheduled downgrade by attaching the existing product again.
group
when creating the product, upgrades and
downgrades will only apply to products within the same group.Attaching a new product from a different group
will enable the new product in
addition to the existing product.reset_usage_when_enabled
property.
true
: existing usage is reset to 0 (typically used for consumable features like credits)false
: existing usage is carried over to the new product (typically used for continuous features like seats)reset_usage_when_enabled = true
for the Pro product’s credits
item, they’ll be reset to 500 credits on upgrade. If it’s false
they’ll have 480.Status | Description |
---|---|
active | The product is currently active and the customer has access to it |
trialing | The product is currently in the trial period (only applies to products with a free trial) |
expired | The product has expired and the customer no longer has access to it |
past_due | The customer is past their due date for payment. Usually applies when a customer’s payment fails |
scheduled | The product will start at the end of the current period |
cancelled | The product has been cancelled and is scheduled to expire at the end of the current period |
past_due
and the customer will immediately lose access to the product.
Please contact us if you’d like to change this behaviour.