#Reformedot
1 messages · Page 1 of 1 (latest)
Hi!
This object cannot be accessed right now because another API request or Stripe process is currently accessing it. If you see this error intermittently, retry the request. If you see this error frequently and are making multiple concurrent requests to a single object, make your requests serially or at a lower rate.
Can you share the request ID (req_xxx) that returns 429 error? Here’s how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
This is the error while fetching the customers when we retry
req_LBfYFPmResqsg9
My plan is to add a delay between retries, but I'm worried about raising a timeout error, can't find the max amout of time of our response to the stripe webhook
Any idea?
Could you share what you are trying to achieve by fetching the customer and why would you retry immediately after receiving a failed payment?
our handle_payment_failed fetches the customer, we grab the available payment methods inside that customer, and we retry the same invoice switching payments
when we retry, the invoice can fail again, and that raises a new webhook, that we handle. But the fetch customer, raises a 429 cause we don't have a delay between retries
My question is: Which delay should I use? I don't want to timeout the webhook request
We don't have a recommended delay duration as processing time on the same customer varies. In general, I'd recommend returning 2xx response to Stripe first, then process retry asynchronously to avoid timeout on the webhook request.
Okay thanks
No problem! Happy to help 😄
What happens if a webhook timesout?
If your webhook doesn't respond in time, Stripe will attempt to deliver re-events:
- for up to three days with an exponential back off in live mode
- three times over a few hours in test mode
https://stripe.com/docs/webhooks/best-practices#retry-logic
If your webhook server doesn't respond 2xx multiple days in a row, the webhook endpoint will be disabled automatically.
Okay thanks river!
No problem 👍
I'm afraid max timeout is not provided. We always recommend to respond 2xx status to Stripe first before processing your internal logic in webhook handler
No problem! Have a good day to you as well 🙂
❤️