For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Get a Demo
Get StartedConceptsProductsGuidesUI ComponentsAPI Access
Get StartedConceptsProductsGuidesUI ComponentsAPI Access
    • Introduction
    • Onboarding
    • Card Management
    • Credit Goals
    • Profile
    • Component Messaging
Get a Demo
LogoLogo
On this page
  • Listening for Messages

Component Messaging

Was this page helpful?
Previous
Built with

Upward’s components communicate with the parent application using iframe messages.
Partners can listen for these messages and take appropriate actions within their app or browser.


Listening for Messages

Add the following code block to the browser console window to see the messages

1window.addEventListener("message", (event) => {
2 const { Event, body } = event.data;
3
4 switch (Event) {
5 case "component.navigation":
6 console.log("Navigation detected", body);
7 break;
8
9 case "component.closed":
10 console.log("The component was closed", body);
11 break;
12
13 case "component.alert":
14 console.log("Alert received", body);
15 console.log(body.message || "Component alert");
16 break;
17
18 case "plaid.token":
19 console.log(body || "Component Plaid");
20 break;
21
22 default:
23 console.warn("Unknown event received:", Event);
24 }
25}, false);