Skip to content

App Store In App Purchase Raw Event Notification via Slack, Discord

Notifications You must be signed in to change notification settings

ramazanarslan/ios-raw-events-notification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

App Store In-App Purchase Event Notification Sender 🔔

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. ⭐️

Integration

  1. Get Incoming Webhook URL 🔗 from Slack or Discord
  2. Create a new Google Cloud Function (2 Million request monthly free usage)
  3. Change WEBHOOK_URL constant in code
  4. Upload this code to Cloud Function
  5. Copy Cloud Function URL 🔗 and paste to Adapty / RevenuCat Panel
  6. Done ✅

1. Get Incoming Webhook URL from Slack or Discord

2. Create a Google Cloud Function and getting the required URL

  1. Open a Google Cloud project or use existing one
  2. Search and open Cloud Functions
  1. Create a Cloud Function

    Enter a name (1), choose HTTPS (2), select Allow unauthenticated invocations (3)

  2. Copy and paste the index.js and package.json with from this repo.

  1. 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.

  2. Deploy 🚀

  3. Copy Cloud Function HTTP URL

3. Forwarding Apple S2S events

1. Using Adapty.io

image
  1. Open Adapty.io
  2. Navigate to App settings > Apps in the Adapty dashboard.
  3. Click to the iOS SDK section, scroll to App Store server notifications.
  4. Enter your the Cloud Function URL (Section 2.7) to URL for forwarding raw Apple events
  5. Click Save in the bottom left corner.

image

🔗 Adapty documentation link


image
  1. Open RevenueCat
  2. Navigate to your iOS app under Project settings > Apps in the RevenueCat dashboard.
  3. 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.
  4. Click Save Changes in the top right corner.

image

🔗 RevenueCat documentation link


3. Using an internal solution

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

image

Why Google Cloud Function ?

Because it has 2 Million request monthly free usage rights. This may be sufficient, especially for individual developers. https://cloud.google.com/functions/pricing

About

App Store In App Purchase Raw Event Notification via Slack, Discord

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published