#idhruv-webhook
1 messages · Page 1 of 1 (latest)
yes
let payload = req.body; if(payload.type === 'subscription_schedule.canceled'){ /** retrieve an invoice */ const invoice = await stripe.invoices.retrieve( payload.data.object.id ); if(invoice.id && invoice.id.length > 0 && invoice.status === "draft"){ /** do something */ } }
just below this we have:
if(payload.type === 'invoice.payment_succeeded' || payload.type === 'invoice.finalized'){}
and this gets called perfectly fine
Can you share your account id so that I can take a closer look at the webhook setup also? You can find your account id by logging in to https://dashboard.stripe.com/settings/account. It'll be in the upper right hand corner and looks like acct_123
sorry gimme a second
no prob
looking at the webhook events your webhooks are listening for, you haven't set them up to send subscription_schedule.canceled events