Skip to content

Commit af6ef24

Browse files
authored
Merge pull request #19503 from mozilla/pay-3290-sub-cancel-error
fix(next): do not crash sub manage on canceled sub
2 parents 2fe77ef + 970bfd9 commit af6ef24

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

libs/payments/customer/src/lib/invoice.manager.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ export class InvoiceManager {
188188
const upcomingInvoice = await this.stripeClient.invoicesRetrieveUpcoming({
189189
customer: customer.id,
190190
subscription: subscription.id,
191+
subscription_details: {
192+
cancel_at_period_end: false,
193+
},
191194
});
192195

193196
return stripeInvoiceToInvoicePreviewDTO(upcomingInvoice);

0 commit comments

Comments
 (0)