EveryRole

How to test checkout without paying

Test checkout without paying: walk to the payment step on the live site, check the plan and the total, never press Pay. And where test mode fits.

You can test checkout without paying by splitting it in two. On the live site, walk as far as the payment step, check that it names the right plan and the right total, and stop. The payment itself you test somewhere else: in your payment provider’s test mode, with a test card, on a test environment.

A lot of what breaks in a checkout breaks before the card is typed. So the first half, which costs nothing and is safe on production, catches more than people expect.

Four steps of a checkout test: open the plans, press one plan's button, check the payment step, then a red line marked "the test stops here" above the Pay button
Everything above the line is safe on the live site. Below it, you need a test mode.

What breaks before anyone pays

Between “I want this plan” and a card field, four things have to go right:

  • The button has to be there, enabled, for a signed-in person and often for a signed-out one.
  • Pressing it has to make a checkout for that plan, with the current total.
  • The payment step has to load. It usually lives on your provider’s side, behind a key and a product id that somebody pasted into a settings file.
  • The person has to arrive there still signed in, or be sent to sign in and brought back to the same plan.

None of that needs a payment. All of it breaks: a product id from the test account left in production settings, a button that works for the admin who built it and sends everyone else to the login page, a yearly toggle that changes the number on the page and nothing else.

How to test checkout without paying, step by step

Use a test account, never your own. Then:

  1. Open the page that lists your plans. Write down each plan’s name and the total shown, exactly as the page says them.
  2. Press the first plan’s button.
  3. On the payment step, check three things. It names the plan you pressed. It shows the total you wrote down. It has a card field (or the provider’s payment form) and a pay button.
  4. Don’t press the pay button. Go back.
  5. Repeat for every plan, and for each billing period if you have a toggle.

That’s the whole test. With three plans it takes a few minutes by hand. The expected result is exact, which is what makes it a real test case: “the payment step says Team and shows the Team total”, never “checkout works”.

Two extra passes are worth the time. Do the walk signed out, because that is how a new customer arrives, and see whether the plan survives the sign-up in the middle. And do it at phone width, where the pay button has a habit of sitting under a cookie banner.

The wrong plan at checkout

Our practice app has a switch we use to test our own product. It is called wrong_plan. With it on, the button under the Team plan opens the payment step for Pro.

A diagram of a plan check, two rows. The button under Pro opens a payment step that says "Pay for Pro" and passes. The button under Team also opens "Pay for Pro" and is marked Broken
Drawn from our own test of the practice app with the wrong-plan switch on. Nothing errors. The only sign is one word on the payment step.

Look at what a weak test sees here. The button is clickable. The payment step loads with no error. There is a card field. A check for “the payment page opened” goes green on both rows, and that is a hollow pass: the test ran and proved nothing.

The real version of this bug is ordinary. Two buttons were copied from one, and the plan id was changed in only one of them. Or plans were renamed and the mapping wasn’t. The customer who wanted the bigger plan pays for the smaller one and writes to support a week later, confused about a missing feature.

So the check at the payment step is always a comparison: the name on this page against the name on the button that led here. Same for the total. If your payment step is hosted by the provider, the plan name is still on it, because you gave it to them when you made the product.

Where payment test mode comes in

The second half is the payment itself and what happens after: the confirmation page, the receipt email, the account that now has the paid features.

Every large payment provider has a test mode. It gives you a second set of keys and a list of test cards: card numbers that only work with those keys, one that always succeeds, others that are declined, expire, or ask for an extra confirmation. Nothing is charged. That is the honest way to test payments without being charged, and it is where the unhappy cards belong: a declined card should leave the person on the payment step with a message and their plan still chosen. Those are the edge cases of a payment.

What test mode can’t tell you is whether production is wired correctly. It uses other keys, other product ids, often another webhook address. A checkout can be perfect in test mode and broken on the live site because one live id is wrong. This is why you need both halves: test mode for the payment, the live walk for the wiring.

Some things we’d skip:

  • Paying with a real card and refunding. It works once. It also costs fees, shows up in your revenue numbers, and nobody does it after every deploy.
  • A coupon that brings the total to zero. It tests the coupon path, which is not the path your customers take, and a coupon code that makes everything free is a risk to have lying around.
  • Mocking the provider. A mock answers the way you told it to. The bugs here are in the settings you didn’t know were wrong.

The words a test must never click

If any of this is automated, the stop line can’t be a comment in the test. It has to be a rule the tool enforces: a list of words (Pay, Buy now, Place order, Subscribe) that are refused before the click happens, whatever the script says.

We learned to treat this as a list per app. One app’s final button says “Pay”, another says “Complete purchase”, a third says “Confirm” on a page that has two other harmless “Confirm” buttons. Read your own payment step and write down the exact words.

How EveryRole tests a checkout

EveryRole tests your app from the outside. When it finds a page with plans, each plan gets the walk above: its button pressed, and the payment step must name that plan and its total. It never pays. “Pay”, “Buy” and “Purchase” are on its never-click list from the start, next to “Delete”, and you add your own words. So when a plan’s button says “Buy”, it waits for your yes for that journey, and then walks it on your preview or staging deploys, not on production. A button with other words, like “Start free”, is checked everywhere.

The verdict comes from a comparison in code: the plan and total on the payment step against the plan whose button was pressed. No AI model decides whether a checkout “looks right”. In our own test suite, the wrong_plan switch has to turn that case to Broken, or our build fails.

If the plan check passes today and the payment step later starts naming something else, the result changes and you are asked about it. It doesn’t pass quietly.

What to do today

Open your live site in a private window, with a test account. Press every plan’s button and read the payment step. Compare the name and the total with the button you pressed.

If they all match, write the plan names and totals down. That list is your expected result, and the next time someone edits the plans it is the first thing to run again.

Keep reading

Test cases

Happy path vs edge cases: where the bugs are

The happy path is the one route through a feature where everything goes right. Test it first, then test five edge cases per step. Which five, and why those.

5 min read

Test cases

How to write test cases that catch real bugs

A test case is one input and one expected result at one stop. How to write test cases for a real form, and the three most teams leave out.

6 min read