This project provides a webhook handler for RevenueCat events, sending notifications to Discord. It's built using Firebase Functions and can be easily deployed to your Firebase project.
- 🚀 hook Handles RevenueCat webhook events
- 💬 Sends formatted notifications to Discord / Slack
- 🌐 Supports multiple languages
- 🏳️ Includes country flags and names in notifications
- 🤖 Customizable bot name and avatar
- 📦 Node.js and npm installed
- 🔥 Firebase CLI installed (
npm install -g firebase-tools) - 🏗️ A Firebase project set up
- 🔗 A Discord webhook URL
-
Clone this repository:
git clone https://github.com/your-username/revenuecat-webhook-notification.git cd revenuecat-webhook-notification -
Install dependencies:
npm install -
Copy
config.example.jsontoconfig.jsonand fill in your details:cp config.example.json config.json -
Edit
config.jsonwith your Discord webhook URL, preferred language, and other settings.
The config.json file should contain the following:
{
"discordWebhookUrl": "YOUR_DISCORD_WEBHOOK_URL",
"slackWebhookUrl": "YOUR_SLACK_WEBHOOK_URL",
"botName": "RevenueCat Bot",
"botAvatarUrl": "",
"language": "en",
"timeZone": "America/New_York"
}-
Login to Firebase:
firebase login -
Initialize your Firebase project:
firebase init functions -
Deploy the function:
firebase deploy --only functions
Once deployed, set up a webhook in your RevenueCat dashboard pointing to your Firebase function URL. The function will receive RevenueCat events and send formatted notifications to your specified Discord channel.
- 🌐 Modify
localization.jsonto add or change language translations. - 🏳️ Edit
countries.jsonto update country information. - 💬 Adjust the
createDiscordMessagefunction inindex.jsto change the format of Discord messages.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- RevenueCat for their subscription and in-app purchase infrastructure.
- Firebase for the serverless functions platform.
- Discord for the webhook integration capabilities.
- Slack for the webhook integration capabilities.