A trader signs up in a Telegram Mini App, pays for a plan, then opens the web app on a laptop and is asked to log in with an account they never created. A week later they install the mobile app and see the paywall again. Each channel was built as its own product, and each one thinks it has a different customer.
ELCARO, a forecast app for crypto, forex and stock traders that we designed and built, works the other way round. Its owner wanted traders to use it in Telegram, the browser or on the phone under one account and one subscription, and today it has one account and one subscription across the web app, a Telegram Mini App and the mobile apps. The algorithm makes the forecasts, AI only explains them in plain words, and the product describes itself as educational tools, not financial advice.
This article covers what it takes to give users one account and one subscription across these channels: how identity works, where access is decided, how payments from different sources fit together, which platform rules apply, and how releases stay in step. The design below is the one we recommend for products of this kind.
Three channels, three ways of knowing who the user is
Each channel gives you a different starting point:
| Channel | How the user arrives | What you can trust |
|---|---|---|
| Web app | email, password, magic link or social sign-in | whatever your own auth issues |
| Telegram Mini App | opens from a bot or link inside Telegram | Telegram user ID from validated initData |
| iOS and Android apps | email, Sign in with Apple, Google sign-in | your own auth token after sign-in |
The mistake is to create a separate user record per channel and try to merge them later. Merging accounts after people have paid is painful: you have to decide whose history wins, and support handles the cases the code gets wrong.
The alternative is one account table with a list of linked identities. An account can have an email, an Apple ID, a Google ID and a Telegram user ID attached to it. Each channel signs in with whatever identity it has and lands on the same account.
Telegram Mini Apps: validate before you trust
A Mini App receives data about the user from Telegram when it opens. Telegram’s Mini Apps documentation is direct about the trap here: the initDataUnsafe field “should not be trusted”. Your server should take the raw initData string, validate it, and only then read the user ID.
Validation works like this, per Telegram’s documentation:
- build a data-check-string from the received fields, sorted alphabetically in
key=<value>format; - derive a secret key as an HMAC-SHA-256 of the bot token, with the constant string
WebAppDataas the key; - compare the HMAC-SHA-256 of the data-check-string with the
hashfield; - check
auth_dateand reject stale data to protect against replays.
Telegram also provides an Ed25519 signature field so third parties can validate the data without the bot token.
Once validated, the Telegram user ID becomes one of the account’s identities. On first open, create an account with that identity. If the user already has an account from the web or mobile app, link them with a short flow: a one-time code sent to the email on the account, or a link opened from the signed-in web app that attaches the Telegram ID. Either way, the user confirms they own both before you join them.
Entitlements live on the server
Once there is one account, access has to be decided in one place. Every client asks the backend what the user is entitled to, caches the answer for offline use, and refreshes it after a purchase or on launch. No client decides on its own.
The entitlement record needs a source field: Apple, Google, a card payment on the web, or another provider. Store events, web payment webhooks and manual grants all write to the same table. A full walkthrough of the store side, with server notifications, grace periods and the mapping between Apple and Google states, is in our article on one backend for App Store and Google Play subscriptions.
With a third and fourth channel, a few extra rules matter:
- One active paid source per account. If someone already pays on the web, the mobile paywall should show their plan instead of selling it again. If two sources end up active anyway, decide in advance which one wins and how to refund or cancel the other.
- Cancellation goes back to the source. Your server can cancel its own card subscriptions. A subscription bought through the App Store has to be managed in Apple’s subscription settings, so the account page should send the user there.
- Refunds and chargebacks from any source revoke access in the same table, so the user loses access everywhere at once.
Payments: each platform has its own rules
Users can still pay in different ways. Each platform sets rules for digital goods, and they change over time, so check the current text before designing a paywall.
Apple. The App Store Review Guidelines say in 3.1.1 that to unlock features or functionality within your app, such as subscriptions or access to premium content, “you must use in-app purchase”. Guideline 3.1.3(b) on multiplatform services allows apps to let users access subscriptions acquired on other platforms or your website, “provided those items are also available as in-app purchases within the app”. Rules on mentioning outside payment options differ by region.
Google Play. Google has its own payments policy and, in some regions, programmes for alternative billing. Check the current Play policy for the countries you sell in.
Telegram. Telegram’s payments documentation says payments for digital goods and services in bots and Mini Apps “must be carried out exclusively in Telegram Stars”. Physical goods and services can use other currencies and payment providers. If your Mini App sells a digital subscription inside Telegram, plan for Stars as a payment source with its own record in the entitlement table.
The point for your own product is the same: every payment channel feeds one entitlement, and the user sees one plan wherever they open the product.
Notifications that respect the channel
With users spread across channels, the same event can reach them three times. ELCARO sends alerts by push, Telegram and email, and only when the direction of a forecast changes, so users are not spammed.
Two rules help here:
- Store notification preferences on the account, not per device, and let users pick channels.
- Send a message when the state changes. A recalculation that changes nothing does not need one.
Releases: web ships today, mobile ships after review
The web app and the Mini App are web code. You deploy, and every user has the new version within minutes. The mobile apps go through App Store and Google Play review, and then users update at their own pace, so several app versions stay in use for months.
That gap shapes the backend:
- Version the API. Older mobile builds keep calling the old endpoints. Add fields without breaking existing ones, and remove old behaviour only when the app versions that need it are gone.
- Use feature flags. A feature can go live on the web and in Telegram today and switch on in mobile once the release is approved.
- Know your minimum supported version. Decide when an old build is too old and ask users to update, instead of keeping every code path forever.
ELCARO has had 137 releases in 15 months, and new versions ship without interrupting users. The product has more than 10,000 registered users.
Account deletion and data
Apple’s guideline 5.1.1(v) says that if your app supports account creation, “you must also offer account deletion within the app”. With one account across channels, deletion from any channel removes the account everywhere: the web profile, the linked Telegram identity, mobile sessions and notification subscriptions. Tell the user what happens to an active store subscription, since deleting the account does not cancel a subscription the store manages.
Checklist
- One account table with linked identities: email, Apple, Google, Telegram user ID.
- Telegram
initDatavalidated on the server, includinghashandauth_date;initDataUnsafenever trusted. - A linking flow that proves the user owns both identities before joining them.
- One entitlement table with a
sourcefield; every client reads access from the backend. - Rules for duplicate subscriptions, cancellation per source and refunds.
- Payment options checked against the current Apple, Google Play and Telegram rules.
- Notification preferences stored per account; alerts sent on meaningful events only.
- Versioned API, feature flags and a minimum supported mobile version.
- Account deletion available in every channel and applied everywhere.
FAQ
Can a user pay on the web and use the subscription in the iOS app?
Apple’s guideline 3.1.3(b) allows apps that work across platforms to give access to subscriptions bought elsewhere, provided those items are also available as in-app purchases within the app. The access check has to come from your backend, which knows about the web payment.
How do I identify a user inside a Telegram Mini App?
Send the raw initData to your server and validate it as Telegram describes: an HMAC-SHA-256 check of the data-check-string against the hash, with a secret key derived from the bot token, plus a check of auth_date. After that, the Telegram user ID is safe to link to an account.
Do I need Telegram Stars for a subscription in a Mini App?
According to Telegram’s documentation, payments for digital goods and services in bots and Mini Apps must be made in Telegram Stars. Physical goods and services can use other providers. Check the current rules for your case, and record Stars payments in the same entitlement table as other sources.
Should a product like this start with all channels at once?
Not necessarily. What matters is that the account and entitlement model is designed for several channels from the first release. Adding a channel then means one more identity type and one more payment source, and no migration of existing users.
We design and build products like this across web, Telegram and mobile. See mobile app development and the ELCARO case study.
What would you like to do next?
Discuss a project
Tell us about the task. Within one working day we reply with questions or a first view on scope and cost.
Ask a question
A short question about your app, website or idea. An engineer replies by email.
Get new articles
New articles and case studies by email, no more than once a month. Unsubscribe at any time.