Purchases start from a package returned by offerings. The package remembers which offering, product, base plan, offer, and placement context produced the purchase.
Do not unlock premium just because the user tapped a package card. Unlock from the returned or refreshed CustomerInfo.

Purchase a package

Android upgrades and downgrades

Flutter and React Native expose Android replacement fields when your app is changing a user’s existing subscription.
Use these only when you have the current Android purchase token and are intentionally replacing a subscription. For normal first purchases, pass only the package and optional placement.

After purchase

Do this:
  • handle success, cancelled, and pending separately
  • check CustomerInfo.hasActiveEntitlement("premium")
  • show a calm pending state for Ask to Buy, SCA, or Play pending flows
  • preserve retryable receipt failures so AppActor can recover
  • log requestId or SDK error details when available
Do not do this:
  • unlock from the selected package alone
  • treat cancellation as an error
  • call restore automatically after every purchase failure
  • convert a queued receipt into a permanent consumable grant before backend acceptance
After purchase handling, wire Check Entitlements and Restore and Account Recovery.