Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.tesouro.com/llms.txt

Use this file to discover all available pages before exploring further.

Onboarding Widget
The onboarding component shows users marketing information about the embedded account and kicks off the KYC/KYB onboarding flow. It pulls in your logo, bank account name, and marketing text from Tesouro’s database — content that is defined collaboratively by you, Tesouro, and the bank, and must be bank-approved. After the user views the marketing information, the component transitions into the onboarding flow where business users submit their information for KYC/KYB validation. The flow collects information on three entities:
  • Business entity — Legal information about the business itself
  • Business controller — An individual with the power to direct or significantly influence the financial activities of the business (e.g. CEO, CFO, VP)
  • Beneficial owners — Any person who owns 25% or more of the company’s ownership interests

Onboarding outcomes

OutcomeDescription
Instant approvalThe user can immediately access the banking dashboard and start using the account
Manual reviewThe bank requires additional review time; the user is notified via email when complete
DeniedThe application is denied if it appears fraudulent or too risky for the bank

React

import { EmbeddedProvider, OnboardingWidget } from "@tesouro/embedded-components-react";

export default function OnboardingPage() {
  return (
    <EmbeddedProvider
      userId={currentUser.id}
      userEmail={currentUser.email}
      widgetTokenRefreshUrl="/api/widget-token"
    >
      <OnboardingWidget bankingDashboardHref="/banking/dashboard" />
    </EmbeddedProvider>
  );
}
PropRequiredDescription
bankingDashboardHrefNoURL to redirect users to after successful onboarding
shouldRedirectNoWhether to automatically redirect after approval (default: false)
businessDetailsFormNoPre-filled business entity data (see pre-fill table below)
personalDetailsFormYesPre-filled business controller data; must include workEmail
additionalBusinessOwnersNoArray of pre-filled beneficial owner data

Web components

<embedded-onboarding-widget
  data-personal-details-form='{"workEmail":"owner@acme.com"}'
></embedded-onboarding-widget>
Use setWidgetDefaults to set shared values like data-user-id and data-widget-token-refresh-url globally instead of repeating them on each component.

Pre-filling onboarding data

If you already store any of the following fields, pass them in to pre-fill the form and reduce friction for your users. Users can always edit pre-filled values. The workEmail field is required and must be passed via the personalDetailsForm prop:
<OnboardingWidget
  personalDetailsForm={{
    workEmail: "owner@example.com", // required for onboarding flow
  }}
/>

data-personal-details-form fields (controller)

FieldParameterTypeExample
Controller first namefirstNamestringJack
Controller last namelastNamestringSmith
Controller date of birthdateOfBirthstring03-01-1997
Controller SSNssnstring123-45-6789
Controller home addresshomeAddressstring234 Main St.
Controller citycitystringPhoenix
Controller statestatestringArizona
Controller ZIP codezipCodestring85001
Controller phonemobilePhoneNumberstring555-345-2343
Controller owns 25%+ownsOver25Percent'yes' | 'no' | 'unselected'yes
Controller ownership %ownershipPercentagestring50
Controller work emailworkEmailstringjack@example.com
workEmail is required for onboarding.

data-business-details-form fields

FieldParameterTypeExample
Company legal namecompanyLegalNamestringNail It Technology, Inc.
Company DBA namecompanyDbaNamestringNail It
Company addressbusinessAddressstring123 Main St.
Company citycitystringPhoenix
Company statestatestringArizona
Company ZIP codezipCodestring85001
Company phonecompanyPhoneNumberstring555-345-3434
Business structurecompanyStructurestringllc
Company websitewebsitestringhttps://www.example.com
EIN / Tax IDtaxIdstring123456789
NAICS industry codenaicsCodeNaicsOption | null111331
Industry codeindustryCodestring111331
You can pass either industryCode or naicsCode. industryCode is supported and translated to naicsCode internally.

data-additional-business-owners fields (beneficial owners array)

Each owner object includes:
FieldParameterTypeExample
Beneficial owner IDidstringowner_1
Beneficial owner first namefirstNamestringJane
Beneficial owner last namelastNamestringDoe
Beneficial owner DOBdateOfBirthstring02-15-1990
Beneficial owner SSNssnstring123456789
Beneficial owner addresshomeAddressstring123 Main St.
Beneficial owner citycitystringPhoenix
Beneficial owner statestatestringArizona
Beneficial owner ZIP codezipCodestring85001
Beneficial owner phonephoneNumberstring5552344456
Beneficial owner %ownershipPercentagestring25