woovibr / node-backend-integration

OpenPix Backend Integration
49 stars 2 forks source link

API Plugin - Webhook routing/mapping #3

Open appeltje-c opened 1 year ago

appeltje-c commented 1 year ago

[not sure where to post this so move anywhere more applicable if incorrect] @sibelius

To accommodate for isolated testing without interfering with our production environment vice versa, we would like to be able to define which Webhooks should be called by which API Plugins.

If you at the moment create two Webhooks for an event then they will both be called regardless of which API Plugin is used.

e.g.

API Plugins:

Webhooks:

When we create the Pix with the MyCompany Test AppID then we want the MyCompany New Charge Test to be called so we receive the call on our api-stage server.

At the moment both Webhooks will be called regardless which AppID we used.

We can snif the payload to understand where it comes from although that has the (major) drawback that we would receive stage traffic to validate on production and production traffic on stage. Since we expect high volumes the latter is mostly undesirable but in general this mix we think is a bad idea.

daniloab commented 1 year ago

Hi @appeltje-c

Thanks for the opened issue. as we have already agreed, we will continue with the solution being the company for testing. And the solution to call the webhook according to the account we will take to the product team to analyze.

Thanks!