Payments and payouts · from our own builds

RevenueCat integration: store subscriptions with your own server records

A RevenueCat integration takes store products set up in Play Console and App Store Connect, an entitlement and offering in RevenueCat that your code names exactly, the SDK logged in with your own user ID, and a webhook your server authenticates, stores once and maps to its own plan state. We built it for LetSlic's Premium on Google Play and for Temphera's Plus and Pro tiers, and the fixes we made were on the server, where store events become plans, trial dates and ledger rows.

Updated 20 October 2026 · checked against our code and the vendors' documentation

Where have we built this?

  1. LetSlic (Slic Solutions Private Limited)Premium monthly and yearly plans on Google Play Billing via RevenueCat, with a stored webhook log and a numbered ledger.
  2. TempheraPlus and Pro tiers mapped from RevenueCat events to plan state, including trial dates; built and tested, not yet selling (store keys not set).

What are the numbers and limits to know?

RevenueCat Pro pricing
Free up to $2,500 in monthly tracked revenue, then 1% of tracked revenuesource, checked 20 October 2026
Webhook retries
Up to 5 retries at about 2.5, 5, 10, 20 and 40 minutes; respond within 60 secondssource, checked 20 October 2026
Webhook delivery time
Usually 5 to 60 seconds; cancellations usually within 2 hours of the user cancellingsource, checked 20 October 2026
Google Play service credentials
Can take up to 36 hours to start workingsource, checked 20 October 2026
Google Play fee on auto-renewing subscriptions
15%source, checked 20 October 2026
Alternative billing in India
Google's service fee reduced by 4%source, checked 20 October 2026
Apple App Store Small Business Program
15% commission for developers with up to $1 million in proceeds in the prior calendar yearsource, checked 20 October 2026
Google Play payments policy
In-app digital goods must use Google Play's billing; physical goods and services are excludedsource, checked 20 October 2026

How do you integrate RevenueCat in-app subscriptions, step by step?

  1. 1

    Settle the store rules before choosing a gateway

    LetSlic offers a digital subscription inside an app already published on Google Play, so Play's payments policy required Play Billing, and we asked for an earlier Razorpay branch to be deleted so it could never be merged into a store build. We chose RevenueCat over a hand-written Play Billing integration because it handles receipt checks, renewals and billing retries, and covers Apple's store in the same SDK.

  2. 2

    Set the store side up in order

    Create the subscription products in Play Console, then a Google Cloud service account with the required permissions, invite it to Play Console and upload its key to RevenueCat. Google can take up to 36 hours to activate those credentials, and the entitlement, offering and packages wait on that; the webhook and test accounts can be set up meanwhile. Credentials show as active in RevenueCat when the wait is over.

  3. 3

    Name entitlements and offerings exactly as the code expects

    LetSlic's code looks for a premium entitlement, a default offering and two exact product IDs, and the setup guide we wrote for the business owner marks each one. Temphera maps store product IDs to its own plans from a table that an environment variable can override without a release, and falls back to the entitlement and the product's period when a product is not listed.

  4. 4

    Log the SDK in with your own user ID

    Both apps configure RevenueCat with the backend user's ID as appUserID, so every webhook names a user the server already knows and support can look a customer up in either system.

  5. 5

    Authenticate the webhook and fail closed

    RevenueCat sends the Authorization header value you set in its dashboard. Temphera compares it in constant time and rejects every request when no secret is configured, so a missing environment variable cannot open the endpoint.

  6. 6

    Store each event once, then process it

    LetSlic stores each webhook first under a unique index on its source and event ID, answers 200, and processes it afterwards, so a redelivered event is recognised and skipped. Temphera checks the event ID, applies the plan change as an idempotent upsert, and records the event as processed only after the work succeeds, so a failure is processed again on RevenueCat's retry.

  7. 7

    Map events to plan state without guessing

    A cancellation keeps access until the period ends and only flags it; an expiration removes it; a billing issue marks the plan past due while the store's grace period runs. Trial start and end come from the event's own purchase and expiry times, never from a hard-coded trial length, because the length lives in the store and can change.

  8. 8

    Keep your own ledger beside RevenueCat

    LetSlic maps each money event to a ledger type and numbers the entry LE-YYYY-NNNNNN. A Restore Purchases button asks RevenueCat directly for the user's current entitlements, as a safety net if a webhook was missed.

  9. 9

    Give existing paying users a plan before the gates go live

    Temphera's old premium flag predates RevenueCat. A script, dry-run by default, grants every legacy premium or lifetime member a complimentary plan before feature gates start reading the plans table, and never overwrites a real store subscription.

What went wrong, and how was it fixed?

The app could never show when a trial ended

Temphera's paywall offered a free trial and its membership screen was ready to show 'Trial ends' with the date, but the server always returned null: the event mapping built the plan from the expiry time alone and never read purchased_at_ms. A user on trial could not see when they would be charged, which invites refund requests and chargebacks.

Fix: The mapping now records period start and end, and the trial pair during a trial, straight from the event, never assuming a trial length. A converted trial keeps its dates as history. Eight tests now cover the mapping, including a 14-day trial and a missing purchase time.

Legacy premium members would have read as free

Once Temphera's feature gates read the new plans table, any member whose premium came from the old flag, with no plan record, would silently have lost what they had paid for.

Fix: The grandfathering script gives each of them a complimentary plan first, maps lifetime members to the higher tier so nothing is taken away, and writes a report of every change.

A payment gateway branch that would break store policy

LetSlic once had a Razorpay branch for in-app subscriptions. Using it in the Google Play build would break Play's payments policy for digital goods and put the app's listing at risk.

Fix: We asked for the branch to be deleted, not just left unmerged, so it could not reach a store build by accident.

What should you check before going live?

  • Play service credentials show as active in RevenueCat
  • Entitlement, offering and product IDs match the code
  • Webhook Authorization header set; server rejects requests when it is unset
  • Event IDs deduplicated on the server
  • A purchase by a Play test account works end to end
  • Debug builds use a separate RevenueCat project or the test store
  • Restore Purchases reachable from the paywall and from Settings
  • Trial end date shown to users on trial
  • Google's real-time developer notifications connected to RevenueCat

Questions about RevenueCat in-app subscriptions

When can an app take payments outside Google Play Billing?

Mainly when the payment is for a physical good or service. Google's policy names services such as transport, gym memberships and food delivery. LetSlic's Premium, a digital feature, goes through Play Billing via RevenueCat.

What does RevenueCat cost?

On its Pro plan RevenueCat is free up to $2,500 of monthly tracked revenue and charges 1% of tracked revenue after that; enterprise pricing is custom. That is on top of the store's own fee, 15% on Google Play auto-renewing subscriptions.

How long does it take to connect RevenueCat to Google Play?

Most of the time is waiting. Google can take up to 36 hours to activate the service account credentials RevenueCat uses, and the entitlement, offering and packages are set up after that. The products, service account, webhook and test accounts take far less time than the wait.

Do we still need our own backend if RevenueCat tracks the subscriptions?

For anything beyond unlocking a screen, yes. Our servers hold each user's plan for feature gates, a ledger of money events, and the records support and account deletion need. RevenueCat's webhook is what keeps them current, and its REST API is the fallback when a webhook is missed.

How do free trials appear in RevenueCat webhooks?

The event's period_type is TRIAL, and its purchase and expiry times bracket the trial exactly. Temphera stores those as the trial's start and end, returns the end date for the app to show, and keeps the dates as history once the trial converts to a paid renewal.

What happens to a store subscription when a user deletes their account?

Billing sits with Apple or Google, so the server has to handle it on purpose. Temphera's deletion job refuses to run while a paid subscription has no refund decision recorded.

Need RevenueCat in-app subscriptions in your app?

We have built it in production code, including the parts that went wrong. Tell us what your app needs and we'll say what it takes.

Ask about this integration