If you already use RevenueCat: REVENUECAT_WEBHOOK_SIGNING_SECRET is now optional and must match the webhook's HMAC webhook signing secret when set. Turn signing on in the dashboard and copy its secret, or remove the variable. Filter each webhook to the environment of its server. A development client built before this change has no react-native-purchases-ui; rebuild it to use the Paywall or the Customer Center.
-
Webhooks RevenueCat counts as delivered.
/api/billing/revenuecatanswered 204, and RevenueCat counts any status but 200 as a failure, retrying each event five times. It now answers 200. It does the same, and acts on nothing, for an authentic event from the other store environment or from an app outsideREVENUECAT_APP_IDS, which used to be rejected with 400. The Authorization header is always required and compared in constant time; theX-RevenueCat-Webhook-SignatureHMAC is required only when its secret is set, because RevenueCat makes signing opt-in. Every documented event type parses, includingTRANSFER,PURCHASE_REDEEMED,EXPERIMENT_ENROLLMENTandTEMPORARY_ENTITLEMENT_GRANT, and every User an event names is re-read. The tests use RevenueCat's own sample payloads. See Mobile subscriptions with RevenueCat. (efd7d4a) -
Verification paced by access. The cron re-read every queued User hourly, at most 600 an hour, so past that size verifications aged out and paying Users lost access. A User with access is now re-read at half of
BILLING_MAX_VERIFIED_AGE_SECONDS, or a minute after the earliest period end. A User without access is re-read on an event, a sync, or weekly. Each tick re-reads 24 Users, four at a time. (70e38b8) -
Store identity for the whole session. Leaving Profile → Subscription logged the SDK out. A renewal or an approved Ask to Buy delivered later would then have been posted for an anonymous user, and RevenueCat's default restore behavior could move the subscription away from the User. The signed-in layout now connects RevenueCat after sign-in and logs it out only on sign-out. Its customer info listener calls
billing.syncwhen the device and the server disagree. (47a490c) -
A screen that explains the store. Purchase and restore results now say what happened: cancelled (silent), waiting for approval, not allowed, already owned (use Restore), belongs to another account, network, or failed. The screen also tells a build without the store module apart from a failed connection, and offers "Manage subscription".
EXPO_PUBLIC_REVENUECAT_PAYWALLshows RevenueCat's Paywall for the current offering, andEXPO_PUBLIC_REVENUECAT_CUSTOMER_CENTERopens the Customer Center. Both come fromreact-native-purchases-ui11.0.4 and are used only in builds that include it. (8135fd6, 47a490c) -
Setup, step by step. Mobile subscriptions with RevenueCat covers:
- store products in App Store Connect and Play Console;
- the RevenueCat project (entitlements, offerings, restore behavior, the v1 secret key);
- the webhook, env vars and the
billing.mobileflag; - sandbox testing with a StoreKit configuration file, sandbox testers and Play license testers.
docs/billing.mdis now in English, and ADR-0004 records the changes. (f636228)