Skip to main content
Solved

How can I create two webhook in the same project?

  • October 31, 2022
  • 4 replies
  • 487 views

Forum|alt.badge.img+4

Hi,

 

Please let me know how I can create two webhooks in the same project.

 

One for Development server.

Second for Production Server.

 

Waiting for reply asap.

 

Thanks

Best answer by kaitlin

Hi Vincent!

At this time, we only support one webhook url per app. This is definitely on our backlog to support but I don’t have an ETA at this time.

There are a couple things you could try in the meantime:

  • Create a separate duplicate RevenueCat app for your staging/development app, with a separate webhook URL and different API keys
  • Use a neutral webhook endpoint and use the environment field in webhooks to differentiate between event types, such as SANDBOX or PRODUCTION


We have developers who use either of these options often, so it will come down to personal preference.
 
Please let me know if this helps and if you have any other questions!

View original
Did this post help you find an answer to your question?
This post has been closed for comments

kaitlin
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • October 31, 2022

Hi Vincent!

At this time, we only support one webhook url per app. This is definitely on our backlog to support but I don’t have an ETA at this time.

There are a couple things you could try in the meantime:

  • Create a separate duplicate RevenueCat app for your staging/development app, with a separate webhook URL and different API keys
  • Use a neutral webhook endpoint and use the environment field in webhooks to differentiate between event types, such as SANDBOX or PRODUCTION


We have developers who use either of these options often, so it will come down to personal preference.
 
Please let me know if this helps and if you have any other questions!


Forum|alt.badge.img+1
kaitlin wrote:

Hi Vincent!

At this time, we only support one webhook url per app. This is definitely on our backlog to support but I don’t have an ETA at this time.

There are a couple things you could try in the meantime:

  • Create a separate duplicate RevenueCat app for your staging/development app, with a separate webhook URL and different API keys
  • Use a neutral webhook endpoint and use the environment field in webhooks to differentiate between event types, such as SANDBOX or PRODUCTION


We have developers who use either of these options often, so it will come down to personal preference.
 
Please let me know if this helps and if you have any other questions!

And what happens when you receive event for TRASFER? 
There is no field `environment` in that event.

```

{

"api_version": "1.0",

"event": {

"app_id": "XXX",

"event_timestamp_ms": XXX,

"id": "XXX",

"store": "APP_STORE",

"transferred_from": [

"XXX"

],

"transferred_to": [

"XXX"

],

"type": "TRANSFER"

}

}
```


Forum|alt.badge.img+3

We had a single app at first. The Transfer webhook do not carry the environment as mentioned above. We had to devise a dirty trick of exposing a method of checking wether a pair of user ids was valid on a given environment and fallback to the other otherwise. Now we are moving to two separate RC projects which is not as clean, but at least guarantees unique webhooks per environment.


Forum|alt.badge.img

Subject: Setting Up Multiple Webhook URLs in RevenueCat for a Single Project

Hi RevenueCat Community,

I am working on a project that requires setting up multiple webhook URLs within RevenueCat to handle different aspects of our subscription events. Specifically, I want to understand:

  1. Is it currently possible to configure multiple webhook URLs for a single project in RevenueCat?
  2. If not, are there any recommended workarounds for routing webhook events to multiple endpoints?
  3. Has there been any recent update or feature addition in RevenueCat that addresses this requirement?

Our goal is to streamline event processing and ensure that different services in our system receive the appropriate subscription-related notifications.

Looking forward to your insights and advice.

Thank you!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings