Billing

Cancel a subscription item

Cancel a specific subscription item. The subscription item can be canceled immediately or at the end of the current billing period.

delete/billing/subscription_items/{subscription_item_id}

Path parameters

subscription_item_idstring required

The ID of the subscription item to cancel

Query parameters

end_nowboolean

Whether to cancel the subscription immediately (true) or at the end of the current billing period (false, default)

Response

A commerce subscription item.

object'commerce_subscription_item' required

String representing the object's type. Objects of the same type share the same value.

idstring required

Unique identifier for the subscription item.

instance_idstring required

Unique identifier for the Clerk instance.

status'active' | 'canceled' | 'expired' | 'ended' | 'past_due' | 'upcoming' | 'incomplete' | 'abandoned' required

Current status of the subscription item.

plan_idstring nullable required

Unique identifier for the associated plan.

price_idstring

Unique identifier for the associated price

plan_period'month' | 'annual' required

The billing period for this subscription item.

payer_idstring required

Unique identifier for the payer.

is_free_trialboolean required

Whether this subscription item includes a free trial.

period_startinteger required

Unix timestamp (in milliseconds) when the current period started.

period_endinteger nullable required

Unix timestamp (in milliseconds) when the current period ends.

proration_datestring date

The day the subscription item was prorated from. Only available in some responses.

canceled_atinteger nullable required

Unix timestamp (in milliseconds) when the subscription item was canceled.

past_due_atinteger nullable required

Unix timestamp (in milliseconds) when the subscription item became past due.

ended_atinteger nullable required

Unix timestamp (in milliseconds) when the subscription item ended.

created_atinteger

Unix timestamp (in milliseconds) when the subscription item was created.

updated_atinteger

Unix timestamp (in milliseconds) when the subscription item was last updated.

Changes

Changed in 3 of the 15 revisions of this API.16

    • added the new payer-credits enum value to the payment_method/payment_type response property for the response status 200

      response-property-enum-value-added

    • added CommerceTotalsResponse-2 to the totals response property allOf list for the response status 200

      response-property-all-of-added

    • removed schemas-CommerceTotalsResponse from the totals response property allOf list for the response status 200

      response-property-all-of-removed

    This revision also has 7 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the optional property next_payment/allOf[CommerceSubscriptionItemNextPaymentResponse]/per_unit_totals to the response with the 200 status

      response-optional-property-added

    • added the optional property next_payment/allOf[CommerceSubscriptionItemNextPaymentResponse]/totals to the response with the 200 status

      response-optional-property-added

    • added schemas-CommerceTotalsResponse to the totals response property allOf list for the response status 200

      response-property-all-of-added

    • removed CommerceTotalsResponse from the totals response property allOf list for the response status 200

      response-property-all-of-removed