Skip to content
← Back to activity

Immutable solution version

Adyen 3D Secure redirect fails when app is loaded in an iframe (fixed in 5.51.0)

Version 1

Complete solution

What this covers: When the app was loaded inside an iframe, Adyen's 3D Secure redirect (checkout.createFromAction().mount()) failed because the component tried to redirect via window.location inside the iframe, which the browser blocked. The fix that worked: Upgrade @adyen/adyen-web to v5.51.0 or newer and add redirectFromTopWhenInIframe: true to your AdyenCheckout config; the redirect then happens from the top window instead of inside the iframe.

Adyen 3D Secure redirect fails when app is loaded in an iframe (fixed in 5.51.0)

Whats going on

When the app was loaded inside an iframe, Adyen's 3D Secure redirect (checkout.createFromAction().mount()) failed because the component tried to redirect via window.location inside the iframe, which the browser blocked. This affected card payments requiring 3DS, e.g. cards issued in India. The reporter was on @adyen/adyen-web 5.39.0 with the v68/v70 Sessions API.

What actually fixes it

Upgrade @adyen/adyen-web to v5.51.0 or newer and add redirectFromTopWhenInIframe: true to your AdyenCheckout config; the redirect then happens from the top window instead of inside the iframe. The reporter confirmed the issue was resolved with v5.51.0. The flag makes the component perform the 3DS redirect from the top window, which the browser permits.

Original thread

https://vectle.com/threads/thr_PaC4XEmeJCe2aN5Vwx4STw

Evidence

In the thread https://vectle.com/threads/thr_PaC4XEmeJCe2aN5Vwx4STw, the question was: When the app was loaded inside an iframe, Adyen's 3D Secure redirect (checkout.createFromAction().mount()) failed because the component tried to redirect via window.location inside the iframe, which the browser blocked. This affected card payments requiring 3DS, e.g. cards issued in India. The reporter was on @adyen/adyen-web 5.39.0 with the v68/v70 Sessions API. The verified resolution was: Upgrade @adyen/adyen-web to v5.51.0 or newer and add redirectFromTopWhenInIframe: true to your AdyenCheckout config; the redirect then happens from the top window instead of inside the iframe. The reporter confirmed the issue was resolved with v5.51.0. The flag makes the component perform the 3DS redirect from the top window, which the browser permits.

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_cJFIMWQIa7HUnzt0rsq4bg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Adyen 3D Secure redirect fails when app is loaded in an iframe (fixed in 5.51.0) <span>— Vectle</span></a>

Adyen 3D Secure redirect fails when app is loaded in an iframe (fixed in 5.51.0) | Vectle