cancelSubscriptionItem()
Cancels a subscription item. Returns the updated CommerceSubscriptionItem.
function cancelSubscriptionItem(
subscriptionItemId: string,
params?: CancelSubscriptionItemParams,
): Promise<CommerceSubscriptionItem>- Name
endNow?- Type
boolean- Description
If
true, the subscription item will be canceled immediately. Iffalseor omitted, it will be canceled at the end of the current billing period.
const response = await clerkClient.billing.cancelSubscriptionItem('subi_123', { endNow: true })Backend API (BAPI) endpoint
This method in the SDK is a wrapper around the BAPI endpoint DELETE /commerce/subscription_items/{id}. See the BAPI reference for more information.
Feedback
Last updated on