#arnotixe

1 messages ยท Page 1 of 1 (latest)

little plazaBOT
elfin night
#

Hi there. It would be easiest to just add a second webhook endpoint for the other account

abstract summit
#

Not sure if should speak here, but adding a query parameter should work too. We use same endpoint and identify who is calling by query parameter

elfin night
#

Yep that's a good suggestion and an option as well

#

Up to you really

uncut gulch
#

yeah, that could work. Only thing hook #1 is in production ๐Ÿค” Could be boss agrees though, there isn't really a looot of traffic on that hook fortunately

elfin night
#

If it's only ever going to be a couple accounts, having an endpoint for each account wouldn't be too bad

#

But yeah up to you really

uncut gulch
#

yeah well I'm not writing a separate processor function in any case, will just switch credentials based on account_id so we just need to identify which is which ๐Ÿ‘ Thanks for the ideas!

elfin night
#

No problem

uncut gulch
#

Actually it should of course be doable without changes to production of course, by defaulting to the missing param

exports.incomingStripeDispute = async (req, res) => {
  const { accountId = '1' } = req.params; // original hook is 1