Skip to content
NexaPay

PCI DSS Credit Card Storage: What You May Keep

PCI DSS credit card storage rules: what you may keep, why encryption stays in scope, and how hosted checkout and tokens cut merchant duties.

PCI DSS Credit Card Storage: What You May Keep

Keep a card number only when a documented business, legal or regulatory need requires it, never retain the CVV, PIN or full track data after authorization, and verify at least once every three months that anything past its retention period has been deleted or rendered unrecoverable. That is the whole of PCI DSS credit card storage in two moves: store almost nothing, and prove on a schedule that whatever you do store goes away.

Which is why the advice you'll find most often, "encrypt the card column and you're fine," is the half-truth that costs merchants the most. Encryption changes who can read the number. It doesn't change what the number is, who can recover it, or how big your assessment becomes. And it says nothing about the failures that show up in breach reports: a verification code that should never have been written down, and copies of the card number sitting in a webhook log, a support ticket, a crash dump or a nightly backup nobody remembered.

Scope follows the data, not the column type. Once you know which rows in that database are allowed to exist, the rest of the job is architecture and discipline.

What PCI DSS Lets You Store

PCI DSS was first released in 2004 by American Express, Discover, JCB International, Mastercard and Visa, which formed the PCI Security Standards Council to manage the standard's technical requirements, as IBM's overview of PCI DSS compliance records. It applies to every organization that stores, processes or transmits cardholder data, and its central principle is data minimization: if a business, legal or regulatory need doesn't require you to keep the cardholder data, you don't keep it.

Where retention is necessary, the stored value has to be rendered unreadable using strong cryptography or masking. That's the second half of the rule, not permission to store freely. PCI DSS treats storage as an exception that requires a justification, documented controls and real protection, never as the ordinary state of a payments database.

The permitted list, row by row

This table answers the only question that matters after authorization.

Data elementAfter authorizationRequired protectionScope effect
Primary account number (PAN)Only with a documented business, legal or regulatory needStrong cryptography; limit amount and timeStill cardholder data; merchant environment in scope
Truncated PAN (BIN and last four)Allowed for display and reconciliationAdequate segmentation from full PANHolding only segmented truncated PANs may be out of scope; truncation system stays in
Card verification code (CVV, CVC, CID)Never, even if encryptedDo not retain; collect only for that authorizationRetention is a violation
PIN or PIN blockNever after authorizationDo not retainRetention is a violation
Full track or track-equivalent dataNever after authorizationDo not retainRetention is a violation
Provider token the merchant cannot reversePreferred substitute for the PANProtect the token; no merchant detokenization pathCan reduce the merchant cardholder data environment

The PAN. Storing it is legal only with a documented business, legal or regulatory need, protected by strong cryptography, with both the amount of data and the retention window kept small. The moment that row exists, your environment is cardholder data and stays in scope.

Truncated values. An approved truncated PAN, typically the BIN plus the last four digits, is what receipts, chargeback evidence and reconciliation require. Systems holding only adequately segmented truncated PANs may fall outside scope, but the truncation step and the systems connected to it stay inside.

The three that never survive. Card verification codes, PINs and PIN blocks, and full track data. Collect a verification code for that single authorization if your process needs it, then let it go. Retention is a violation, encryption doesn't rescue it, and no business justification makes it acceptable.

Tokens. A provider token the merchant cannot reverse is the preferred substitute for the PAN and can shrink the cardholder data environment considerably. A token you can detokenize is a different animal, and it arrives with a vault and a key store attached.

The test that settles most arguments: if your production database holds a row from the first column of that table and nobody can produce the business reason and the retention date for it, delete it today.

One caveat before you relax. Outsourcing capture, to a hosted checkout or a processor, lowers storage risk but doesn't erase every PCI duty. That distinction matters most for merchants that accept cards and settle in cryptocurrency, where avoiding the PAN reduces the cardholder data environment without transferring the whole obligation.

Why Encryption Does Not Remove Scope

Encrypting the card column protects the numbers if a disk leaves the building. It doesn't change what the numbers are. PCI SSC states that encrypted cardholder data remains cardholder data for SAQ eligibility, so a merchant that electronically stores an encrypted PAN may need SAQ D rather than an assessment intended for organizations that do not store cardholder data, as the PCI SSC FAQ on encryption and scope sets out.

That single sentence reframes the whole design conversation. The useful question isn't "is the PAN encrypted?" It's "does this merchant ever hold the PAN, who controls the keys, and can any connected system retrieve the number?"

An infographic illustrating that encrypting card numbers does not remove them from PCI DSS compliance scope requirements.

Five architectures and who holds the number

Read the table as a decision path. For each row, ask who receives the number, what your database keeps, and who can turn the stored value back into a PAN.

ArchitectureWho receives the PANMerchant storesWho can recover the PANUsual scope result
Provider-hosted checkout or hosted fieldsPCI-validated providerToken plus non-sensitive metadataProvider onlySmallest merchant cardholder data environment if no PAN path exists
Provider vault tokenProvider vaultToken the merchant cannot reverseProvider, via detokenizationMerchant scope reduced; vault, keys and detokenization stay assessable
Network tokenNetwork or token serviceNetwork tokenToken service under its rulesPAN exposure drops; the token path remains relevant
Encrypted full PANMerchant systemsCiphertext of the PANWhoever controls the keysStill cardholder data; often the broader SAQ D
Truncated PAN onlySystems after an in-scope truncation stepBIN and last fourNot reversible to the full PANSegmented truncated values may be out of scope

There's a memory problem that sits outside the table and trips up good teams. Card data in non-persistent memory doesn't itself require encryption, but controls have to stop it becoming persistent, and it should be removed when the business purpose ends. That means your API gateway, your job queue, your crash dumps, your observability tooling and your retry buffer all need a rule about what they may hold and for how long. A process that logs a full request body on failure has just created a card store nobody planned.

Encryption lowers the damage from a breach. It rarely lowers the scope of the assessment, because the data is still there and someone can still read it.

The test to leave with is blunt. If you, your keys, or a system connected to yours can recover the PAN, you have reduced breach impact without leaving scope.

Retention Limits Under Requirement 3.2.1

Stored account data starts a clock. Under Requirement 3.2.1, the organization needs documented retention and disposal procedures covering every location where account data lives, from the primary database out to exports, replicas and backups.

Three obligations sit inside that rule. Limit the amount of data kept, and the length of time it is kept, to what legal, regulatory or business purposes require. Write down a specific business justification for each store. Then, when the need ends, delete the data securely or render it unrecoverable.

The policy becomes a control through repetition. At least once every three months, the organization has to confirm that account data older than its defined retention period is gone. That cadence is what separates a working disposal process from a paragraph in a document nobody reads. A retention schedule works like the due date stamped inside a library book: the date means nothing unless someone checks the shelves.

Proving deletion across providers and backups

Sensitive authentication data gets stricter handling. Where it is stored electronically before authorization completes, v4.0 requires it to be minimized through retention and disposal procedures and protected with strong cryptography. That pre-authorization window is a narrow allowance, never permission to keep the data afterward.

StepEvidence to fileFrequency
Inventory every store: databases, replicas, backups, exports, ticket storesLocation list with named ownerQuarterly
Set the retention clock and business reason for each storeSigned retention scheduleQuarterly
Sample records past their retention limitSample results with timestampsQuarterly
Confirm secure deletion or unrecoverability, including backup expiryDeletion logs and backup expiry settingsQuarterly
Review detokenization access and provider attestationsAccess list and current attestationQuarterly

The routine reads clearly. Running it is where teams stall, because the sentence "our processor doesn't store cards" can be perfectly true and still prove nothing about order exports, an analytics warehouse, support desk attachments or the snapshot a hosting provider rotates on its own schedule. A support request containing a full card number is itself a card store, which is why support channels should never carry card numbers, credentials or keys. Run the checklist against every system that could have received account data, then file the results.

Backups deserve their own pass. Deleting the live record while last month's snapshot still holds it is like shredding the original and leaving the photocopies in the cabinet. The retention clock ends only when the last recoverable copy, including the copy inside the backup, is gone.

What auditors actually ask for: last quarter's sample showing that records older than your stated limit no longer exist.

Hosted Checkout and the Card Data Leak Map

A shopper clicks Pay, and the browser moves to the licensed payment provider's hosted checkout page. The customer enters card details there, or pays with Apple Pay or Google Pay, then confirms the payment. No confirmation, no charge. NexaPay never stores card details, and card and other payments are handled solely by licensed third-party payment providers.

The provider's page carries the card fields and the HTTPS session. Card payments through supported provider checkouts accept Visa and Mastercard. What returns to the merchant is a status, an amount, a provider token and non-sensitive metadata. Smart routing can select the best available payment provider in the buyer's region, so the visible checkout identity stays with the provider handling that transaction.

A diagram illustrating a secure hosted checkout process where card data is encrypted and not stored by merchants.

A token works like a coat-check ticket. It lets you refund, reconcile and recognize a returning customer without holding the card itself. Anyone who can exchange that ticket back for the PAN, plus the key store that makes the exchange possible, remains relevant to the assessment. Provider-hosted fields and tokenization reduce what reaches your systems, while the tokenization service, detokenization paths, PAN vault and key-management systems still need to be mapped. Encryption helps protect data in transit and at rest, but encrypted PANs in your own databases, exports or backups still count as stored card data. A provider's "we do not store cards" statement says nothing about copies your own systems created.

Where the copies actually end up

Follow one payment through its whole lifecycle and mark every place the PAN or CVV must not be written. Most accidental card stores are created by helpful engineers doing routine work.

  1. Collection. Hosted provider page only. Your checkout code should never touch a card field, and no custom script should read one.
  2. Authorization. The provider authorizes and returns a result. Keep the result, not the payload.
  3. Provider tokenization. Store the token and an identifier. Never log the vault response body in full.
  4. Webhook delivery. Webhook bodies often echo masked data and sometimes more. Strip the payload before storage, then store only the fields your order record needs.
  5. Retries and queues. A failed-payment payload parked in a dead-letter queue is a card store with no owner and no expiry.
  6. Observability. Request logs, error traces, APM spans and session replay tools capture form posts by default. Turn that capture off for the checkout path.
  7. Support tooling. Email tickets, chat transcripts, screenshots and call recordings are where CVVs live longest, because a customer will happily type one into a message.
  8. Backups. A replica or snapshot inherits every mistake the primary made, and outlives the retention clock unless someone sets expiry.
  9. Disputes and refunds. Evidence packs should carry BIN and last four, never a full number. Questions about a specific payment, such as disputes, chargebacks or verification, go to the licensed provider that handled the transaction.
  10. Deletion. The end of the lifecycle needs a verifiable end, not an assumption.

The pattern worth memorizing: the card number is rarely the leak that hurts. Prohibited authentication data and operational copies are.

PCI SSC states that card verification codes cannot be retained after authorization, even when encrypted, although they may be collected for a specific transaction before authorization. It also states that sensitive authentication data cannot be stored after authorization even where no PAN is present, and that pairing a verification code with a reusable payment token can enable fraudulent transaction representation, per the PCI SSC FAQ on retaining sensitive authentication data.

The practical question for a merchant is how it proves deletion and retention limits across logs, tickets, webhooks and backups. A hosted checkout removes card fields from your pages. It does not give your team permission to keep copied payloads because they arrived after authorization.

Here's a short walkthrough of how hosted fields keep the card number away from your servers:

Provider choice drives most of this, which is why what makes a good payment gateway comes down to where the card fields live and who can retrieve a stored number, not to the fee table.

A purge pass you can run this week

Start with searches, because search results are evidence. Query your log platform and ticket system for CVV-length fields and for any 13- to 19-digit sequence with card-like separators, then look at what the query returns before you delete anything.

  • Scrub at the edge. Drop or mask card fields in the logging middleware, before the event is serialized, so nothing downstream has to remember the rule.
  • Wipe fixtures. Production-copied test data is a card store with developer credentials on it. Regenerate fixtures from a synthetic generator.
  • Fix the replays. Treat webhook replay stores and event buses as card data until someone proves the payloads are clean.
  • Set backup expiry. Make the snapshot lifetime match the retention clock, then confirm the setting on the oldest bucket you own.
  • Recheck after every release. A new error handler that dumps the request body undoes a quarter of discipline in one deploy.

If you need display or reconciliation data, keep an approved truncated PAN limited to the BIN and last four digits. Systems holding only adequately segmented truncated values may be out of scope, but the truncation system and its connected systems stay in. Truncation now buys a smaller assessment later.

Merchant Duties That Stay in Scope

A hosted checkout shrinks your environment. It doesn't hand back the responsibility. After the card fields move to a provider, five duties remain yours, and each one has an owner you can name.

A five-step guide showing essential PCI DSS compliance duties for merchants to maintain secure card data environments.
  • Inventory of data flows. Write down every place card data could travel: browser, provider page, webhook endpoint, order database, log pipeline, warehouse, support desk, backup bucket. A flow you didn't draw is a flow you can't segment.
  • Segmentation. Card paths must not leak into application code, analytics events or internal dashboards. If your marketing team can query a payments replica, the boundary is decorative.
  • Access control. The API key stays private and the API call runs on the merchant's server, never in client-side code where a browser can read it. Dashboard seats need the same discipline as database grants.
  • Monitoring. Log access to the systems that touch payment events, alert on unusual retrieval patterns, and review detokenization activity if you hold any credential that can reach it.
  • Vendor management. Keep current attestation for the provider, and check that the validation covers the service you use, in the region you use it.

Then there's the quarterly evidence trail, which still applies to every location account data could have landed, including backups, exports and the ticket system. Reduce stored data and you lower breach impact and audit effort. You don't get to skip proof that third parties do what the contract claims.

Customer verification follows the same logic. A payment provider may ask a customer to verify their identity before paying, and that check happens at checkout with the provider. Questions about a specific payment, including disputes, chargebacks or verification, belong with the licensed provider that handled the transaction, not in a merchant-side card store.

Practical rule: if a customer emails you a card number, delete the email body and reply asking them to pay through the checkout link.

If your integration runs through a provider that also handles onboarding and settlement, pin down who owns each step. This explanation of what a payment facilitator is is a useful reference when you're mapping those responsibilities onto your own flow.

Choose a Storage Model Before You Integrate

Pick the model before the first line of integration code. The model determines your assessment form, your logging rules and your retention job, and changing it later means a migration.

You never need the card number. Provider-hosted checkout, storing a non-reversible token plus non-sensitive metadata, and the BIN and last four if your receipts or reconciliation require them. This is the smallest viable footprint and the right default for most e-commerce and SaaS sellers.

Repeat purchases need a reusable credential. Use the provider's vault and confirm in writing that your account cannot detokenize. Merchant-side detokenization puts the vault, the keys and the reversal path back into your assessment.

A legacy system already holds encrypted PANs. Treat it as in-scope cardholder data and plan a migration rather than renewing the encryption contract. Encryption reduced the damage from a breach; it didn't change what the system holds.

SituationStorage modelScope effect
Business never needs the card numberProvider-hosted checkout; store token and metadataSmallest merchant scope if no PAN path exists
Repeat purchases need a reusable credentialProvider vault token; no merchant detokenizationVault and detokenization stay assessable
Legacy system already holds encrypted PANsPlan migration off PAN storageStill cardholder data; likely SAQ D

All payments on our platform run through PCI DSS Level 1 certified providers with 256-bit encryption, and NexaPay never stores card details, which is the first row of that table in practice.

Whatever model you land on, the next artifact is one page. Draw the browser or app, the provider page, the webhook receiver, the order database, the log pipeline, the backup bucket and the support tools, then mark every box store, truncate or drop. Send that page to your acquirer and ask which self-assessment questionnaire matches it before you build. Teams that want card payments settled in cryptocurrency can evaluate NexaPay as one provider option, but the attestation and the flow map check are what decide your scope.

If you're comparing providers, this white label payment gateway overview explains how the hosted pieces fit together.


NexaPay runs card, Apple Pay and Google Pay payments through PCI DSS Level 1 certified providers, redirects every customer to the provider's hosted checkout, and never stores card details on our side, which keeps your environment at the smallest end of the table above. If you want card payments settled directly into your own crypto wallets without adding a card data store to your stack, visit NexaPay and check the provider options for your region before you integrate. Keep the flow map on one page, keep the retention job running, and let the licensed provider hold the numbers.