Skip to main content
Version: 3.0.0 (current)

Controlling the iframe - Suspends & locks

Suspend

If you wish to lock the client from allowing any user inputs, for example while the cart is being updated, you can call the suspend function in the JavaScript SDK. The iframe will fade out a bit and show a spinner while it is suspended.

window._briqpay.v3.suspend()

Resume

When you wish to unlock the iframe again, call the resume function. It will rehydrate the iframe with any updates you have made and unlock for the user.

window._briqpay.v3.resume()

Resume Decision

When you wish to unlock the session after validation has completed in the Session Decision flow, call the resumeDecision function.

window._briqpay.v3.resumeDecision()

Lock & unlock modules

If you wish to lock a specific module, you can call the lockModule function in the JavaScript SDK. The second parameter, 'stickyLock', controls whether the lock is client-side or server-side.

window._briqpay.v3.lockModule('payment', true)

If you wish to unlock the module again, call the unlockModule function.

window._briqpay.v3.unlockModule('payment')