Where a Subscription Platform Fits in Your App: Three Integration Patterns
A subscription platform can sit in different places inside a mobile app. It can run the whole purchase backend, share responsibility with your server, or observe purchases made by code you already have. The right placement depends on how much purchase infrastructure you already operate, whether you need server-side reactions to subscription changes, and whether your current purchase code can be replaced.
Why placement matters
Handling subscriptions correctly usually requires more than a purchase button. Servers, databases, APIs, and client code must stay aligned with Apple and Google payment rules and with other processors such as Stripe. A managed backend can absorb that maintenance, letting a team focus on product and client experience while the platform keeps subscription status current across devices and platforms. That does not mean every app must adopt the same architecture. Three common placements cover most starting points.
Option 1: SDK only
In this pattern the app writes client code only. The Purchases SDK fetches products, completes purchases, and keeps subscription status synchronized. It suits a new app, a first subscription launch, replacement of old or unloved infrastructure, or client-only purchase code that needs a maintained platform for security, scalability, insights, and features. The practical benefit is a smaller operational surface: after testing and working through a launch checklist, the client team can ship without building purchase infrastructure of its own.
Option 2: SDK plus your backend
Some teams still need server-side logic even when purchases run through the SDK. Examples include writing purchase, renewal, or cancellation details into your own database, or starting an out-of-app flow such as sending a feedback survey after cancellation. In that setup the SDK handles client purchases while your server reacts to changes and stays synced with subscription status. Webhooks are the usual bridge: the server acts only when the platform detects a change, and scalable webhook handlers can avoid running a dedicated server. When current subscriber details are needed on demand, the REST API serves as the source of truth.
Option 3: Keep existing purchase code
Larger apps often have purchase code that already works and cannot be rewritten safely. Here the existing code continues to run purchases, while a small amount of client code reports transactions in the background. Once stored securely, those transactions unlock webhooks, integrations, data exports, dashboard reporting, and delivery to third-party platforms or internal business-intelligence tools. This pattern adds visibility and downstream features without forcing a purchase-code rewrite.
Decision checklist
Use this checklist before choosing: Is this a new subscription feature or a replacement? Does your purchase code live only on the client? Do you need to update your own database or trigger email or other out-of-app actions? Is your existing purchase code fully functional but impossible to rewrite? Do you need events forwarded to analytics, CRM, or BI systems? SDK-only fits the first two answers. SDK plus backend fits the database and out-of-app needs. Keeping existing code fits a working system you must not touch. If none of the three matches your setup, a migration guide or a personalized migration plan can help map an alternative pattern.
Webhook event map
INITIAL_PURCHASE: a new subscription is bought. NON_RENEWING_PURCHASE: a purchase that will not auto-renew. RENEWAL: an existing purchase renews automatically. PRODUCT_CHANGE: the subscriber changes their subscription product. CANCELLATION: a subscription is canceled. BILLING_ISSUE: charging the subscriber failed. SUBSCRIBER_ALIAS: a new app_user_id is registered for an existing subscriber. Treat this list as a routing map for backend work: renewals and billing issues usually need retention or recovery handling, cancellations may trigger surveys or win-back flows, and alias events matter when identities change.
| Pattern | Who runs purchases | Best signal | Main trade-off |
|---|---|---|---|
| SDK only | Platform SDK and backend | New app or client-only code | Least infrastructure to maintain |
| SDK plus backend | SDK on client, your server reacts | Database sync or out-of-app actions | You operate webhook handling |
| Existing code plus platform | Your purchase code, platform observes | Working code you cannot rewrite | Purchase flow stays yours |
Choose based on existing code and server-side needs, not on feature count alone.
Frequently asked questions
Which integration pattern fits my app?
Use only the Purchases SDK when client code can handle the purchase flow and you want the platform to maintain subscription status across devices and platforms. Add your own backend when you need server-side reactions to lifecycle changes, such as database updates or messages sent outside the app. Keep existing purchase code and layer the platform on top when that code is already working and cannot be rewritten, but you still want dashboard visibility, webhooks, integrations, or exports.
What subscription events can trigger backend logic?
The listed webhook event types are INITIAL_PURCHASE, NON_RENEWING_PURCHASE, RENEWAL, PRODUCT_CHANGE, CANCELLATION, BILLING_ISSUE, and SUBSCRIBER_ALIAS. Each payload carries event-specific details about the user and their subscriptions, and the REST API can be used when you need to pull current subscriber information.
How do I decide between SDK-only, SDK plus backend, and keeping existing code?
A new app, a first subscription implementation, or client-only purchase code that needs stronger security, scalability, insights, and features points toward the SDK-only pattern. Working purchase code you cannot replace points toward keeping that code and observing transactions through the platform. A need to sync your own database or trigger out-of-app experiences points toward combining the SDK with backend logic.