Scope is reduced by architecture, not by a badge
Hosted payment fields and tokenization can reduce an ecommerce merchant’s PCI DSS scope when raw card data is collected and handled by the provider without passing through merchant servers, APIs or databases. They do not eliminate scope or certify the integration. The merchant still controls the checkout page, code, configuration, access, orders, integrations and supplier relationships. Ask which people, processes and technologies can encounter account data or influence the payment journey.
The outcome depends on the deployed data flow, not the product label. A visually embedded field may be an isolated frame served by the provider, or it may be a merchant input that posts the PAN to merchant infrastructure. Only a technical map and observable evidence distinguish those designs. This guide presents a provider-neutral operating model; the applicable validation method and questionnaire must be confirmed with the acquirer or a QSA for the merchant’s actual environment.
Map data boundaries and copies before integration
Trace primary data and secondary systems
Draw the route from browser to provider and from provider to merchant services. At each hop record the code origin, destination domain, payload, returned identifier, encryption, retention and owner. Include the frontend, backend, queues, webhooks, fraud tooling and support systems. Mark PAN, expiry date, cardholder name, security codes and tokens separately. They are not interchangeable and should not disappear under a generic “payment data” label.
Extend the inventory to application logs, APM, session replay, analytics, crash reports, data lakes, tickets, email and backups. An exception handler that serializes a request body or a recorder that captures the DOM can create an unexpected copy even when the main database is clean. Look for manual exports, screenshots and debug variables too. For every system, define negative evidence: redaction settings, reviewed log samples, search queries and an accountable owner.
Compare checkout models without conflating them
Experience ownership and technical exposure
A redirect or fully hosted checkout moves the customer to a provider page and usually creates the clearest boundary. An embedded hosted checkout retains more of the journey within the merchant site. Hosted fields place individual isolated inputs or components inside a merchant-controlled page, preserving layout control while leaving the container page under merchant responsibility. Raw collection sends card data through merchant application code or servers and greatly expands the people, systems and controls involved.
- Redirect: clear boundary, with a visible journey change and dependence on the return flow.
- Hosted checkout: provider-managed experience, delivered standalone or embedded.
- Hosted fields: provider-served sensitive inputs within a merchant-controlled page.
- Raw collection: PAN or authentication data enters merchant code or infrastructure.
Do not infer SAQ A from the product name. Effective 1 April 2025, the revised criterion highlighted by PCI SSC distinguishes pages containing embedded payment forms, where the merchant must confirm protection from script attacks, from redirects or fully outsourced payment functions to which that specific eligibility criterion does not apply. This is an eligibility distinction, not a broad guarantee.
Design the browser, provider and token flow
Raw card data must not reach the merchant server
The backend creates a payment session using the amount and currency derived from the order, then returns only limited initialization data to the browser. The browser loads the component from the provider’s official domain and library. The shopper enters details into hosted fields; the component sends those details directly to the provider, which returns a token, payment-method identifier or session reference. The browser passes this reference to the backend, never the PAN or security code.
Concrete implementations differ. Stripe documents that Elements tokenizes sensitive payment details inside the component without those details touching the merchant server. Adyen describes client-side components and a vault where a token represents payment details stored by the provider. These are provider-specific examples, not universal token semantics. Format, lifetime, reuse, merchant scope and permissions must be taken from the chosen integration’s contract.
Keep the server authoritative for order and outcome
Tokenizing the card does not secure business logic
The client must not decide price, discount, currency, delivery or quantity. Before initializing payment, the server reloads catalogue and cart facts from trusted sources, applies commercial rules and calculates the total. Store the order, calculation version, expected amount, currency and provider identifier. If the browser submits an amount, treat it as untrusted context rather than the accounting source.
After payment, do not fulfill from the return page alone. Verify status through the provider API or an authenticated server-to-server notification, match order, amount and currency, and make the transition to paid idempotent. Handle duplicate, late and out-of-order callbacks. A valid token only establishes that a reference may be usable in its defined context; it does not establish that the order is correct or that the payment is final.
Keep PAN and authentication data out of secondary systems
Adopt an explicit rule: merchant backends, databases, logs, analytics, APM, tickets, email and backups must not receive full PAN or sensitive authentication data. Do not copy field DOM content, send complete errors to third-party telemetry or add payment values to analytics properties. Operational interfaces should expose only necessary, permitted attributes, such as provider-reported brand, appropriate last digits and a transaction reference.
A token reduces exposure by replacing a sensitive value in the application flow, but it is neither anonymous nor universally harmless. It can remain linkable to a customer, order or payment method and may authorize operations within defined permissions. Protect tokens with access control, environment separation, encryption where needed, limited retention and secret-free logging. Never turn one into a predictable public identifier.
Control scripts and shared responsibility
The page hosting the fields remains a merchant surface
An isolated component may prevent merchant code from directly reading a field, yet malicious scripts can alter the page, replace the component or divert the shopper. Maintain a script inventory and approval process, update dependencies, control changes and monitor integrity. For nonces, directives and staged enforcement, use our guide to Content Security Policy for ecommerce checkout instead of duplicating its configuration here.
Build a responsibility evidence pack: approved integration, implemented provider instructions, provider attestation where required, authorized domains and versions, data-flow matrix, access reviews, log evidence and test results. Outsourcing transfers functions, not the merchant’s ultimate responsibility. Recheck supplier documentation and status, assign internal owners and retain versioned, dated evidence.
Test tampering, failures and leakage
In a test environment, alter amount and currency, submit a token from another order, replay a reference, send an unsigned callback, duplicate a webhook and forge browser return parameters. Interrupt the network during tokenization and confirmation, then simulate timeouts and reloads. Confirm that retries cannot create two orders or two fulfillments, and that a component-load failure stops payment clearly without activating raw fields as a fallback.
Then run leakage tests. Search for test-card patterns in logs, APM traces, analytics events, queues, support tickets and backups produced during the journey. Verify error and payload redaction, token access and separation between test and production. Every result should create retainable evidence, an accountable owner and a remediation action, not just a screenshot of a successful payment.
Measure the boundary and maintain a runbook
Track the share of payments using the approved flow, component-load errors, failed tokenizations, amount or currency mismatches, rejected callbacks, duplicates, suspended orders and sensitive-data detections in secondary systems. Add provider-attestation age, unreviewed checkout dependencies and time to close exceptions. Build thresholds from the merchant’s own baseline rather than universal benchmarks.
The runbook should explain how to disable checkout, restore a known version, rotate credentials, isolate suspect logs, suspend fulfillment and contact the provider, acquirer and internal owners. To design a verifiable separation between browser, provider and order systems, explore our ecommerce and systems services. To review flows, evidence and responsibilities before release, contact AE Digital Agency; the acquirer or relevant QSA still determines SAQ eligibility and compliance validation.
Frequently asked questions
Do hosted fields eliminate a merchant’s PCI DSS scope?
No. They can reduce the systems exposed to raw card data, but the merchant retains responsibilities for checkout, scripts, integration, suppliers, access, order logic and evidence.
When can an integration be eligible for SAQ A?
Eligibility depends on the deployed flow and applicable criteria. For embedded forms, the revised criterion also addresses protection from script attacks; the acquirer or QSA should confirm the correct questionnaire.
Can a payment token be treated as anonymous data?
No. A token may remain linkable to a customer, order or payment method and can have limited operational capabilities. Apply least privilege, environment separation, retention and risk-based protection.
What evidence shows that PAN does not reach merchant systems?
Use a data-flow map, component configuration, request inspection, reviewed redacted logs, searches across APM and analytics, failure tests and current provider documentation.
Related articles
Ecommerce Content Security Policy: a safe rollout for checkout and analytics
An implementation guide to introduce CSP without breaking payments, consent or measurement: dependency inventory, Report-Only, nonces, journey tests and canary enforcement.
Shopify Checkout Extensibility: Maximize Conversions & First-Party Data with Advanced Strategies
Discover how Shopify Checkout Extensibility revolutionizes the checkout for Plus merchants, enabling advanced customizations, first-party data collection, and crucial marketing integrations for the post-cookie era.
Reliable ecommerce webhooks: idempotency, retries and observability
An implementation blueprint for receiving order and payment events, preventing duplicate effects, recovering failures and measuring the entire pipeline.
