Handling Iframe postMessage events on the parent frame
Overview
This document describes how to listen for payout-related tracking events emitted by the Breeze payout iframe via the browser's postMessage API. These events allow the host (parent) page to monitor user interactions within the embedded Breeze hosted payout form — without directly accessing the iframe's DOM. This is useful for analytics, conversion funnel tracking, and triggering custom UI behavior in response to payout flow activity.
Usage
Register a message event listener on the window object. Incoming messages with type === "on-payout-event" originate from the Breeze iframe. The specific event name is available at event.data.data.eventName.
// Register event listener for iframe messages
const handleIFrameRequest = (event: MessageEvent) => {
if (event.data?.type === "on-payout-event") {
// Handle the callback here
handleEvent(event.data.data?.eventName);
}
};
window.addEventListener("message", handleIFrameRequest);Event Reference
| EBreezePayoutEvent | Description |
|---|---|
payout_page_view_all | Page view impression when the user successfully loads the payout page. |
payout_click_confirm_payout_button | User clicks the "Confirm" button after selecting the payout method. |
payout_action_all_status_processing | User has finished the onboarding process and is redirected to the processing status page. |
payout_action_all_status_processed | User is redirected to the processed status page. |
payout_action_all_status_failed | User is redirected to the failed status page. |
Updated about 11 hours ago
Did this page help you?
