Skip to content
Superapp
Esc
navigateopen⌘Jpreview
On this page

Test and restore purchases

Verify purchase states and make paid access recoverable across installs and devices.

A successful first purchase is only one state. A production-ready app must continue granting the correct access after relaunch, reinstall, device changes, cancellation, renewal problems, and restoration.

Always provide Restore Purchases

Put a visible Restore Purchases action on the paywall or account screen. Run restoration only after the user chooses it, show progress, and explain whether access was recovered or no eligible purchase was found.

Restore the customer entitlement

RevenueCat

Trigger RevenueCat’s restore flow, then unlock from the returned active entitlement. Use a consistent app user ID when purchases should follow an app account.

Synchronize with the App Store

StoreKit

Refresh Apple purchase state, evaluate verified current entitlements, and update the interface from that result.

Test in stages

1. StoreKit configuration in Xcode

Exercise the interface and transaction states locally before the App Store products are ready. This is fast but does not prove the production configuration.

2. Apple sandbox

Use sandbox accounts with the real App Store Connect products. Check identifiers, eligibility, renewal, expiration, and billing states without a real charge.

3. TestFlight

Test the signed distributed build on a real device. Confirm the complete purchase, relaunch, restore, and subscription-management experience.

Minimum test matrix

  • New purchase succeeds and unlocks the intended feature.
  • The customer cancels the purchase sheet without losing app state.
  • A pending or failed purchase shows a recoverable message.
  • Access survives relaunch and reinstall.
  • For non-consumables and subscriptions, Restore Purchases works on another device using the same App Store account.
  • Consumables are not restored by StoreKit. If credits must follow the customer across devices, persist and reconcile the account-backed balance separately.
  • Expiration or revocation removes access at the correct time.
  • Upgrade and downgrade behavior matches the subscription-group levels.
  • The paywall reflects trial eligibility and normal pricing correctly.