Skip to content
Tutorials Center
My learning

Topics

Lesson 14 of 40 ยท Cart and Checkout

Checkout Flow and Conversion

Design a checkout that converts. Compare one-page and multi-step flows, guest checkout, address validation, express wallets, form errors and accessibility.

Checkout is where a shop earns its money and where it loses most of its shoppers. Every extra field, surprise cost or confusing error message sends a few percent of buyers away. Because the shopper has already chosen products, those losses are the most expensive ones in the whole funnel.

This lesson covers the structure of a checkout, which decisions affect conversion, and how to build the form so that it is fast, accessible and hard to break. The cart that feeds it is described in Designing the Cart; the payment itself is explained in How Online Payments Work.

What checkout has to collect

Whatever the layout, a checkout gathers the same information in roughly this order:

  1. Contact: an email address (and often a phone number for the carrier).
  2. Shipping address: only when the cart contains physical goods.
  3. Shipping method: options and prices depend on the address and cart weight.
  4. Billing address and payment: the payment method, plus a billing address if the method needs one.
  5. Review and place order: a final summary with totals, taxes and policies.

The order matters because later steps depend on earlier ones. Shipping rates need an address (Shipping Methods and Rates), taxes need the destination (Sales Tax, VAT and GST), and the final total needs both.

flowchart LR
    A["Cart"] --> B["Contact"]
    B --> C["Shipping address"]
    C --> D["Shipping method"]
    D --> E["Payment"]
    E --> F["Review and place order"]
    F --> G["Order confirmed"]

The usual checkout sequence. Each step produces data the next one needs.

One page or several steps?

Neither layout wins everywhere. Test with your own shoppers.

One-page checkout Multi-step checkout
Feel Everything visible, no waiting between steps Small, focused chunks
Risk Looks long on phones More page loads, easy to get lost
Best for Few fields, simple shipping Complex rules, B2B, many options
Implementation One screen that updates totals as inputs change A progress indicator and per-step validation

Whichever you choose, keep these constants:

  • Show the order summary and the total on every step.
  • Let the shopper go back without losing data.
  • Show the full cost, including shipping and tax, as early as you can. Surprise costs at the last step are the most common reason for abandonment.
  • Keep one primary action per screen.

Guest checkout and accounts

Forcing account creation before payment reduces conversions. Offer guest checkout first, and offer an account afterwards ("Save your details for next time?") on the confirmation page, where you already know the email and address. Creating the account from an existing order is easy: all the data is already there.

Other ways to cut friction:

  • Remember returning customers' addresses and let them choose from a saved list.
  • Offer sign-in with a passwordless email link or a passkey rather than a long registration form.
  • Do not ask for a password confirmation field, and let people reveal the password they type.

Addresses

Addresses are harder than they look. Countries disagree about what an address is.

  • Do not assume "state", "zip" or a house number. The label and whether the field is required depend on the country.
  • Choose the country first, then show the fields for it.
  • Do not reject names or streets with apostrophes, accents, hyphens or non-Latin letters.
  • Phone numbers vary widely. Accept spaces and punctuation, then normalize to E.164 (+14155550123) before storing.
  • Validate in layers: format checks in the browser for fast feedback, rules on the server for security and correctness, and optionally an address-verification or autocomplete service that suggests corrections without forcing them.

More on formats is in Currencies and Localization.

Shipping and payment steps

When the shipping address changes, recalculate options and totals from the server and update the summary. Do not let the browser compute shipping on its own.

For payment, aim to keep sensitive card entry inside your payment provider's components, which keeps your own pages out of the heaviest compliance scope (see PCI DSS Scope and 3-D Secure). Show only the payment methods that apply to the shopper's country and currency, with the most likely choice first.

Express checkout wallets

Wallet buttons such as Apple Pay, Google Pay and PayPal let a shopper pay with details already stored on their device or account: name, email, shipping address and payment method arrive in one tap. They are most useful on product and cart pages and on mobile. Points to remember:

  • The wallet returns an address, so you still need to compute shipping and tax for it and let the wallet sheet update the total.
  • Guest data from a wallet should create the same kind of order as a normal checkout.
  • Keep the normal form available. Not every shopper has a wallet, and some countries or products are not supported.

Form errors that help

Validation is about helping the shopper finish, not scolding them.

  • Validate when a field loses focus, not on every keystroke. Showing "invalid email" after the first typed letter is irritating.
  • Put the message next to the field, in plain language: "Enter an email like [email protected]", not "Invalid input".
  • Keep what the shopper typed. Never clear a form after an error.
  • After a failed submit, move focus to the first invalid field or to an error summary.
  • Never rely on color alone to show an error.

Here is a small validator that returns errors keyed by field, using the same shape a server could return. Try changing the input values:

JS Validating a checkout form

Press Run (or Ctrl + Enter) to see the console output here.

No output.

This is the browser-side layer only. The server must run the same rules (and more) again, because anything in the browser can be bypassed.

Accessibility

An inaccessible checkout excludes real customers and, in many regions, creates legal risk (GDPR, Consumer Law and Accessibility). The basics cost little:

  • Every input has a visible <label> connected with for/id. Placeholders are not labels.
  • Use the right type and autocomplete values (email, tel, given-name, street-address, postal-code, cc-number) so browsers and password managers can fill the form.
  • Errors are announced: put them in an element referenced by aria-describedby, mark the input aria-invalid="true", and use an aria-live region for summaries.
  • Everything works with a keyboard, with a visible focus outline and a logical tab order.
  • Touch targets are large enough for a thumb and text meets contrast requirements.

Performance matters at checkout

Slow pages cost sales. Keep checkout light:

  • Load third-party scripts (chat, A/B tools, trackers) sparingly. Many shops remove them entirely from the payment step.
  • Do not block the page on network calls. Calculate shipping with a visible loading state and disable the submit button while a request is in flight.
  • Prevent double submission: disable the button, and make the order creation call idempotent (Idempotency and Reliable Payments).
  • Preload the payment provider's script when the shopper reaches the cart.

Measuring a checkout

Even small changes in per-step completion compound. If each of five steps keeps 90% of shoppers, only about 59% finish. This helper shows how a funnel multiplies:

JS How step drop-off compounds

Press Run (or Ctrl + Enter) to see the console output here.

No output.

You can collect the per-step numbers with the events described in Analytics, Funnels and Metrics.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Why should the country be chosen before the other address fields?

    Postal code rules, state or province fields and phone formats differ by country, so the form should adapt after the country is known.
  2. 2. What is the best way to handle account creation in checkout?

    Guest checkout removes friction. After the order you already have the email and address, so creating an account is a single step.
  3. 3. A validation error occurs on submit. Which behavior is best?

    Keeping data, explaining the fix in words and managing focus helps everyone, including keyboard and screen reader users.
  4. 4. Browser-side validation passes. Does the server still need to validate?

    Client validation is for speed and usability. Security and data integrity depend on server-side validation.

Summary

  • Checkout gathers contact, address, shipping method, payment and a final review, in that dependency order.
  • One-page and multi-step layouts both work; always show the summary and total, and avoid late surprise costs.
  • Offer guest checkout first and account creation after the order.
  • Treat addresses as country-specific; validate in the browser for speed and on the server for truth.
  • Use wallets as a shortcut, not a replacement for the form.
  • Write helpful errors, support keyboards and screen readers, and keep the page fast.
  • Small improvements per step multiply across the funnel.

Next, track what happens after the shopper clicks "Place order": The Order Lifecycle and State Machines.