diff --git a/components/server/ee/src/workspace/gitpod-server-impl.ts b/components/server/ee/src/workspace/gitpod-server-impl.ts index 0555034b88d8a9..877fef632525c5 100644 --- a/components/server/ee/src/workspace/gitpod-server-impl.ts +++ b/components/server/ee/src/workspace/gitpod-server-impl.ts @@ -1596,11 +1596,13 @@ export class GitpodServerEEImpl extends GitpodServerImpl { { teamId, chargebeeSubscriptionId }, ); } - const subscriptionId = await this.stripeService.findUncancelledSubscriptionByAttributionId( - AttributionId.render({ kind: "team", teamId: teamId }), - ); - if (subscriptionId) { - await this.stripeService.cancelSubscription(subscriptionId); + if (this.config.enablePayment) { + const subscriptionId = await this.stripeService.findUncancelledSubscriptionByAttributionId( + AttributionId.render({ kind: "team", teamId: teamId }), + ); + if (subscriptionId) { + await this.stripeService.cancelSubscription(subscriptionId); + } } }