I'm using Stripe to do subscriptions and based on the docs, invoices will auto finalize after 1 hour.
I use test clocks to simulate the subscription, and for some reason, the invoice does not finalize after simulating a clock advancement of 1 hour (even weeks).
Here are my steps to reproduce:
- In
invoice.created
webhook event, i setauto_advance
to true. - Advance test clock to 1 hour later, I expect invoice to be finalized, but remains in Draft
Code:
case 'invoice.created':
const invoiceId = event.data.object.id
try {
const update = await stripe.invoices.update(invoiceId, {'auto_advance': true})
} catch (error) {
console.log(error)
}
break
What am I missing?