On this page
What this issue is
PCI DSS is the security standard for businesses that take card payments. Version 4.0 added requirement 6.4.3, which applies to payment pages, meaning pages where card data is entered or where a payment form or iframe is loaded. It has three parts: each script must be authorized, its integrity must be assured, and you must keep an inventory of all scripts with a written justification for each.
Why it costs you leads or sales
- Script addedA marketing tool is added to the checkout page
- No inventoryNo record, approval or reason is written down
- Script changesThe vendor or a hijacker alters the code
- Card data copiedShoppers' details are sent to a third party
The break is the missing inventory: nobody notices the new or changed script.
How to check if your site has it
Open the payment page in a private window
Go through the real checkout to the step where card details or the payment form appear. Note every URL where this happens.
Open browser developer tools
In Chrome, press F12, open the Network tab, filter by JS, and reload. Save the list of script URLs. Tick 'Disable cache' for a full picture.
Check scripts that load other scripts
Sort by Initiator. Tag managers and chat widgets often pull in more files. Each one counts.
Check inline scripts
View page source and search for <script. Inline blocks without a src also need to be on the list.
Compare with any existing list
Anything loading that is not on your list, or on the list but not loading, is a finding.
[...document.scripts].map(s => s.src || '(inline script)').forEach(s => console.log(s));
performance.getEntriesByType('resource').filter(r => r.initiatorType === 'script').forEach(r => console.log(r.name));How to fix it
Create the inventory table
One row per script per payment page. Columns: script URL or name, vendor, page(s), purpose, business justification, owner, approver, approval date, integrity method, last reviewed.
Write a justification for each script
State why it must run on the payment page. 'Fraud screening required by our processor' is a reason. 'Marketing asked for it' is not enough on its own.
Remove what you cannot justify
Ad pixels, heatmaps and chat widgets are common candidates to remove from payment pages. Fire them on earlier steps instead.
Record authorization
Have a named person approve each script and keep the date. Set up a change process so new scripts need approval before they go live.
Assure integrity
Use Subresource Integrity (SRI) for fixed, self-hosted or versioned files, and a Content Security Policy (CSP) to allow only listed sources. For scripts that change often, use monitoring or hosting the file yourself.
Schedule reviews
Review the inventory at least every time you change the checkout and on a regular schedule, for example quarterly. Record each review.
| Script | Purpose and justification | Owner / approver | Integrity method |
|---|---|---|---|
| https://js.stripe.com/v3/ | Payment provider script, required to take card payments | Dev lead / Finance director | CSP allow-list; loaded directly from the provider |
| /assets/checkout.js | Our own checkout logic, validates the cart | Dev lead / CTO | Self-hosted, code review, SRI hash |
| GTM container GTM-XXXX | Not needed on payment step; removed | Marketing / CTO | Removed from payment page |
<script src="https://example.com/lib/checkout-helper-1.2.3.js"
integrity="sha384-REPLACE_WITH_REAL_HASH"
crossorigin="anonymous"></script>Content-Security-Policy: script-src 'self' https://js.stripe.com; frame-src https://js.stripe.com https://hooks.stripe.com; object-src 'none'; base-uri 'self'Review checkout scripts
Checkout is largely hosted by Shopify, so your control is mainly over apps and customer events (Settings > Customer events). Remove pixels and apps you cannot justify. Shopify Plus stores can edit checkout extensibility settings. Confirm your scope with Shopify's PCI documentation.
Find plugin-injected scripts
On WooCommerce checkout, list scripts with the console snippet above, then identify the plugin behind each. Deactivate plugins that add scripts you cannot justify, or dequeue them on the checkout page with wp_dequeue_script inside is_checkout().
Limit tags on payment pages
In each tag, add a blocking trigger on the payment page URL or path. Use workspace approvals and version notes to record who approved each tag and why.
Check custom code
Review Site settings > Custom code and page-level custom code for the payment page. Remove or scope scripts. Where you use an embedded payment provider form, list its scripts too.
Set CSP and SRI
Send a Content-Security-Policy header on payment routes, add SRI to fixed files, and keep the inventory in version control so changes go through review.
Before
- Scripts added by anyone, any time
- No list of what runs on checkout
- No written reason or approval
- Nothing checks if a script changes
After
- Every script listed with owner and reason
- Approval recorded before go-live
- CSP and SRI limit what can run
- Inventory reviewed on a schedule
How to confirm it's fixed
- The scripts loaded on each payment page (Network tab) match the inventory exactly
- Each entry has a justification, an owner, an approver and a date
- Unjustified scripts are gone from the payment pages
- A CSP is active and the browser console shows no unexpected violations
- SRI hashes are in place for fixed files that support them
- A review date is on the calendar and the last review is recorded
- You can show your assessor or acquirer the document on request
How to prevent it happening again
- Require approval before any new script goes on a payment page
- Lock down tag manager publish rights on checkout tags
- Re-run the script list after every checkout, theme or plugin update
- Review the inventory on a fixed schedule and record it
- Prefer hosted payment pages or provider iframes to reduce scripts you must manage
- Keep the inventory in version control or a ticketing system with history
Month 0
A chat widget is added to all pages, including checkout
Month 3
The person who added it leaves; nobody owns it
Month 8
The vendor changes the script; no one reviews it
Month 12
Assessor asks for the inventory; the script is found and removed from payment pages
How FunnelGuard handles this
Questions people ask
What is PCI DSS requirement 6.4.3?
It is a PCI DSS 4.0 requirement for payment pages. It says each script loaded and run in the shopper's browser must be authorized, have its integrity assured, and be listed in an inventory with a written justification for why it is needed.
How do I create a script inventory for my payment page?
Load the payment page with developer tools open, list every script from the Network tab and page source, then record each in a table with its purpose, justification, owner, approver and integrity method. Remove any script you cannot justify.
Do Google Analytics and Meta Pixel need to be on the inventory?
Yes, if they run on a payment page they are scripts and must be listed, justified and authorized. Many businesses choose to remove marketing tags from the payment step and fire them on earlier pages instead, which shortens the inventory.
How do I prove script integrity on a checkout page?
Common methods are Subresource Integrity hashes on fixed files, a Content Security Policy that allows only listed sources, hosting scripts yourself under code review, or using a monitoring tool that detects changes. Which are enough depends on your assessor.
Does 6.4.3 apply if I use a hosted payment page or iframe?
Often the scope is smaller, because the provider controls the page where card data is entered. Your own page that embeds or redirects to it may still have scripts to manage. Confirm with your acquirer or assessor which questionnaire and requirements apply.
How often should I review my payment page script inventory?
Review it whenever the checkout, theme, plugins or tag manager change, and on a regular schedule such as quarterly. Record each review with a date and name.
Does FunnelGuard check PCI DSS script inventories?
No. FunnelGuard does not check this yet; it is a possible future check. It does run your checkout journeys on a schedule and checks steps and tracking hits, but it does not produce a script inventory or compliance evidence.