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:
@ -81,6 +81,17 @@ export class BillingAddWorkflowSubscriptionItemCommand extends ActiveOrSuspended
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!options.dryRun) {
|
if (!options.dryRun) {
|
||||||
|
await this.stripeSubscriptionService.updateSubscription(
|
||||||
|
subscription.stripeSubscriptionId,
|
||||||
|
{
|
||||||
|
trial_settings: {
|
||||||
|
end_behavior: {
|
||||||
|
missing_payment_method: 'create_invoice',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
await this.stripeSubscriptionItemService.createSubscriptionItem(
|
await this.stripeSubscriptionItemService.createSubscriptionItem(
|
||||||
subscription.stripeSubscriptionId,
|
subscription.stripeSubscriptionId,
|
||||||
associatedWorkflowMeteredPrice.stripePriceId,
|
associatedWorkflowMeteredPrice.stripePriceId,
|
||||||
|
|||||||
Reference in New Issue
Block a user