### Start Hosted Application Response (200) Source: https://docs.wayflyer.com/apis/embedded-finance-1-0-0/docs Example JSON response for a successful request, containing 'next' and 'application_id' fields. ```json { "next": "next", "application_id": {} } ``` -------------------------------- ### Install UI SDK from NPM Source: https://docs.wayflyer.com/embedded-journey-v5-overview/using-the-sdk/ui-sdk Install the @wf-financing/ui-sdk package from NPM. The SDK uses dynamic imports to minimize bundle size and reduce page load impact. ```shell npm install @wf-financing/ui-sdk ``` -------------------------------- ### Start Hosted Application Request Body (JSON) Source: https://docs.wayflyer.com/apis/embedded-finance-1-0-0/docs Example JSON body for the POST /company/hosted-application/ endpoint. Contains company_data, user_data, and partner_data fields. ```json { "company_data": { "company_name": {}, "company_currency": {}, "primary_store_url": {}, "company_annual_revenue": {}, "company_onboarding_date": {}, "company_incorporation_date": {}, "country": {}, "state": {}, "company_type": {} }, "user_data": { "first_name": {}, "last_name": {}, "email_address": {}, "phone_number": {} }, "partner_data": "" } ``` ```json { "company_data": { "company_name": {}, "company_currency": {}, "primary_store_url": {}, "company_annual_revenue": {}, "company_onboarding_date": {}, "company_incorporation_date": {}, "country": {}, "state": {}, "company_type": {} }, "user_data": { "first_name": {}, "last_name": {}, "email_address": {}, "phone_number": {} }, "partner_data": "" } ``` -------------------------------- ### Continue Hosted Application - Response Example Source: https://docs.wayflyer.com/apis/embedded-finance-1-0-0/docs Example JSON response from the continue hosted application endpoint. Contains the next URL to redirect the user to. ```json { "next": "next" } ``` -------------------------------- ### Install Headless SDK via npm Source: https://docs.wayflyer.com/embedded-journey-v5-overview/using-the-sdk/headless-sdk Install the @wf-financing/headless-sdk package from NPM. The SDK uses dynamic imports to minimize bundle size and reduce page load impact. ```shell npm install @wf-financing/headless-sdk ``` -------------------------------- ### Get CTA configuration - 200 response Source: https://docs.wayflyer.com/apis/embedded-finance-sandbox-api-1/docs Example JSON response for a successful GET request to /company/cta/. Shows the banner state and data structure. ```json { "state": "continue_application", "data": { "offer": { "amount": 0, "currency": "USD" }, "config": { "text": "text", "bullet_points": [], "button_label": "button_label", "embedded_application_uuid": "embedded_application_uuid" } }, "dismissal_key": {} } ``` -------------------------------- ### Batch upload curl request example Source: https://docs.wayflyer.com/embedded-journey-v5-overview/shared/uploading-data-for-indicative-offers Example curl command to initiate a batch upload to the Wayflyer API. Uses POST to /v1/partner/anon-data-upload/batch/ with a array of company data. Requires a partner token in the Authorization header. ```shell curl -X POST 'https://api.wayflyer.com/v1/partner/anon-data-upload/batch/' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '[ { "company_id": "merchant01", "annual_revenue": 1400000, "currency": "GBP", "country": "GB", "incorporation_date": "2020-01-01", "client_onboarding_date": "2020-01-01" }, { "company_id": "id2", ... } ]' ``` -------------------------------- ### POST /company/hosted-application/ Source: https://docs.wayflyer.com/apis/embedded-finance-1-0-0/docs Starts a hosted application for a company. If the company is not yet onboarded, a new company is created with a pre-configured funding application. Returns a 'next' URL to redirect the user to. ```APIDOC ## [POST] /company/hosted-application/ ### Description Starts a hosted application for the company i.e., one the user will complete on the Wayflyer app. If the company hasn’t already been onboarded with Wayflyer then a new company is created in the Wayflyer app with a funding application pre-configured using any additional data supplied during the API call. The response contains a `next` url to redirect the user to which will typically be a co-branded landing page from which they can create their user account and complete the funding application. ### Method POST ### Endpoint https://api.wayflyer.com/financing/company/hosted-application/ ### Headers - **API-Version** (string) - Required - Allowed values: 1 - **Authorization** (string) - Required - Bearer token. Example: `Authorization: Bearer 123` ### Request Body - **company_data** (object) - Optional - Data used to pre-fill the company’s funding application. Can be one of: HostedApplicationCompanyData (object) or null. - **company_name** (string) - Optional - Company name. - **company_currency** (string) - Optional - Company currency. - **primary_store_url** (string) - Optional - Primary store URL. - **company_annual_revenue** (number) - Optional - Annual revenue. - **company_onboarding_date** (string) - Optional - Onboarding date. - **company_incorporation_date** (string) - Optional - Incorporation date. - **country** (string) - Optional - Country. - **state** (string) - Optional - State. - **company_type** (string) - Optional - Company type. - **user_data** (object) - Optional - Data about the user starting the hosted application. Can be one of: HostedApplicationUserData (object) or null. - **first_name** (string) - Optional - User's first name. - **last_name** (string) - Optional - User's last name. - **email_address** (string) - Optional - User's email address. - **phone_number** (string) - Optional - User's phone number. - **partner_data** (string) - Optional - Additional data unique to an individual partner. Consult with Wayflyer representative for more information. ### Request Example ```json { "company_data": { "company_name": "Example Company", "company_currency": "USD", "primary_store_url": "https://store.example.com", "company_annual_revenue": 1000000, "company_onboarding_date": "2023-01-01", "company_incorporation_date": "2020-01-01", "country": "US", "state": "CA", "company_type": "LLC" }, "user_data": { "first_name": "John", "last_name": "Doe", "email_address": "john.doe@example.com", "phone_number": "+1234567890" }, "partner_data": "" } ``` ### Response #### Success Response (200) - **next** (string) - Required - The URL to redirect the user to after making this API call. - **application_id** (string, uuid) - Required - The ID of the hosted application created by this API call. #### Response Example ```json { "next": "https://app.wayflyer.com/application/123", "application_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" } ``` ``` -------------------------------- ### POST /start-hosted-application Source: https://docs.wayflyer.com/apis/embedded-finance-sandbox-api-1/versions/89e9f620-626b-413f-b4ac-7605711a516f Starts a new hosted funding application. Provide company and user data to pre-fill the application. Returns a URL to redirect the user to and the application ID. ```APIDOC ## POST /start-hosted-application ### Description Starts a new hosted funding application. Provide company and user data to pre-fill the application. Returns a URL to redirect the user to and the application ID. ### Method POST ### Endpoint /start-hosted-application ### Parameters #### Request Body - **company_data** (HostedApplicationCompanyData) - Optional - Data used to pre-fill the company's funding application. - **company_name** (string) - Optional - The name of the company. - **company_currency** (SupportedCurrencyCode) - Optional - One of a supported subset of ISO 4217 codes for the currency the company uses primarily. - **primary_store_url** (string) - Optional - The URL of the primary store. - **company_annual_revenue** (integer) - Optional - Company's annual revenue to the nearest whole number in `company_currency`. - **company_onboarding_date** (date) - Optional - The date the company onboarded to the partner. - **company_incorporation_date** (date) - Optional - The date the company was incorporated. - **country** (SupportedCountryCode) - Optional - One of a supported subset of ISO-3166-1 alpha-2 codes for the country the company is located in. - **state** (USStateCode or CanadianProvinceCode) - Optional - The state the company is located in. - **company_type** (CompanyType) - Optional - The type of company. - **user_data** (HostedApplicationUserData) - Optional - Data about the user starting the hosted application. - **first_name** (string) - Optional - The first name of the user. - **last_name** (string) - Optional - The last name of the user. - **email_address** (string) - Optional - The email of the user. - **phone_number** (string) - Optional - The phone number of the user. - **partner_data** (object) - Optional - During onboarding, Wayflyer may have agreed additional data unique to an individual partner that may be used to customise the funding application. This data is not required for the funding application to be processed, but may be used to provide a better experience. Consult with your Wayflyer representative for more information about what can be provided here. ### Response #### Success Response (200) - **next** (string) - The URL to redirect to the user to after making this API call. - **application_id** (uuid) - The ID of the hosted application created by this API call. #### Response Example { "next": "https://example.com/redirect", "application_id": "123e4567-e89b-12d3-a456-426614174000" } ``` -------------------------------- ### Start the application with startEmbeddedApplication() Source: https://docs.wayflyer.com/embedded-journey-v5-overview/using-the-sdk/started-an-embedded-application Call startEmbeddedApplication() when the user is ready to apply. Returns an EmbeddedApplicationStatusResponse with application_id and required_details. ```typescript import type { EmbeddedApplicationStatusResponse } from '@wf-financing/headless-sdk'; const status: EmbeddedApplicationStatusResponse = await sdk.startEmbeddedApplication(); // status.application_id — the application ID (null if creation failed) // status.required_details — list of required detail sections and their completion status ``` -------------------------------- ### POST /hosted-applications Source: https://docs.wayflyer.com/apis/embedded-finance-1-0-0/versions/7d0182a3-23d8-43cc-b636-dac7e1594f96 Starts a hosted funding application. Returns a URL to redirect the user to and an application ID. ```APIDOC ## POST /hosted-applications ### Description Starts a hosted funding application. Returns a URL to redirect the user to and an application ID. ### Method POST ### Endpoint /hosted-applications ### Request Body - **company_data** (object) - Optional - Data used to pre-fill the company's funding application. - **company_name** (string) - Optional - The name of the company. - **company_currency** (SupportedCurrencyCode) - Optional - One of a supported subset of ISO 4217 codes for the currency the company uses primarily. - **primary_store_url** (string) - Optional - The URL of the primary store. - **company_annual_revenue** (integer) - Optional - Company's annual revenue to the nearest whole number in `company_currency`. - **company_onboarding_date** (date) - Optional - The date the company onboarded to the partner. - **company_incorporation_date** (date) - Optional - The date the company was incorporated. - **country** (SupportedCountryCode) - Optional - One of a supported subset of ISO-3166-1 alpha-2 codes for the country the company is located in. - **state** (USStateCode or CanadianProvinceCode) - Optional - The state the company is located in. - **company_type** (CompanyType) - Optional - The type of company. - **user_data** (object) - Optional - Data about the user starting the hosted application. - **partner_data** (object) - Optional - Additional data unique to an individual partner that may be used to customise the funding application. ### Request Example { "company_data": { "company_name": "string", "company_currency": "string", "primary_store_url": "string", "company_annual_revenue": 0, "company_onboarding_date": "2023-01-01", "company_incorporation_date": "2023-01-01", "country": "string", "state": "string", "company_type": "string" }, "user_data": {}, "partner_data": {} } ### Response #### Success Response (200) - **next** (string) - The URL to redirect the user to after making this API call. - **application_id** (uuid or null) - The ID of the hosted application created by this API call. #### Response Example { "next": "string", "application_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6" } ``` -------------------------------- ### POST /company/hosted-application/ Source: https://docs.wayflyer.com/apis/embedded-finance-1-0-0/versions/7d0182a3-23d8-43cc-b636-dac7e1594f96 Starts a hosted application for the company, which the user will complete on the Wayflyer app. If the company hasn't been onboarded, a new company is created with a pre-configured funding application. ```APIDOC ## POST /company/hosted-application/ ### Description Start a hosted application for the company i.e., one the user will complete on the Wayflyer app. If the company hasn't already been onboarded with Wayflyer then a new company is created in the Wayflyer app with a funding application pre-configured using any additional data supplied during the API call. ### Method POST ### Endpoint /company/hosted-application/ ### Parameters #### Header Parameters - **ApiVersion** (string) - Required - API version parameter (referenced from components). ### Response #### Success Response (200) - **StartHostedApplicationResponse** (object) - The response schema for starting a hosted application. #### Response Example ```json { "example": "StartHostedApplicationResponse object" } ``` #### Error Response (500) - **Internal Server Error** - An error occurred on the server. ``` -------------------------------- ### Instantiate WayflyerUiSdk with loadSdk Source: https://docs.wayflyer.com/embedded-journey-v5-overview/using-the-sdk/ui-sdk Initializes the UI SDK by calling the static method loadSdk with a companyToken and optional UiSdkOptions. The example sets isSandbox, skipAnimations, and language to 'de'. ```typescript import { WayflyerUiSdk, type UiSdkOptions } from '@wf-financing/ui-sdk'; const options: UiSdkOptions = { isSandbox: true, skipAnimations: true, language: 'de', }; const wayflyerUiSdk = await WayflyerUiSdk.loadSdk(companyToken, options); ``` -------------------------------- ### POST /company/embedded-application/ Source: https://docs.wayflyer.com/apis/embedded-finance-1-0-0/versions/7d0182a3-23d8-43cc-b636-dac7e1594f96/operations/wf_embedded_finance_service_apps_web_embedded_application_views_embedded_application_start_embedded_application Starts an embedded application for the company. Returns the application ID and required details status. Returns a 400 error if an open application already exists. ```APIDOC ## POST /company/embedded-application/ ### Description Start an embedded application for the company. The returned schema will let the user know if additional details are required to submit the application and provide the application ID to track the application status in subsequent API calls. If an open embedded application already exists for the company, a 400 error is returned. ### Method POST ### Endpoint /company/embedded-application/ ### Parameters #### Header Parameters - **API-Version** (string, optional) - The API version to use. Allowed values: "1". ### Request Example No request body is required. ### Response #### Success Response (200) - **application_id** (string, nullable) - The ID of the embedded application. - **required_details** (array of EmbeddedApplicationDetailStatus) - A list of required details to submit the embedded application. - **name** (string) - The name of the detail. Allowed values: "user_details", "company_details". - **status** (string) - The status of the detail, either complete or incomplete. Allowed values: "complete", "incomplete". #### Response Example { "application_id": "550e8400-e29b-41d4-a716-446655440000", "required_details": [ { "name": "user_details", "status": "incomplete" }, { "name": "company_details", "status": "complete" } ] } #### Error Response (400) - **detail** (string) - Error detail. #### Error Response Example { "detail": "An open embedded application already exists for the company." } ### Authentication Bearer token (CompanyToken) ### Security - CompanyToken: [] ``` -------------------------------- ### StartHostedApplicationResponse Schema Source: https://docs.wayflyer.com/apis/embedded-finance-1-0-0/versions/7d0182a3-23d8-43cc-b636-dac7e1594f96/schemas/StartHostedApplicationResponse Defines the response object returned when starting a hosted application. It includes the redirect URL and the application ID. ```APIDOC ## StartHostedApplicationResponse ### Description The response object returned when starting a hosted application. It contains the URL to redirect the user to and the ID of the hosted application created. ### Properties - **next** (string) - Required - The URL to redirect the user to after making this API call. - **application_id** (string, uuid or null) - Required - The ID of the hosted application created by this API call. ### Example ```json { "next": "https://example.com/redirect", "application_id": "123e4567-e89b-12d3-a456-426614174000" } ``` ``` -------------------------------- ### Authorization Header Example Source: https://docs.wayflyer.com/embedded-journey-v5-overview/shared/authentication Shows the format for including a Partner or Company Token as a Bearer token in HTTP request headers. ```text Authorization: Bearer ``` -------------------------------- ### OpenAPI definition for Initiate batch upload Source: https://docs.wayflyer.com/apis/embedded-finance-1-0-0/versions/7d0182a3-23d8-43cc-b636-dac7e1594f96/operations/wf_embedded_finance_service_apps_web_anonymous_data_upload_views_anonymous_upload_initiate_batch_upload YAML definition of the POST /partner/anon-data-upload/batch/ endpoint, including request body schema and example payload. ```yaml openapi: 3.1.0 info: title: Embedded Finance version: "1" servers: - url: https://api.wayflyer.com/financing/ description: Production paths: /partner/anon-data-upload/batch/: post: operationId: wf_embedded_finance_service_apps_web_anonymous_data_upload_views_anonymous_upload_initiate_batch_upload summary: Initiate batch upload parameters: - $ref: "#/components/parameters/ApiVersion" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/InitiateBatchUploadResponse" "500": description: Internal Server Error description: |- Initiate a batch upload of multiple companys revenue data. The number of companies should not be more than 26.000. tags: - Data Upload requestBody: content: application/json: schema: items: $ref: "#/components/schemas/CompanyData" title: Payload type: array example: - company_id: Company id currency: GBP annual_revenue: 14000000 revenue_in_period: 7000000 shipping_in_period: 60000 num_period_months: 6 country: AF state: US-AL incorporation_date: 2020-01-15 client_onboarding_date: 2020-06-30 required: true security: - PartnerToken: [] security: - PartnerToken: [] components: parameters: ApiVersion: in: header name: API-Version schema: title: API-Version type: string enum: - "1" required: false schemas: InitiateBatchUploadResponse: properties: upload_id: description: UUID of the upload format: uuid title: Upload Id type: string required: - upload_id title: InitiateBatchUploadResponse type: object CompanyData: properties: company_id: description: An identifier in the partner's system that uniquely identifies the company to create a token for title: Company Id type: string currency: $ref: "#/components/schemas/CurrencyCode" description: ISO 4217 code for currency the company uses primarily examples: - GBP annual_revenue: anyOf: - type: integer - type: "null" description: Companies annual revenue to the nearest whole number in `currency` examples: - 14000000 title: Annual Revenue revenue_in_period: anyOf: - type: integer - type: "null" description: Revenue for the company in the specified period to the nearest whole number in `currency` examples: - 7000000 title: Revenue In Period shipping_in_period: anyOf: - type: integer - type: "null" description: Shipping amount for the company in the specified period to the nearest whole number in `currency` examples: - 60000 title: Shipping In Period num_period_months: anyOf: - maximum: 12 minimum: 1 type: integer - type: "null" description: Number of months the `revenue_in_period` and `shipping_in_period` cover examples: - 6 title: Num Period Months country: $ref: "#/components/schemas/CountryCode" description: ISO 3166-1 alpha-2 code for the incorporation country of the company state: anyOf: - $ref: "#/components/schemas/USStateCode" - $ref: "#/components/schemas/CanadianProvinceCode" - type: "null" ``` -------------------------------- ### GET /partner/anon-data-upload/upload/{upload_id}/ Source: https://docs.wayflyer.com/apis/embedded-finance-1-0-0/versions/7d0182a3-23d8-43cc-b636-dac7e1594f96/operations/wf_embedded_finance_service_apps_web_anonymous_data_upload_views_anonymous_upload_get_status Get the status of a file as it is being processed asynchronously. This endpoint requires the upload_id path parameter and returns the current batch status. ```APIDOC ## GET /partner/anon-data-upload/upload/{upload_id}/ ### Description Get the status of a file as it is being processed asynchronously. ### Method GET ### Endpoint `/partner/anon-data-upload/upload/{upload_id}/` ### Parameters #### Path Parameters - **upload_id** (string, uuid) - Required - The unique identifier of the upload. #### Header Parameters - **API-Version** (string) - Optional - The API version to use. Allowed values: "1". ### Responses #### Success Response (200) - **status** (string) - Status of the batch upload. Possible values: `PENDING_UPLOAD`, `PROCESSING`, `PROCESSED`, `ERROR`. #### Response Example ```json { "status": "PROCESSING" } ``` #### Error Response (404) Not Found - The upload ID does not exist or is not accessible. ### Security - **PartnerToken** (HTTP Bearer authentication) - Required. ### OpenAPI Definition ```yaml openapi: 3.1.0 info: title: Embedded Finance version: "1" servers: - url: https://api.wayflyer.com/financing/ description: Production paths: /partner/anon-data-upload/upload/{upload_id}/: get: operationId: wf_embedded_finance_service_apps_web_anonymous_data_upload_views_anonymous_upload_get_status summary: Get upload status parameters: - $ref: "#/components/parameters/ApiVersion" - in: path name: upload_id schema: format: uuid title: Upload Id type: string required: true responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/BatchStatusResponse" "404": description: Not Found description: Get the status of a file as it is being processed asynchronously. tags: - Data Upload security: - PartnerToken: [] security: - PartnerToken: [] components: parameters: ApiVersion: in: header name: API-Version schema: title: API-Version type: string enum: - "1" required: false schemas: BatchStatusResponse: properties: status: $ref: "#/components/schemas/BatchStatus" description: Status of the batch upload required: - status title: BatchStatusResponse type: object BatchStatus: enum: - PENDING_UPLOAD - PROCESSING - PROCESSED - ERROR title: BatchStatus type: string securitySchemes: PartnerToken: type: http scheme: bearer ``` ``` -------------------------------- ### GET /company/company-details/ Source: https://docs.wayflyer.com/apis/embedded-finance-1-0-0/versions/7d0182a3-23d8-43cc-b636-dac7e1594f96/operations/wf_embedded_finance_service_apps_web_core_views_company_details_get_company_details Get company details for the authenticated company. This endpoint returns comprehensive information about the company, including legal name, revenue, industry, and more. ```APIDOC ## GET /company/company-details/ ### Description Get company details for the authenticated company. ### Method GET ### Endpoint https://api.wayflyer.com/financing/company/company-details/ ### Parameters #### Header Parameters - **API-Version** (string, optional) - API version to use. Allowed values: "1". ### Response #### Success Response (200) - **country_code** (string|null) - ISO 3166-1 alpha-2 country code - **state_code** (string|null) - ISO 3166-2 code for US states or Canadian provinces - **principal_place_of_business** (string|null) - US state where the company primarily operates - **legal_name** (string) - Legal name of the company - **registration_number** (string|null) - Company registration number - **business_type** (string|null) - Legal business type — null for non-US companies - **revenue** (integer) - Monthly revenue in the smallest whole currency unit - **revenue_currency** (string) - ISO 4217 currency code - **industry_code** (string) - TRBC industry classification code - **industry_name** (string) - Human-readable industry name - **date_of_incorporation** (string) - Date the company was incorporated (format: date) - **customer_segments** (array) - Customer segments - **sales_channels** (array) - Sales channels - **product_offerings** (array) - Product offerings - **website_url** (string|null) - Company website URL #### Response Example { "country_code": "US", "state_code": "CA", "principal_place_of_business": "CA", "legal_name": "Example Corp", "registration_number": "123456", "business_type": "LLC", "revenue": 100000, "revenue_currency": "USD", "industry_code": "45102010", "industry_name": "E-commerce", "date_of_incorporation": "2020-01-01", "customer_segments": ["B2C"], "sales_channels": ["Online"], "product_offerings": ["Physical goods"], "website_url": "https://example.com" } #### Error Response (404) - **detail** (string) - Error detail #### Error Response Example { "detail": "Company not found" } ``` -------------------------------- ### Instantiate WayflyerHeadlessSdk with companyToken and options Source: https://docs.wayflyer.com/embedded-journey-v5-overview/using-the-sdk/headless-sdk Initialize the SDK by calling WayflyerHeadlessSdk.loadSdk with a companyToken. Pass an options object with isSandbox: true for sandbox mode. The companyToken should be minted using the Company Token endpoint on the partner's backend. ```typescript import { WayflyerHeadlessSdk, type HeadlessSdkOptions } from '@wf-financing/headless-sdk'; // Production mode const sdk = await WayflyerHeadlessSdk.loadSdk(companyToken); // Sandbox mode const options: HeadlessSdkOptions = { isSandbox: true }; const sdk = await WayflyerHeadlessSdk.loadSdk(companyToken, options); ``` -------------------------------- ### OpenAPI definition for Get user details Source: https://docs.wayflyer.com/apis/embedded-finance-1-0-0/versions/7d0182a3-23d8-43cc-b636-dac7e1594f96/operations/wf_embedded_finance_service_apps_web_core_views_user_details_get_user_details YAML OpenAPI 3.1.0 specification for the GET /company/user-details/ endpoint. It defines the operation ID, parameters, responses, security scheme, and schemas for UserDetailsResponse and ErrorDetail. ```yaml openapi: 3.1.0 info: title: Embedded Finance version: "1" servers: - url: https://api.wayflyer.com/financing/ description: Production paths: /company/user-details/: get: operationId: wf_embedded_finance_service_apps_web_core_views_user_details_get_user_details summary: Get user details parameters: - $ref: "#/components/parameters/ApiVersion" responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/UserDetailsResponse" "404": description: Not Found content: application/json: schema: $ref: "#/components/schemas/ErrorDetail" description: |- Get user details for the authenticated user. Returns the current user details including email and phone number. User is extracted from the authentication token. tags: - User Details security: - CompanyToken: [] security: - CompanyToken: [] components: parameters: ApiVersion: in: header name: API-Version schema: title: API-Version type: string enum: - "1" required: false schemas: UserDetailsResponse: properties: email: anyOf: - format: email type: string - type: "null" description: The email of the user title: Email first_name: anyOf: - type: string - type: "null" description: The first name of the user title: First Name last_name: anyOf: - type: string - type: "null" description: The last name of the user title: Last Name phone_number: anyOf: - type: string - type: "null" description: The phone number of the user in E.164 format title: Phone Number title: UserDetailsResponse type: object ErrorDetail: properties: detail: title: Detail type: string required: - detail title: ErrorDetail type: object securitySchemes: CompanyToken: type: http scheme: bearer ``` -------------------------------- ### POST /company/hosted-application/continue/ Source: https://docs.wayflyer.com/apis/embedded-finance-1-0-0/versions/7d0182a3-23d8-43cc-b636-dac7e1594f96/operations/wf_embedded_finance_service_apps_web_hosted_application_views_hosted_application_continue_hosted_application Continues an open hosted application and returns a URL to redirect the user to continue their application. Requires the company to have been onboarded and have an open hosted application. ```APIDOC ## POST /company/hosted-application/continue/ ### Description Continue an open hosted application. Returns a URL to redirect the user to where they can continue their open hosted application. Requires the company to have been onboarded with Wayflyer and have an open hosted application i.e., call this endpoint only after calling the start hosted application endpoint. ### Method POST ### Endpoint `/company/hosted-application/continue/` ### Parameters #### Header Parameters - **API-Version** (string, optional) - The API version to use. Allowed values: "1". ### Request Example No request body is required. ### Response #### Success Response (200) - **next** (string) - The URL to redirect the user to after making this API call. #### Response Example ```json { "next": "https://example.com/continue" } ``` #### Error Responses - **400** - Bad Request. Response body contains an `ErrorDetail` object with a `detail` field. - **500** - Internal Server Error. Response body contains an `ErrorDetail` object with a `detail` field. ### Security Requires CompanyToken authentication (bearer token). ``` -------------------------------- ### OpenAPI definition for Get upload status Source: https://docs.wayflyer.com/apis/embedded-finance-sandbox-api-1/versions/89e9f620-626b-413f-b4ac-7605711a516f/operations/wf_embedded_finance_service_apps_sandbox_views_anonymous_upload_get_status Complete OpenAPI 3.1.0 specification for the GET /partner/anon-data-upload/upload/{upload_id}/ endpoint. Defines the operation ID, parameters, responses, and the BatchStatusResponse schema with status values PENDING_UPLOAD, PROCESSING, PROCESSED, and ERROR. ```yaml openapi: 3.1.0 info: title: Embedded Finance Sandbox version: "1" servers: - url: https://sandbox-api.wayflyer.com/financing/ description: Production paths: /partner/anon-data-upload/upload/{upload_id}/: get: operationId: wf_embedded_finance_service_apps_sandbox_views_anonymous_upload_get_status summary: Get upload status parameters: - $ref: "#/components/parameters/ApiVersion" - in: path name: upload_id schema: format: uuid title: Upload Id type: string required: true responses: "200": description: OK content: application/json: schema: $ref: "#/components/schemas/BatchStatusResponse" "404": description: Not Found description: Get the status of a file as it is being processed asynchronously. tags: - Data Upload security: - PartnerToken: [] security: - PartnerToken: [] components: parameters: ApiVersion: in: header name: API-Version schema: title: API-Version type: string enum: - "1" required: false schemas: BatchStatusResponse: properties: status: $ref: "#/components/schemas/BatchStatus" description: Status of the batch upload required: - status title: BatchStatusResponse type: object BatchStatus: enum: - PENDING_UPLOAD - PROCESSING - PROCESSED - ERROR title: BatchStatus type: string securitySchemes: PartnerToken: type: http scheme: bearer ``` -------------------------------- ### Initialize SDK in sandbox mode with isSandbox option Source: https://docs.wayflyer.com/embedded-journey-v5-overview/using-the-sdk/headless-sdk Pass `isSandbox: true` in the `HeadlessSdkOptions` to enable sandbox mode. Requires the `@wf-financing/sandbox-ui` package for simulating responses. ```typescript import { WayflyerHeadlessSdk, type HeadlessSdkOptions } from '@wf-financing/headless-sdk'; const options: HeadlessSdkOptions = { isSandbox: true }; const sdk = await WayflyerHeadlessSdk.loadSdk(companyToken, options); ``` -------------------------------- ### GET /document-uploads Source: https://docs.wayflyer.com/apis/embedded-finance-1-0-0/versions/7d0182a3-23d8-43cc-b636-dac7e1594f96 Lists document uploads, optionally including unconfirmed documents. ```APIDOC ## GET /document-uploads ### Description Lists document uploads, optionally including unconfirmed documents. ### Method GET ### Endpoint /document-uploads ### Parameters #### Query Parameters - **include_unconfirmed** (boolean) - Optional - Include unconfirmed documents in the response. Default is false. ### Response #### Success Response (200) - **id** (uuid) - The unique identifier for the document upload. - **file_name** (string) - The name of the file. - **file_type** (ContentType) - The MIME type of the file. - **confirmed** (boolean) - Whether the document is confirmed. - **locked** (boolean) - Whether the document is locked. #### Response Example [ { "id": "123e4567-e89b-12d3-a456-426614174000", "file_name": "invoice.pdf", "file_type": "application/pdf", "confirmed": true, "locked": false } ] ``` -------------------------------- ### GET /company/embedded-application/ Source: https://docs.wayflyer.com/apis/embedded-finance-1-0-0/versions/7d0182a3-23d8-43cc-b636-dac7e1594f96/operations/wf_embedded_finance_service_apps_web_embedded_application_views_embedded_application_get_embedded_application Get the status of the open embedded application for the company. The returned schema will let the user know if additional details are required to submit the application and provide the application ID to track the application status in subsequent API calls. If no open embedded application exists for the company, a 404 error is returned. ```APIDOC ## GET /company/embedded-application/ ### Description Get the status of the open embedded application for the company. The returned schema will let the user know if additional details are required to submit the application and provide the application ID to track the application status in subsequent API calls. If no open embedded application exists for the company, a 404 error is returned. ### Method GET ### Endpoint /company/embedded-application/ ### Parameters #### Header Parameters - **API-Version** (string, optional) - The API version to use. Allowed values: "1". ### Response #### Success Response (200) - **application_id** (string, nullable) - The ID of the embedded application. - **required_details** (array) - A list of required details to submit the embedded application. - **name** (string) - The name of the detail. Allowed values: "user_details", "company_details". - **status** (string) - The status of the detail, either complete or incomplete. Allowed values: "complete", "incomplete". #### Response Example { "application_id": "550e8400-e29b-41d4-a716-446655440000", "required_details": [ { "name": "user_details", "status": "incomplete" }, { "name": "company_details", "status": "complete" } ] } #### Error Response (404) - **detail** (string) - Error detail. #### Error Response Example { "detail": "Not Found" } ### Authentication Bearer token (CompanyToken) ### Security - CompanyToken: [] ``` -------------------------------- ### Initialize Wayflyer UI SDK in sandbox mode with prefill callback Source: https://docs.wayflyer.com/embedded-journey-v5-overview/using-the-sdk/ui-sdk Use this snippet to initialize the Wayflyer UI SDK in sandbox mode by setting `isSandbox: true` in the options. The SDK will then call the sandbox environment API. The example also shows how to define a prefill callback and mount a CTA element. ```typescript import { WayflyerUiSdk, type UiSdkOptions, type EmbeddedJourneyPrefillCallback, type EmbeddedJourneyPrefill, } from '@wf-financing/ui-sdk'; const options: UiSdkOptions = { isSandbox: true }; const wayflyerUiSdk = await WayflyerUiSdk.loadSdk(companyToken, options); const prefillCallback: EmbeddedJourneyPrefillCallback = async () => { const prefill: EmbeddedJourneyPrefill = {}; return prefill; }; wayflyerUiSdk.mountCta('wayflyer-cta', prefillCallback); ``` -------------------------------- ### GET /company/cta/ Source: https://docs.wayflyer.com/apis/embedded-finance-1-0-0/versions/7d0182a3-23d8-43cc-b636-dac7e1594f96/operations/wf_embedded_finance_service_apps_web_cta_views_banner_get_banner Retrieves the CTA configuration for a given company. Returns a 204 if no CTA should be shown. ```APIDOC ## [GET] /company/cta/ ### Description Retrieve the CTA configuration for a given company or responds with a 204 if no CTA should be shown. ### Method GET ### Endpoint /company/cta/ ### Parameters #### Header Parameters - **API-Version** (string, optional) - The API version to use. ### Response #### Success Response (200) - **state** (BannerState) - The type of CTA to display. Possible values: continue_application, continue_embedded_application, indicative_offer, generic_offer. - **data** (BannerData) - Data to display in the CTA. - **offer** (Offer, nullable) - Offer data to display in the CTA. - **amount** (integer) - Amount of the offer in `currency`. - **currency** (SupportedCurrencyCode) - ISO 4217 code for the currency of the offer. - **config** (ContinueEmbeddedApplicationBannerConfig | ContinueApplicationBannerConfig | OfferBannerConfig) - Configuration for the CTA. - **dismissal_key** (string, nullable) - Opaque key identifying this CTA instance. Use it when dismissing the banner. #### Response Example { "state": "indicative_offer", "data": { "offer": { "amount": 10000, "currency": "USD" }, "config": {} }, "dismissal_key": "string" } #### Success Response (204) No Content - No CTA should be shown. #### Error Response (500) Internal Server Error ``` -------------------------------- ### POST /company/hosted-application/simulation/ Source: https://docs.wayflyer.com/apis/embedded-finance-sandbox-api-1/versions/89e9f620-626b-413f-b4ac-7605711a516f/operations/wf_embedded_finance_service_apps_sandbox_views_hosted_application_hosted_application_simulation_action Perform a simulation action on a company's hosted application. Returns HTTP 204 No Content on success. ```APIDOC ## POST /company/hosted-application/simulation/ ### Description Perform a simulation action on a company's hosted application. Returns HTTP 204 No Content on success. ### Method POST ### Endpoint `/company/hosted-application/simulation/` ### Parameters #### Header Parameters - **API-Version** (string, optional) - The API version to use. Allowed values: `1`. #### Request Body (required) Content type: `application/json` The request body must be one of the following schemas: - **SimpleActionRequest** (object) - Schema for simple simulation actions without extra fields. - **action** (string, required) - The simulation action to perform. Allowed values: `application-submitted`, `discontinue-application`, `fail-uw`, `request-additional-info`, `provide-info`, `accept-offer`, `reject-offer`, `complete-kyc`, `pass-kyc`, `fail-kyc`, `sign-contract`, `reject-contract`. - **PassUWRequest** (object) - Schema for the `pass-uw` action, requires offer details. - **action** (string, required) - Must be `pass-uw`. - **approved_amount** (integer or null, optional) - The approved amount. - **currency** (string or null, optional) - The currency code. ### Request Example ```json { "action": "application-submitted" } ``` ### Response #### Success Response (204) No Content. No response body. #### Error Responses - **400 Bad Request** - The request was invalid. Response body contains an `ErrorDetail` object with a `detail` field. - **500 Internal Server Error** - An unexpected error occurred. #### Response Example (Error) ```json { "detail": "Error message" } ``` ### Security Requires a bearer token (CompanyToken) for authentication. ``` -------------------------------- ### GET /company/hosted-application/simulation/ Source: https://docs.wayflyer.com/apis/embedded-finance-sandbox-api-1/versions/89e9f620-626b-413f-b4ac-7605711a516f/operations/wf_embedded_finance_service_apps_sandbox_views_hosted_application_hosted_application_simulation_status Retrieves the current simulation status and valid actions for the customer's hosted application. ```APIDOC ## [GET] /company/hosted-application/simulation/ ### Description Get and return the current simulation status for the customer and the valid actions that can be performed. ### Method GET ### Endpoint /company/hosted-application/simulation/ ### Parameters #### Header Parameters - **API-Version** (string, optional) - The API version to use. Allowed values: "1". ### Response #### Success Response (200) - **status** (HostedApplicationSimulationStatus) - The current simulation status. Possible values: APPLICATION_IN_PROGRESS, AWAITING_UW_DECISION, AWAITING_ADDITIONAL_INFO, AWAITING_OFFERS_DECISION, KYC_IN_PROGRESS, AWAITING_KYC_DECISION, AWAITING_ADDITIONAL_KYC_INFO, AWAITING_CONTRACT_SIGNING, REJECTED, COMPLETED, CLOSED. - **valid_actions** (array of HostedApplicationSimulationAction) - The valid actions that can be performed. Possible values: application-submitted, discontinue-application, pass-uw, fail-uw, request-additional-info, provide-info, accept-offer, reject-offer, complete-kyc, pass-kyc, fail-kyc, sign-contract, reject-contract. #### Response Example { "status": "APPLICATION_IN_PROGRESS", "valid_actions": ["application-submitted", "discontinue-application"] } ``` -------------------------------- ### POST /company/embedded-application/start/ Source: https://docs.wayflyer.com/apis/embedded-finance-1-0-0/versions/7d0182a3-23d8-43cc-b636-dac7e1594f96 Creates a new embedded application. This endpoint must be called before submitting the application. ```APIDOC ## POST /company/embedded-application/start/ ### Description Creates a new embedded application. This endpoint must be called before submitting the application. ### Method POST ### Endpoint /company/embedded-application/start/ ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body Not specified in source. ### Request Example Not specified in source. ### Response #### Success Response (200) Not specified in source. #### Response Example Not specified in source. ### Error Handling Not specified in source. ```