• About Us
  • Disclaimer
  • Contact Us
  • Privacy Policy
Wednesday, October 8, 2025
mGrowTech
No Result
View All Result
  • Technology And Software
    • Account Based Marketing
    • Channel Marketing
    • Marketing Automation
      • Al, Analytics and Automation
      • Ad Management
  • Digital Marketing
    • Social Media Management
    • Google Marketing
  • Direct Marketing
    • Brand Management
    • Marketing Attribution and Consulting
  • Mobile Marketing
  • Event Management
  • PR Solutions
  • Technology And Software
    • Account Based Marketing
    • Channel Marketing
    • Marketing Automation
      • Al, Analytics and Automation
      • Ad Management
  • Digital Marketing
    • Social Media Management
    • Google Marketing
  • Direct Marketing
    • Brand Management
    • Marketing Attribution and Consulting
  • Mobile Marketing
  • Event Management
  • PR Solutions
No Result
View All Result
mGrowTech
No Result
View All Result
Home Google Marketing

Google Pay inside sandboxed iframe for PCI DSS v4 compliance

Josh by Josh
June 10, 2025
in Google Marketing
0
Google Pay inside sandboxed iframe for PCI DSS v4 compliance
0
SHARES
0
VIEWS
Share on FacebookShare on Twitter


If you are developing or maintaining a checkout page you might come across PCI DSS v4 which includes the following requirement under 6.4.3:

All payment page scripts that are loaded and executed in the consumer’s browser are managed as follows:
– A method is implemented to confirm that each script is authorized.
– A method is implemented to assure the integrity of each script.
– An inventory of all scripts is maintained with written business or technical justification as to why each is necessary.

One way to comply with this requirement is to use a technique like Subresource Integrity (SRI). However, the Google Pay JavaScript (pay.js) build and release process does not allow for a long-lived, stable hash required by techniques like SRI.


Using a sandboxed iframe

Using a sandboxed iframe satisfies any concerns with compliance since scripts within the iFrame will not have access to the parent DOM. See the following illustration for an example:

<iframe
  src="https://cdn.somewhereelse.com"
  allow="payment"
  sandbox="allow-scripts allow-popups allow-same-origin allow-forms">
</iframe>

HTML

In this case the domain “cdn.somewhereelse.com” would load Google Pay’s pay.js JavaScript file. After a successful transaction, the inner iframe can communicate with the parent page through mechanisms like window.postMessage() if needed.

In order for Google Pay to work in all browsers we need the following 4 sandbox attribute values in addition to allow=”payment”:

To allow the iframe to execute scripts (pay.js as an example)

Allows the embedded page to create ‘child browsing contexts’. In practice, this flag enables the embedded iframe to open new tabs and windows when the user clicks a link.

If not set, fails on various occasions for browsers. If set, the iframe has access to the parents storage and cookies.

Allows forms such as the Google Pay login to submit the data.

See this test page to see the various iframe sandbox values in action.


Shopify successfully certified for PCI DSS v4

Google Pay partnered with Shopify to implement the above solution. Shopify was able to successfully pass the PCI DSS v4 audit by using a sandboxed iframe to display the Google Pay button. Here is what Shopify has to say:

We’ve built Shopify Checkout in such a way that Google Pay code executes in a secure sandboxed environment, allowing us to maintain the integrity of our checkout and comply with PCI DSS V4 requirements.

–

Ilya Grigorik, Distinguished Engineer at Shopify

For more information on how Shopify built their checkout solution using sandboxed iframes, their “Powering Shopify’s High-Performance, PCI DSS v4 Compliant Checkout with Sandboxing” blog post has the insights.


Conclusion

Wrapping your Google Pay integration in a sandboxed iframe can help you to comply with PCI DSS v4 requirements. For more assistance with your implementation, sign in to the Google Pay & Wallet Console to create a support ticket. In addition, you can join the developer community in the #payments channel on Discord.

Follow @GooglePayDevs on X for future updates. If you have questions, tag @GooglePayDevs and include #AskGooglePayDevs in your tweets.





Source_link

READ ALSO

AI Mode in Google Search expands to more than 40 new areas

The judge tasked with deciding Google’s fate would rather not

Related Posts

AI Mode in Google Search expands to more than 40 new areas
Google Marketing

AI Mode in Google Search expands to more than 40 new areas

October 7, 2025
The judge tasked with deciding Google’s fate would rather not
Google Marketing

The judge tasked with deciding Google’s fate would rather not

October 7, 2025
Building High-Performance Data Pipelines with Grain and ArrayRecord
Google Marketing

Building High-Performance Data Pipelines with Grain and ArrayRecord

October 7, 2025
5 tips for taking better group photos with the Pixel 10
Google Marketing

5 tips for taking better group photos with the Pixel 10

October 7, 2025
The Supreme Court didn’t save Google from Epic, and now the clock is ticking
Google Marketing

The Supreme Court didn’t save Google from Epic, and now the clock is ticking

October 7, 2025
Google expert helps define vibe coding
Google Marketing

Google expert helps define vibe coding

October 7, 2025
Next Post
How to Leverage On-Demand Content In Online Conferencing

How to Leverage On-Demand Content In Online Conferencing

POPULAR NEWS

Communication Effectiveness Skills For Business Leaders

Communication Effectiveness Skills For Business Leaders

June 10, 2025
15 Trending Songs on TikTok in 2025 (+ How to Use Them)

15 Trending Songs on TikTok in 2025 (+ How to Use Them)

June 18, 2025
Trump ends trade talks with Canada over a digital services tax

Trump ends trade talks with Canada over a digital services tax

June 28, 2025
App Development Cost in Singapore: Pricing Breakdown & Insights

App Development Cost in Singapore: Pricing Breakdown & Insights

June 22, 2025
7 Best EOR Platforms for Software Companies in 2025

7 Best EOR Platforms for Software Companies in 2025

June 21, 2025

EDITOR'S PICK

I Tried Webflow Vs. WordPress in 2025, Here’s the Winner

I Tried Webflow Vs. WordPress in 2025, Here’s the Winner

August 25, 2025
How Effective is Video Marketing?

How Effective is Video Marketing?

June 30, 2025
How to Research and Analyze AI Overviews with Semrush

How to Research and Analyze AI Overviews with Semrush

July 4, 2025

Do You Need More Than A Smartphone Camera When Traveling?

March 21, 2025

About

We bring you the best Premium WordPress Themes that perfect for news, magazine, personal blog, etc. Check our landing page for details.

Follow us

Categories

  • Account Based Marketing
  • Ad Management
  • Al, Analytics and Automation
  • Brand Management
  • Channel Marketing
  • Digital Marketing
  • Direct Marketing
  • Event Management
  • Google Marketing
  • Marketing Attribution and Consulting
  • Marketing Automation
  • Mobile Marketing
  • PR Solutions
  • Social Media Management
  • Technology And Software
  • Uncategorized

Recent Posts

  • You can’t libel the dead. But that doesn’t mean you should deepfake them.
  • Building a Human Handoff Interface for AI-Powered Insurance Agent Using Parlant and Streamlit
  • World Mental Health Day: How We Can Make Small Steps With Big Impact
  • AI Mode in Google Search expands to more than 40 new areas
  • About Us
  • Disclaimer
  • Contact Us
  • Privacy Policy
No Result
View All Result
  • Technology And Software
    • Account Based Marketing
    • Channel Marketing
    • Marketing Automation
      • Al, Analytics and Automation
      • Ad Management
  • Digital Marketing
    • Social Media Management
    • Google Marketing
  • Direct Marketing
    • Brand Management
    • Marketing Attribution and Consulting
  • Mobile Marketing
  • Event Management
  • PR Solutions

Are you sure want to unlock this post?
Unlock left : 0
Are you sure want to cancel subscription?