compliance · 2025-03-03 · 8 min read
PCI DSS for front-end developers: the rules that touch your checkout form
You do not need to read 300 pages to avoid the biggest mistakes. These are the requirements that affect how you build, host and script a payment page.

PCI DSS (Payment Card Industry Data Security Standard) is the rulebook every merchant and processor must follow, maintained by the PCI Security Standards Council. Version 4.0 became mandatory in 2024 and added requirements aimed squarely at the browser. For a front-end developer the practical takeaways fit on one page.
Scope: why you want SAQ A
If card data is entered into the provider's iframe or hosted fields and never touches your origin, you can usually self-assess under SAQ A — the shortest questionnaire. The moment your JavaScript reads the PAN, you fall into SAQ A-EP or SAQ D with dozens of additional controls. Architecture is your biggest compliance lever; tokenization explains the pattern.
The non-negotiables
- Never log, store or send the PAN or CVV anywhere except the provider's tokenization endpoint.
- Mask the PAN wherever it is displayed: first six / last four at most — see masking rules.
- Serve the checkout only over TLS 1.2+ and set HSTS.
- Keep third-party scripts, tag managers and chat widgets off the payment page (Requirement 6.4.3 now requires an inventory and integrity control for every script).
- Monitor the payment page for unauthorized changes (Requirement 11.6.1) — skimming attacks like Magecart inject code client-side.
- Do not pre-fill or 'remember' the security code, ever.
What about educational tools like this one?
This site never transmits what you type and tells you loudly not to enter a real card. That is the right posture for any demo, lab or validator: make clear it is not a payment form.
The Council's v4.0 quick reference is the readable summary; the full standard is for your QSA.

Keywords: PCI DSS, PCI compliance, SAQ A, hosted fields, cardholder data, PCI DSS 4.0, payment page security, requirement 6.4.3
Frequently asked questions
Do I need PCI compliance if I use Stripe or PayPal?
Yes, but using their hosted fields or iframes typically reduces you to SAQ A, the simplest self-assessment.
Can I store the last four digits of a card?
Yes. The last four (and first six) are not considered sensitive on their own and may be stored and displayed for identification.