Installation
Initialization
Opening Checkout
Overlay Mode
Opens checkout in a full-screen modal overlay:Embed Mode
Renders checkout inside a target DOM element:Checkout Options
Billing Data Object
Prefill customer billing information:Multi-Product Checkout
Specify quantities for multiple offers:Custom Fields
Pass custom field values to the checkout:Closing Checkout
Programmatically close the checkout:Listening to checkout events
The SDK listens for messages from the checkout iframe and dispatches DOM events ondocument. This happens automatically when you call Fungies.Initialize() or use the data-auto-init script attribute — no extra setup is required.
Use these events to run your own logic after a purchase (redirect to a thank-you page, refresh entitlements, show a confirmation modal, etc.).
Import event name constants from the package (recommended):
useEffect and remove them on unmount: