Search
K

Embedded Journey Sandbox

Understanding the Wayflyer Embedded Journey Sandbox and Reference App.

The sandbox makes it easy for partners to develop their integration with the Embedded Journey. The sandbox simulates all interactions and state changes that may occur over a customer's application lifecycle.

Partners can easily switch between production and sandbox by simply switching to:

  • sandbox-api.wayflyer.com as the base URL
  • their sandbox client ID and secret (issued during onboarding)

Partners can be confident that if their integration works correctly in the sandbox, their integration will work correctly in production.

Using the Sandbox

SDK Sandbox Mode

Both the UI SDK and Headless SDK support sandbox mode. Pass isSandbox: true in the options when initializing:

// UI SDK
import { WayflyerUiSdk } from '@wf-financing/ui-sdk';
const sdk = await WayflyerUiSdk.loadSdk(companyToken, { isSandbox: true });

// Headless SDK
import { WayflyerHeadlessSdk } from '@wf-financing/headless-sdk';
const sdk = await WayflyerHeadlessSdk.loadSdk(companyToken, { isSandbox: true });

Sandbox UI Control

Sandbox UI Control

Wayflyer provides a Sandbox UI Control (@wf-financing/sandbox-ui) that can be integrated into partner apps during development to simplify experimentation and manual testing. Partners may also use the sandbox SDK or API directly to drive automated integration tests.

The Sandbox control allows users to:

  • Simulate uploading anonymous data to generate indicative offers.
  • Simulate the stages of the embedded application lifecycle, which allows partners to test the handling of all CTA states.

Rather than completing the full application process, the sandbox provides simulated responses at each step to allow partners to test the full range of outcomes.

Reference App

To allow partners to experiment with the Wayflyer Embedded Journey prior to developing their integration, a representative example web app is available. The app provides a complete reference implementation using Wayflyer's UI SDK and the sandbox.

The reference app is available here: https://demo.wayflyerhostedcapital.com/

Partners should use their sandbox credentials when prompted.

Developers can review the code for the reference app here: https://github.com/wayflyer/hosted-capital-reference-app

Note that to create the simplest possible end-to-end implementation, the reference app fetches sandbox partner and company tokens, and uploads anonymous data from the frontend. Partner implementations must never pass production secrets to their frontend. Instead, partners should implement token fetching and data uploads from their backend to ensure security.

Please reach out to us if you have any questions.