Before you launch or pay for traffic
Secure payment forms best practices: card fields
The padlock tells your buyer the connection is encrypted, and nothing about the scripts running beside the card box. A first-time buyer on a phone meets those scripts cold, and a simulated visitor can show you where the card step breaks.
What are the best practices for a secure payment form?
Serve every part of the checkout over HTTPS, including each script and image on the payment step. Let your payment provider serve the card number, expiry and security code in its own frame, or give your own fields the standard autocomplete names so a browser can recognize them. Keep card numbers out of your server logs, your URLs and your error messages. A simulated visitor shows whether the card fields appear on a phone and which request failed on that step, which is the step a padlock does not cover.
What this looks like in a report
“The card box is an empty space and the Pay button is gray. The address bar says the page is secure, but I cannot see where to type my card. Is this store taking cards at all?”
The fix. Load the card fields from the payment provider's frame, and remove any script on the payment step that the step does not need. Then check on a phone that the card box appears before the buyer has to wait or scroll.
An illustration. Run a test to see your own.See a real sample report
The padlock covers the page, not the scripts that read the card
A padlock in the address bar means the connection to the page is encrypted. It does not say who else runs code on that page. A checkout often loads a tag manager, a chat box and a discount script, and any of them can read a field you built yourself. A card box from your payment provider sits in a frame served from the provider's own address, so the digits never reach your page. A stranger on a phone meets the gap when that frame loads late, or when a blocked script leaves the space empty.
- The padlock shows on every step of the checkout, including the payment step itself.
- The card number, expiry and security code come from your provider, or carry autocomplete names.
- No image, script or stylesheet on the payment step loads from a plain http address.
- Each third-party script on the payment step is listed, and the step needs it.
- A declined card keeps the name and address filled in, with the message beside the card field.
Which card setup keeps the digits off your page
Three setups cover most stores, and they behave differently on a phone. In the first, your own inputs collect the number and post it to your server, so the digits pass through your code, your logs and every script on the page. In the second, the provider serves the card fields inside its own frame, and your page only receives a token that stands in for the card. The mixed setup breaks quietly: the provider's frame is on the page, but your own script also reads the number field before the frame gets it. Check which one you run by looking at where the number field is served from.
The wrong version is a field named cardNumber with no autocomplete value. A browser then cannot tell it is a card field, so autofill offers a shipping field or a saved login instead, and a buyer who expects their saved card gets nothing. The right version uses the autocomplete values cc-number, cc-exp and cc-csc, or the provider's own field. To confirm which one you have, open the field in the browser's developer tools on the payment step and read its attributes. A simulated visitor cannot pay with a real card, so the test cannot show a saved card being filled in.
What a phone buyer sees when the card frame loads late
On a phone the card frame is the last thing to load, after the page, the total and the scripts that run before it. If the frame is slow, the buyer sees an empty box, and then the fields appear, or nothing does. The buyer has typed an address, so an empty box looks like a fault. The simulated test shows this as a step: the visitor reaches the payment step, and the report gives a screenshot of it, with any failed or slow request on that step. An empty box on the screenshot points at the frame or a script that blocks it. Fields with a dead Pay button point somewhere else, such as validation or the total.
Keep card details out of URLs, logs and error text
A card number can leak after the payment step as well as inside the form. The wrong version is a redirect that carries the order total, the email or a partial card number in the address, where it stays in browser history, analytics and any link someone shares. The other wrong version is an error handler that writes the whole request body to a log, so every decline is saved with its digits. The right version sends only an order reference in the URL and logs the status code with that reference. After a decline, read the address bar and search your error log for the test number you used in staging, and make sure it is not there.
What you get with Mimiq
- 01
Run it by hand, or on every pull request
Paste a link and a task in the app and watch the visitors work. Or run them on every preview deploy: the GitHub Action comments on the pull request, any other CI can call the MCP endpoint, and your coding agent can run it too.
- 02
Bugs and usability problems in one report
The browser records errors and failed or slow requests on the step they happened. The visitors say where the wording or the steps confused them, and where they left.
- 03
Visitors that behave like your audience
Each visitor is a different profile with a reason to be there, matched to who the page is for, described by you, or built from your own customers.
- 04
A prompt to fix each problem
Every problem comes with a fix to paste into Cursor, Claude Code, Lovable or any coding agent, and one prompt hands over the top problems at once. Then send the same visitors through again.
- 05
Follow every visitor
See each visitor's whole path, step by step with screenshots, and what it was thinking at every step. Ask any visitor a question.
The browser records relevant JavaScript errors and failed or slow app requests encountered during the run, attached to the step where they occurred. The visitors are simulated: they find problems, they do not predict how many real people will convert.
A tag added next month can read the card field again
A store owner adds a review widget, an ad pixel or a new discount script, and the payment step changes without anyone opening it. Rerun the same first-time visitors up to the card fields after each change, and compare where they stopped with the last run. Mimiq can send the same visitors through again, so you see whether the step that loaded last week still loads today.
Starter
Try it on one launch
About 4 tests of 5 visitors
- Visitors on your landing page, signup and checkout
- Where they left and why, with a fix to copy for each problem
- Run it in the app or on every pull request
- Ask any visitor a question, included
- Test accounts and protected previews
Builder
Test every build
About 20 tests of 5 visitors
- Everything in Starter
- Credits refill each month, and what is left rolls over once
- Cancel anytime
Pro
Test every release, as a team
About 60 tests of 5 visitors
- Everything in Starter
- Credits refill each month, and what is left rolls over once
- Cancel anytime
Scale
Test at scale, every day
About 240 tests of 5 visitors
- Everything in Starter
- Credits refill each month, and what is left rolls over once
- Priority support
- Cancel anytime
Questions
Is a padlock enough to call a payment form secure?
No. The padlock shows that the connection is encrypted. It does not show which scripts run on the page, whether card digits are stored or logged, or whether a blocked script leaves the fields empty. Check the card fields and the scripts on the payment step as well as the padlock.
Can the test show that my payment form is secure?
No. It does not tell you whether encryption, storage or your provider's setup is sound, and it cannot pay with a real card, so it stops before any payment is sent. It shows whether the card fields appeared on the payment step, which request failed there and where a visitor stopped. Those are faults you can fix before a real buyer meets them.
Should I build my own card fields or use the provider's?
Use the provider's fields unless you have a specific reason and a security review in hand. The provider's fields keep the digits off your page and out of your code. Your own fields mean every script on the page can read the number, and you carry the work of protecting it. The test can show you the layout and the step, not how well the fields are protected.
Should I run the test on a phone or a laptop?
Run the payment step on a phone first. The on-screen keyboard can cover the card box, and a card frame that loads slowly on a phone can look broken when it is only late. A laptop run is still useful for the layout and the console, but it will not show the phone's failure.
Keep reading
Send visitors and see what breaks first.
Your first test is free: sign in with Google and it starts right away. Last checked 2026-11-02.