Get a Telegram message for every App Store and Google Play sale
A new subscription, a renewal, a refund: both stores can tell you the moment it happens. This guide sends those notifications to your own Telegram chat, through a small free relay that runs on your own Cloudflare account. About 15 minutes, no server to rent.
What you get
One short message per event, in the chat you choose:
💰 New subscription · Trail Kit
pro_monthly · 4.99 USD · USA
App Store
- App Store: new subscriptions, renewals, one-time purchases, upgrades and downgrades, turned-off auto-renew, billing problems, expirations, refunds and refund requests, with the product, price and country.
- Google Play: new subscriptions, renewals, cancellations, payment problems, pauses, expirations, one-time purchases, refunds and chargebacks. Google’s notifications carry no price, so these messages name the event and the app.
Paid app downloads and free downloads have no instant notification on either store. For those, and for the amounts behind every Google Play order, use a daily report: see all your app revenue in one place.
How it works
Both stores push a notification to a web address you give them. A desktop app cannot receive those, so you need something online. Instead of a paid service in the middle, you run the open-source AppShip relay: one file on a free Cloudflare Worker, in your account.
- Apple or Google sends the notification to your relay’s secret address.
- The relay checks it. App Store notifications must be signed by Apple: the relay verifies the whole certificate chain up to Apple Root CA - G3, and refuses anything else.
- It sends one message to Telegram with your own bot, and keeps nothing.
Your bot token and secret live only in your Cloudflare account. Your sales never pass through AppShip. Cloudflare’s free plan allows 100,000 requests a day, far more than store notifications need.
Before you start
- A Telegram account and a free Cloudflare account.
- App Store: the Account Holder, Admin, App Manager or Marketing role in App Store Connect.
- Google Play: access to the app in Play Console, and a Google Cloud project (the one that holds your Play service account is fine).
You can set up one store only. In AppShip Studio, open Revenue → Instant sale messages → Set up: it makes the secret, finds your chat, builds both addresses and sends a test message. The steps below are the same, by hand.
Step 1. Create a Telegram bot
- In Telegram, open @BotFather, send
/newbot, and choose a name and a username ending inbot. - BotFather replies with a token like
123456789:AAH…. Keep it private: anyone with it can post as your bot. - Open your new bot and send it any message. A bot cannot write to you before you write to it.
- Find your chat ID. Studio does it with Find my chat. By hand: open
https://api.telegram.org/bot<TOKEN>/getUpdatesin a browser and copy the number after"chat":{"id":. For a group, add the bot to the group, write in it, and use the group’s ID (it starts with-).
Step 2. Put the relay on Cloudflare
With a GitHub account: use the Deploy to Cloudflare button. Cloudflare copies the relay into a new repository on your account, asks for the three secrets below and deploys it.
Without GitHub: in the Cloudflare dashboard, open Workers & Pages → Create, start from the Hello World Worker, name it appship-relay and deploy it. Then Edit code, replace everything with the relay code (Studio’s Copy the relay code button, or worker.js on GitHub) and deploy again.
Then add three secrets in the Worker’s Settings → Variables and Secrets:
TELEGRAM_BOT_TOKEN: the token from BotFather.TELEGRAM_CHAT_ID: your chat ID.RELAY_SECRET: a long random string (Studio makes one). It becomes part of your addresses, so only you, Apple and Google know them.
Open your Worker’s address (like https://appship-relay.your-name.workers.dev) in a browser: it should say the relay is running and all three secrets are set. In Studio, paste the address and click Save and test; a test message arrives in Telegram.
Your two notification addresses are:
- App Store:
https://…workers.dev/apple/YOUR_SECRET - Google Play:
https://…workers.dev/google/YOUR_SECRET
Step 3. App Store Server Notifications
- In App Store Connect, open your app → App Information (under General).
- In App Store Server Notifications, set the Production Server URL to your App Store address and choose Version 2.
- Set the Sandbox Server URL to the same address. Test purchases then show up tagged
[Sandbox], which is the easiest way to check everything works. - Repeat for each app. One relay serves all your apps.
Already using RevenueCat, Adapty or your own server? Apple allows one address per environment. Do not replace theirs: use their option to forward Apple’s notifications to another address, and enter your relay’s App Store address there.
Step 4. Google Play real-time developer notifications
Google delivers its notifications through Google Cloud Pub/Sub, so there are a few more clicks:
- In the Google Cloud console, open Pub/Sub and create a topic, for example
play-notifications. - On the topic, add the principal
google-play-developer-notifications@system.gserviceaccount.comwith the role Pub/Sub Publisher. - Create a subscription on the topic with delivery type Push and your Google Play address as the endpoint.
- In Play Console, open your app → Monetize → Monetization setup. Under Real-time developer notifications, turn them on and paste the full topic name (
projects/…/topics/play-notifications). - Choose Get all notifications for subscriptions and one-time products, so one-time purchases are included.
- Click Send test message: Telegram shows “Test notification from Google Play”. Save, and repeat for each app (they can share the topic).
If something does not arrive
- “chat not found” on the test: send your bot a message first, or check the chat ID (a group’s starts with
-). - “Not found” from the relay: the secret in the address does not match
RELAY_SECRET. - Google’s test fails: the Pub/Sub Publisher role is missing on the topic, or the topic name is incomplete.
- Sandbox works, Production does not: check the Production address is set, with Version 2.
If Telegram cannot be reached, the relay answers with an error and both stores send the notification again later, so a short outage does not lose sales messages.
A daily summary too
Instant messages tell you that something happened. For how much, AppShip Studio sends a morning summary to the same chat: yesterday’s sales and downloads per app, compared with the day before, plus the last 7 and 30 days. It reads the stores’ own reports with your keys, on your computer. New reviews can come to the chat as well.