#jj_1325
1 messages · Page 1 of 1 (latest)
We have a doc specific to which webhook events you should use with Subscriptions here: https://stripe.com/docs/billing/subscriptions/webhooks
I save some data in my database like subscription is active or not
I handle invoice.payment_failed and invoice.payment_succeded event in my spring code.
I retrieve subscription from stripe and check that status and save my database if not exist.
If that subscription exist in my db that update that subscription with stripe subscription status.
If you don't respond to invoice.created it will delay automatic payment collection by 72 hours. We mention this in our doc
But problem is stripe send webhook to my spring microserice. Than stripe after send other failed request so some time both request executed parallel and save duplicate entry in my db
Stripe will resend a webhook event if it does not receive a 200 status response
I write logic
In failed event
If subscription == present than update with stripe subscription status
Else
Save that subscription.
Save logic write in invoice succeed scenario
But some time both succeed and failed request parallel and add duplicate entry in my db.
Is it best practices to save some details in my db using webhook???
?
Because stripe send many webhook after subscription and hit that request on my db server.
Sorry it's not clear at all what your logic is doing. When you say "failed event" what event are you talking about specifically?
Which of these event types do you mean: https://stripe.com/docs/api/events/types
When I create a subscription and make a payment.
Payment is successfully done.
After stripe send invoice.payment_failed event and invoice.payment_succeded event both
I use 3ds
Do you have examples of these events with their event IDs?
👋 hopping in here since snufkin has to head out
Can you please send us an example invoice or event ID? The behavior you're describing is not one that we'd expect, so we want to take a closer look to see what's happenign on your account
My transaction in rupees
Again, can you pleases give us a specific example?
I understand this is happening for every one of your payments, so can you give us an example of any of those payments so we can double check what's happening?
See image
And I'm asking if you can give us the specific invovice or event ID - not just a screenshot