#Dikgethop-sub-webhooks
1 messages · Page 1 of 1 (latest)
Hello 👋
Depends on your flow but generally, I'd listen for invoice.paid
https://stripe.com/docs/billing/subscriptions/webhooks#events
Awesome thanks bud, so I was using invoice.paid. What happens is that for some reasons the event happens twice when a subscription is charged.
For the same subscription?
Yes for the same subscription, I even thought it's because the event invoice.paid has two scenarios Occurs whenever an invoice payment attempt succeeds or an invoice is marked as paid out-of-band.
Um yes, I just confirmed all the event Ids for that specific person are different meaning Stripe would never charged a person twice. I have a workflow that listens to invoice.paid, every time that hits we update the amount of that user. So in my case the amount of that user was updated twice, but on stripe theres only one transaction.
huh interesting, if you have the event IDs then I can look into it with more context
Here evt_1LRIeVHQNXaaN7ptnBAMRhOv
For this event, it seems like we retried the delivery as we didn't receive 200 response on the first try
It is possible that the delivery happened but the response timed out
so we resent it
that'd explain the second delivery
Oh, interesting so this explains why the customer's amount was $300 instead of $150. How can I make sure this does, happen again?
*doesn't
You'd likely want to check if the amount was recently updated, if so ignore the new event
Okay thanks bud. Much appreciated.