api

post/api/subscriptions/update/

Query parameters

customer_idstring required

Filter to a specific customer.

plan_idstring uuid required

Filter to a specific plan.

valuestring required
property_namestring required

The string name of the property to filter on. Example: 'product_id'

Filter to a specific set of subscription filters. If your billing model only allows for one subscription per customer, you very likely do not need this field. Must be formatted as a JSON-encoded + stringified list of dictionaries, where each dictionary has a key of 'property_name' and a key of 'value'.

Request body

replace_plan_idstring uuid

If provided, will replace the current subscription's plan with this plan. If this is provided,turn_off_auto_renew and end_date will be ignored. The provided plan must have the same duration as the current plan.

invoicing_behavior'add_to_next_invoice' | 'invoice_now'

The invoicing behavior to use when replacing the plan. Invoice now will invoice the customer for the prorated difference of the old plan and the new plan, whereas add_to_next_invoice will wait until the end of the subscription to do the calculation.

usage_behavior'transfer_to_new_subscription' | 'keep_separate'

The usage behavior to use when replacing the plan. Transfer to new subscription will transfer the usage from the old subscription to the new subscription, whereas reset_usage will reset the usage to 0 for the new subscription, while keeping the old usage on the old subscription and charging for that appropriately at the end of the month.

turn_off_auto_renewboolean

Turn off auto renew for the subscription

end_datestring date-time

Change the end date for the subscription.

Response

start_datestring date-time required

The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.

end_datestring date-time required

The time the subscription starts. This will be a string in yyyy-mm-dd HH:mm:ss format in UTC time.

auto_renewboolean required

Whether the subscription automatically renews. Defaults to true.

is_newboolean required

Whether this subscription came from a renewal or from a first-time. Defaults to true on creation.

fully_billedboolean required

Whether the subscription has been fully billed and finalized.

Changes