Payment Scripts on Your Checkout Page: Speed Costs, Script Inventories, and the PCI DSS 4.0 Controls Now in Force

Payment Scripts on Your Checkout Page: Speed Costs, Script Inventories, and the PCI DSS 4.0 Controls Now in Force
By admin September 8, 2026

An e-commerce checkout can look simple to a shopper while running dozens of scripts behind the scenes. A payment SDK initializes card fields. A fraud service gathers signals. A tag manager launches analytics. 

A consent platform conditionally loads marketing code. A support widget, experimentation platform, accessibility tool, or personalization service may add still more JavaScript.

Under the current PCI DSS framework, checkout payment script management is therefore more than web-performance housekeeping. 

For payment-page architectures to which PCI DSS Requirements 6.4.3 and 11.6.1 apply, organizations need controls for knowing which scripts execute, determining why they are necessary, confirming that they are authorized, assuring their integrity, and detecting unauthorized changes to payment pages.

PCI DSS v4.0.1 resources maintained by the PCI Security Standards Council confirm the current standard and supporting materials for these e-commerce controls.

The exact merchant burden depends heavily on architecture. A merchant-controlled card-entry page, an embedded provider iframe or hosted-field implementation, and a redirect to a fully hosted payment page are not equivalent PCI environments. 

SAQ A also changed in 2025: Requirements 6.4.3 and 11.6.1 were removed from the SAQ A questionnaire itself, while an eligibility criterion concerning protection from script attacks was added for relevant embedded payment implementations.

That compliance work has an operational side effect worth exploiting. Once you identify every script that actually loads at checkout, you often discover code that has no reason to be there. 

Removing or delaying unnecessary JavaScript can reduce third-party dependencies, network activity, parsing and execution work, and the amount of code competing with the payment experience.

The useful workflow is:

identify architecture → determine PCI/SAQ responsibilities → inventory scripts → justify them → authorize and integrity-control them → monitor changes → remove unnecessary code → measure performance → reconsider hosted payment architecture where appropriate.

What Checkout Payment Script Management Means Under PCI DSS 4.0

A PCI payment page is not defined merely by whether the browser URL contains /checkout/. PCI SSC defines a payment page as a web-based interface containing one or more form elements intended to capture account data from a consumer or submit captured account data for payment processing. 

It can be a complete document, an iframe component within another page, or multiple components contained in frames. PCI SSC separately defines payment-page scripts as programming instructions processed or interpreted by the customer’s browser, including instructions interacting with the page’s DOM.

That distinction matters when deciding what checkout payment script management actually covers.

A merchant should first diagram what happens in the customer’s browser:

  • Which page originates from the merchant?
  • Where are card-entry fields rendered?
  • Who creates those fields?
  • Does an iframe come directly from the payment provider?
  • Does merchant JavaScript create or modify the payment experience?
  • Can merchant-controlled scripts influence how the customer reaches the payment form?
  • Which external services execute on the parent page?
  • Does card data ever reach merchant-controlled JavaScript or infrastructure?

Only after answering those questions should the merchant assign an SAQ or determine how Requirements 6.4.3 and 11.6.1 apply. PCI SSC explicitly notes that PCI DSS applies not only to entities that store, process, or transmit cardholder data, but also to systems that can affect the security of the cardholder data environment.

For relevant architectures, payment-page script governance should let the organization answer five basic questions about each browser-executed script:

  1. What is it?
  2. Why does checkout require it?
  3. Who authorized it?
  4. How is its integrity assured?
  5. How would we know if the payment page unexpectedly changed?

That is a substantially different operating model from allowing developers, marketing teams, analytics teams, and vendors to add checkout tags independently.

What PCI DSS 6.4.3 Requires

The PCI DSS 6.4.3 script requirements are designed to control scripts that execute in the consumer’s browser on applicable payment pages. 

PCI SSC summarizes the defined approach around three controls: confirming that scripts are authorized, assuring script integrity, and maintaining an inventory with written justification explaining why each script is necessary.

This is important because PCI DSS does not reduce the issue to “install CSP” or “put SRI hashes on your CDN files.”

Those technologies may contribute to a compliant control design, but Requirement 6.4.3 describes outcomes that have to work across the organization’s actual script population.

RequirementMain ObjectiveMerchant Action
6.4.3Govern payment-page scriptsKnow which relevant scripts execute, authorize them, assure integrity, and justify their necessity
11.6.1Detect unauthorized payment-page changesDetect and alert on unauthorized modifications affecting relevant payment-page content and HTTP headers
TogetherReduce browser-side payment-page riskEstablish what is approved, then identify when reality unexpectedly differs from that approved state

Script Inventory and Written Justification

A useful payment page script inventory is not simply a dump of every .js file found in a source repository.

Requirement 6.4.3 is concerned with payment-page scripts that actually load and execute in the consumer’s browser within the requirement’s applicable scope. PCI SSC’s SAQ A-EP material explicitly notes that the requirement includes scripts loaded from the entity’s environment and scripts loaded from third and fourth parties.

That means inventory work should capture first-party and third-party components such as:

  • checkout application bundles,
  • gateway or payment SDKs,
  • fraud/risk tools,
  • analytics,
  • tag-manager loaders and injected tags,
  • consent managers,
  • A/B testing tools,
  • personalization,
  • chat applications,
  • accessibility tooling,
  • affiliate tracking,
  • advertising and remarketing code,
  • review or trust widgets,
  • scripts loaded indirectly by another SDK.

None of those categories is automatically prohibited. The important question is whether each script belongs on the applicable payment page and how it is controlled.

A working inventory might look like this:

ScriptSourcePurposeNeeded on Checkout?OwnerApproval
Checkout application bundleMerchant originCart, validation and checkout UIYesEngineeringRelease workflow
Payment SDKPayment providerCreate and operate payment UIYesPaymentsPayment architecture owner
Fraud SDKRisk providerPre-payment fraud evaluationUsually, if required by risk designFraudFraud/security owner
Consent managerApproved vendorConsent handlingDepends on jurisdiction/designPrivacyPrivacy/compliance
AnalyticsAnalytics vendorFunnel measurementPossiblyAnalyticsAnalytics/product
Chat widgetSupport vendorCustomer supportOften optionalSupportProduct/support
Remarketing tagAdvertising platformCampaign attributionOften deferrableMarketingMarketing

A useful justification should be specific enough that someone reviewing it six months later can distinguish genuine checkout necessity from organizational habit.

At minimum, record:

  • script or component name,
  • owner,
  • vendor if applicable,
  • source URL/domain or delivery method,
  • business or technical purpose,
  • reason it must run on the payment page,
  • authorization method,
  • integrity method where applicable,
  • approval owner,
  • date reviewed,
  • related change or deployment record.

“Marketing needs it” is weak documentation. “Records checkout-step abandonment for the approved funnel analytics program; reviewed by Product Analytics; no access to payment-field iframe contents” is far more useful operationally.

Authorization and Integrity Controls

Authorization answers: How does an organization ensure a script was intentionally permitted?

Possible mechanisms include:

  • deployment through an approved build/release pipeline,
  • code-review and production-change approval,
  • controlled allowlists,
  • tightly managed tag-manager publishing,
  • payment-page-specific publishing rules,
  • CSP source restrictions as one layer,
  • configuration management,
  • documented approval of a payment provider’s required resources.

No single mechanism is universally sufficient. The right implementation depends on where code originates and how it reaches the browser.

A first-party application bundle may be authorized through signed releases, source-control approval, CI/CD permissions, and production change management. A marketing tag injected through a tag manager requires governance of the tag manager itself. A payment-provider script may need provider-specific implementation controls.

Integrity addresses a related but different question: How do you obtain assurance that the script being executed is the script you expect?

Options may include:

  • Subresource Integrity where technically suitable,
  • tightly controlled first-party build artifacts,
  • controlled and reproducible deployments,
  • approved version pinning where supported,
  • monitoring of third-party script content,
  • browser-side change detection,
  • provider controls for hosted resources.

SRI is particularly useful for static external files because the browser can compare a resource to an expected cryptographic hash and refuse the resource when it does not match. MDN documents SRI as a browser mechanism for verifying that fetched resources have not undergone unexpected manipulation.

But dynamic vendor scripts frequently change. Some providers intentionally serve evolving resources from stable URLs. Others load further dependencies dynamically. Fixed hashes can therefore be impractical for portions of a modern checkout.

SRI is a tool, not the whole PCI DSS 6.4.3 program. CSP is also a tool, not the whole program.

What Requirement 11.6.1 Requires

Merchants and PCI SAQ compliance types illustration

Requirement 6.4.3 establishes what payment-page script behavior is supposed to be authorized. Requirement 11.6.1 addresses detecting when payment-page reality unexpectedly changes.

The 11.6.1 change detection payment page requirement calls for a change- and tamper-detection mechanism capable of alerting personnel to unauthorized modifications—including changes, additions, deletions, and indicators of compromise—to applicable payment-page contents and HTTP headers as they are received by the consumer browser.

The browser-side perspective is important.

A repository can be unchanged while the page delivered to customers is different because of:

  • a modified CDN resource,
  • a tag-manager publication,
  • a vendor-side update,
  • an altered HTTP header,
  • an injected dependency,
  • compromised delivery infrastructure,
  • configuration changes,
  • conditional scripts that only execute for particular visitors.

Monitoring only source-control commits therefore does not provide the same visibility as observing the customer-facing payment experience.

Change Detection and Monitoring Frequency

The PCI DSS defined approach establishes at least once every seven days as the baseline for the 11.6.1 change/tamper-detection mechanism. Alternatively, the mechanism may operate periodically at a frequency defined through the entity’s targeted risk analysis conducted according to Requirement 12.3.1.

That means “weekly” is a legitimate shorthand for the baseline, but it is incomplete to state that PCI DSS unconditionally requires exactly one weekly scan in every implementation.

The defined alternatives are:

  • at least once every seven days, or
  • another periodic frequency supported by the required targeted risk analysis.

An organization should not casually extend the interval because the operations team finds alerts inconvenient. Where the targeted-risk-analysis option is used, the chosen frequency needs to follow PCI DSS’s TRA requirements rather than an undocumented team preference.

Operational monitoring might identify events such as:

  • an unknown script becoming present,
  • an expected script disappearing,
  • a script source/domain changing,
  • relevant script content unexpectedly changing,
  • a new iframe being added,
  • checkout form structure changing,
  • security-relevant HTTP headers changing,
  • a tag manager publishing an unexpected payment-page tag.

A practical response process is:

Alert → verify an authorized deployment → locate the change record → determine payment impact → contain or roll back unauthorized changes → investigate → document the result.

Detection without meaningful alert response has limited value.

Which Merchants and SAQ Types Are Affected?

Merchants and PCI SAQ compliance types illustration

SAQ applicability cannot be determined solely from merchant size or the fact that a store uses “Stripe-style fields,” “a gateway,” or “an iframe.” The actual implementation matters.

PCI SSC advises merchants to determine the appropriate SAQ with the organization receiving the compliance validation—typically their acquirer or payment brand—because eligibility turns on the payment architecture and merchant environment.

SAQ A

SAQ A is designed for qualifying card-not-present merchants whose account-data functions are completely outsourced to PCI DSS compliant third parties and whose systems do not electronically store, process, or transmit account data.

A significant change took effect March 31, 2025. PCI SSC removed Requirements 6.4.3, 11.6.1, and the associated 12.3.1 TRA requirement from SAQ A and added an eligibility criterion requiring relevant merchants to confirm their site is not susceptible to attacks from scripts that could affect the e-commerce system.

For an SAQ A merchant using an embedded payment form or iframe, PCI SSC FAQ 1588 says the merchant can establish that protection in either of two broad ways:

  • use techniques such as those in 6.4.3 and 11.6.1 itself, implemented by the merchant or a third party; or
  • obtain confirmation from the PCI DSS-compliant TPSP/payment processor providing the embedded form that, when its solution is implemented as instructed, it includes techniques protecting the merchant’s payment page from script attacks.

The new eligibility criterion specifically concerns relevant embedded payment pages/forms. PCI SSC clarifies that it does not apply the same way to qualifying e-commerce implementations where customers are redirected to the provider or payment functions are otherwise fully outsourced—for example, a payment link that sends the shopper to the provider’s site.

So “SAQ A means scripts do not matter” is incorrect. The more accurate statement is that current SAQ A handles this issue through eligibility criteria rather than directly listing 6.4.3 and 11.6.1 as questionnaire requirements.

SAQ A-EP

SAQ A-EP applies to qualifying e-commerce merchants that partially outsource payment processing but operate a merchant website capable of affecting payment transaction security.

The SAQ A-EP eligibility description states that the merchant site does not itself receive account data but controls how customers or account data are redirected to the payment provider, and that payment-page elements may originate from the merchant or compliant TPSP.

That greater influence over the payment experience explains why payment-page governance is more prominent.

SAQ A-EP includes Requirement 6.4.3 for relevant payment pages supplied from the merchant website to the customer’s browser. Its 11.6.1 treatment similarly applies to web servers hosting applicable merchant payment pages, with specific SAQ completion guidance around redirects.

The practical difference is that an A-EP merchant generally has more merchant-controlled code and infrastructure capable of affecting payment security, so the merchant has more to inventory, approve, protect, monitor, patch, and document.

SAQ D

SAQ D is broader and should not be treated as one architecture.

A merchant may be using SAQ D because its environment does not qualify for a narrower SAQ, because cardholder data is directly handled by merchant systems, because the e-commerce architecture is more complex, or for other scope reasons.

For applicable e-commerce payment pages, the full 6.4.3 and 11.6.1 controls may therefore form part of the merchant’s PCI DSS obligations. The current standard itself—not an assumptions table—is the correct basis for determining applicability.

ArchitectureLikely SAQ Context*Script ResponsibilityWhat to Verify
Fully hosted provider redirectOften compatible with SAQ A when all eligibility criteria are metLower merchant influence over provider payment pageRedirect implementation and SAQ eligibility
Provider-hosted iframe/hosted fieldsCan be SAQ A when implementation satisfies all criteriaParent-page script risk still matters; current SAQ A script eligibility criterion may applyTPSP instructions, eligibility criterion and merchant-page protections
Merchant page affecting payment flow without receiving account dataOften SAQ A-EP territorySignificant merchant script/control responsibilityExact A-EP eligibility and payment-page scope
Merchant-hosted card fields/direct card-data handlingCommonly broader scope, potentially SAQ DHigh merchant responsibilityComplete architecture and PCI scope

*These are architectural tendencies, not a substitute for the SAQ eligibility criteria or acquirer/payment-brand determination.

How Payment Embed Method Changes the Compliance Burden

Payment embed methods with varying security and compliance requirements

The most useful way to understand checkout PCI scope is to compare how much control remains on the merchant side of the browser boundary.

Fully Hosted Redirect

In a fully hosted redirect model, the shopper leaves the merchant-controlled payment experience and arrives at a payment page delivered by the provider.

When the integration genuinely satisfies SAQ A eligibility, this can substantially reduce the amount of payment-page code the merchant must directly operate. PCI SSC’s current SAQ A clarification specifically distinguishes redirects from merchant pages embedding provider payment forms.

The merchant still has PCI responsibilities. A redirect is not a PCI exemption, and the merchant must still protect the systems and credentials that could affect the payment flow and satisfy its applicable validation requirements.

Hosted Fields or Iframe

Hosted fields place provider-controlled payment components within a merchant-controlled page.

This can keep raw card data away from merchant JavaScript and application infrastructure when designed correctly, which is an important scope-reduction benefit. But the parent page remains important because scripts outside the iframe may be able to alter what the customer sees, change navigation, replace elements, or otherwise influence the payment experience.

That is why PCI SSC’s 2025 SAQ A eligibility clarification specifically addresses script attacks for embedded forms.

Direct API or Merchant-Hosted Card Fields

A direct integration can give product and engineering teams extensive UX flexibility. It also generally leaves the merchant with greater responsibility for the card-entry environment, secure software, browser code, payment-data handling, system scope, and monitoring.

“More control” is therefore both an advantage and an obligation.

MethodPCI Scope TendencyScript BurdenUX Control
Fully hosted redirectUsually lowest of these models when SAQ A criteria are metLowest merchant payment-page script influenceLower
Provider-hosted iframe/fieldsReduced card-data handling but parent-page risk remainsModerate and architecture dependentHigh
Merchant-hosted/direct card entryUsually broaderHighest merchant script responsibilityHighest

How to Build a Payment Page Script Inventory

Do not build the inventory exclusively from what engineering thinks is deployed.

Build it from what browsers actually receive.

A good discovery process combines several sources:

  • browser developer-tools Network panel,
  • browser source/DOM inspection,
  • initiator/dependency information,
  • tag-manager configuration,
  • build/dependency manifests,
  • production CDN configuration,
  • CSP reporting,
  • approved vendor inventory,
  • payment-page monitoring/scanner output.

Run the real production checkout through representative states: initial checkout, card-entry initialization, fraud checks, authentication transitions, errors, successful payment, and relevant consent paths.

First-Party Scripts

First-party JavaScript often includes:

  • checkout UI,
  • cart calculations,
  • address handling,
  • validation,
  • shipping selection,
  • payment orchestration,
  • order submission,
  • application-framework runtime.

Do not assume “first party” means safe by definition.

A compromised first-party checkout bundle can have more influence over payment flow than a narrowly constrained third-party resource. It needs an owner, controlled deployment, a documented purpose, authorization, appropriate integrity controls, and production-change visibility just as third-party code does.

Production bundles also deserve attention when build systems use hashed filenames or deploy frequently. Your inventory does not necessarily need to become an unreadable list of every transient chunk name; it needs a defensible mapping between the scripts executing and the governed application/component that owns them.

Third-Party Scripts and Tag Managers

Third-party scripts checkout security becomes difficult because external code often creates further dependencies.

A single top-level tag can cause the browser to contact:

  • a tag-management domain,
  • analytics endpoints,
  • campaign measurement endpoints,
  • personalization services,
  • consent services,
  • CDN hosts,
  • nested vendor dependencies.

The checkout inventory should therefore account for the observed dependency chain rather than only top-level HTML <script> elements.

Tag managers deserve special scrutiny because they effectively create a second deployment system. A marketer with publish permissions may be able to change production checkout behavior without a software release.

Recommended controls include:

  • least-privilege access,
  • publishing approval,
  • separate development and production environments,
  • payment-page-specific rules or containers where useful,
  • change-ticket linkage,
  • audit logging,
  • review of templates and custom code,
  • explicit controls around who can introduce new external domains.

Consent managers create another source of conditional behavior. One shopper may see analytics and advertising scripts while another does not. Geographic, device, browser, campaign and consent differences can produce different script populations.

Representative testing should therefore include relevant conditions rather than one clean desktop incognito session.

The Checkout Performance Dividend

Compliance is the primary reason for the inventory, but the same evidence creates a performance opportunity.

Every script retained on checkout has an operational cost profile:

  • transfer bytes,
  • DNS/TLS/network activity,
  • parsing,
  • compilation,
  • JavaScript execution,
  • event listeners,
  • DOM manipulation,
  • memory consumption,
  • additional dependencies,
  • potential main-thread contention.

That does not mean every script is bad.

A payment SDK may be essential. Fraud code may materially protect the transaction. Consent functionality may be required. The goal is to distinguish payment-critical functionality from code that accumulated because nobody asked whether checkout really needed it.

Measuring Script Weight

Create a baseline before removing anything.

Record:

  • total JavaScript transfer size,
  • uncompressed/resource size where useful,
  • number of JavaScript requests,
  • number of third-party origins,
  • third-party JavaScript share,
  • main-thread JavaScript execution time,
  • long tasks or blocking activity,
  • payment SDK initialization timing,
  • relevant Core Web Vitals in field data.

For user-experience measurement, current Core Web Vitals include Largest Contentful Paint (LCP), Interaction to Next Paint (INP), and Cumulative Layout Shift (CLS). INP is the stable responsiveness metric that replaced FID.

Checkout analysis may additionally use TTFB to understand server delivery and Total Blocking Time in laboratory diagnostics. TBT is useful diagnostically but is not itself a Core Web Vital.

A checkout page speed payment SDK review should separate provider code from unrelated work. If SDK initialization is slow because five marketing products saturate the main thread simultaneously, blaming the payment library alone misses the real problem.

Measure:

before → change one category → re-test → compare field and lab data.

Do not promise that removing a particular number of kilobytes will produce a particular conversion increase. Merchant traffic, devices, network quality, checkout design and customer behavior vary too widely.

Deferring Non-Payment Tags

Common candidates for review include:

  • remarketing pixels,
  • heatmaps,
  • session replay,
  • chat,
  • recommendation engines,
  • post-purchase survey code,
  • personalization that no longer changes checkout,
  • duplicate analytics libraries,
  • legacy campaign tracking.

Possible treatments include:

  • remove entirely,
  • suppress on payment pages,
  • load after payment,
  • load after a meaningful interaction,
  • defer until it cannot compete with payment initialization,
  • consolidate overlapping tooling.

Do not indiscriminately delay fraud controls, payment dependencies, accessibility requirements, consent functions, authentication mechanisms or other code needed for lawful and secure checkout operation.

Script TypeNeeded Before Payment?Defer/Remove Candidate?Governance Owner
Payment SDKUsually yesUsually noPayments/engineering
Required fraud SDKOften yesOnly with risk-owner approvalFraud/security
Checkout validationYesNoEngineering
Consent controlsArchitecture/legal dependentReview carefullyPrivacy/legal
Funnel analyticsSometimesOften defer-capableProduct/analytics
RemarketingUsually not payment-criticalStrong candidateMarketing
Chat widgetUsually notOftenSupport/product
Heatmap/session replayUsually not payment-criticalStrong review candidateProduct/analytics

The key insight is straightforward:

If a script has no justified business or technical need on the payment page, removing it can reduce PCI inventory work, third-party supply-chain exposure and page weight at the same time.

CSP and SRI for Payment Pages

Content Security Policy and Subresource Integrity often appear in discussions of PCI DSS 6.4.3 because both can contribute useful browser-side protections. They solve different problems and neither should be treated as an automatic compliance checkbox.

Content Security Policy

A Content Security Policy (CSP) tells the browser what types of resources and sources a page is permitted to use. MDN describes CSP as a mechanism for placing restrictions on page behavior, with controlling JavaScript resource loading among its primary uses.

For payment-page governance, CSP can help restrict where scripts may originate and make unexpected resource loading more difficult.

Operationally, CSP requires more than adding a header once.

A disciplined rollout can include:

  • inventorying legitimate domains,
  • identifying inline and dynamically created scripts,
  • reducing broad source permissions,
  • testing policy behavior,
  • using reporting during rollout,
  • monitoring violations,
  • enforcing the policy after expected resources are understood,
  • revisiting policy when providers change domains or SDK behavior.

Avoid configuring a policy so broadly that virtually any external code is accepted. Excessive wildcards undermine the purpose of source restriction.

Subresource Integrity

SRI binds an external static resource to expected cryptographic hash metadata. When the downloaded resource does not match, a supporting browser refuses to use it.

This is especially attractive for stable third-party resources whose content is versioned and predictable.

The limitation appears when vendors serve dynamic content from a URL. If the vendor legitimately changes the JavaScript, the old hash fails. Some resource-delivery models also make SRI impractical or require additional provider support.

Therefore:

ControlHelps WithDoes Not Solve
CSPRestricting allowed sources/execution pathwaysFull inventory, justification, every integrity case, change-response process
SRIVerifying the exact contents of suitable static resourcesDynamic vendor scripts, authorization, inventory, all payment-page changes
Change monitoringDetecting unexpected page/script/header changesPreventing every unauthorized change
Change managementEstablishing approved modificationsIndependent browser-observed detection
Provider-hosted componentsReducing merchant card-data exposure and codeEvery parent-page PCI responsibility

A robust design often layers these controls instead of choosing one.

Change-Detection and Monitoring Tools

Requirement 11.6.1 does not require every merchant to invent a custom browser scanner.

Organizations may use appropriate technologies and service providers, provided the implementation meets their actual PCI responsibilities. PCI SSC’s current guidance explicitly contemplates controls deployed by merchants or third parties in relevant scenarios.

Tool categories include:

  • client-side integrity monitoring,
  • dedicated payment-page monitoring,
  • synthetic browser monitoring,
  • file/change detection combined with browser observation,
  • security-header monitoring,
  • managed e-commerce security services,
  • functionality built into payment providers or compliance services.

The important evaluation question is not what the product calls itself. It is what it observes.

Ask whether it can detect relevant changes such as:

  • newly introduced scripts,
  • removed scripts,
  • changed resource contents,
  • unknown domains,
  • new iframe sources,
  • checkout DOM modifications,
  • payment-form changes,
  • relevant HTTP-header changes,
  • tag-manager publications.

Then examine alert handling.

An operational workflow should be documented:

  1. An alert is generated.
  2. Operations or security identifies the affected checkout.
  3. The observed change is compared with deployment and tag-manager records.
  4. The team establishes whether the change was authorized.
  5. Payment impact is assessed.
  6. An unauthorized change is contained or rolled back according to incident procedures.
  7. Relevant investigation and escalation occurs.
  8. Findings and response are recorded.
  9. The approved baseline and script inventory are updated only after the change is validated.

“Monitoring enabled” is not the same as monitoring that somebody actually operates.

What Your Gateway or Processor May Already Provide

A payment provider can materially change the merchant’s workload, but capabilities vary.

Providers may offer:

  • redirect checkout,
  • provider-hosted fields,
  • iframe payment forms,
  • tokenization,
  • provider-controlled JavaScript,
  • required-domain lists,
  • recommended CSP directives,
  • payment-page monitoring,
  • integrity or script-security capabilities,
  • PCI implementation guides,
  • Attestations of Compliance and related documentation.

Merchants reviewing checkout security should also consider how fraud controls and transaction handling affect chargeback prevention and dispute management, especially when unauthorized-transaction claims or processing errors occur. 

Do not infer those capabilities from a provider’s size or marketing material.

Ask direct questions:

  • Which SAQ architecture is this integration designed to support?
  • Which eligibility criteria must my implementation satisfy?
  • Do card details ever reach my JavaScript or servers?
  • Which scripts and domains are required on checkout?
  • Do you offer provider-hosted payment fields?
  • What parent-page scripts could invalidate the intended scope reduction?
  • How do you protect your embedded payment components from script attacks?
  • What documentation do you provide for current SAQ A eligibility?
  • How should we address PCI DSS 6.4.3 and 11.6.1 for this architecture?
  • If your SDK URL, domain or dependency changes, how will customers be informed?

PCI SSC encourages SAQ A merchants using embedded provider forms to work directly with their TPSP/payment processor on secure implementation and, where appropriate, obtain the provider confirmation contemplated by FAQ 1588.

How Hosted Payment Fields Reduce Both Scope and Script Complexity

Hosted fields can solve two architectural problems simultaneously.

First, well-designed provider-hosted fields can prevent raw payment credentials from flowing through merchant-written card-input code and merchant application infrastructure.

Second, the merchant no longer has to build and maintain every piece of card-field behavior itself.

Instead of owning:

card fields → validation → browser collection → secure transmission → payment provider API

the merchant may own the page and orchestration while the PCI-compliant payment provider controls the sensitive embedded fields.

That can materially simplify the payment architecture.

It does not make the merchant’s surrounding page irrelevant.

PCI SSC’s 2025 guidance is especially important here: for SAQ A merchants using embedded payment forms, the merchant must meet the applicable script-attack eligibility criterion either through suitable protections or through appropriate provider confirmation.

Parent-page governance therefore remains important:

  • Which scripts can execute around the iframe?
  • Can a tag manager introduce new content?
  • Can marketing code alter navigation?
  • Are unnecessary third-party dependencies present?
  • Is the embedded form implemented according to provider instructions?
  • Are required provider origins tightly controlled?
  • Are changes monitored appropriately?

A hosted field should reduce merchant exposure, not become justification for ignoring the rest of checkout.

Direct API vs. Hosted Fields for Script Governance

A direct card-entry API integration is not inherently a poor design. Some organizations have legitimate requirements that favor greater control.

But the tradeoff should be explicit.

Direct merchant control tends to increase:

  • software-development responsibility,
  • PCI scope,
  • secure coding requirements,
  • dependency governance,
  • payment-page script inventory,
  • change monitoring,
  • incident-response responsibility,
  • testing complexity.

Hosted fields surrender some implementation control in return for moving sensitive browser functionality to a specialist provider.

A redirect moves still more of the payment interface away from the merchant, potentially simplifying the merchant environment further when all applicable SAQ eligibility conditions are satisfied.

A useful architecture decision matrix is therefore:

IntegrationMerchant ControlPCI Burden TendencyScript BurdenUX Flexibility
Fully hosted redirectLowerLower when qualifyingLowerLower
Hosted iframe/fieldsMedium-highReduced but architecture dependentMediumHigh
Merchant card fields/direct integrationHighestUsually broaderHighestHighest

Do not select purely on the shortest SAQ.

Consider:

  • product requirements,
  • customer experience,
  • fraud controls,
  • engineering capability,
  • provider resilience,
  • accessibility,
  • international requirements,
  • observability,
  • long-term security staffing,
  • cost of maintaining custom payment code.

Pro Tip: PCI scope is an architecture characteristic, not paperwork optimization. Design the safest practical payment flow first, then validate it against the appropriate SAQ criteria.

Managing Script Ownership, Vendors and Production Changes

A script inventory becomes dramatically more useful when every entry has an internal owner.

Possible owners include:

  • payments,
  • web engineering,
  • marketing,
  • analytics,
  • fraud/risk,
  • privacy,
  • customer support,
  • security,
  • compliance.

“Vendor owns it” is not enough. The vendor may operate the code, but somebody inside the merchant organization should own the business decision to allow that vendor onto checkout.

Unowned scripts create predictable problems:

  • nobody knows whether they are still required,
  • vendor contracts expire while tags remain,
  • domains change without inventory updates,
  • alert recipients do not know who should investigate,
  • marketing experiments become permanent dependencies,
  • old SDK versions remain because no team claims them.

Payment-page script changes should tie back to controlled change records. That includes traditional software releases, tag-manager publications, provider SDK upgrades, CSP modifications and emergency fixes.

When a vendor changes its script URL, hosting domain, SDK version or dependency behavior:

  1. assess the vendor change,
  2. update the approved inventory,
  3. review authorization and integrity controls,
  4. adjust CSP or SRI where applicable,
  5. test the change outside production,
  6. deploy through the approved process,
  7. confirm monitoring recognizes the authorized new state.

Development and staging environments are valuable for testing, but compliance evidence needs to represent production behavior.

A pristine staging checkout does not prove that production’s tag manager, consent logic and campaign parameters load the same resources.

Dynamic Scripts, Consent Paths and Representative Testing

One of the hardest inventory mistakes is believing the first browser waterfall is complete.

Modern checkout JavaScript can be conditional.

Scripts may vary according to:

  • geography,
  • cookie consent,
  • logged-in versus guest status,
  • mobile versus desktop layout,
  • browser capability,
  • campaign query parameters,
  • payment method,
  • fraud decision,
  • 3-D Secure flow,
  • feature flags,
  • A/B experiments.

Scripts can also load scripts.

A consent platform may permit an analytics script, which loads another resource, which makes additional calls after an event. A tag manager can introduce a vendor library without any corresponding merchant-code deployment.

This is why a browser-observed inventory is more dependable than a static review alone.

PCI SSC even provides specific clarification for scripts involved in typical 3-D Secure processing. FAQ 1581 explains that validation of Requirement 6.4.3 for qualifying 3DS scripts used for 3DS functionality is not required because of the trust relationship established with the 3DS provider; scripts outside that purpose remain subject to the requirement where applicable.

That FAQ is a useful reminder not to create universal rules such as “every script that appears in DevTools must be treated identically.”

Architecture and purpose matter.

Checkout Script Performance Budgets and Resilience

Once inventory and ownership are established, teams can create an internal checkout performance budget.

It does not need one universal KB target.

A better budget may govern:

  • maximum unnecessary third-party origins,
  • JavaScript transfer growth,
  • main-thread blocking attributable to noncritical code,
  • payment SDK initialization regression,
  • new scripts requiring explicit approval,
  • whether non-payment vendors may block checkout rendering.

A performance budget becomes especially powerful when linked to change review.

A proposed marketing tag then has to answer two questions:

Why does this code need access to checkout?

and

What performance cost does it introduce?

Third-party resilience should also be considered.

Where technically and operationally safe:

  • a noncritical analytics outage should not stop card entry,
  • a chat outage should not make checkout unusable,
  • marketing scripts should not become hard dependencies of payment submission.

Payment-critical fraud, authentication and security controls are different. Do not bypass required protections merely to keep a transaction flowing.

The objective is graceful failure for noncritical dependencies, not weakening the controls that protect payment.

Common PCI Payment-Page Script Mistakes

The difficult part of payment-page governance is rarely creating the first spreadsheet. It is keeping documented controls aligned with the real browser experience.

MistakeCompliance/Operational RiskBetter Approach
Inventory comes only from source codeMisses tag managers, vendor dependencies and conditional scriptsVerify production behavior in browsers
Every tag-manager publication is assumed authorizedCreates an uncontrolled alternative deployment channelRestrict permissions and require publishing approval
Script has no internal ownerNobody can justify, investigate or retire itAssign accountable business/technical owner
“First-party” code is assumed trustworthyMerchant code can still be changed or compromisedApply change and integrity governance
CSP allows extremely broad sourcesSource restriction loses much of its benefitMaintain deliberate, tested allowed sources
CSP is treated as complete 6.4.3 complianceInventory, justification and integrity obligations remainTreat CSP as one possible control layer
SRI is treated as universalDynamic vendor code may not support static hashesApply SRI where suitable and use other controls elsewhere
11.6.1 monitor produces alerts nobody reviewsUnauthorized changes may go unansweredEstablish owners, escalation and response process
Hosted fields assumed to remove PCI obligationsParent page and eligibility criteria can still matterValidate exact SAQ architecture and residual scope
Marketing tags accumulate indefinitelyMore third-party exposure and page weightRevalidate checkout necessity
Staging inventory is treated as production inventoryActual customer scripts may differObserve production under representative conditions
Vendor SDK changes bypass governanceNew URLs/resources may invalidate controlsReview vendor changes like production changes

Practical Payment-Page Script Governance Workflow

A mature program can use the following sequence.

  1. Identify the checkout architecture: Document redirects, iframes, hosted fields, APIs, parent pages and provider boundaries.
  2. Determine applicable PCI validation and responsibilities: Verify SAQ eligibility against current PCI SSC documentation and with the compliance-accepting entity where needed.
  3. Observe production checkout: Use representative browsers, devices, consent states and payment paths.
  4. Inventory payment-page scripts and relevant resources: Include merchant, provider and other third-party code within applicable scope.
  5. Identify each owner and source: Record internal owner, vendor, domain and method of deployment.
  6. Document necessity: Explain the script’s specific checkout business or technical purpose.
  7. Remove unnecessary scripts: If a script has no defensible payment-page need, eliminate it where feasible.
  8. Establish authorization controls: Tie code deployments, tag-manager publishing and vendor changes to controlled approvals.
  9. Establish integrity controls: Use suitable technical mechanisms based on how resources are delivered.
  10. Deploy payment-page change/tamper detection: Observe the page as the customer browser receives it.
  11. Verify monitoring frequency: For applicable 11.6.1 defined-approach implementations, use at least once every seven days or the periodic frequency supported by the required targeted risk analysis.
  12. Document the approved baseline.
  13. Measure performance: Capture JavaScript transfer size, request count, third-party share, execution cost, payment SDK initialization, INP and LCP.
  14. Defer noncritical work: Suppress or postpone code that does not need to compete with payment.
  15. Re-test payment flows: Validate success, failure, authentication, consent and device variations.
  16. Update inventory after authorized changes.
  17. Review provider-hosted alternatives: Assess whether hosted fields or redirect checkout can simplify future architecture.
  18. Reassess scope and provider guidance when architecture changes.

Payment-Page Script Governance Checklist

Use this as an operational review rather than a substitute for the relevant PCI DSS assessment documentation.

  • Identify the payment-page architecture.
  • Confirm the applicable SAQ or other validation path.
  • Verify current PCI DSS 6.4.3 applicability.
  • Verify current PCI DSS 11.6.1 applicability.
  • Account for current SAQ A eligibility rules where relevant.
  • Inventory production-observed scripts.
  • Include applicable first-party and third-party code.
  • Test conditional and dynamically loaded script paths.
  • Record source/vendor.
  • Assign an internal owner.
  • Record business or technical justification.
  • Remove scripts with no checkout need.
  • Establish authorization/change-control mechanisms.
  • Apply appropriate integrity controls.
  • Review CSP configuration.
  • Use SRI for suitable static resources.
  • Configure applicable payment-page change/tamper detection.
  • Verify the required monitoring frequency.
  • Establish alert triage and response ownership.
  • Govern tag-manager changes.
  • Test provider SDK changes.
  • Keep development, staging and production separated.
  • Ensure the documented inventory reflects production.
  • Measure checkout JavaScript weight.
  • Measure payment SDK initialization.
  • Track relevant INP and LCP field data.
  • Defer or suppress noncritical scripts where appropriate.
  • Retest payment functionality after cleanup.
  • Review hosted-field or redirect alternatives where appropriate.
  • Update documentation after approved changes.
  • Revisit PCI SSC and payment-provider guidance when architecture changes.

Frequently Asked Questions

What does PCI DSS 6.4.3 require for checkout scripts?

For applicable payment pages, Requirement 6.4.3 requires mechanisms to confirm scripts are authorized, assure their integrity, and maintain an inventory with written justification explaining why each script is necessary.

Do I need an inventory of every JavaScript file on my payment page?

You need to address the payment-page scripts covered by your applicable implementation of Requirement 6.4.3. PCI SSC notes that this can include scripts from the entity and third or fourth parties. 

Determine actual applicability from your payment architecture rather than assuming every JavaScript resource throughout the entire website falls under the payment-page requirement.

What does written justification mean for a payment-page script?

Document why the script is necessary on checkout, not merely why the company uses the vendor. A useful record includes the script/component, owner, source, checkout purpose, approval and review information.

Does CSP satisfy PCI DSS 6.4.3?

Not by itself. CSP can contribute to authorization and script-execution controls, but Requirement 6.4.3 also addresses script integrity and an inventory with written justification.

Does SRI satisfy PCI DSS 6.4.3?

No. SRI is useful for verifying suitable static resources against expected hashes, but it does not provide the entire authorization, inventory, justification and governance process required by 6.4.3.

What does PCI DSS 11.6.1 require?

For applicable environments, it requires a change- and tamper-detection mechanism that identifies and alerts on unauthorized modifications to relevant payment-page contents and HTTP headers as received by the consumer browser.

How often must payment pages be checked for unauthorized changes?

The defined-approach baseline is at least once every seven days, or periodically at a frequency defined through the targeted risk analysis required by PCI DSS Requirement 12.3.1.

Do SAQ A merchants have to manage payment-page scripts?

Current SAQ A no longer directly includes Requirements 6.4.3 and 11.6.1. However, qualifying SAQ A merchants using embedded payment forms must satisfy the applicable script-attack eligibility criterion. PCI SSC FAQ 1588 explains ways this can be accomplished.

How is SAQ A-EP different from SAQ A for script controls?

SAQ A-EP applies where the merchant’s e-commerce website has greater influence over payment security even though it does not itself receive account data under the eligibility model. Its applicable requirements include direct treatment of payment-page script governance and change detection.

Do hosted payment fields reduce PCI script requirements?

They can reduce merchant card-data exposure and the amount of card-entry code the merchant owns. They do not automatically eliminate payment-page security responsibilities. Parent-page scripts and current SAQ A eligibility rules can remain relevant.

Does a fully hosted checkout redirect reduce scope more than an iframe?

Often, yes, because the provider controls more of the payment page and PCI SSC’s current SAQ A script eligibility clarification distinguishes qualifying redirects from embedded forms. Final scope still depends on satisfying every applicable SAQ eligibility criterion.

How do I find every third-party script running on checkout?

Observe production with browser developer tools and supplement that evidence with tag-manager configuration, build manifests, CSP reporting, provider documentation and payment-page monitoring. Test different consent states and other conditions that change script loading.

Can removing marketing scripts make checkout faster?

Potentially. Removing unnecessary code can reduce network requests, JavaScript transfer and browser execution work. Measure the checkout before and after changes rather than assuming a fixed performance gain.

What should I ask my gateway about PCI 6.4.3 and 11.6.1?

Ask which SAQ model the integration supports, which scripts/domains are required, whether hosted fields or redirects are available, how embedded components are protected, what responsibilities remain with the merchant and what current PCI guidance/documentation the provider supplies.

Conclusion

Payment-page JavaScript is now a formal governance issue under PCI DSS v4.x, not merely a front-end performance concern.

For environments where it applies, Requirement 6.4.3 centers on knowing which payment-page scripts execute, establishing that they are authorized and necessary, assuring their integrity, and maintaining the supporting inventory and justification. Requirement 11.6.1 complements that governance by requiring detection of unauthorized payment-page changes.

Architecture determines how much responsibility stays with the merchant. SAQ A, SAQ A-EP and broader SAQ D environments should not be treated interchangeably, and the current SAQ A rules for embedded payment forms are particularly important after the March 2025 changes.

The operational opportunity is that compliance and performance begin with the same question: what actually runs on checkout, and why?

Removing a script that has no justified payment-page purpose can simultaneously reduce attack surface, vendor dependencies, governance overhead and JavaScript weight. Hosted payment fields or fully hosted payment pages can simplify the architecture further when implemented according to current PCI eligibility requirements.

The goal is not a checkout with no JavaScript. It is a checkout where every important script is known, necessary, controlled and observable.