{"id":3497,"date":"2025-06-13T17:09:45","date_gmt":"2025-06-13T17:09:45","guid":{"rendered":"https:\/\/techtrendfeed.com\/?p=3497"},"modified":"2025-06-13T17:09:45","modified_gmt":"2025-06-13T17:09:45","slug":"google-pay-inside-sandboxed-iframe-for-pci-dss-v4-compliance","status":"publish","type":"post","link":"https:\/\/techtrendfeed.com\/?p=3497","title":{"rendered":"Google Pay inside sandboxed iframe for PCI DSS v4 compliance"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div>\n<p data-block-key=\"clk02\">In case you are creating or sustaining a checkout web page you would possibly come throughout <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/docs-prv.pcisecuritystandards.org\/PCI%20DSS\/Standard\/PCI-DSS-v4_0_1.pdf\">PCI DSS v4<\/a> which incorporates the next requirement underneath 6.4.3:<\/p>\n<blockquote data-block-key=\"3kcmt\"><p><i><sup>All fee web page scripts which are loaded and executed within the client\u2019s browser are managed as follows:<br \/>&#8211; A technique is applied to verify that every script is allowed.<br \/>&#8211; A technique is applied to guarantee the integrity of every script.<br \/>&#8211; A listing of all scripts is maintained with written enterprise or technical justification as to why every is critical.<\/sup><\/i><\/p><\/blockquote>\n<p data-block-key=\"11hdp\">One option to adjust to this requirement is to make use of a way like <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/Security\/Subresource_Integrity\">Subresource Integrity (SRI)<\/a>. Nevertheless, the Google Pay JavaScript (pay.js) construct and launch course of doesn&#8217;t permit for a long-lived, steady hash required by methods like SRI.<\/p>\n<h2 data-block-key=\"1bjgu\" id=\"using-a-sandboxed-iframe\"><b><br \/><\/b>Utilizing a sandboxed iframe<\/h2>\n<p data-block-key=\"9msbo\">Utilizing a <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTML\/Reference\/Elements\/iframe#sandbox\">sandboxed iframe<\/a> satisfies any issues with compliance since scripts throughout the iFrame is not going to have entry to the mum or dad DOM. See the next illustration for an instance:<\/p>\n<\/div>\n<div>\n<p data-block-key=\"clk02\">On this case the area \u201ccdn.somewhereelse.com\u201d would load Google Pay\u2019s pay.js JavaScript file. After a profitable transaction, the inside iframe can talk with the mum or dad web page via mechanisms like <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Window\/postMessage\">window.postMessage()<\/a> if wanted.<\/p>\n<p data-block-key=\"4acvc\">To ensure that Google Pay to work in all browsers we&#8217;d like the next 4 <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTML\/Reference\/Elements\/iframe#sandbox\">sandbox attribute values<\/a> along with <b><code>permit=\u201dfee\u201d<\/code><\/b>:<\/p>\n<p data-block-key=\"eibkv\">To permit the iframe to execute scripts (pay.js for instance)<\/p>\n<p data-block-key=\"5dbl3\">Permits the embedded web page to create &#8216;baby searching contexts&#8217;. In follow, this flag allows the embedded iframe to open new tabs and home windows when the consumer clicks a hyperlink.<\/p>\n<p data-block-key=\"dfbou\">If not set, fails on varied events for browsers. If set, the iframe has entry to the mother and father storage and cookies.<\/p>\n<p data-block-key=\"akt25\">Permits kinds such because the Google Pay login to submit the information.<\/p>\n<p data-block-key=\"165up\">See <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/dmengelt.github.io\/gpay-web-tester\/reproducers\/google-pay-sandboxed-iframe\">this<\/a> take a look at web page to see the varied iframe sandbox values in motion.<\/p>\n<h2 data-block-key=\"umi2k\" id=\"shopify-successfully-certified-for-pci-dss-v4\"><b><br \/><\/b>Shopify efficiently licensed for PCI DSS v4<\/h2>\n<p data-block-key=\"47q23\">Google Pay partnered with Shopify to implement the above answer. Shopify was in a position to efficiently go the PCI DSS v4 audit by utilizing a sandboxed iframe to show the Google Pay button. Here&#8217;s what Shopify has to say:<\/p>\n<blockquote data-block-key=\"eqq5o\"><p><i>We\u2019ve constructed Shopify Checkout in such a manner that Google Pay code executes in a safe sandboxed surroundings, permitting us to keep up the integrity of our checkout and adjust to PCI DSS V4 necessities.<\/i><i><sup><\/p>\n<p>\u2013<\/p>\n<p><\/sup><\/i> <sup>Ilya Grigorik, Distinguished Engineer at Shopify<\/sup><\/p><\/blockquote>\n<p data-block-key=\"chppi\">For extra info on how Shopify constructed their checkout answer utilizing sandboxed iframes, their <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/www.shopify.com\/in\/partners\/blog\/checkout-compliance\">\u201cPowering Shopify\u2019s Excessive-Efficiency, PCI DSS v4 Compliant Checkout with Sandboxing\u201d<\/a> weblog put up has the insights.<\/p>\n<h2 data-block-key=\"p8fvt\" id=\"conclusion\"><b><br \/><\/b>Conclusion<\/h2>\n<p data-block-key=\"6so1u\">Wrapping your Google Pay integration in a sandboxed iframe will help you to adjust to PCI DSS v4 necessities. For extra help along with your implementation, register to the Google Pay &amp; Pockets Console to create a assist ticket. As well as, you possibly can be a part of the developer group within the #funds channel on <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/goo.gle\/payments-dev-community\">Discord<\/a>.<\/p>\n<p data-block-key=\"aj6oa\">Observe <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/twitter.com\/GooglePayDevs?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor\">@GooglePayDevs<\/a> on X for future updates. When you&#8217;ve got questions, tag <a rel=\"nofollow\" target=\"_blank\" href=\"https:\/\/twitter.com\/GooglePayDevs?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor\">@GooglePayDevs<\/a> and embrace #AskGooglePayDevs in your tweets.<\/p>\n<\/div>\n<p><template id="GqoArnUZcVv3X8JoxBun"></template><\/script><br \/>\n<br \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In case you are creating or sustaining a checkout web page you would possibly come throughout PCI DSS v4 which incorporates the next requirement underneath 6.4.3: All fee web page scripts which are loaded and executed within the client\u2019s browser are managed as follows:&#8211; A technique is applied to verify that every script is allowed.&#8211; [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":3499,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[56],"tags":[278,3279,81,3277,2436,3278,3276],"class_list":["post-3497","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","tag-compliance","tag-dss","tag-google","tag-iframe","tag-pay","tag-pci","tag-sandboxed"],"_links":{"self":[{"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/posts\/3497","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3497"}],"version-history":[{"count":1,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/posts\/3497\/revisions"}],"predecessor-version":[{"id":3498,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/posts\/3497\/revisions\/3498"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=\/wp\/v2\/media\/3499"}],"wp:attachment":[{"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3497"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3497"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techtrendfeed.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3497"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}<!-- This website is optimized by Airlift. Learn more: https://airlift.net. Template:. Learn more: https://airlift.net. Template: 69d9690a190636c2e0989534. Config Timestamp: 2026-04-10 21:18:02 UTC, Cached Timestamp: 2026-05-09 07:56:06 UTC -->