This repo monitors App Store Server to Server Version 2 events for in-app purchases and notifies you on Slack or Discord in a convenient format. Ideal for individual developers with low purchase requests.
If you liked it, don't forget to star it. ⭐️
- Get Incoming Webhook URL 🔗 from Slack or Discord
- Create a new Google Cloud Function (2 Million request monthly free usage)
- Change
WEBHOOK_URL
constant in code - Upload this code to Cloud Function
- Copy Cloud Function URL 🔗 and paste to Adapty / RevenuCat Panel
- Done ✅
- Open a Google Cloud project or use existing one
- Search and open Cloud Functions
-
Create a Cloud Function
Enter a name (1), choose HTTPS (2), select Allow unauthenticated invocations (3)
-
Copy and paste the
index.js
andpackage.json
with from this repo.
-
Please modify the specified line of code as follows: Replace
const WEBHOOK_URL = "https://hooks.slack.com/services/xxxxxxxxxxx/xxxxxx";
with the Slack or Discord Webhook URL obtained (Section 1), within the Cloud Function. -
Deploy 🚀
-
Copy Cloud Function HTTP URL
1. Using Adapty.io
- Open Adapty.io
- Navigate to App settings > Apps in the Adapty dashboard.
- Click to the iOS SDK section, scroll to App Store server notifications.
- Enter your the Cloud Function URL (Section 2.7) to URL for forwarding raw Apple events
- Click Save in the bottom left corner.
2. Using RevenueCat.com
- Open RevenueCat
- Navigate to your iOS app under Project settings > Apps in the RevenueCat dashboard.
- Scroll to the Apple Server to Server notification settings section, and enter your the Cloud Function URL (Section 2.7) in Apple Server Notification Forwarding URL.
- Click Save Changes in the top right corner.
🔗 RevenueCat documentation link
If you are using an internal solution, your own backend url is probably added here. Therefore, you can prepare an endpoint for your own backend and give it to the Google Cloud function we prepared as the raw event arrives.
App Store Connect -> General -> App Information -> App Store Server Notifications
Because it has 2 Million request monthly free usage rights. This may be sufficient, especially for individual developers. https://cloud.google.com/functions/pricing