Skip to main content
DELETE
python (new sdk)

Authorizations

Authorization
string
header
required

Customer session tokens are specific tokens that are used to authenticate customers on your organization. You can create those sessions programmatically using the Create Customer Session endpoint.

Path Parameters

id
string<uuid4>
required

The subscription ID.

Response

Customer subscription is canceled.

created_at
string<date-time>
required

Creation timestamp of the object.

modified_at
string<date-time> | null
required

Last modification timestamp of the object.

id
string<uuid4>
required

The ID of the object.

amount
integer
required

The amount of the subscription.

Example:

10000

currency
string
required

The currency of the subscription.

Example:

"usd"

recurring_interval
enum<string>
required

The interval at which the subscription recurs.

Available options:
day,
week,
month,
year
Example:

"month"

recurring_interval_count
integer
required

Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on.

status
enum<string>
required

The status of the subscription.

Available options:
incomplete,
incomplete_expired,
trialing,
active,
past_due,
canceled,
unpaid,
paused
Example:

"active"

current_period_start
string<date-time>
required

The start timestamp of the current billing period.

current_period_end
string<date-time>
required

The end timestamp of the current billing period.

current_meter_period_start
string<date-time> | null
required

The start timestamp of the current meter period, if the product has a meter cycle set. Metered credits are granted and overage is settled on this cadence.

current_meter_period_end
string<date-time> | null
required

The end timestamp of the current meter period, if the product has a meter cycle set. This is when credits next renew.

trial_start
string<date-time> | null
required

The start timestamp of the trial period, if any.

trial_end
string<date-time> | null
required

The end timestamp of the trial period, if any.

cancel_at_period_end
boolean
required

Whether the subscription will be canceled at the end of the current period.

canceled_at
string<date-time> | null
required

The timestamp when the subscription was canceled. The subscription might still be active if cancel_at_period_end is true.

started_at
string<date-time> | null
required

The timestamp when the subscription started.

ends_at
string<date-time> | null
required

The timestamp when the subscription will end.

ended_at
string<date-time> | null
required

The timestamp when the subscription ended.

pause_at_period_end
boolean
required

Whether the subscription will be paused at the end of the current period.

paused_at
string<date-time> | null
required

The timestamp when the subscription was paused.

resumes_at
string<date-time> | null
required

The timestamp when a paused subscription is scheduled to automatically resume, if set.

customer_id
string<uuid4>
required

The ID of the subscribed customer.

product_id
string<uuid4>
required

The ID of the subscribed product.

discount_id
string<uuid4> | null
required

The ID of the applied discount, if any.

checkout_id
string<uuid4> | null
required
customer_cancellation_reason
enum<string> | null
required
Available options:
customer_service,
low_quality,
missing_features,
switched_service,
too_complex,
too_expensive,
unused,
other
customer_cancellation_comment
string | null
required
product
CustomerSubscriptionProduct · object
required
prices
(LegacyRecurringProductPriceFixed · object | LegacyRecurringProductPriceCustom · object | ProductPriceFixed · object | ProductPriceCustom · object | ProductPriceSeatBased · object | ProductPriceMeteredUnit · object)[]
required

List of enabled prices for the subscription.

A recurring price for a product, i.e. a subscription.

Deprecated: The recurring interval should be set on the product itself.

meters
CustomerSubscriptionMeter · object[]
required

List of meters associated with the subscription.

pending_update
PendingSubscriptionUpdate · object | null
required

Pending subscription update that will be applied at the beginning of the next period. If null, there is no pending update.

past_due_at
string<date-time> | null

The timestamp when the subscription entered past_due status.

seats
integer | null

The number of seats for seat-based subscriptions. None for non-seat subscriptions.