Hosted Payment Page vs Embedded Checkout: Which to Choose
Payment Processing Fundamentals

Hosted Payment Page vs. Embedded Checkout: Which to Choose

Hosted payment page vs embedded checkout: compare redirect, hosted fields and API options on conversion, branding and PCI scope before you build.

Overhead view of hands highlighting mobile app wireframe sketches beside a smartphone, markers and a desktop monitor

Photo: Pixabay

On this page 7 sections
  1. Three Ways a Card Number Reaches Your Processor
  2. Hosted Payment Pages Hand the Whole Form to Your Gateway
  3. Hosted Fields and iFrames Keep Shoppers on Your Site
  4. Direct API Integration Puts Your Servers in Scope
  5. How Each Option Changes Your PCI Self-Assessment
  6. Redirect Checkout vs. On-Site Checkout: Where Conversion and Branding Differ
  7. Hosted Payment Page vs. Embedded Checkout for Your Type of Business

Key takeaways

  • "Embedded checkout" covers two different builds. Gateway-served iframes usually keep your PCI workload light. A form built by your own JavaScript usually puts your website in scope.
  • Redirect merchants still have a page to protect. An attacker who changes your "Pay" link can send shoppers to a fake form.
  • Before you pick a WooCommerce payment plugin, find out which collection method it uses. That tells you more about your PCI workload than its feature list.
  • Agencies should write script inventory and checkout-page change monitoring into client maintenance contracts. The merchant signs the compliance questionnaire, but the agency controls what loads on the page.

For most small online businesses, the choice of hosted payment page vs. embedded checkout depends on who will maintain the checkout page.

A hosted payment page sends the shopper to a page your gateway runs. It gives you the lightest PCI workload and the least design control. Embedded checkout built with hosted fields keeps the shopper on your site and can often qualify for a similarly short self-assessment, but you become responsible for every script that loads around those fields. A direct API integration has card numbers passing through your own servers. It belongs to companies with a security team and a budget for a full assessment.

Three Ways a Card Number Reaches Your Processor

Every online checkout raises the same question: whose code collects the card number? The answer drives your PCI paperwork, your design freedom and how much can go wrong.

The table shows the usual pattern. Your acquiring bank or processor decides which self-assessment questionnaire applies to you, so treat the last column as a general guide.

MethodWho renders the card fieldsCard data touches your server?Design controlTypical PCI workload
Hosted payment page (redirect)Gateway, on its own pageNoLow: logo, colors, some textLightest
Hosted fields (iframes)Gateway, inside your pageNoHighLight, if every payment field comes from the gateway's iframes
JavaScript or direct-post formYour pageNo, but your page builds or sends itHighMuch heavier: your website is in scope
Direct APIYour page and serverYesFullHeaviest: your systems are in scope

For a refresher on what the gateway does in each of these paths, see our explainer on how a payment gateway gets online payments approved.

Hosted Payment Pages Hand the Whole Form to Your Gateway

With a hosted payment page, the shopper builds a cart on your site and clicks "Pay." The browser then moves to a page on the gateway's domain. The shopper types the card details there, and the gateway sends them back to your confirmation page with an approved or declined result. Your systems never see the card number.

The advantages are practical. The gateway maintains the page and keeps its security current. It often adds features such as 3D Secure authentication and digital wallets without work on your end. Setup is often a matter of settings rather than code, which suits a store owner with no developer on call.

The drawbacks show up at the moment of payment. The address bar changes, and the design shifts from your brand to a template. A shopper who has never heard of you may hesitate on an unfamiliar domain. You also lose most of your ability to test or measure what happens on that page.

Hosted pages also carry a failure mode that catches merchants off guard. If the shopper pays and then closes the tab before the redirect back, your store may never record the order. Ask your gateway for a server-to-server notification, often called a webhook or silent post, so the order is created even when the browser never returns.

Redirect merchants still have one page to protect. The page that sends shoppers to the gateway is yours, and an attacker who alters that link can route customers to a convincing fake form. Keeping that page clean still matters.

Hosted Fields and iFrames Keep Shoppers on Your Site

Hosted fields place small iframes inside your own checkout form, one each for card number, expiration date and security code. An iframe is a window into another website. Your page looks like one form, but whatever the shopper types into those boxes goes straight to the gateway. The gateway returns a token, a stand-in value that represents the card. Your server then charges the token. Our guide to payment tokenization and how it cuts PCI scope covers the mechanics.

This approach has three main advantages:

  • Continuous branding. The shopper never leaves your domain, and you can style the fields to match.
  • Flexible layout. One-page checkouts and custom flows are possible.
  • Card-on-file support. The token can be saved for reorders and subscriptions.

The cost is development time and discipline. You have to follow the gateway's integration exactly.

This is where "embedded checkout" gets misunderstood. The term describes two very different builds. In one, the gateway serves every payment field inside its iframes. In the other, your own JavaScript draws the form, reads the card number, and posts it to the gateway from the shopper's browser. Both look the same to a shopper. The first usually qualifies for the lightest self-assessment. The second usually brings your website into PCI scope, which means a substantially longer questionnaire and more security work on your site.

Check Which Method Your WooCommerce Plugin Uses

WooCommerce payment plugins vary on this point. Some redirect to a hosted page, some use the gateway's iframe fields, and some use a direct-post or JavaScript method. The plugin's documentation, or a direct question to its developer, should tell you which method it uses and which level of PCI self-assessment it is designed for. Check that before you install it. Switching plugins after launch means retesting the whole checkout.

Direct API Integration Puts Your Servers in Scope

With a direct API integration, your checkout collects the raw card number, sends it to your server, and your server passes it to the gateway's API. You get total control over the form, the data and the flow.

You also take on the full weight of PCI DSS. That usually means the most extensive PCI assessment and the work behind it: secured and segmented systems, logging, access controls, vulnerability scanning and penetration testing. A breach on your servers is your breach.

Most merchants who think they need this are really after something narrower. They may want to own their tokens so they can route payments across multiple processors, or they may want a custom flow. Gateway tokens, third-party vaults and hosted fields can often deliver those goals without putting raw card data on your infrastructure. Choose direct API only when you have a specific requirement that nothing else meets and the staff to secure it.

How Each Option Changes Your PCI Self-Assessment

PCI DSS is the card industry's data security standard. The PCI Security Standards Council sets it, and your acquiring bank enforces it under the card networks' rules. It is not federal law. Smaller merchants usually prove compliance by completing a self-assessment questionnaire, and the questionnaire you file depends on how your checkout handles card data.

The dividing lines follow the table above:

  • All card entry happens on a PCI-compliant provider's page or inside its iframes. This is generally the shortest questionnaire, because you have outsourced card data handling.
  • Your website's code controls how card data reaches the processor, even though your servers never store it. Your web server becomes part of the security picture, so the questionnaire is much longer.
  • Card data passes through or is stored on your systems. This is the most extensive self-assessment, and larger merchants may need an outside assessor.

Your acquirer's compliance portal labels these questionnaires with letter codes. Match your setup against the eligibility section of the current questionnaire itself rather than a summary, because the Council revises its documents over time.

Scripts on the Payment Page Are the Weak Point

Web skimming attacks inject malicious code into checkout pages, often through a compromised third-party script, to copy card numbers as shoppers type. A rogue script can draw a fake card field over the real one, change where the "Pay" button sends shoppers, or record keystrokes elsewhere on the page. Iframe fields protect what happens inside the frame. They do not protect the page around it.

That is why scripts deserve attention whichever method you use. How the current standard and questionnaires treat scripts on e-commerce payment pages has been a moving target, especially for merchants who embed a provider's iframes. Read the current questionnaire on the PCI Security Standards Council website, or ask your acquirer, rather than relying on an older summary.

These habits are sound whatever you file:

  1. Open your checkout page and list every script that loads: analytics, chat widgets, tag managers, A/B testing tools.
  2. Remove anything that doesn't need to run on the payment step.
  3. Set a content security policy, a browser instruction that limits where scripts can load from.
  4. Use change or tamper monitoring, from your gateway or a dedicated vendor, so you learn about an altered page before customers do.

This is general information, not compliance or legal advice. Confirm your questionnaire type and obligations with your acquirer or a Qualified Security Assessor.

Redirect Checkout vs. On-Site Checkout: Where Conversion and Branding Differ

Vendors on both sides make strong conversion claims. In practice, the result depends on your brand and your build.

A redirect costs you the most when shoppers don't know you and the hosted page looks nothing like your store. It costs you the least when the hosted page loads fast, works well on mobile, and offers digital wallets. A poorly built embedded checkout can lose more sales than a clean redirect, especially if extra scripts slow down the payment step.

The biggest conversion levers usually sit elsewhere: forced account creation, too many form fields, confusing error messages and false declines. Our breakdown of average checkout conversion rate benchmarks covers those. Our companion piece on which checkout style converts better goes deeper on testing.

Subscriptions and memberships add a requirement of their own. You need to store a card for future charges, so confirm that your chosen method returns a reusable token and supports the network rules for saving customer cards on file. Many hosted pages can save cards, but not all of them can, and not all of them make it easy to move those tokens to a new processor later.

Hosted Payment Page vs. Embedded Checkout for Your Type of Business

These illustrative profiles show how the decision usually plays out. None of them describes a real merchant.

A WooCommerce store with no developer. Use a hosted payment page, or a plugin that uses the gateway's iframe fields with no customization. Fewer moving parts means fewer things to monitor.

A subscription box or membership site. Use hosted fields with tokenization, or a hosted page that saves cards. Before you sign, confirm that recurring billing, card updates and token portability work.

A web design agency building client stores. Standardize on the gateway's iframe fields. Write script inventory and checkout-page monitoring into your maintenance contracts. The merchant signs the compliance questionnaire, but your plugins and tags decide whether its answers are true. Scope creep often starts with a marketing tag added to the checkout page.

A growing brand with an in-house developer. Hosted fields give you design control with limited PCI scope. Keep direct API on the shelf unless you have a requirement nothing else meets.

Before you build, ask your gateway four questions:

  • Which integration methods do you support for my platform?
  • Which PCI self-assessment is each method designed to support?
  • Do you send server-side notifications for completed payments?
  • Can I export my stored tokens if I change processors?

The answers often make the decision for you.

Your next step is quick. Open your checkout page, list every script on it, and check which collection method your payment plugin uses. If the answers don't match the questionnaire you filed most recently, raise it with your provider now. MannyPay sets up online payment processing through payment gateways such as Authorize.net and NMI for most major carts. To review your current setup with a specialist, request a free quote.

About the author

Adrian Reyes

Adrian Reyes is Senior Payments & Fintech Editor for Beyond the Swipe, covering credit card processing, merchant accounts, payment technology and processing fees.

This article is for general educational purposes and is not legal, tax or financial advice. Card network rules and state laws change; confirm current requirements for your business.

Related reading