Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gentamura committed Feb 6, 2025
1 parent 9ba3e19 commit 0ff5641
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/webhooks/stripe/handle-invoice-creation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ export async function handleInvoiceCreation(invoice: Stripe.Invoice) {
return;
}

// When a subscription is canceled, we should charge for usage-based billing from the previous billing cycle. The final invoice, which includes these charges, will be automatically created but will not be processed for payment. Therefore, we need to handle this case manually.
await stripe.invoices.pay(invoice.id);
}

0 comments on commit 0ff5641

Please sign in to comment.