A mobile subscription feature needs more than a successful purchase screen. Define which verified transaction state grants access, where that entitlement is stored and how it changes after renewal, expiry, refund or an interrupted request. Keep payment-provider events and product access as separate concepts so they can be reconciled.
Use an entitlement model instead of a client-side paid flag
A client can display a purchase result while the backend is still waiting for verification. Conversely, a purchase can complete while the app loses its connection. Your product needs an explicit pending state and a way to recover. Do not make the phone’s last local flag the only authority for access shared with a web portal.
| Observed condition | Product behavior to specify | Evidence to retain |
|---|---|---|
| Purchase initiated; result unknown | Show pending status and permit reconciliation | Transaction reference and attempt identity |
| Verified active entitlement | Grant only the features in that entitlement | Verification source, account and relevant dates |
| Same provider event delivered twice | Apply the state transition once | Provider event identity and processing result |
| Notification arrives late | Reconcile current provider state before a destructive transition | Notification time and effective transaction state |
| App reinstalled | Offer the supported restore or resync path | Restored transaction and account association |
Make event handling idempotent
A webhook or store notification is a delivery mechanism, not a guarantee that messages arrive exactly once or in the order you prefer. Persist a provider event identity where available, make state transitions safe to repeat and retain enough evidence to reconcile an ambiguous result. A timeout after a committed change must not cause a second purchase or duplicate credit simply because the request is retried.
Stripe: webhook delivery and duplicate-event handling
Test restore and account association
Reinstallation, device changes and sign-in changes expose a common mismatch: the store account and the product account are different identities. Define the supported association and conflict behavior rather than silently attaching a transaction to whichever profile happens to be open. Use the platform’s current test environments and verification guidance for the actual integration.
Apple: restoring purchased products
Scope the payment method separately from the access model
Store requirements depend on the product, region and current rules. Evaluate the permitted purchase path against the feature you sell; this architecture note is not an instruction to route digital purchases through a particular processor. Whatever path applies, the product still needs verified access, an explanation of pending status and support tools that do not invent payment success.
A release acceptance sequence
- Complete a test purchase, lose the network and reopen the app.
- Restore access after reinstalling with the supported account arrangement.
- Replay the same provider event and inspect the resulting entitlement.
- Simulate an expired or refunded transaction and verify current-state reconciliation.
- Confirm the mobile and web experiences follow the same agreed access policy.
Mobile subscription entitlement synchronization
Stripe webhook idempotency in a SaaS backend
Should the app unlock access immediately after a purchase tap?
A tap is an attempt, not proof of a completed purchase. Define pending and verified states, and use the applicable provider verification and reconciliation flow.
Why can a subscription work on one device but not another?
Check entitlement refresh, account association and local versus server-backed state. The store account and the product account are separate identities and need an explicit supported relationship.
