Card data architecture affects security, PCI DSS scope, recurring billing, incident response, and engineering effort. This guide compares payment tokenization, encryption, hosted fields, and payment vaults, then provides a practical review process for choosing and monitoring a design that supports secure online payments without creating unnecessary operational exposure.
Overview
Businesses handling card payments usually need to answer two separate questions: how will sensitive card data be protected, and how much of that data will the business handle directly? Those questions are related, but they are not the same. Encryption protects data by transforming it into an unreadable form that can be restored with the correct key. Tokenization replaces sensitive card data with a substitute value, or token, that is intended to have limited value outside the payment environment that issued it. Hosted fields move card-entry elements into a provider-controlled interface, reducing the need for the business application to receive raw card numbers. A payment vault stores payment credentials in a controlled system and returns references for later transactions.
These approaches can be used separately or together. For example, a checkout may use hosted fields to collect card details, tokenization for subsequent payment requests, and encryption to protect tokens, logs, and internal data in transit and at rest. The right architecture depends on transaction flows, recurring billing requirements, provider capabilities, operational maturity, and the business's PCI DSS responsibilities.
Tokenization is not a substitute for all security controls, and encryption does not automatically remove systems from PCI DSS scope. Scope depends on how payment data enters, moves through, is processed by, and can be accessed from the environment. For a broader compliance planning process, review the PCI DSS Compliance for Online Payments checklist and the PCI DSS scope and SAQ selection guide.
Payment tokenization vs. encryption
| Approach | What it protects | Data exposure | Integration effort | Key or recovery considerations | Recurring-payment fit |
|---|---|---|---|---|---|
| Tokenization | Replaces card data with a provider- or system-generated token. | Reduces the need for applications to retain raw card data, but the tokenization service remains important. | Moderate; requires token creation, storage, mapping, and lifecycle handling. | Recovery depends on the token provider, token portability, account mapping, and provider availability. | Often suitable when the token can be reused for authorized recurring or stored-credential transactions. |
| Encryption | Protects data while stored or transmitted by using cryptographic keys. | Raw card data may still exist in the application or database in encrypted form. | Potentially high; requires sound cryptographic design, key management, rotation, and access controls. | Loss or misuse of keys can affect confidentiality and business recovery. Decryption access must be tightly controlled. | Possible, but recurring charges require a controlled, compliant system that can decrypt or use the protected value. |
| Hosted fields or hosted checkout | Moves card-entry controls into a payment provider's controlled interface. | Can limit raw card data exposure to the business environment, subject to implementation and provider design. | Often lower than building direct card collection, though styling, events, errors, and testing still require engineering work. | Recovery depends on provider availability and the ability to reconnect customer records to payment references. | Usually works well when the provider creates a reusable payment method reference. |
| Payment vault | Stores payment credentials or tokens in a controlled payment system. | Centralizes sensitive payment references and can keep raw data away from general-purpose applications. | Moderate to high; requires APIs, permissions, customer mapping, migration planning, and operational monitoring. | Assess backup, export, portability, failover, access review, and provider exit procedures. | Strong fit for subscriptions, saved payment methods, and merchant-initiated transactions when supported by the provider and payment rules. |
The table is a design aid, not a compliance determination. Confirm the actual data flows, responsibilities, and applicable assessment requirements with your qualified security or compliance team.
What to track
A secure card data architecture should be monitored as an operating system, not treated as a one-time diagram. Keep an inventory of every place payment data, tokens, payment method identifiers, and authentication results can appear. Include production databases, logs, analytics tools, support systems, message queues, backups, test environments, browser code, mobile applications, and third-party integrations.
1. Data-flow and exposure changes
- Record where card data is collected, whether through hosted fields, a redirect, a mobile SDK, or a direct API.
- Verify that raw card data is not written to application logs, error reports, analytics events, support tickets, or debug payloads.
- Track which services can read tokens, create charges, issue refunds, attach payment methods, or update customer records.
- Review whether new integrations introduce a browser script, webhook, plugin, or vendor into the payment path.
2. Token and vault lifecycle
Document what each token represents, where it is stored, whether it is limited to a merchant account or environment, and what happens when a customer replaces a card or closes an account. Monitor token creation failures, expired or unusable references, duplicate customer mappings, and failed migrations. For SaaS payment processing and recurring billing, also track whether a token is approved for the intended transaction type and whether account updater or similar provider features alter the payment method lifecycle.
3. Encryption and key management
Maintain an inventory of encryption keys, their owners, permitted uses, rotation procedures, storage locations, and recovery dependencies. Separate key-management permissions from ordinary database access where practical. Test whether an authorized recovery process works without creating an uncontrolled copy of decrypted card data. Never assume that an encrypted database is safe if application credentials, keys, backups, or logs are broadly accessible.
4. Security and payment operations
Track access-review completion, privileged actions, failed authentication events, webhook signature failures, unusual token activity, charge attempts from unexpected systems, and changes to payment configuration. Connect security monitoring with payment operations: a sudden increase in declines, refunds, account changes, or failed webhooks may be a reliability issue, a fraud signal, or evidence of an integration problem. The Payment API integration checklist can help organize controls around deployment and production changes.
Cadence and checkpoints
Use a recurring review schedule, with additional reviews whenever the architecture changes. The exact cadence should reflect transaction volume, system criticality, change frequency, and internal risk requirements.
Monthly operational check
- Review failed tokenizations, vault lookups, recurring charges, refunds, and payment-method updates.
- Search logs and monitoring outputs for unexpected card-data patterns or sensitive request fields.
- Review new production integrations, permissions, API keys, webhook endpoints, and payment configuration changes.
- Confirm that alerts were triaged and that unresolved security exceptions have owners and due dates.
Quarterly architecture checkpoint
- Rebuild the payment data-flow diagram from the current implementation rather than relying only on old documentation.
- Sample services and environments to confirm that token storage, encryption, retention, and access controls match the design.
- Review provider documentation for changes to token behavior, hosted components, APIs, webhooks, vault features, and migration options.
- Test a payment-provider outage scenario, including retries, idempotency, customer support handling, and reconciliation.
- Reassess PCI DSS scope with the responsible compliance team when collection methods or system boundaries have changed.
Annual or major-change review
At least annually, and before a major provider migration, conduct a deeper review of cryptographic controls, privileged access, backup recovery, vendor responsibilities, incident response, penetration-test findings, and data-retention rules. Include privacy requirements that apply to customer and payment-related identifiers in the jurisdictions where the business operates. A provider's compliance status may support the assessment, but it does not replace the business's responsibility to understand its own implementation.
How to interpret changes
Not every change requires a new architecture, but every meaningful change deserves a documented decision. Start by classifying the change: collection method, data destination, privilege, provider, cryptographic control, customer lifecycle, or transaction type. Then ask what new data can be accessed, which systems are now in scope, and whether existing monitoring can detect misuse.
A rise in tokenization failures may indicate an API change, incorrect environment configuration, expired credentials, or a customer-record mapping problem. A rise in recurring-payment failures may reflect expired payment methods, provider behavior, network issues, or an incorrect use of stored payment credentials. An increase in unexpected sensitive fields in logs is more urgent: pause the source if appropriate, preserve relevant evidence, restrict access, and follow the incident-response process.
When comparing vendors, do not evaluate only whether a provider offers “tokenization.” Ask whether tokens are network or provider tokens, whether they are portable, how they behave across merchant accounts and environments, how customer migration works, what happens during an outage, and which recurring-payment and refund operations they support. Also ask how hosted fields are loaded, how browser-side changes are controlled, and what responsibilities remain with the merchant. These questions are more useful than treating encryption, tokenization, or a vault as a standalone compliance badge.
For implementation teams, keep security decisions close to payment tests. Test successful and failed authorization, refunds, duplicate requests, webhook replay, customer deletion, token replacement, provider timeouts, and partial outages. The payment checkout testing checklist provides a useful starting point for these scenarios.
When to revisit
Revisit this article and your architecture checklist monthly or quarterly, depending on the sensitivity and change rate of your payment environment. A scheduled review is especially useful after changes in payment gateway capabilities, provider contracts, token terminology, PCI guidance, cryptographic recommendations, privacy obligations, or supported payment methods. Treat those changes as prompts to verify your implementation rather than assumptions that a vendor update automatically improves security.
Start an immediate review when you change payment providers, introduce a new payment API, add recurring billing, move from hosted checkout to direct card collection, launch a marketplace or platform payment flow, receive a penetration-test finding, discover card data in an unexpected system, or investigate a suspected incident. Also revisit the design before expanding into new regions or currencies, because new transaction flows can change data routing, authentication, settlement, retention, and support requirements.
Use this final checklist during each review:
- Draw the current card-data and token flow from collection through authorization, storage, refunds, disputes, and deletion.
- Identify every system that can access raw card data, tokens, keys, payment-method references, or sensitive logs.
- Confirm that hosted fields, tokenization, encryption, and vault controls match the actual implementation.
- Test recurring payments, retries, webhooks, provider outages, migration, and recovery without creating uncontrolled card-data copies.
- Document PCI DSS scope assumptions, open exceptions, provider responsibilities, and owners for remediation.
- Record the next review date and the events that will trigger an earlier reassessment.
A sound payment architecture is one that limits exposure, supports the business's required payment flows, and remains understandable during an outage or investigation. Regular review keeps that balance visible as products, providers, and security requirements evolve.