Skip to main content
Fanfare configuration starts with three values: Keep secret keys on your server. Client SDK integrations should use publishable keys only.

React Provider

Most React apps configure Fanfare once near the route or app area that renders the experience.
FanfareProvider initializes the core SDK, restores local session state by default, and provides SDK access to components and hooks below it. Common provider props: See Configuration Reference for the full public option list.

ExperienceWidget

Configure the journey UI with ExperienceWidget.
Common widget props: Use onGranted when checkout needs a trusted handoff:

Copy And Theme

Use provider-level locale and translations for shared copy. Use widget theme, variant, and slots for per-page customization.
For targeted UI ownership, use slots:

Core SDK

Use the core SDK when your application owns every screen.
Call sdk.destroy() when the application area that owns the SDK permanently unmounts.

Web Components

Register web components once before rendering custom elements.
Listen for granted events when the host page needs a custom handoff:
Avoid logging admission grants or raw journey snapshots to third-party tools.

Environment Variables

Use framework-supported public environment variables for browser credentials.
Common public prefixes:

Development And Production

Use test credentials for development and live credentials for production.
The SDK chooses its supported public environment by default. Do not set environment or API URL overrides unless your Fanfare contact explicitly asks you to. Only enable debug logging during guided troubleshooting.

Next Steps