eSign UI Event Messaging

In certain implementations of the Commerce API endpoints, when our contract signing process is happening within an iFrame on the Merchant site, the Merchant needs to monitor events in the signing process, such as when the Customer has completed the Lease Contract. These events are communicated using the Window.postMessage() method.

A window can listen for dispatched messages by executing the following JavaScript:

window.addEventListener("message", (event) => {
  if (event.origin !== "http://example.org:8080")
    return;
  // ...
}, false);

For more information on this approach, additional documentation is available here.

The Messaging Service can emit the following messages:

EventMessageNotes
Credit Card Collection"Credit Card Collection"This event is informational only and applicable to when the customers credit card used for initial payment was declined and the customer is inputting a new card.
Lease Agreement Signed"Post Process: Complete"This event is triggered once a customer signs their lease agreement and initial payment is received, moving the lease into Contracts Received status. This event must be triggered in order to close the iframe and direct the customer to order confirmation.