placement(id).redeem() can later resolve exactly that claim;
the options carry per-surface UI configuration.
Signature
PlacementOptions
Structure
PlacementOptions is a union of two layout variants sharing a common base:
Field Reference
| Field | Type | Applies to | Description |
|---|---|---|---|
appearance | AppearanceConfig | both layouts | accentColor, backgroundColor, textColor: CSS color strings. |
layout | 'list' | 'thankYou' | - | Layout template; default 'list' (the offer sheet). Unknown values fall back to 'list' with a warning. |
redemptionMode | 'deferred' | 'immediate' | both layouts | Per-placement override of the configure() default: the claim↔redeem coupling for this surface. See Redemption Modes. |
display | { appDisplayName?, trialPeriod?, logoUrl? } | both layouts (consumed by 'list' · deferred) | Local override of the portal-managed host display values the deferred screens render; required to resolve (locally or remotely) in 'list' · deferred. See Display Resolution. |
header.title / header.subtitle | string | both layouts | Top heading block; an explicit value always wins. Defaults: in 'list' · deferred, the composed “Get free for ” / “Claim a partner offer to start”; in 'list' · immediate, the remote/generic copy; in 'thankYou', title defaults to “Payment Successful”, and a receipt passed to show() supersedes subtitle. |
header.icon | 'success' | 'none' | 'thankYou' only | Status check above the title; 'success' (default) renders the green check, 'none' hides it. Ignored by 'list'. |
offerContext | { title?, subtitle? } | 'thankYou' only | Priming copy above the offers. The subtitle is a fallback; the active offer’s campaign perk line supersedes it. |
footer.text | string | 'thankYou' only | Trust line below the carousel; omitted → not rendered. |
'thankYou' layout the blocks render top to bottom: check icon → header.title →
status subtitle (the receipt passed to show(),
else header.subtitle) → offerContext copy → the carousel → footer.text.
Usage end to end:
Reduce Paywall Churn ('list' · deferred) ·
Post-Purchase Placements ('thankYou').
PlacementBuilder
show(options?)
Presents the offer carousel with this placement’s options and resolves the bareShowResult
('claimed' | 'dismissed' | 'unavailable'). On a thankYou-layout placement, pass the
per-transaction receipt, rendered as the “You paid … for …” subtitle line
(render-only, never sent to Encore’s servers).
redeem()
Redeems the claim recorded at this placement, phase 2 of the deferred flow. It never resolves another placement’s transaction (resolves{ status: 'none' } if this
placement has no pending claim). Contract: redeem().
onNotGranted(callback)
Fires when the sheet closes without a claim, carrying the dismissal reason (the sameNotGrantedReason a dismissed result carries).
onLoadingStateChange(callback)
Firestrue when the presentation starts loading and false when it settles; useful for
spinners and disabling the triggering button. Callbacks are scoped to this builder instance;
they don’t persist across calls.
Examples
Two-phase flow at a named placement
Post-purchase placement (thankYou layout)
Related
show(): theShowResultcontractredeem(): phase 2; placement-scoped resolution- Redemption Modes: the
redemptionModeaxis - Display Resolution: how
displayandheadervalues resolve