Hosted Payment Fields vs Redirect: 5 Trade-Offs

Hosted Payment Fields vs Redirect: 5 Trade-Offs

Hosted payment fields and a redirect solve the same problem. Both take the card number out of your own code. The comparison people actually need, hosted payment fields vs redirect, is not about integration effort or conversion uplift; it is about what is left behind on your page, and what a skimmer can still do with it.

Both models are configuration choices. You change an integration setting with your provider, adjust a template, and the card inputs stop belonging to you. For most merchants that is the cheapest single reduction in skimming risk available, which is why it is worth doing before any monitoring product is bought. But neither option deletes the attacker. It moves the target.

What follows is five trade-offs, written from the attacker’s side of the glass, with the obligations that survive both choices stated plainly.

What each setup actually does in the browser

With hosted payment fields, your provider serves small cross-origin iframes for the primary account number, expiry and security code. Those frames sit inside your checkout template and are styled to look like the rest of your form. The shopper never leaves your domain. Keystrokes inside those frames belong to the provider’s document, and the browser’s same-origin policy stops your JavaScript, or anybody else’s JavaScript on your page, from reading them.

With a redirect, or a hosted payment page, the shopper leaves your site entirely. Card details are typed on the provider’s domain, on a page you do not control, and the shopper returns to you with a status and a reference. Nothing on your estate ever sees the number.

The part people skip: everything outside the card fields still belongs to you. Name, billing address, email address, telephone number, basket contents, the order total, the button, the template, the tag manager, the analytics, the chat widget. Whatever an attacker can reach on your checkout, they can also reach on the page that holds the iframe or launches the redirect. Hosted payment fields remove the inputs, not the page.

3-D Secure muddies both models anyway. When the issuer steps the shopper up to a challenge, the browser loads an access control server page from a domain neither you nor your provider owns, usually inside an iframe. That happens whichever integration you chose, and it is the thing most likely to break a tight Content Security Policy.

Trade-off 1: where the card number can be read

This is the real difference, and it is a large one.

If a skimmer is injected into your checkout and the card fields are provider-owned iframes, the straightforward route is closed. The script cannot attach a listener to an input it cannot see. That is the exact class of attack that hit British Airways in 2018, where modified first-party JavaScript on the booking page read the details as they were typed. The ICO issued a £20m penalty in October 2020. Hosted fields would have taken those inputs out of British Airways’ own document.

With a redirect, the card is not typed on your estate at all. There is nothing on your page to hook, because the page with the card form is not yours.

The shared gap is the rest of the form. Name, address, email and phone are still in your DOM, still readable by injected code, and still personal data under UK GDPR. A breach of those is a breach, and it is reportable. Criminals sell that data too. Removing the card number narrows the loss. It does not end it.

Trade-off 2: PCI scope and SAQ A eligibility

Both routes can keep a merchant eligible for SAQ A, the shortest self-assessment questionnaire. Neither does so automatically.

Two PCI DSS v4.x requirements matter here and they are frequently misread. Requirement 6.4.3 asks for an inventory of every script loaded and executed in the consumer’s browser on the payment page, with each one authorised and justified in writing, and integrity assured. Requirement 11.6.1 asks for a mechanism that detects and alerts on unauthorised change to the HTTP headers and the content of the payment page as received by the browser. Both were future-dated and became mandatory on 31 March 2025. Neither is limited to the card field. They attach to the page that loads the payment form. You can read a fuller walkthrough of what requirements 6.4.3 and 11.6.1 ask of a payment page if you are scoping the work. Whichever route you choose also shapes whether you still qualify for SAQ A, and the SAQ A eligibility criteria for UK merchants are set out elsewhere.

There is a wrinkle worth knowing before a QSA tells you. In January 2025 the PCI Security Standards Council revised SAQ A, removing 6.4.3 and 11.6.1 from the questionnaire itself and adding an eligibility criterion instead: the merchant confirms that its site is not susceptible to attacks from scripts that could affect the e-commerce system. Read plainly, that is the same obligation with a different signature on it. You are attesting that you know what runs on that page. Check the current version at the PCI Security Standards Council document library and confirm with your acquirer, because SAQ versions move.

A redirect does not empty your scope either, if the page before the redirect collects any cardholder data, or if your own code sets the destination. Document the decision while it is fresh: which model you use, which domains serve the payment form, which scripts are on the page before the handover, who approved each one, and what watches for change. An acquirer or assessor should be able to follow that in one sitting.

Trade-off 3: the attacks neither option stops

The fake form overlay

Compromised first-party code hides the provider iframe with a line of CSS, or removes it, and draws a replica in its place. The shopper types the card into the replica. The skimmer sends it out. The attacker cannot then type into the real cross-origin frame, so the usual finish is a staged error, the genuine form restored, and a polite request to try again. The order completes. The payment succeeds. So does the theft. This is the specific defeat for hosted fields, and file integrity monitoring on your server does not see it. Change detection on the rendered checkout DOM does. The weak points in iframe card payment form security almost all live in that gap between the file on disk and the page in the browser.

Redirect substitution

If an attacker can edit your checkout template, they can change where the shopper is sent. A form action pointed at a lookalike domain, or a script that sets window.location to one, produces a convincing payment page under their control. Vendor documentation for redirect integrations never mentions this, because from the provider’s side nothing happened at all.

Platform compromise

In September 2020 the security firm Sansec counted 1,904 Magento 1 stores skimmed over a single weekend, through an unpatched, end-of-life platform. When an attacker holds admin or file access, they rewrite the template that renders your checkout. Your iframe is only as trustworthy as the code that places it on the page.

Third-party supplier compromise

Ticketmaster UK in 2018 was skimmed through a compromised chat supplier’s script loaded on the payment page. The ICO fined Ticketmaster £1.25m in November 2020. The payment field was not the weakness. The page around it was. A chat widget has no business on the page where card numbers are typed, whoever owns the field.

Trade-off 4: conversion, payment methods and support load

An unexpected domain change at the moment of payment costs something. How much depends on your audience and how familiar the provider’s brand is; treat vendor conversion figures with scepticism, because the people publishing them sell the integration. Hosted fields keep the shopper in your template, which is the honest commercial argument for them.

Against that, your checkout is probably already a mixed economy. PayPal, Klarna and most wallets are redirect-native or open their own frames anyway. A shopper who chooses one of those leaves your page regardless, so the “we never send customers away”line is usually already untrue.

Hosted fields bring their own support load. You cannot set the input mode inside the provider’s frame, so mobile keyboard behaviour is whatever the provider shipped. Browser autofill across iframes is inconsistent. Validation messages come from the provider and may not match your form’s styling or tone. Each of those produces a trickle of tickets that a redirect does not.

Then there are the policy mistakes that break either model silently. Miss the provider in frame-src and the card field renders as empty space with a console error nobody reads. Miss it in form-action and a redirect implemented as a form POST stops dead. Pin frame-src too tightly and the 3-D Secure challenge frame, served from an issuer’s access control server, is blocked for a subset of cards you did not test with.

Trade-off 5: what you still have to watch afterwards

Take a baseline of what the checkout loads: every script, every frame, every outbound request, the headers. Re-check it on a schedule and alert on difference. Hourly is reasonable for a busy site, daily is defensible for a small one. The point is that a changed script or a missing iframe is noticed in hours, not when an acquirer rings you.

Run Content Security Policy in report-only first, collect violations for a fortnight through real traffic including 3-D Secure challenges, then enforce. Pin frame-src to the payment provider. Restrict form-action to your own endpoints and the provider’s. Be aware of the limit: form-action governs where a form posts, not a script that navigates the browser, and the proposed navigate-to directive was dropped and never shipped. A working checkout CSP is a control. An untested one is a header.

Subresource Integrity is worth pinning on whatever third-party scripts remain, with the honest caveat: when a supplier rotates their file without notice, the hash fails and the script stops loading. Decide before you deploy who gets the alert and who re-hashes. SRI also does nothing for a tag manager that fetches further scripts at runtime.

Treat outside signals as evidence. Issuer fraud reports, acquirer alerts, and customers saying a card was used only on your site. Those arrive before most internal alarms do.

Choosing between hosted payment fields and a redirect

A redirect is the honest answer when the platform is unpatched or past end of life, when nobody in the business owns the checkout code, when the catalogue is small, or when there is no capacity to monitor the page. Taking the handover off your estate entirely is the right call in those cases, and nobody should feel bad about it.

Hosted fields earn their place when your script estate is short and justified, CSP is enforced, change detection is already running against the rendered page, and conversion is a real commercial pressure. The conditions are the point. Hosted fields on a checkout carrying eleven marketing tags and no monitoring are a conversion decision dressed up as a security one.

Either way, three things in the next fortnight: list every script on the checkout and delete the ones nobody can justify, put CSP into report-only with frame-src and form-action drafted, and set up a scheduled comparison of the rendered page against a known-good baseline. If you suspect something is already wrong, work through the checks for a skimmed checkout before changing anything, because a redeploy destroys the evidence. Penalties from the Information Commissioner’s Office in both 2018 cases turned on security practice, not on which integration was configured.

The short version

  • Hosted fields stop a page-level skimmer reading the card number. A redirect means the number never touches your estate.
  • Both leave name, address, email and phone in your DOM, which is still a reportable breach.
  • PCI DSS v4.x requirements 6.4.3 and 11.6.1 became mandatory on 31 March 2025 and apply to the page that loads the payment form, in both models.
  • Hosted fields are beaten by a fake form overlay. Redirects are beaten by a rewritten destination. Platform compromise beats both.
  • CSP with frame-src and form-action locked down, plus change detection on the rendered checkout, is what turns either model into a control.

Frequently Asked Questions

Is a redirect safer than hosted payment fields against card skimming?

Against a skimmer injected into your own page, yes, marginally: the card is never typed on your domain, so there is nothing to intercept. The trade is a different failure mode, where an attacker with template or file access changes the destination and sends shoppers to a lookalike page. Neither model protects the personal data still collected on your side.

Do hosted payment fields keep me on SAQ A under PCI DSS 4.0?

They can. PCI DSS v4.x extended SAQ A eligibility to merchants embedding provider iframes, with conditions attached, and the January 2025 SAQ A revision added a criterion about the site not being susceptible to script-based attacks. Confirm the current SAQ version with your acquirer rather than assuming last year’s answer still holds.

Do PCI DSS 6.4.3 and 11.6.1 still apply if I use a redirect?

They apply to pages that affect the security of the payment transaction, and in a redirect model that includes the page which sets the destination and hands the shopper over. If your pre-redirect page collects no cardholder data and loads nothing you have not authorised, the work is small. It is not zero.

Can a skimmer steal card details from a payment provider iframe?

Not by reading inside it: the same-origin policy prevents that. The practical attack is to hide or remove the real frame, draw a replica in your own page, capture what the shopper types, then stage an error and restore the genuine form so the order completes normally. Detecting that needs monitoring of the rendered checkout, not just of files on the server.

Does moving to hosted payment fields hurt checkout conversion?

Hosted fields are usually the better of the two for conversion, because the shopper stays on your page. Expect some friction from styling limits, mobile keyboard behaviour and autofill, and treat provider-published uplift figures as marketing until you have measured your own. Run the change as a test with the old flow available to fall back to.