Payment Page Script Management

PCI DSS v4.0.1 requires you to control every script that loads and runs in a consumer’s browser on your payment page: you must prove each script is explicitly authorized, verify the integrity of each script, and maintain a complete script inventory with a written business justification for why each script is needed (PCI DSS v4.0.1 Requirement 6.4.3). Operationally, this becomes a tight change-control and monitoring program for browser-executed code.

Key takeaways:

  • Maintain a living inventory of all payment page scripts, including third-party tags, with a written necessity justification for each (PCI DSS v4.0.1 Requirement 6.4.3).
  • Implement two distinct controls: script authorization (is it allowed?) and script integrity assurance (has it been altered?) (PCI DSS v4.0.1 Requirement 6.4.3).
  • Treat marketing/analytics and other non-payment scripts as in-scope if they execute in the consumer’s browser on the payment page (PCI DSS v4.0.1 Requirement 6.4.3).

“Payment page script management” is one of the most operationally misunderstood PCI DSS requirements because the scope is simple, but the execution crosses teams. If a script loads and executes in the consumer’s browser on any page where payment data is entered or processed, you must manage it: approve it, protect it from unauthorized modification, and document why it exists (PCI DSS v4.0.1 Requirement 6.4.3). This includes third-party scripts you did not write, such as analytics tags, chat widgets, A/B testing tools, fraud tooling, and tag manager-delivered code.

For a CCO, GRC lead, or security compliance owner, the goal is to convert this requirement into something you can audit daily: an authoritative script inventory, a formal approval workflow for introducing or changing scripts, and technical integrity controls that detect tampering before it becomes a cardholder data event. The hardest part is usually governance: deciding who can approve scripts, how emergency changes work, and how you enforce “no unknown scripts” in production.

This page gives you requirement-level implementation guidance you can hand to engineering, marketing operations, and your PCI assessor: what to do, what evidence to retain, and where audits typically get stuck.

Regulatory text

PCI DSS v4.0.1 Requirement 6.4.3 states:

“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, and an inventory of all scripts is maintained with written justification as to why each is necessary.” (PCI DSS v4.0.1 Requirement 6.4.3)

Operator translation:

  • “Payment page scripts” means any JavaScript (or equivalent browser-executed code) that runs on your checkout/payment page(s), regardless of who supplied it.
  • You need three outcomes:
    1. you can show each script is approved/allowed,
    2. you can show you protect against unauthorized changes to that script (or detect them quickly and reliably),
    3. you maintain an inventory and a written justification for every script.

Plain-English interpretation (what the assessor wants to see)

An assessor is looking for evidence that you can answer these questions consistently:

  1. What scripts run on the payment page today? (Complete inventory.)
  2. Who approved each one and why is it there? (Authorization + written justification.)
  3. How do you know it hasn’t been changed, swapped, or injected? (Integrity assurance.)
  4. How do you stop unapproved scripts from appearing? (Preventive controls plus monitoring and response.)

This requirement exists because browser-executed scripts are a practical path for payment data theft. Your program should assume that third-party scripts and tag supply chains can change independently of your release cycle, then build controls to manage that risk.

Who it applies to (entity and operational context)

Applies to any organization with PCI DSS scope that serves payment pages to consumers, including:

  • Merchants with hosted checkout pages, embedded payment forms, or custom checkout flows (PCI DSS v4.0.1 Requirement 6.4.3).
  • Service providers and payment processors that provide payment pages, hosted fields, or JavaScript libraries used in consumer browsers (PCI DSS v4.0.1 Requirement 6.4.3).

Operationally, you are in-scope if you have:

  • A web payment page where users enter payment details, or
  • A single-page app checkout, embedded iFrame/hosted fields, or any payment experience where scripts execute in the consumer’s browser on the payment page (PCI DSS v4.0.1 Requirement 6.4.3).

Common “surprise” in-scope owners:

  • Marketing teams controlling tags via a tag manager.
  • E-commerce platform admins adding “apps” that inject scripts.
  • Fraud/telemetry vendors that require browser-side code.
  • Customer support tools that add widgets.

What you actually need to do (step-by-step)

Step 1: Define “payment page” scope and owners

  • Enumerate payment-related URLs/routes, including localized versions and A/B variants.
  • Identify a single accountable owner for payment page script governance (often Security Engineering or AppSec), plus required approvers (e.g., Product + Security + Privacy).

Deliverable: “Payment page scope statement” (list of pages/endpoints and ownership model).

Step 2: Build the script inventory (the non-negotiable foundation)

Create an inventory that covers all scripts loaded and executed in the consumer browser on payment pages (PCI DSS v4.0.1 Requirement 6.4.3). Include:

  • Script name and purpose
  • Source (first-party vs third party)
  • Loading mechanism (static include, tag manager, build pipeline, CDN, etc.)
  • Exact URL/host/path pattern and environments (prod/stage)
  • Script owner (internal team) and third party contact (if applicable)
  • Data access notes (what it can read on the page, especially payment form fields)
  • Written justification: why it is necessary (PCI DSS v4.0.1 Requirement 6.4.3)

Practical tip: Start by capturing a browser HAR file and “view source” for payment pages, then reconcile with tag manager exports and CI/CD manifests.

Step 3: Implement script authorization (prove “allowed”)

You need a method to confirm each script is authorized (PCI DSS v4.0.1 Requirement 6.4.3). A workable model:

  • Maintain an allowlist of approved script sources (domains) and approved script identifiers (file name/path, integrity hash, or versioned artifact).
  • Require formal approval before adding a script or changing how a script loads (including tag manager changes).
  • Tie approvals to a ticket (change request) that references the inventory entry and includes risk review.

Control options (choose what fits your stack):

  • Change-control gates for the web repo + tag manager publishing workflow.
  • Content Security Policy (CSP) with strict script-src directives to constrain where scripts can load from (authorization boundary).
  • E-commerce platform controls that restrict who can install “apps” or inject header/footer code.

Step 4: Implement script integrity assurance (prove “unchanged”)

You need a method to assure integrity of each script (PCI DSS v4.0.1 Requirement 6.4.3). Common patterns include:

  • Subresource Integrity (SRI) for externally loaded scripts where feasible (pin expected hashes).
  • Hosting critical scripts on controlled infrastructure with integrity controls in the build pipeline (signed artifacts, immutable versioned files).
  • Runtime monitoring that detects DOM/script changes on the payment page and alerts on drift from known-good baselines.

Integrity assurance must address third-party script risk. If a third party changes their script, your control should detect or prevent the modified script from running on your payment page.

Step 5: Connect inventory ↔ change management ↔ monitoring

Make the inventory operational:

  • Any production change that affects scripts must update the inventory entry and justification.
  • Any monitoring alert about a new/changed script should map to “authorized change vs unauthorized injection.”
  • Define an incident path: who disables a tag, rolls back a release, or updates CSP/SRI.

Step 6: Document exceptions explicitly (and keep them rare)

If you cannot apply a certain integrity method to a specific script, document:

  • Why (technical limitation)
  • Compensating controls (stronger CSP, additional monitoring, restricted tag publishing)
  • Approval by accountable security owner

Assessors typically focus on “show me how you still assure integrity” rather than accepting a blanket exception.

Required evidence and artifacts to retain

Prepare evidence that stands on its own during an assessment:

Inventory artifacts

  • Script inventory (current, dated) with written justification per script (PCI DSS v4.0.1 Requirement 6.4.3)
  • Tag manager export/config snapshot tied to a release or publish event
  • List of payment pages in scope with mapping to inventory coverage

Authorization artifacts

  • Script approval workflow document (who approves, criteria, emergency path)
  • Change tickets showing approvals for new scripts, script source changes, or tag manager publishes
  • CSP policy files/headers demonstrating allowlisted sources (if used)

Integrity artifacts

  • SRI hashes in templates/build artifacts (if used)
  • Evidence of build/release controls that keep script artifacts immutable/versioned
  • Monitoring outputs: baseline snapshots, alerts, and investigation notes for drift events

Governance artifacts

  • RACI for payment page scripts
  • Third-party management records for script-providing third parties (contracts, security review notes), where applicable to your program

Common exam/audit questions and hangups

Expect these questions:

  • “Show me your inventory of scripts that load and execute on the payment page” (PCI DSS v4.0.1 Requirement 6.4.3).
  • “How do you know this list is complete? What’s your discovery method?”
  • “Where is the written justification for each script?” (PCI DSS v4.0.1 Requirement 6.4.3).
  • “Demonstrate how you confirm authorization for a script introduced via tag manager.”
  • “Show integrity controls for third-party scripts. What happens if the third party changes the script without notice?” (PCI DSS v4.0.1 Requirement 6.4.3).
  • “Who can publish tag changes, and how is that controlled?”

Hangups that cause findings:

  • Inventory exists but is outdated or missing tag manager-injected scripts.
  • “Authorization” is informal (Slack approvals) with no durable record.
  • Integrity control is claimed but not demonstrated on actual payment pages.

Frequent implementation mistakes (and how to avoid them)

  1. Treating tag manager as out of scope
  • Avoidance: tag managers are often the primary injection path. Include tag manager configs in inventory, approvals, and monitoring.
  1. Inventorying domains instead of scripts
  • Avoidance: domains help, but you still need script-level justification and integrity thinking. Keep at least an identifier that distinguishes scripts under the same domain.
  1. No written justification beyond “business need”
  • Avoidance: require a short, specific justification: what function it provides, why it must run on the payment page, and why alternatives won’t work (PCI DSS v4.0.1 Requirement 6.4.3).
  1. Integrity controls that break during normal third-party updates
  • Avoidance: decide which scripts must be pinned (SRI/versioned) and which can change but must be detected quickly through monitoring and a defined response path.
  1. Split ownership with no decision-maker
  • Avoidance: designate a single control owner who can say “no” to new scripts on payment pages.

Enforcement context and risk implications

No public enforcement cases were provided in the source catalog for this requirement. Practically, this control reduces the likelihood that unauthorized or modified browser scripts can access payment page data. From a risk perspective, unmanaged third-party scripts create a “silent change channel” into your checkout experience, often outside normal SDLC controls. Your compensating posture is: prevent unknown scripts from running, detect changes fast, and prove governance with durable records.

Practical execution plan (30/60/90-day)

Because this requirement is operational, sequence work by dependency rather than dates on a calendar.

First phase (immediate): Get to a defensible inventory and ownership

  • Name the accountable owner and required approvers.
  • Enumerate payment pages and build the first script inventory from runtime evidence (browser capture) plus tag manager exports.
  • Add written justification per script (PCI DSS v4.0.1 Requirement 6.4.3).
  • Freeze ad hoc script additions: require a ticket for any script change until controls are in place.

Second phase (near-term): Enforce authorization through process and technical boundaries

  • Implement an approval workflow connected to change management for:
    • code-based scripts
    • tag manager publishes
    • e-commerce plugin/app installs
  • Implement CSP allowlisting for script sources where feasible to create a hard boundary for authorization.
  • Reduce script count on payment pages by removing non-essential tags (inventory justifications make this easier).

Third phase (operationalize): Integrity assurance, monitoring, and response

  • Add SRI where feasible for external scripts and lock critical scripts to versioned artifacts.
  • Stand up monitoring that detects new/changed scripts on payment pages and routes alerts to an on-call owner.
  • Run at least one tabletop: “unapproved script detected on payment page” with rollback steps (disable tag, revert release, tighten CSP).

Where Daydream fits naturally: teams often fail on evidence quality and inventory drift. Daydream can function as the system of record for script inventory, approvals, and artifact retention, so your PCI evidence stays current instead of becoming a quarterly scramble.

Frequently Asked Questions

Does PCI DSS 6.4.3 apply to scripts loaded through a tag manager on the payment page?

Yes. If the script loads and executes in the consumer’s browser on the payment page, it is in scope and must be authorized, integrity-assured, and inventoried with written justification (PCI DSS v4.0.1 Requirement 6.4.3).

Do first-party scripts need integrity controls, or only third-party scripts?

The requirement applies to all payment page scripts executed in the consumer’s browser, regardless of who wrote them (PCI DSS v4.0.1 Requirement 6.4.3). First-party scripts typically rely on SDLC and release integrity; you still need a method that demonstrates integrity assurance.

What counts as “written justification” for a script?

A short explanation tied to a business function, plus why it must run on the payment page and who owns it. The key is that every script has a specific necessity statement in the inventory (PCI DSS v4.0.1 Requirement 6.4.3).

If a third party hosts the script and changes it, how can we “assure integrity”?

You can pin integrity (for example, SRI or versioned artifacts) where feasible, and add monitoring and response controls to detect unauthorized change. Your assessor will expect a method that works for the scripts you actually run (PCI DSS v4.0.1 Requirement 6.4.3).

Are scripts on non-payment pages in scope if they don’t execute on the payment page?

Requirement 6.4.3 is scoped to payment page scripts loaded and executed in the consumer’s browser (PCI DSS v4.0.1 Requirement 6.4.3). Keep your payment-page definition precise and document it so scope decisions are defensible.

How do we prove completeness of the script inventory during an audit?

Show multiple discovery inputs: runtime captures of the payment page, tag manager configuration exports, and build/release manifests. Then show the reconciliation process that maps each observed script to an authorized inventory entry (PCI DSS v4.0.1 Requirement 6.4.3).

Frequently Asked Questions

Does PCI DSS 6.4.3 apply to scripts loaded through a tag manager on the payment page?

Yes. If the script loads and executes in the consumer’s browser on the payment page, it is in scope and must be authorized, integrity-assured, and inventoried with written justification (PCI DSS v4.0.1 Requirement 6.4.3).

Do first-party scripts need integrity controls, or only third-party scripts?

The requirement applies to all payment page scripts executed in the consumer’s browser, regardless of who wrote them (PCI DSS v4.0.1 Requirement 6.4.3). First-party scripts typically rely on SDLC and release integrity; you still need a method that demonstrates integrity assurance.

What counts as “written justification” for a script?

A short explanation tied to a business function, plus why it must run on the payment page and who owns it. The key is that every script has a specific necessity statement in the inventory (PCI DSS v4.0.1 Requirement 6.4.3).

If a third party hosts the script and changes it, how can we “assure integrity”?

You can pin integrity (for example, SRI or versioned artifacts) where feasible, and add monitoring and response controls to detect unauthorized change. Your assessor will expect a method that works for the scripts you actually run (PCI DSS v4.0.1 Requirement 6.4.3).

Are scripts on non-payment pages in scope if they don’t execute on the payment page?

Requirement 6.4.3 is scoped to payment page scripts loaded and executed in the consumer’s browser (PCI DSS v4.0.1 Requirement 6.4.3). Keep your payment-page definition precise and document it so scope decisions are defensible.

How do we prove completeness of the script inventory during an audit?

Show multiple discovery inputs: runtime captures of the payment page, tag manager configuration exports, and build/release manifests. Then show the reconciliation process that maps each observed script to an authorized inventory entry (PCI DSS v4.0.1 Requirement 6.4.3).

Authoritative Sources

Operationalize this requirement

Map requirement text to controls, owners, evidence, and review workflows inside Daydream.

See Daydream
PCI DSS 4.0: Payment Page Script Management | Daydream