#_sidharth

1 messages · Page 1 of 1 (latest)

rain shaleBOT
hollow isle
#

do you have the event id?

analog quiver
#

ye just a minute

#

"id": "evt_1O02apSCyTW7Hz17GKasDLuA",

#

as mentioned, even after being success, it hits again and again

hollow isle
#

are you sure those failed delivery attempts are are all for the same event id?

analog quiver
#

yes

#

except a few

hollow isle
#

I took a look and none of those failed delivery attempts are for evt_1O02apSCyTW7Hz17GKasDLuA

#

they're all for other event ids

analog quiver
hollow isle
analog quiver
#

oh

hollow isle
#

if you click on each specific row in the Dashboard, you can see the event id that failed delivery

analog quiver
#

i mean different for all

#

main problem is when the response of the webhook reaches our server, we create a subscription document for that user with some details, i.e i have written the subscription document creation inside the block where if event_type == 'checkout.session.completed': But due to this retry, it tends to create documents again and again

#

by document i meant NoSQL documents

#

entire code if needed\

hollow isle
#

ultimately, you need to ensure that you return a 200 to Stripe when you receive the webhook. If you look at the response for the failed webhook, I've seen 500 server error, time out, or 404 from your ngrok endpoint.

If your server doesn't return a 200, we assume delivery failed and will retry

analog quiver
#

ooh

#

so ideally i have to replace that return SuccessResponse(body="Payment successful") with a code 200 return right?