Offer

An offer card and modal that invites the user to apply for a product (today, a bank account) and then shows where their application stands.

Part ofEmbedded Banking

An offer card and modal that invites the user to apply for a product (today, a bank account) and then shows where their application stands.

The card and its "Learn more" modal present your product copy (logo, captions, "How it works" steps, benefits). Its Apply now and modal CTAs call onPrimaryCtaClick, which you typically wire to show BankAccountOnboardingWidget inline. Once an application exists, the card swaps its CTAs for the application's status (see Behaviour), and it hides itself when the user already has an account.


Quick Start

Pass your tenant-specific content; the package looks up no white-label or bank assets itself.

BankAccountOnboardingWidget renders inline and fills its container, so the CTA either navigates to a page that hosts it or swaps it in place of the card inside a container with a real height:

import { useState } from 'react';
import {
  OfferWidget,
  BankAccountOnboardingWidget,
} from '@tesouro/embedded-components-react';

function ProspectOnboarding({ content }) {
  const [isOnboarding, setIsOnboarding] = useState(false);

  if (isOnboarding) {
    return (
      <div style={{ height: '100vh', minHeight: 600 }}>
        <BankAccountOnboardingWidget
          onEmbeddedOnboardingCompletedSuccessfully={handleComplete}
          onNavigateToDashboard={goToDashboard}
        />
      </div>
    );
  }

  return (
    <OfferWidget
      content={content}
      onPrimaryCtaClick={() => setIsOnboarding(true)}
    />
  );
}

Behaviour

  • Renders nothing until widget init and the organization's application status load.
  • Hidden when the user is already ACTIVE / INACTIVE or INVITED, or the organization's bank-account application is COMPLETE.
  • Otherwise the card follows the organization's application:
Application statusStarted by the userStarted by a colleague
noneNormal offerNormal offer
DRAFTNormal offer, CTA reads Resume applicationStatus chip + message, no CTAs
SUBMITTEDStatus chip + message, no CTAsStatus chip + message, no CTAs
DENIEDStatus chip + message, no CTAsStatus chip + message, no CTAs
DELETED / CANCELEDNormal offerNormal offer
COMPLETEHiddenHidden
  • Resume application calls the same onPrimaryCtaClick; BankAccountOnboardingWidget resumes the draft by itself.
  • The bank name in status messages comes from widget init.
  • The widget renders content as given, so your sponsor bank must approve that copy before it goes live.

Props

Widget props

PropTypeDefaultDescription
contentOfferWidgetContentRequiredHost-resolved card and modal copy, images, "How it works" steps, and benefits.
onPrimaryCtaClickEvent() => voidRequiredCalled when the applicant clicks Apply now on the card or the modal CTA (default label: Start application). Closes the modal first.
Label overrides
PropTypeDefaultDescription
labelsLabelsPartialDeep<OfferWidgetLabels>English labelsOverride the card and modal copy. See the exported OfferWidgetLabels type for every key.
statusLabelsLabels
PartialDeep<OfferWidgetStatusLabels>
PartialDeep<OfferWidgetStatusLabels>
English labelsOverride the Resume application label and each status message. Heading and body are functions of { bankName }.

TypeScript

import type {
  OfferWidgetProps,
  OfferWidgetContent,
  OfferWidgetLabels,
  OfferWidgetStatusLabels,
  OfferWidgetBenefit,
  OfferWidgetHowItWorksStep,
  OfferWidgetImage,
} from '@tesouro/embedded-components-react';
import { OfferBenefitIcon } from '@tesouro/embedded-components-react';

On this page