fix billing command - add workflow subscription item (#11631)

to migrate user with trialing or paused subscription status with trial
end behaviour 'paused'
This commit is contained in:
Etienne
2025-04-17 16:23:03 +02:00
committed by GitHub
parent f40aafb89f
commit a7b75c61e8

View File

@ -81,6 +81,17 @@ export class BillingAddWorkflowSubscriptionItemCommand extends ActiveOrSuspended
}
if (!options.dryRun) {
await this.stripeSubscriptionService.updateSubscription(
subscription.stripeSubscriptionId,
{
trial_settings: {
end_behavior: {
missing_payment_method: 'create_invoice',
},
},
},
);
await this.stripeSubscriptionItemService.createSubscriptionItem(
subscription.stripeSubscriptionId,
associatedWorkflowMeteredPrice.stripePriceId,