For the complete documentation index, see llms.txt. This page is also available as Markdown.

Mortgage Marketplace

Implementation, Syntax, Consumer Experience, Tags, Tracking, and Best Practices

person-waving

Engine embeds run the same backend Mortgage application as our Hosted Partner Page do, but as opposed to linking out to a MoneyLion-hosted page they can be embedded directly into you property for a more native experience.

The Mortgage Experience

Engine's Mortgage embed covers purchase, refinance, and home equity (HELOC and HELOAN). The embed renders three surfaces, and your zone configuration decides which one the consumer lands on first:

  • Explore. A rate-trend chart built on current APR data. It shows how rates have moved rather than listing offers, so a consumer can arrive with no information and still see something useful. Its call-to-action hands off to Search.

  • Search. The question flow that qualifies the consumer and ends by creating an offer search with Engine's lending partners.

  • Compare. The results page for that offer search. The consumer can sort the offers, page through them, and narrow them with filters, and each offer's call-to-action sends the consumer to that lender. Compare is the last Engine screen in the flow.

Your Engine representative will set the entrypoint per zone to either Explore or Search. Compare is not available as an entrypoint, because the page is scoped to the offer search that Search created - the only way to reach it is to complete the question flow.

Which filters appear on Compare depends on the mortgage type. Purchase and refinance offers can be narrowed by loan term and by FHA and VA program eligibility. Home equity offers can be narrowed by property value, current mortgage balance, and requested loan amount.

The Search Funnel

Mortgage asks a different opening question than Engine's other marketplaces: the consumer states a goal - buying a home, refinancing, or borrowing against home equity - and that answer changes which questions follow.

Step
What the consumer provides

Mortgage Information

Purchase: goal, plus purchase price and down payment

Refinance: property value and current mortgage balance

Home Equity: property value, current mortgage balance, and desired loan amount

Zip Code

The property's ZIP code

Cash Out

Refinance only. Whether the consumer wants cash out, or a rate-and-term refinance

Credit Score

Self-reported credit score range

Identity Verification

Date of birth and phone number

Contact Information

First name, last name, and email

Personal Information

Mailing address

SSN and Consents

Social Security Number, with FCRA and TCPA consent

Not every consumer may see every step. When Engine already has consumer data because identity verification returned i, the marketplace routes past those steps instead of asking again. Identity verification may also insert an SMS one-time-passcode step.

Standard Embed Implementation

Engine's embed code can be placed in any order within your page, but for optimal user experience we recommend placing the script tag within the same div where the content is being rendered.

Embed Components

  • Channel & Zone: placeholders that will be replaced with precise values in the embed code provided to you.

  • Component Name: corresponds to the specific product or Engine experience type that's being rendered.

    • Mortgage is served from /web-component/mortgage/ : the full Mortgage marketplace - Explore, Search, and Compare, across purchase, refinance, and home equity. Mortgage ships a single component rather than one per surface. It always opens the app root, and Engine's zone configuration decides whether the consumer starts on Explore or Search, so there is no experience attribute to set.

  • Mounting: manual is the default. Place where the marketplace should render. The script tag and the element can appear in either order on the page.

    • With data-embed-type="auto-mount", do not add the element - the script inserts the component immediately after itself when the bundle loads. In this mode the script tag must be inside , in the exact position where the marketplace should appear.

Basic Syntax

This is a representative example of what our embed code looks like, and placeholders will be replaced with precise values in the embed code provided to you:

PLEASE NOTE: Your Engine representative will provide you with your specific code snippet. Do not try to reproduce from the sample snippet outlined below.

Customization & Auto Sizing

The web component loads an iFrame and will automatically fill the container. Embeds are rendered wherever you include our HTML tag on your page and will responsively scale to fill the space available to it. The embedded app reports its own height to your page as the consumer moves through the flow, so the iFrame grows and shrinks with the content.

Required Consumer Data Inputs

The Mortgage experience collects every field below itself, inside the Search funnel. Fields appear in the order the consumer meets them, matching the Search Funnel above.

A consumer is only asked for the fields belonging to the mortgage type they picked, and any step Engine can already satisfy - through identity verification - is skipped rather than asked again.

Name
Field Name
Description
Required? Which Mortgage Product(s)?

Mortgage Type

mortgageType

What the consumer wants to do. Values: purchase, refinance, heloc. Home equity submits heloc and leaves the lead's mortgageType unset.

All Mortgage Product Types

Purchase Price

purchasePrice

Purchase price of the home. Stored on the lead as propertyValue.

Purchase only

Down Payment

downPayment

Cash down payment, in dollars. Stored on the lead as downPaymentAmount.

Purchase only

Down Payment Percentage

downPaymentPercent

The same down payment expressed as a percentage of purchase price. Used by the form only; not stored on the lead.

Purchase only

Property Value

propertyValue

Current estimated value of the home.

Refinance and Home Equity

Current Mortgage Balance

loanBalance (refinance) mortgageBalance (home equity)

Outstanding balance on the existing mortgage. Stored on the lead as mortgageBalance in both cases.

Refinance and Home Equity

Desired Loan Amount

desiredLoanAmount

Amount the consumer wants to borrow against their equity. Stored on the lead as mortgageAmount.

Home Equity only

Property ZIP Code

zipcode

ZIP code of the property being financed, collected on the Zip Code step. Distinct from the consumer's mailing ZIP. Stored on the lead as propertyZipcode, and Engine derives propertyState from it.

All Mortgage Product Types

Cash Out

cashOut

Whether the consumer wants cash out or a rate-and-term refinance. Values: yes, no. Stored on the lead as refinanceType (cash_out or rate_term).

Refinance only

Credit Score

creditScoreRange

Self-reported credit score range. Stored on the lead as mortechCreditRating. Engine always runs a soft pull.

All Mortgage Product Types

Date of Birth

dateOfBirth

Consumer's date of birth. Stored on the lead as YYYY-MM-DD.

All Mortgage Product Types

Phone Number

phoneNumber

Primary phone number. Stored on the lead as primaryPhone.

All Mortgage Product Types

First Name

firstName

Legal first name.

All mortgage types

Last Name

lastName

Legal last name.

All mortgage types

Email Address

email

Email address.

All mortgage types

Street Address

address1

Mailing street address.

All mortgage types

Address Line 2

address2

Apartment, unit, or suite.

Optional

City

city

Mailing city.

All Mortgage Product Types

State

state

Mailing state.

All Mortgage Product Types

Mailing ZIP Code

zipcode

The consumer's mailing ZIP code, collected on the Personal Information step. May differ from the property ZIP.

All Mortgage Product Types

Social Security Number

ssn

Collected and stored in the form NNN-NN-NNNN.

All Mortgage Product Types

Client Tags for Reporting & Attribution

Client tags let Engine attribute leads and offer clicks back to your own reporting. Where they are supported, the syntax is a tag. prefix on each key:

Client tags carried on the Mortgage marketplace URL are attached to the offer search Engine creates for that consumer, which is what makes them available in your reporting. For a URL-based integration, see Client Tags on the Hosted Partner Page.

Supported Client Tag Keys

Below are the client tag keys that are currently supported:

  • agentId

  • campaignId

  • clickId

  • clientId

  • deviceId

  • medium

  • sourceId

  • subId

  • subId1

  • subId2

  • subId3

  • target

  • trafficsource

  • userId

If a different key is needed, please reach out to your Partner Manager - we may be able to accommodate, but adding nonstandard keys will increase the time it takes Engine to report Client Tag values back to you and is therefore not recommended.

Tracking Events Emitted by Embed

When you embed the Mortgage experience, event callbacks fire by default. There is no attribute, flag, or opt-in to enable them.

How It Works

As a consumer navigates through the experience, the embed emits partner messages: JSON objects with a name (the event type) and a payload (event-specific data). The iFrame posts them to your host page with postMessage.

  • You do not register callbacks with Engine. You listen on your host page; messages arrive whether or not you handle them.

  • Not every UI action sends a message. Only the events listed below are part of the partner contract. Other activity - offers rendering, offer detail views, and the embed scrolling into view - is used internally and is not posted to your page.

  • Messages are one-way. There is no acknowledgement or response channel.

Implementation Path

Partners using Web Embed receive events by listening for browser message events on the host page:

The message shape is always:

Every payload includes timestamp, an ISO-8601 string.

Events & Data

onUpdate: Emitted when the consumer submits a question in the flow. updatePage is the step slug from the question flow table above, so this is the event to use for funnel and drop-off reporting.

onOfferClick: Emitted when the consumer clicks an offer call-to-action. placement distinguishes where the click happened: offer-card for the button on the offer card itself, and more-info-modal for the call-to-action inside the offer's More Info dialog.

onBrandLoaded: Emitted when the embedded app has resolved your brand styling. If you use Engine's <moneylion-mortgage> component, you can ignore this event - the component applies the styling for you. It is relevant only if you host the iFrame directly.

onOpenModal: Emitted when the consumer opens an offer's More Info dialog, carrying the content to display. As with onBrandLoaded, Engine's component renders this dialog for you; the event matters only for a direct iFrame integration.

Two events are SDK-only and are not emitted by the Engine web embed:

  • onBack: emitted by the SDK header back button

  • onExit: emitted by the SDK header exit button

Mortgage also does not emit onRateTableRender, onNavigate, onCreate, onSubmit, onErrorPageView, or onErrorPageRetry. If you have integrated another Engine embed, do not assume those events are available here - use onUpdate for flow progress and onOfferClick for conversion.

Embed Best Practices & Troubleshooting

Best practices

Troubleshooting

Last updated

Was this helpful?