PCI DSS Requirements Explained: The Complete Compliance Checklist for Developers

15 min read
ISO 8583 Guides

A QSA just emailed your team: “Please provide evidence of PCI DSS compliance for your payment application.” You stare at the 300-page standard and think β€” where do I even start? Right here.

What is PCI DSS?

The Payment Card Industry Data Security Standard (PCI DSS) is a set of security requirements designed to ensure that all companies that process, store, or transmit credit card information maintain a secure environment. It was created by the five major card networks β€” Visa, Mastercard, American Express, Discover, and JCB β€” through the PCI Security Standards Council (PCI SSC).

PCI DSS isn’t a law, but it’s contractually enforced. If you accept card payments, your acquiring bank requires compliance. Non-compliance can result in fines of $5,000 to $100,000 per month, increased transaction fees, or β€” worst case β€” losing the ability to accept card payments entirely.

See it in action: Our PCI Sanitizer demonstrates Requirement 3.4 in practice β€” masking PANs and sensitive data before they hit your logs.

Also Known As…

PCI DSS goes by several names depending on the context:

NameContext
PCI DSSOfficial standard name
PCI complianceIndustry shorthand
PCICasual abbreviation (technically refers to the council, not the standard)
PCI Data Security StandardFull formal name
PA-DSSLegacy predecessor for payment applications (now replaced by PCI SSF)
PCI SSFSoftware Security Framework β€” the modern successor to PA-DSS
SAQSelf-Assessment Questionnaire (how most merchants prove compliance)

The PCI DSS standard is currently on version 4.0.1 (released June 2024), which replaces version 3.2.1. Version 4.0 introduced significant changes, including a shift toward customized validation alongside the traditional defined approach.

The 12 PCI DSS Requirements at a Glance

PCI DSS is organized into 6 goals containing 12 requirements. This is your compliance checklist:

#RequirementGoal
1Install and maintain network security controlsBuild and Maintain a Secure Network
2Apply secure configurations to all system componentsBuild and Maintain a Secure Network
3Protect stored account dataProtect Account Data
4Protect cardholder data with strong cryptography during transmissionProtect Account Data
5Protect all systems and networks from malicious softwareMaintain a Vulnerability Management Program
6Develop and maintain secure systems and softwareMaintain a Vulnerability Management Program
7Restrict access to system components and cardholder data by business need-to-knowImplement Strong Access Control Measures
8Identify users and authenticate access to system componentsImplement Strong Access Control Measures
9Restrict physical access to cardholder dataImplement Strong Access Control Measures
10Log and monitor all access to system components and cardholder dataRegularly Monitor and Test Networks
11Test security of systems and networks regularlyRegularly Monitor and Test Networks
12Support information security with organizational policies and programsMaintain an Information Security Policy

These 12 requirements break down into over 300 individual sub-requirements β€” but as a developer, you only need to focus on the ones that directly impact your code and architecture.

PCI DSS Compliance Levels

Not every merchant has the same compliance burden. The card networks assign compliance levels based on annual transaction volume:

LevelAnnual TransactionsValidation Requirement
Level 1Over 6 millionAnnual on-site audit by a QSA + quarterly network scan
Level 21–6 millionAnnual SAQ + quarterly network scan
Level 320,000–1 million (e-commerce)Annual SAQ + quarterly network scan
Level 4Under 20,000 (e-commerce) or up to 1 million (other)Annual SAQ + quarterly network scan (recommended)

Key terms: A QSA (Qualified Security Assessor) is a PCI-certified auditor. An ASV (Approved Scanning Vendor) performs external vulnerability scans. An ISA (Internal Security Assessor) is trained staff who can perform internal assessments.

SAQ Types: Which One Do You Need?

The Self-Assessment Questionnaire you complete depends on how you handle card data:

SAQ TypeScenarioQuestions
SAQ ACard-not-present, fully outsourced (e.g., Stripe Checkout hosted page)~30
SAQ A-EPE-commerce with website that affects security of payment (e.g., redirect to processor)~140
SAQ BImprint machines or standalone dial-out terminals only~40
SAQ B-IPStandalone PTS-approved terminals, IP-connected~80
SAQ CPayment application connected to internet, no electronic cardholder data storage~160
SAQ C-VTVirtual terminal on isolated computer, no electronic storage~70
SAQ DAll other merchants / service providers~330
SAQ P2PEHardware terminals using a PCI-validated P2PE solution~30

The golden rule: The less card data you touch, the fewer requirements apply to you.

Deep Dive: Requirements That Matter Most to Developers

Let’s break down the requirements where developers have the most impact.

Requirement 3: Protect Stored Account Data

This is where most developer mistakes happen. The rules are clear about what you can and cannot store:

Data ElementStorage Allowed?Protection Required
PAN (Primary Account Number)YesMust be rendered unreadable (encryption, truncation, hashing, or tokenization)
Cardholder nameYesProtection required if stored with PAN
Service codeYesProtection required if stored with PAN
Expiration dateYesProtection required if stored with PAN
Full magnetic stripe dataNEVERCannot be stored post-authorization
CAV2/CVC2/CVV2NEVERCannot be stored post-authorization
PIN / PIN blockNEVERCannot be stored post-authorization

PAN Masking and Truncation

When displaying PANs, PCI DSS allows showing at most the first 6 and last 4 digits (but not both at once unless there’s a business justification and proper access controls):

function maskPAN(pan) {
    const cleaned = pan.replace(/\D/g, '');
    
    if (cleaned.length < 13) return '****';
    
    // Show first 6 and last 4 (requires business justification per PCI DSS 4.0)
    // Default safe approach: show only last 4
    const lastFour = cleaned.slice(-4);
    const masked = '*'.repeat(cleaned.length - 4) + lastFour;
    
    return masked;
}

// Input:  4111111111111111
// Output: ************1111

Try it yourself: Paste a log file containing PANs into our PCI Sanitizer to see compliant masking applied automatically.

Encryption Requirements

If you store PANs, PCI DSS Requirement 3.5 mandates strong cryptography with proper key management:

MethodPCI ApprovalNotes
AES-256ApprovedIndustry standard for data-at-rest encryption
TDES (3DES)Being deprecatedStill seen in legacy systems; avoid for new development
RSA 2048+ApprovedFor key wrapping and transport encryption
TokenizationApprovedReplace PAN with non-reversible token β€” reduces PCI scope
TruncationApprovedStore only a portion (e.g., last 4); irreversible
One-way hashApproved (with salt)Irreversible; keyed hashing recommended (HMAC)

Requirement 4: Protect Data in Transit

Every transmission of cardholder data across open, public networks must use strong cryptography:

// WRONG: HTTP for payment data
fetch('http://api.example.com/charge', {
    body: JSON.stringify({ pan: '4111111111111111' })
});

// CORRECT: TLS 1.2+ enforced
fetch('https://api.example.com/charge', {
    body: JSON.stringify({ pan: '4111111111111111' }),
    headers: { 'Content-Type': 'application/json' }
});

PCI DSS 4.0 explicitly requires TLS 1.2 or higher. Earlier versions (SSL, TLS 1.0, TLS 1.1) are prohibited.

ProtocolPCI Status
SSL 2.0 / 3.0Prohibited
TLS 1.0Prohibited
TLS 1.1Prohibited
TLS 1.2Approved (minimum)
TLS 1.3Approved (recommended)

Requirement 6: Secure Development Practices

PCI DSS 4.0 significantly expanded Requirement 6 for software development:

Secure Development Lifecycle

Sub-RequirementWhat It Means for Developers
6.2.1Develop software securely using industry standards (OWASP, CERT)
6.2.2Train developers annually in secure coding for your tech stack
6.2.3Review custom code for vulnerabilities before production release
6.2.4Use software engineering techniques to prevent common vulnerabilities
6.3.1Identify and manage security vulnerabilities via a formal process
6.3.2Maintain an inventory of custom and third-party software components
6.4.1Protect public-facing web applications against attacks (WAF or code review)
6.4.2Manage payment page scripts (new in PCI DSS 4.0!)

Requirement 6.4.2: Payment Page Script Management

This is brand new in PCI DSS 4.0 and catches many teams off guard. If you have a payment page, you must:

  1. Inventory all scripts loaded on the payment page (including third-party)
  2. Justify each script’s presence and business need
  3. Verify script integrity using Subresource Integrity (SRI) or Content Security Policy (CSP)
  4. Monitor for unauthorized changes to scripts
<!-- CORRECT: SRI hash ensures script integrity -->
<script src="https://js.stripe.com/v3/" 
        integrity="sha384-ABC123..."
        crossorigin="anonymous"></script>

<!-- CORRECT: CSP header restricts script sources -->
<!-- Content-Security-Policy: script-src 'self' https://js.stripe.com -->

Requirement 8: Strong Authentication

PCI DSS 4.0 raised the bar for authentication:

ControlPCI DSS 3.2.1PCI DSS 4.0
Minimum password length7 characters12 characters (or 8 if system doesn’t support 12)
MFA requirementAdmin access to CDEAll access to the CDE
Account lockoutAfter 6 attemptsAfter 10 attempts (max)
Session idle timeout15 minutes15 minutes (unchanged)
Service account passwordsMust be changed periodicallyMust be changed periodically + complexity enforced

Requirement 10: Logging and Monitoring

Every access to cardholder data must be logged. But here’s the catch β€” your logs themselves must not contain cardholder data:

// WRONG: PAN in log output
logger.info(`Processing payment for card ${cardNumber}`);
// Output: "Processing payment for card 4111111111111111" ← PCI VIOLATION

// CORRECT: Masked PAN in logs
logger.info(`Processing payment for card ${maskPAN(cardNumber)}`);
// Output: "Processing payment for card ************1111" βœ…

What must be logged (Requirement 10.2):

EventRequired Fields
Access to cardholder dataUser ID, timestamp, action, success/failure
Admin actionsUser ID, timestamp, what changed
Access to audit trailsUser ID, timestamp
Invalid access attemptsUser ID, timestamp, source
Changes to authentication mechanismsUser ID, timestamp, before/after
System-level eventsEvent type, timestamp, component

Clean your logs: Use our PCI Sanitizer to strip PANs, CVVs, and track data from log files before sharing them with support teams or storing them in log management systems.

What Changed in PCI DSS 4.0

PCI DSS 4.0 represents the biggest update to the standard in years. Here are the changes developers need to know:

ChangeImpact
Customized approachYou can now design your own controls if they meet the security objective
Targeted risk analysisOrganizations define their own frequency for certain controls
Script management (6.4.2)Must inventory and protect payment page scripts
MFA everywhereMFA required for all CDE access, not just admin
12-char passwordsMinimum password length increased from 7 to 12
Authenticated vulnerability scansInternal scans must be authenticated
Encryption key managementStricter lifecycle controls for cryptographic keys
Phishing protectionTechnical controls against phishing now required

Key Deadlines

MilestoneDate
PCI DSS 3.2.1 retiredMarch 31, 2024
PCI DSS 4.0 effectiveMarch 31, 2024
Future-dated requirements mandatoryMarch 31, 2025

All future-dated requirements are now mandatory β€” there’s no more grace period.

PCI DSS Compliance Checklist for Developers

Here’s a practical checklist you can use during code reviews and architecture decisions:

Data Handling

  • Never store full track data, CVV2, or PIN post-authorization
  • Encrypt stored PANs using AES-256 or stronger
  • Implement key rotation for encryption keys
  • Use tokenization where possible to reduce PCI scope
  • Mask PANs in all display output (show last 4 only)
  • Purge cardholder data when no longer needed

Network and Transmission

  • Enforce TLS 1.2+ for all cardholder data transmissions
  • Disable SSL and early TLS in all configurations
  • Implement certificate pinning for mobile applications
  • Segment the cardholder data environment (CDE) from other networks

Application Security

  • Sanitize all user input (prevent SQL injection, XSS)
  • Implement Content Security Policy headers on payment pages
  • Inventory all scripts on payment pages (Requirement 6.4.2)
  • Use SRI hashes for third-party scripts
  • Conduct code reviews before each production release
  • Keep all frameworks and libraries patched and up to date

Authentication and Access

  • Enforce 12-character minimum passwords
  • Implement MFA for all access to the CDE
  • Assign unique IDs to every user (no shared accounts)
  • Implement role-based access control (RBAC)
  • Lock accounts after 10 failed login attempts
  • Set 15-minute session idle timeout

Logging and Monitoring

  • Log all access to cardholder data with user ID and timestamp
  • Never log PANs, CVVs, or sensitive auth data in plaintext
  • Protect audit logs from modification
  • Review logs daily for suspicious activity
  • Retain audit logs for at least 12 months (3 months readily accessible)
  • Synchronize clocks across all systems using NTP

Scope Reduction: The Developer’s Best Friend

The single most impactful thing you can do for PCI compliance is reduce your scope. Less card data in your environment means fewer requirements apply:

StrategyScope ImpactHow It Works
TokenizationMajor reductionReplace PANs with non-sensitive tokens; token vault is out of your scope
P2PE (Point-to-Point Encryption)Major reductionCard data encrypted at terminal, decrypted only at processor
Hosted payment pageMajor reductionRedirect to processor’s page (Stripe Checkout, Adyen Drop-in)
iFrame integrationModerate reductionPayment fields rendered by processor in an iframe on your page
Network segmentationModerate reductionIsolate CDE from rest of network; non-CDE systems are out of scope
Cloud tokenizationMajor reductionUse provider’s vault (e.g., Stripe tokens, Braintree vault)
Your Full Environment (without scope reduction):
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  β”Œβ”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚ Web β”‚ β”‚ App    β”‚ β”‚ DB   β”‚ β”‚ Log       β”‚ β”‚ ← ALL in PCI scope
β”‚  β”‚ Srv β”‚ β”‚ Server β”‚ β”‚ Srv  β”‚ β”‚ Server    β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

With Tokenization + Segmentation:
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Non-CDE (out    β”‚    β”‚  CDE (in scope)      β”‚
β”‚  of scope)       β”‚    β”‚  β”Œβ”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β” β”‚    β”‚  β”‚Token β”‚ β”‚ HSM    β”‚ β”‚
β”‚  β”‚ Web β”‚ β”‚ Log β”‚ β”‚    β”‚  β”‚Vault β”‚ β”‚        β”‚ β”‚
β”‚  β”‚ Srv β”‚ β”‚ Srv β”‚ β”‚    β”‚  β””β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”˜ β”‚    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Common PCI DSS Violations (and How to Fix Them)

These are the issues QSAs find most often during assessments:

ViolationRequirementFix
PANs in log files3.4, 10.3Implement log sanitization; use our PCI Sanitizer
Storing CVV2 post-auth3.3.2Purge immediately after authorization; never write to disk
SSL/TLS 1.0 still enabled4.2.1Disable in web server and API gateway configs
Default passwords on systems2.2.2Change all vendor defaults before deployment
No MFA for CDE access8.4.2Deploy MFA solution (TOTP, FIDO2, push notification)
Unpatched systems6.3.3Implement automated patching within 30 days of release
No script inventory on payment page6.4.2Audit all <script> tags; implement CSP + SRI
Shared admin accounts8.2.1Assign unique IDs to every individual
Logs not reviewed10.4.1Implement automated log analysis + daily review process
No network segmentation1.3.1Segment CDE with firewalls; document data flows

Key Management for PCI DSS

Requirement 3.6 and 3.7 mandate a complete cryptographic key management lifecycle. This is where HSMs become essential:

PhasePCI RequirementImplementation
Generation3.6.1.1Use HSM or CSPRNG; minimum AES-256 or RSA-2048
Distribution3.6.1.2Encrypt keys during transport; use key-encrypting keys (KEKs)
Storage3.6.1.3Store in HSM or encrypted key store; never in application code
Rotation3.6.1.4Rotate at least annually or upon suspected compromise
Retirement3.6.1.4Retire keys that have reached the end of their cryptoperiod
Destruction3.6.1.5Securely destroy using zeroization or cryptographic erasure
Split knowledge / dual control3.6.1.2No single person has full key; require 2+ custodians

Verify your keys: Use our KCV Calculator to compute Key Check Values β€” the PCI-approved method for verifying key integrity without exposing the key itself.

PCI DSS for Different Architectures

How PCI scope changes depending on your payment integration:

Direct API Integration

You handle raw card data directly. Heaviest PCI scope.

Customer β†’ Your Server (PAN in memory) β†’ Processor API
  • SAQ D applicable
  • Full 12 requirements apply
  • Annual penetration testing required
  • Quarterly ASV scans required

Hosted Payment Page (Redirect)

Customer is redirected to the processor’s page. Lightest scope.

Customer β†’ Processor's hosted page β†’ Processor
                ↓
        Your server (token only)
  • SAQ A applicable
  • ~30 questions
  • No card data touches your systems

JavaScript/iFrame Integration

Processor’s JS collects card data within your page. Moderate scope.

Customer β†’ Your page (with processor's iFrame/JS)
                ↓
        Card data β†’ Processor directly
        Token β†’ Your server
  • SAQ A-EP applicable
  • ~140 questions
  • You must protect your payment page scripts (Req 6.4.2)

What PCI DSS Does NOT Cover

Understanding the boundaries prevents false confidence:

MisconceptionReality
PCI compliance means you’re securePCI is a minimum baseline, not comprehensive security
Passing a SAQ means you passed an auditSAQs are self-assessments; only Level 1 requires a formal audit
PCI only applies to e-commerceAny channel that touches card data (POS, MOTO, e-comm) is in scope
Outsourcing payments removes all PCI obligationsYou still have due diligence requirements for your service providers
Compliance is a one-time eventPCI requires continuous compliance β€” it’s an ongoing program
PCI protects against all breachesPCI reduces risk but cannot prevent every attack vector

Quick Reference: PCI DSS Terminology

TermDefinition
CDECardholder Data Environment β€” systems that store, process, or transmit card data
PANPrimary Account Number β€” the 13-19 digit card number
SADSensitive Authentication Data β€” track data, CVV2, PINs (never store post-auth)
QSAQualified Security Assessor β€” PCI-certified auditor
ASVApproved Scanning Vendor β€” performs external vulnerability scans
ROCReport on Compliance β€” formal audit report from QSA
AOCAttestation of Compliance β€” summary document of compliance status
SAQSelf-Assessment Questionnaire β€” self-evaluation of compliance
ISAInternal Security Assessor β€” trained internal staff for assessments
CISCenter for Internet Security β€” provides baseline configuration benchmarks
CSPContent Security Policy β€” HTTP header controlling script sources
SRISubresource Integrity β€” hash-based script verification
P2PEPoint-to-Point Encryption β€” encrypts from terminal to decryption at processor
DUKPTDerived Unique Key Per Transaction β€” key management for terminals

Next Steps

Now that you understand PCI DSS requirements and how they impact your payment applications:

  1. Sanitize your logs with the PCI Sanitizer β€” see Requirement 3.4 and 10.3 in action
  2. Verify your keys with the KCV Calculator β€” PCI-compliant key verification
  3. Learn HSM fundamentals in our HSM Basics for Developers guide β€” the backbone of PCI key management
  4. Understand ARQC/ARPC with the ARQC Calculator β€” the cryptographic operations behind chip card compliance
  5. Parse payment messages with the ISO 8583 Studio β€” see where PAN data lives in Field 2
  6. Look up response codes in the Reference Database when debugging PCI-scoped transaction flows
  7. Understand track data in our Magnetic Stripe Track Data Guide β€” the Sensitive Authentication Data that must never be stored post-authorization
  8. Compare 3DES vs AES in our 3DES vs AES in Payments guide β€” understand the encryption algorithms behind PCI Requirement 3.5

This post is part of the ISO 8583 Mastery series. Follow along as we explore payment messaging in depth.

Related Posts

Payment Tokenization Explained: Network Tokens, Gateway Tokens, and Why They Matter
Feb 18, 2026 14 min
HSM Basics for Developers: What Every Payment Engineer Should Know
Feb 16, 2026 11 min
DUKPT Explained: Key Derivation for Secure Payment Transactions
Feb 18, 2026 12 min

πŸ’¬ Discussion

Have a question or feedback? Leave a comment below β€” powered by GitHub Discussions.

❓ Frequently Asked Questions

What is PCI DSS?

The Payment Card Industry Data Security Standard (PCI DSS) is a set of security requirements established by the major card brands to ensure that all companies that process, store, or transmit credit card information maintain a secure environment.

If I use a payment gateway like Stripe, am I automatically PCI compliant?

No. While using a PCI-compliant gateway drastically reduces your compliance scope (especially if using hosted fields or iframes), you are still required to complete an SAQ (Self-Assessment Questionnaire) regarding how your application handles data.

What is the penalty for violating PCI DSS?

Non-compliance can result in monthly fines ranging from $5,000 to $100,000 from the acquiring banks, mandatory forensic audits, and in severe cases, the permanent revocation of your ability to process credit cards.

\n