Store notifications
On this page
Tenth learns about renewals, cancellations, refunds and billing problems from the stores' server notifications. Set them up for every App Store and Google Play connection, right after you add it under Connections. Without them, Tenth still finds most changes by checking the stores on a schedule, but later.
Each connection's card in Connections shows the URL to use. It's specific to that connection, so copy it from there.
App Store Server Notifications
- In Connections, open the App Store connection and copy the App Store Server Notifications URL.
- In App Store Connect, open your app, then App Information → App Store Server Notifications.
- Choose Version 2 notifications, and paste the URL as both the Production Server URL and the Sandbox Server URL.
One URL serves both environments. Tenth reads the environment from each signed notification and routes it to the app's live or test connection for that bundle ID. A sandbox notification for an app with no test connection is recorded and otherwise ignored.
Tenth verifies Apple's signature on every notification, then reads the transaction from the App Store Server API before acting on it.
Google Play real-time developer notifications
Google Play sends notifications through a Google Cloud Pub/Sub topic, and Tenth receives them through a push subscription.
- In Google Cloud, create a Pub/Sub topic, and give
[email protected]the Pub/Sub Publisher role on it. - In Play Console, open Monetize with Play → Monetization setup and enter the topic under Real-time developer notifications.
Create a push subscription on the topic:
- Endpoint URL: the connection's Pub/Sub push endpoint from Connections.
- Enable authentication, with a service account the subscription signs its requests as. Enter that service account (and the audience, if you set a custom one) on the connection in Tenth, which refuses unsigned pushes.
- In Play Console, use Send test notification to check it.
Each connection needs its own push subscription, so a package with both a test and a live connection has two subscriptions, one per endpoint.
Checking the stores on a schedule
Notifications can be delayed or lost, so Tenth also checks the stores itself:
- every 10 minutes, it reads the App Store's notification history and Google Play's voided purchases;
- it re-checks subscriptions it already knows about around their renewal dates, and sweeps all open subscriptions over the course of each week.
A brand-new Google Play purchase reaches Tenth through a notification or through the app (the Expo SDK sends every purchase to Tenth), not through these checks.
Running Tenth next to RevenueCat
While you move from RevenueCat, both can receive the stores' notifications.
- App Store: Apple allows one notification URL per environment. Keep RevenueCat's URL in App Store Connect, and in RevenueCat's App Store settings set Tenth's URL as the notification forwarding URL. RevenueCat then forwards each notification unchanged, and since Tenth verifies Apple's signature inside the notification itself, forwarded notifications are accepted like direct ones.
- Google Play: a Pub/Sub topic can have many subscriptions. Leave RevenueCat's subscription in place and add Tenth's push subscription to the same topic.
Purchases made in an app on the Tenth SDK reach Tenth directly, whatever the notifications do.
The RevenueCat importer (bringing over existing customers and their purchase history), its dry-run report, and a dual-run mode that keeps revenue from being billed twice while both run are coming in a later release. Until then, Tenth counts revenue it receives during this period as usual. See Migrating from RevenueCat.