Skip to main content

Signature

Parameters

When It Fires

onPurchaseComplete fires only when:
  1. No onPurchaseRequest handler is registered
  2. Encore successfully completes a native StoreKit 2 purchase
  3. The transaction is verified and finished
It does not fire when:
  • An onPurchaseRequest handler is set (the delegated handler takes full responsibility)
  • The user cancels the purchase
  • The purchase fails or is pending

Usage

Use this callback to sync StoreKit transactions with subscription managers that don’t automatically detect external purchases.

Adapty

Qonversion

RevenueCat and Superwall auto-detect StoreKit transactions when configured in observer mode. They do not need onPurchaseComplete.

Chaining

Behavior

  • Survives reset() — app-level infrastructure, not user state
  • Last handler wins — setting a new handler replaces the previous one
  • Main actor — called on the main thread