Overview
Encore allows you to present targeted offers to users in exchange for rewards (free trials, discounts, credits) at critical moments like cancellation flows or feature paywalls. The SDK uses a delegation pattern — you register purchase and passthrough handlers, then call.show() wherever you need an offer.
Present Offers
Presenting an Encore offer is a single line:
Important: When presenting offers in critical flows (like cancellation), your onPassthrough handler ensures users are never blocked from completing their intended action.
Register handlers before presenting. See Handle Offer Results below.
Handle Offer Results
Register handlers that tell the SDK how to complete purchases and what to do when a user dismisses. Register these once at app launch, afterconfigure().
Register onPurchaseRequest
Called when a user accepts an offer. Use this to trigger a purchase via StoreKit, RevenueCat, Adapty, or your own billing implementation.
Register onPassthrough
Called when the user dismisses the offer or no offers are available. Use this to resume the user’s original action (e.g., proceed with cancellation).
onPurchaseComplete (Optional)
Only needed when you don’t set an onPurchaseRequest handler, or when integrating with subscription managers that don’t auto-detect purchases (e.g., Adapty, Qonversion). RevenueCat and Superwall auto-detect purchases and don’t need this callback.
Summary
| Callback | When it fires | Required? |
|---|---|---|
onPurchaseRequest | User accepts the offer | Yes |
onPassthrough | User dismisses or no offers available | Yes |
onPurchaseComplete | Purchase finishes (for managers that don’t auto-detect) | Optional |
Both
onPurchaseRequest and onPassthrough must be registered before presenting any placements.Third-Party Paywall Integrations
For Superwall and RevenueCat integrations, see the dedicated guides:Using Superwall
Trigger Encore from Superwall paywalls and dismissals
Using RevenueCat
Trigger Encore from RevenueCat paywalls and dismissals
Next Steps
- Add Subscription Product - Create an App Store subscription product and connect it to Encore
- Configure Analytics - Track offer performance and measure impact