This reference targets protocol 0.5. See version information for SDK availability and HTTP examples.
Related:Versions and integration
Customer data and run state remain private. Preview, refresh and pagination execute no claims, payments or completion.
Current exports and methods
createPaywallSession(options, { paywallId, customerToken, commerce, locale, requirement? })Resolve a standalone Paywall and pin its Paywall/Offering Version. preview/confirm/cancel/read use independent commercial services; destroy clears in-memory credentials.
Returns Promise<PaywallSession>
createFunnelRunController(options)Import from core; holds the gg_fr_ run credential. get/submit/retry/resume/link/subscribe/reset control the current run; retry replays the original command.
Returns FunnelRunController
showPaywall(container, { check, start, onAccessGranted?, ...options })Available in npm 0.1.0 beta. Match the server, then check access and show the authored Paywall on denial. start returns an independent PaywallSession; it never obtains a Funnel credential. Completion calls onAccessGranted only after an optional check allows access.
Returns { check, host }
showFunnelRun(container, options)Import from core and supply authentication, checkout, native-purchase and link callbacks. Each screen selects modal, panel, fullscreen or inline presentation. An external page node issues an open_url instruction with openIn: without onOpenUrl, same_window acknowledges opened and then navigates this page, and new_window opens a window inside the visitor's click; a blocked window takes failed. Return false from onOpenUrl, or throw, when the page could not be opened. Nothing about the Run or Customer is appended to the URL. Published screens load in a sandboxed frame from Indiana's public render address (presentation only: no prices or visitor data); allow that origin in your page's frame-src. While the Funnel is paused or archived the run view reports stopped and the host hides itself quietly until the Funnel is active again.
Returns FunnelRunHandle
showPopup(document, options)A pure renderer from the popup entry: displays a current screen document without remote delivery, automatic claims or charges. Use Funnel for business experiences.
Returns PopupHandle
prepareScreen(document, window)Validate and sanitize the current screen format without mounting or executing business effects.
Returns ScreenDocument
handle.destroy()Remove UI, listeners and timers. Funnel closure is an explicit controller close command; destruction does not imply completion.
Returns void