Skip to content
Start here

Subscriptions

List Subscriptions
client.accounts.subscriptions.get(SubscriptionGetParams { account_id, zone_id } params?, RequestOptionsoptions?): SinglePage<Subscription { id, currency, current_period_end, 5 more } >
GET/{accounts_or_zones}/{account_or_zone_id}/subscriptions
Get Subscription
client.accounts.subscriptions.getByIdentifier(stringsubscriptionIdentifier, SubscriptionGetByIdentifierParams { account_id } params, RequestOptionsoptions?): Subscription { id, currency, current_period_end, 5 more }
GET/accounts/{account_id}/subscriptions/{subscription_identifier}
Create Subscription
client.accounts.subscriptions.create(SubscriptionCreateParams { account_id, zone_id, frequency, rate_plan } params, RequestOptionsoptions?): Subscription { id, currency, current_period_end, 5 more }
POST/{accounts_or_zones}/{account_or_zone_id}/subscriptions
Update Subscription
client.accounts.subscriptions.update(stringsubscriptionIdentifier, SubscriptionUpdateParams { account_id, frequency, rate_plan } params, RequestOptionsoptions?): Subscription { id, currency, current_period_end, 5 more }
PUT/accounts/{account_id}/subscriptions/{subscription_identifier}
Delete Subscription
client.accounts.subscriptions.delete(stringsubscriptionIdentifier, SubscriptionDeleteParams { account_id } params, RequestOptionsoptions?): SubscriptionDeleteResponse { subscription_id }
DELETE/accounts/{account_id}/subscriptions/{subscription_identifier}
Cancel Delayed Downgrade
client.accounts.subscriptions.cancelDowngrade(SubscriptionCancelDowngradeParams { account_id, subscription_ids } params, RequestOptionsoptions?): SubscriptionCancelDowngradeResponse
POST/accounts/{account_id}/subscriptions/cancel-downgrade
ModelsExpand Collapse
SubscriptionDeleteResponse { subscription_id }
subscription_id?: string

Subscription identifier tag.

maxLength32
SubscriptionCancelDowngradeResponse = unknown | string | null
One of the following:
unknown
string | null

SubscriptionsCancel Reason

Create Cancel Reason
client.accounts.subscriptions.cancelReason.create(stringsubscriptionIdentifier, CancelReasonCreateParams { account_id, other, reason_code } params, RequestOptionsoptions?): CancelReasonCreateResponse { id, other, reason_code, 2 more }
POST/accounts/{account_id}/subscriptions/{subscription_identifier}/cancel-reason
Get Cancel Reason
client.accounts.subscriptions.cancelReason.get(stringsubscriptionIdentifier, CancelReasonGetParams { account_id } params, RequestOptionsoptions?): CancelReasonGetResponse { id, other, reason_code, 2 more }
GET/accounts/{account_id}/subscriptions/{subscription_identifier}/cancel-reason
ModelsExpand Collapse
CancelReasonCreateResponse { id, other, reason_code, 2 more }
id?: string

The cancel reason identifier.

other?: string

Additional cancellation details.

reason_code?: Array<string>

The cancellation reason codes.

submitted?: string

When the cancel reason was submitted.

formatdate-time
subscription_id?: string

The subscription identifier.

CancelReasonGetResponse { id, other, reason_code, 2 more }
id?: string

The cancel reason identifier.

other?: string

Additional cancellation details.

reason_code?: Array<string>

The cancellation reason codes.

submitted?: string

When the cancel reason was submitted.

formatdate-time
subscription_id?: string

The subscription identifier.

SubscriptionsActions

Append Subscription Action
client.accounts.subscriptions.actions.append(stringsubscriptionIdentifier, ActionAppendParams { account_id, frequency, rate_plan } params, RequestOptionsoptions?): Subscription { id, currency, current_period_end, 5 more }
POST/accounts/{account_id}/subscriptions/{subscription_identifier}/action/append

SubscriptionsBulk

Create Subscriptions
client.accounts.subscriptions.bulk.create(BulkCreateParams { account_id, idemp_key, coupon_code, 3 more } params, RequestOptionsoptions?): BulkCreateResponse { client_secrets, subscriptions }
POST/accounts/{account_id}/bulk/subscriptions
ModelsExpand Collapse
BulkCreateResponse { client_secrets, subscriptions }
client_secrets?: Array<string> | null
subscriptions?: Array<Subscription { id, currency, current_period_end, 5 more } >
id?: string

Subscription identifier tag.

maxLength32
currency?: string

The monetary unit in which pricing information is displayed.

current_period_end?: string

The end of the current period and also when the next billing is due.

formatdate-time
current_period_start?: string

When the current billing period started. May match initial_period_start if this is the first period.

formatdate-time
frequency?: "weekly" | "monthly" | "quarterly" | "yearly"

How often the subscription is renewed automatically.

One of the following:
"weekly"
"monthly"
"quarterly"
"yearly"
price?: number

The price of the subscription that will be billed, in US dollars.

rate_plan?: RatePlan { id, currency, externally_managed, 4 more }

The rate plan applied to the subscription.

state?: "Trial" | "Provisioned" | "Paid" | 4 more

The state that the subscription is in.

One of the following:
"Trial"
"Provisioned"
"Paid"
"AwaitingPayment"
"Cancelled"
"Failed"
"Expired"