The three parts of a subscription system

Responsibilities in a subscription architecture
PartResponsibility
App (Flutter)Show products and prices from the store, start purchases, restore purchases, display entitlement state
Store (Google Play / App Store)Take payment, manage renewals, refunds, grace periods and cancellations
BackendValidate purchases with the store, map them to a user, store entitlements, receive renewal and cancellation notifications

The purchase flow, step by step

  • The app fetches product details from the store so prices and currencies are correct
  • The user starts a purchase through the store's own sheet
  • The app receives a purchase token or transaction and sends it to the backend
  • The backend verifies it with the store's API and writes an entitlement for the user
  • The app refreshes entitlements and unlocks the feature
  • The app acknowledges the purchase where the store requires it

Keeping entitlements in sync

Renewals, cancellations, refunds and billing problems happen outside the app. Both stores send server notifications for these events; the backend must handle them and update entitlements so access is granted and revoked correctly. Without this, users keep access after refunds or lose it during a paid grace period.

Edge cases to design for

  • Restore purchases on a new device or after reinstall
  • One store account, several app accounts (and the reverse)
  • Free trials, introductory offers and their eligibility rules
  • Upgrades and downgrades between plans mid-cycle
  • Grace periods and account hold when a payment fails
  • Refunds and chargebacks
  • Family sharing on iOS where enabled

Build the backend yourself or use a service?

Services such as RevenueCat wrap both stores' billing and notifications behind one API and are a reasonable choice for small teams that do not want to maintain receipt validation. Building it yourself on Cloud Functions gives full control and no per-revenue fee. Either way, the app-side rules are the same: read entitlements, do not compute them.

Store rules that shape the design

Show prices, billing period and terms clearly before purchase, provide restore purchases, and offer account deletion. Do not link to external payment for in-app digital features unless your category and region allow it. These requirements are checked in review, so build them into the paywall and settings screens from the start.