• France
status page
Demo shops
assistance
FAQContact support
Search
Categories
Tags
Europe (English)
France
Spain
Europe (English)
India
Homepage
Use cases
Create a payment
Create an installment payment
Create a multi-card (split) payment
Create a payment by Alias (Token)
Create a payment link
Create a recurring payment
Manage subscriptions
Manage your transactions (refund, cancel...)
Analyze your reports
API docs
Embedded Form
REST API
Hosted payment
Mobile payment
File exchange
SDD mandates by REST API
Snippets
Payment methods
Plugins
Marketplace
Guides
Merchant Back Office
Back Office Expert
Functional guides

Managing timeouts

A payment session is the time given to the buyer for making a payment.

The payment session delay is 10 minutes.

Once the session has expired, the buyer is disconnected. The merchant web site is notified if the “Instant Payment Notification URL on cancellation” notification rule is configured and enabled.

If the buyer makes a transaction on the payment page after the expiry of the payment session, an error message will be displayed.

To avoid this logout message, you can add a counter to your page.

After some time (5 minutes for example) the iframe will be closed automatically.

...
setTimeout(window.parent.removeIframe(), '30000');
</body>
</html>

Another solution consists in capturing the “message” event sent by the payment gateway in case of disconnection.

For this, paste the code below into the page that invokes the iframe:

if (window.addEventListener) {
    window.addEventListener("message", onMessage, false);        
}  else if (window.attachEvent) {
    window.attachEvent("onmessage", onMessage, false);
}
function onMessage(event) {
    if (event.origin !== "https://secure.lyra.com") return;
    var data = event.data;
    if (typeof(window[data.func]) == "function") {
        window[data.func].call();
    }
}

Then, implement the handlePaymentDisconnection() function:

function handlePaymentDisconnection() {
    //Close iframe
    //Show message
    //Show button to relaunch payment
    //etc, etc
}

Make sure you respect the spelling of the function name.

Jobs
Legal
GDPR
25.18-1.11