#Adam Dillon

1 messages · Page 1 of 1 (latest)

twin otterBOT
rotund fulcrum
#

Hello! To make sure I understand, the sequence of events is:

  1. Your integration receives a webhook request from Stripe
  2. As part of processing that request you make a Stripe API call
  3. That Stripe API call returns a 429 error
  4. You respond to the webhook request from Stripe with a 200

And you're wondering if you should instead respond with a 429?

fringe sable
#

That is correct.

#

We want to modify as little of the MemberPress plugin as possible to get a retry of the webhook

rotund fulcrum
#

So you're not the developer of the plugin, you're just using it?

fringe sable
#

That is correct.

rotund fulcrum
#

Okay, so that's a bit dangerous. If you modify the plugin your changes will be wiped out the next time you update it. I recommend contacting the MemberPress developers to explain the situation and ask them to fix the issue on their end.

MemberPress should be quickly returning a 2xx status code after receiving the Event, with any lengthly processing (like making a Stripe API call) deferred until later: https://stripe.com/docs/webhooks#acknowledge-events-immediately

That way the Event would still be sitting locally waiting to be processed if a 429 was encountered, which would prevent the need for a redelivery in the first place.

fringe sable
#

https://dashboard.stripe.com/events/evt_1LkXL9HBOGNBmoSlCOlVxzgx Here is an example of the webhook. For this one, I reran it manually and it succeeded but, if you look at the original one, we returned a 200, and it never tried to run again.

You can see the response from the member press plugin.

<div class="mepr_error">There was a problem with our system: 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. (invalid_request_error). Please come back soon and try again.</div>

rotund fulcrum
#

Yeah, that seems like a bug in MemberPress.

fringe sable
#

But, we are aware of the issue with modifying a plugin like that and make sure to monitor those with updates. So, we are trying to circumvent that because we aren't away of how long it will take them to fix it.

rotund fulcrum
#

Yep, if you're careful and aware of the risks you can make those changes. 🙂

fringe sable
#

Let's just say, this isn't the only change that has been made. We have a whole dev process around testing those changes out out upgrades. Thanks for you help