Migration Guide: v4 to v5
A step-by-step guide for upgrading from the Hosted Application (v4) integration to the Embedded Journey (v5).
A step-by-step guide for upgrading from the Hosted Application (v4) integration to the Embedded Journey (v5).
The Embedded Journey (v5) replaces the Hosted Application (v4) with an embedded application experience. Instead of immediately redirecting users to Wayflyer, v5 embeds the initial application steps within your platform. Once complete, users are handed over to Wayflyer to finalise their application (bank connections, offer selection, KYC, and contract signing).
This guide covers the key changes and steps required to migrate your integration.
| Area | v4 (Hosted Application) | v5 (Embedded Journey) |
|---|---|---|
| User experience | User is redirected to Wayflyer to complete their application | Initial application steps happen inline within your platform, then user is handed over to Wayflyer to finalise |
| Application flow | Consent modal then redirect to Wayflyer | Embedded panel with step-by-step screens, then handover to Wayflyer |
| Continuation | Partner calls continueHostedApplication() to get a redirect URL | Automatic — panel reopens at the saved step |
| Data collection | Wayflyer collects all data on its hosted pages | Contact details, company details, and business model are collected in the embedded panel before handover |
| Prefill | Partner passes StartHostedApplicationRequest with company/user/partner data | Partner provides an EmbeddedJourneyPrefillCallback that returns pre-populated fields |
| SDK packages | @wf-financing/ui-sdk@release-v4 / @wf-financing/headless-sdk@release-v4 | @wf-financing/ui-sdk / @wf-financing/headless-sdk (latest) |
Remove the v4 packages and install the latest versions:
npm uninstall @wf-financing/ui-sdk @wf-financing/headless-sdk
npm install @wf-financing/ui-sdk @wf-financing/headless-sdk
The mountCta method signature has changed. The partner callback now returns prefill data instead of a hosted application request.
v4:
import { type PartnerCallbackType } from '@wf-financing/ui-sdk';
const partnerCallback: PartnerCallbackType = async () => {
return {
company_data: { /* ... */ },
user_data: { /* ... */ },
partner_data: { /* ... */ },
};
};
wayflyerUiSdk.mountCta(targetId, partnerCallback);
v5:
import { type EmbeddedJourneyPrefillCallback, type EmbeddedJourneyPrefill } from '@wf-financing/ui-sdk';
const prefillCallback: EmbeddedJourneyPrefillCallback = async () => {
const prefill: EmbeddedJourneyPrefill = {
email: 'merchant@example.com',
companyName: 'Acme Ltd',
country: 'IE',
};
return prefill;
};
wayflyerUiSdk.mountCta(targetId, prefillCallback);
The prefill callback is optional — you can return void if no data is available. See the Prefilling Application Data page for the full list of prefill fields.
If you are using the Headless SDK, the following methods are new to v5 and replace the hosted application flow:
| v4 method | v5 replacement | Notes |
|---|---|---|
startHostedApplication(data) | startEmbeddedApplication() | No longer requires application data upfront — data is collected during the journey |
continueHostedApplication() | Not needed | Continuation is handled automatically via journey progress |
New v5 methods for managing the embedded application:
getUserDetails() / updateUserDetails(payload) — manage user contact informationgetCompanyDetails() / updateCompanyDetails(payload) — manage company informationsearchCompanyRegistrationDetails(payload) — search company registrationssearchIndustryClassifications(payload) — search industry codessearchBusinessType() — list available business typessearchEligibleBusinessModel(payload) — validate business model eligibilitysubmitEmbeddedApplication() — submit the completed applicationhandover() — get redirect URL for the Wayflyer platformgetJourneyProgress() / saveJourneyProgress() / deleteJourneyProgress() — manage journey statecreateDocumentUpload() / confirmDocumentUpload() / deleteDocumentUpload() / listDocumentUploads() — manage document uploadsSee the Headless SDK documentation for full details.
If your integration inspects the CTA state field, note the new state:
| v4 state | v5 state | Description |
|---|---|---|
continue_application | continue_embedded_application | User has an in-progress application |
The indicative_offer and generic_offer states remain unchanged.
The Embedded Journey introduces a new panel component that replaces the consent modal. If you previously provided theming for the consent modal, the same brand elements (font, accent colour, banner style) will be applied to the journey panel. You will also need to provide a logo if you have not already — see the UI Style Guide for requirements. Contact your Partnerships Manager if you would like to review the updated look and feel.
After completing the migration, test the full flow in sandbox mode to verify everything works correctly. See the Sandbox documentation for details.
Contact your Partnerships Manager or reach out to Wayflyer support if you have any questions during the migration process.