On this page
What this issue is
PCI-DSS is the security standard for anyone who takes card payments. When the card number, expiry and CVC are typed into plain <input> elements that belong to your page, any script on that page can read them. Your server may also receive them when the form is posted.
With a hosted field, the card input is an iframe served from the payment provider's domain. Your page never sees the digits. The provider returns a token (a one-time reference) that you use to charge the card. A hosted payment page goes further: the whole payment step is on the provider's site.
<form action="/pay" method="post">
<input name="card_number" autocomplete="cc-number">
<input name="exp" autocomplete="cc-exp">
<input name="cvc" autocomplete="cc-csc">
<button>Pay</button>
</form>Why it costs you leads or sales
The main cost is risk and compliance work. Skimming scripts (code injected by attackers to copy card details) target exactly this kind of form. A breach means card brand fines, forensic costs, lost trust and often a shut-down checkout.
There is a conversion cost too. Custom card forms often lack the provider's wallet buttons, card validation, autofill and 3D Secure handling, so more shoppers abandon. Payment providers can also refuse or review accounts that collect raw card data without proof of compliance.
Own page inputs
- Card digits typed into your page's inputs
- Any script on the page can read them
- Your server may receive and log them
- Larger PCI-DSS questionnaire and controls
Hosted field or hosted page
- Card digits typed into the provider's iframe or page
- Your scripts cannot read the field
- Your server only gets a token
- Smaller compliance scope
- Shopper types cardInto an input your page owns
- Your page and scriptsCan read the digits
- Your serverReceives and may log card data
- Payment providerFinally charges the card
A compromised script on your page can copy the card before the payment provider ever sees it.
How to check if your site has it
Open your checkout in a browser
Go to the payment step with a product in the cart. Do not enter a real card.
Right-click the card number field and choose Inspect
If the element sits inside an <iframe> whose src is on the provider's domain (for example js.stripe.com or a similar provider host), it is hosted. If it is a plain <input> in your page's HTML, it is not.
Check the form action and network calls
In DevTools, open the Network tab and submit a test. If the request to your own domain contains card_number, cvc or similar, your server is receiving card data.
Search your theme or code
Search for autocomplete="cc-number", name="card" or name="cvc" in templates and plugins.
How to fix it
Pick one of two routes. Hosted fields keep the shopper on your page with provider-served inputs. A hosted payment page redirects the shopper to the provider, which is the simplest and smallest scope. Either way, remove the old raw inputs and any server code that reads card values.
Use the gateway's official plugin
In WooCommerce go to WooCommerce > Settings > Payments and enable your provider's official gateway (for example Stripe or PayPal). Use its hosted or element-based checkout mode.
Remove custom card plugins
Deactivate and delete any plugin or theme template that renders its own card number input.
Use Shopify Payments or a supported gateway
Go to Settings > Payments. Shopify's checkout serves card fields in provider iframes, so do not add your own card inputs to theme files.
Remove custom card markup
Search theme code for cc-number or card inputs and delete them.
Use Webflow Ecommerce checkout or a provider embed
Do not build card fields with Form Block elements. Use Ecommerce checkout settings or the provider's hosted payment link or embed.
Use Wix Payments or a connected provider
Go to Settings > Accept Payments and connect a provider. Replace any custom form that collects card numbers with a payment link or checkout.
Use built-in Commerce checkout
Go to Commerce > Payments and connect Stripe, PayPal or Square. Do not collect card numbers in a Form Block or Code Block.
Mount the provider's hosted field
Replace each card input with the provider's element, for example Stripe Elements, and submit the returned token or payment method ID to your server.
Delete card handling on the server
Remove any code that reads, stores or logs card number, expiry or CVC.
const stripe = Stripe('pk_test_your_publishable_key');
const elements = stripe.elements();
const card = elements.create('card');
card.mount('#card-element');
document.querySelector('#pay').addEventListener('click', async () => {
const { paymentMethod, error } = await stripe.createPaymentMethod({
type: 'card',
card
});
if (!error) {
// send only paymentMethod.id to your server
}
});How to confirm it's fixed
- Inspect the card number field: it sits inside an iframe from the provider's domain, or the payment happens on the provider's page
- No <input> with cc-number, cc-exp or cc-csc autocomplete exists in your own HTML
- In the Network tab, requests to your domain contain a token or payment method ID, not card digits
- A test-mode payment with the provider's test card completes
- Server code and logs no longer reference card number or CVC fields
How to prevent it happening again
- Make hosted fields a rule for every new checkout, popup or landing page that takes payment
- Review theme, plugin and page-builder changes that touch payment steps before they go live
- Keep a list of every script on payment pages and who approved it
- Re-run the inspection check after any checkout redesign
- Confirm your PCI-DSS self-assessment type with your provider each year
How FunnelGuard handles this
This issue is outside what FunnelGuard checks. FunnelGuard runs robot visits through your funnels, such as forms and checkouts, and checks steps, tracking hits and lead delivery. It does not assess how card data is handled or judge PCI-DSS compliance, and it stops before payment unless a store's test mode is set up.
The kind of tool that fits is a PCI-DSS compliance and payment page security tool: your payment provider's self-assessment questionnaire and compliance portal, plus an approved scanning vendor or a code review for custom checkouts. FunnelGuard can still help once you have fixed this, by running your checkout journey on a schedule to confirm the flow keeps working.
Frequently asked questions
Questions people ask
Is it against PCI-DSS to put a card form on my own website?
It is not forbidden, but it puts your site fully in scope. You must meet far more PCI-DSS requirements for the page, scripts and servers that touch card data. Most small businesses avoid this by using hosted fields or a hosted payment page.
What is the difference between a hosted field and a hosted payment page?
A hosted field is an iframe from the payment provider shown inside your page, so the shopper stays on your site. A hosted payment page sends the shopper to the provider's own site to pay. Both keep card digits away from your code; the hosted page gives the smallest scope.
How do I know if my checkout uses hosted fields?
Right-click the card number field and choose Inspect. If it sits inside an iframe whose source is on the payment provider's domain, it is hosted. If it is a plain input in your page's HTML, your page handles the card data.
Does using Stripe Elements make me PCI compliant?
It greatly reduces your scope, but compliance is still your responsibility. You must complete the right self-assessment questionnaire and secure the page that loads the Elements script. Check the requirements with Stripe or your acquirer.
Can I keep my custom card form if I never store the numbers?
Not stored does not mean out of scope. If card data is typed into your page or passes through your server, that environment is still in PCI-DSS scope, even briefly. Hosted fields avoid this.
Will switching to hosted fields hurt my checkout design?
Usually not. Providers let you style the iframe fields to match your brand with fonts, colours and sizes. Hosted fields often improve conversion thanks to built-in validation, autofill and wallet options.
Can FunnelGuard tell me if my card form is not hosted?
No. This is outside what FunnelGuard checks. You need a PCI-DSS compliance or payment page security tool, or a manual inspection. FunnelGuard can run your checkout journey on a schedule to check the flow still works.