diff --git a/.changeset/spicy-shirts-kiss.md b/.changeset/spicy-shirts-kiss.md new file mode 100644 index 00000000000..63e10f5a733 --- /dev/null +++ b/.changeset/spicy-shirts-kiss.md @@ -0,0 +1,5 @@ +--- +'@clerk/clerk-js': patch +--- + +Replace the `/subscriptions` FAPI endpoint with `/subscription_items` for cancelling subscription items. diff --git a/packages/clerk-js/src/core/resources/CommerceSubscription.ts b/packages/clerk-js/src/core/resources/CommerceSubscription.ts index d2f8ae66219..fb2bae29029 100644 --- a/packages/clerk-js/src/core/resources/CommerceSubscription.ts +++ b/packages/clerk-js/src/core/resources/CommerceSubscription.ts @@ -68,8 +68,8 @@ export class CommerceSubscription extends BaseResource implements CommerceSubscr const json = ( await BaseResource._fetch({ path: orgId - ? `/organizations/${orgId}/commerce/subscriptions/${this.id}` - : `/me/commerce/subscriptions/${this.id}`, + ? `/organizations/${orgId}/commerce/subscription_items/${this.id}` + : `/me/commerce/subscription_items/${this.id}`, method: 'DELETE', }) )?.response as unknown as DeletedObjectJSON;