You can listen to the overlay events easily with a few lines of code. You'll need to make sure you've got the Lemon.js library installed on your page first.
Every time an event is fired from the Overlay,
You will be able to determine which event happened by checking the value in
Checkout.Success events will be passed an Order object in
event.data, which you can use to access or save data immediately after purchase.
List of Events
Lemon.js currently supports the following events:
|Checkout.Success||Checkout was successful|
|PaymentMethodUpdate.Mounted||Payment Method Update Overlay has been loaded|
|PaymentMethodUpdate.Closed||Payment Method Update Overlay has been closed|
|PaymentMethodUpdate.Updated||Payment method has been updated successfully|