Skip to main content

Overview

The Phoenix payment iframe communicates with your application through the window.postMessage API. This page explains the messages exchanged between your application and the Phoenix payment iframe.

Messages from Phoenix to Your Application

The Phoenix payment iframe will send messages to your application to indicate the status of different processes:

Handling Messages

Your application should listen for these messages and take appropriate actions:

Parameters from Your Application to Phoenix

Parameters are passed from your application to the Phoenix payment iframe via URL query string:

Required Parameters

Optional Parameters

Security Considerations

To ensure secure communication between your application and the Phoenix payment iframe:
  1. Always verify the origin of incoming messages to prevent cross-site scripting attacks
  2. Use HTTPS for all communication
  3. Validate input parameters before passing them to the iframe
  4. Clean up event listeners when the payment process is complete to prevent memory leaks