Operations
Redirect handling
Keep navigation controlled by the host page.
Redirect listener
Embedded mode keeps navigation in the host page. MakePay emits the redirect request and your site decides whether to close the modal, navigate, or keep the user in place.
javascript
window.addEventListener("makepay.payment.redirect_requested", function (event) {
if (event.detail && event.detail.redirectUrl) {
window.location.assign(event.detail.redirectUrl);
}
});Navigation behavior
Use makepay.payment.redirect_requested when the host page should navigate after completion. Embedded mode never redirects the top window automatically.