Server to Server notifications with multiple environments

We are looking to implement S2S notifications, but in our case we have multiple environments for the same App:
  • Development

  • User Acceptance Testing

  • Production

Only a single URL can be provided for App Store Server notifications which makes handling multiple environments tricky.

The common options seem to be:
  • A different app for each environment

  • A service that receives the notification and forwards it to the correct environment

  • A service that handles the notifications for all environments

How would you recommend handling multiple environments for a single App?

Answered by jose-varela-img in 628278022
Hi,
We came across this problem too.

We got two stages (development and production) with different addresses and we wished we could send App Store production events to our production stage and App Store sandbox events to our development stage.
Accepted Answer
Hi,
We came across this problem too.

We got two stages (development and production) with different addresses and we wished we could send App Store production events to our production stage and App Store sandbox events to our development stage.
We solved this problem by using a proxy routing service. Our implementation is a simple Flask application that ingests the Apple (and Google) webhooks and proxies the corresponding service given the context.

Being able to configure different environments directly from the source would be preferred. Also the ability to inject metadata, that was a pain point for us.

I'm happy to share our source for the proxy service.
Server to Server notifications with multiple environments
 
 
Q