#knolleary - STripe CLI

1 messages ยท Page 1 of 1 (latest)

kind dagger
#

HI ๐Ÿ‘‹

#

In this case they either

  1. create their own accounts (which risk not matching production)
    or
  2. Configure their local dev code to filter out events they don't want (perhaps adding metadata to each Stripe object)
harsh totem
#

Hi! That's the conclusion we had come to - wanted to make sure we weren't missing any other trick here.

Thanks for the speedy response - much appreciated.

kind dagger
#

Sure thing, happy to help ๐Ÿ™‚

harsh totem
#

The main issue we have is we 404 if the event is for a resource we don't recognise - which will happen if you have multiple devs running their own environments.

That then leads to stripe emails about failed deliveries.

Having just spotted the livemode flag, I think we could use that to return 200 if we see its a test-mode event we don't recognise.

Can't decide if that's a good idea or not in terms of testing deviated from production

kind dagger
#

Well that is what the livemode property was explicitly designed for so I think that would be reasonable. And ideally you should log the unrecognized webhook event internally but still return a 200 (unless having the webhook endpoint disabled is part of the design)