Skip to main content

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.

Handle Offer Results

Choosing your integration shape: This page shows the handler pattern. If your call site has direct access to purchase logic, the async-result pattern is often cleaner. See Integration Patterns for the decision tree and Android Integration Patterns for Kotlin examples.
Before presenting offers, register handlers that tell the SDK how to process purchases and what to do when a user dismisses. Register these once in Application.onCreate(), after configure().

Register onPurchaseRequest

Called when a user accepts an offer. Use this to trigger a purchase via Google Play Billing, 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

Both onPurchaseRequest and onPassthrough must be registered before presenting any placements.

Presenting an Offer

Fire-and-Forget

For cases where you don’t need to await the result:
That’s it — when the user accepts an offer, your onPurchaseRequest handler fires. When they dismiss or no offers are available, onPassthrough fires.

Placement IDs

Use meaningful placement IDs to track where offers are triggered in your app:
Placement IDs appear in your Encore Dashboard analytics, letting you measure conversion rates per placement.

Next Steps