#idhruv-webhook

1 messages · Page 1 of 1 (latest)

halcyon pulsar
#

hi there! can you share your server code that is handling the events?

brazen arrow
#

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

halcyon pulsar
#

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

brazen arrow
#

acct_1GwmKzGdNldKu1zm

#

did you found anything?

halcyon pulsar
#

sorry gimme a second

brazen arrow
#

no prob

halcyon pulsar
#

looking at the webhook events your webhooks are listening for, you haven't set them up to send subscription_schedule.canceled events