# Payment card

> Card numbers are long and copied from a small card, and every small obstacle here loses payments.

Area: Forms. Evidence behind the answer: Moderate. Last checked November 12, 2026.
Page: https://uxreference.com/forms/payment-card

## The answer

Take the card number in one field, with or without spaces, and work out the card type yourself.

- **Moderate.** Take the card number in one field, with or without spaces. (https://uxreference.com/forms/payment-card#rule-2)
- **Moderate.** Work out the card type from the number. Don’t ask for it. (https://uxreference.com/forms/payment-card#rule-5)

## The problem

Card details are long numbers copied from a small object, and small obstacles here cost completed payments.

## How to decide

None. The sources do not describe more than one correct practice that depends on context.

## Every rule

Each rule has a grade: Settled (required by WCAG AA or law, or replicated research), Strong, Moderate, Weak, or Unsettled (use the stated default until the evidence settles).

#### Rule 1. Settled, WCAG AA

Mark fields for the person's own card with the standard card tokens.

- Applies when: The person is entering their own details.
- Based on: Standard or law
- Depends on: Whose details they enter
- Principle: Work for everyone

Why: WCAG 2.2 level AA (1.3.5).

Sources: wcag22-1.3.5; [Payment forms (Learn Forms)](https://web.dev/learn/forms/payment)

Link: https://uxreference.com/forms/payment-card#rule-1

#### Rule 2. Moderate

Take the card number in one field and accept it with or without spaces.

- Applies when: Always.
- Based on: Practitioner research
- Principle: Prevent errors

Why: Baymard reports errors where spaces are refused, without participant numbers; GOV.UK, Stripe and Google agree. Rated 3.

Sources: [The credit card number field must allow and auto-format spaces](https://baymard.com/blog/credit-card-field-auto-format-spaces); [Ask users for payment card details (GOV.UK Design System pattern)](https://design-system.service.gov.uk/patterns/payment-card-details/); [Credit card checkout UI design - what to include, what to skip](https://stripe.com/en-bg/resources/more/credit-card-checkout-ui-design); [Payment forms (Learn Forms)](https://web.dev/learn/forms/payment)

Link: https://uxreference.com/forms/payment-card#rule-2

#### Rule 3. Moderate

Ask for a numeric keyboard on the number and security code fields.

- Applies when: On small touch screens.
- Based on: Convention
- Depends on: Device and screen
- Principle: Let practiced people go faster

Why: Four sources agree. Rated 3.

Sources: [Ask users for payment card details (GOV.UK Design System pattern)](https://design-system.service.gov.uk/patterns/payment-card-details/); [Payment forms (Learn Forms)](https://web.dev/learn/forms/payment); [Credit card checkout UI design - what to include, what to skip](https://stripe.com/en-bg/resources/more/credit-card-checkout-ui-design); [Credit card form UX (L.L.Bean as best-in-class example)](https://baymard.com/blog/credit-card-form-ux-llbean)

Link: https://uxreference.com/forms/payment-card#rule-3

#### Rule 4. Moderate

Take the expiry date as month and year in the form printed on the card.

- Applies when: Always.
- Based on: Practitioner research
- Principle: Make controls match their effects

Why: Baymard's testing and GOV.UK; matches [Entering a date, rule 11](https://uxreference.com/forms/date-input#rule-11). Rated 3.

Sources: [Format the Expiration Date fields exactly the same as the physical credit card](https://baymard.com/blog/how-to-format-expiration-date-fields); [Ask users for payment card details (GOV.UK Design System pattern)](https://design-system.service.gov.uk/patterns/payment-card-details/)

Link: https://uxreference.com/forms/payment-card#rule-4

#### Rule 5. Moderate

Work out the card type from the number. Do not ask the person to choose it.

- Applies when: Always.
- Based on: Convention
- Principle: Leave out what is not needed

Why: Three sources agree. Rated 3.

Sources: [Credit card form UX (L.L.Bean as best-in-class example)](https://baymard.com/blog/credit-card-form-ux-llbean); [Credit card checkout UI design - what to include, what to skip](https://stripe.com/en-bg/resources/more/credit-card-checkout-ui-design); [Ask users for payment card details (GOV.UK Design System pattern)](https://design-system.service.gov.uk/patterns/payment-card-details/)

Link: https://uxreference.com/forms/payment-card#rule-5

#### Rule 6. Moderate

Check the card number's built-in checksum and say at once when it fails.

- Applies when: Always.
- Based on: Convention
- Principle: Prevent errors

Why: Baymard and Stripe. Rated 3.

Sources: [Credit card form UX (L.L.Bean as best-in-class example)](https://baymard.com/blog/credit-card-form-ux-llbean); [Credit card checkout UI design - what to include, what to skip](https://stripe.com/en-bg/resources/more/credit-card-checkout-ui-design)

Link: https://uxreference.com/forms/payment-card#rule-6

#### Rule 7. Weak

Ask for the fields in the order they appear on the card.

- Applies when: Always.
- Based on: Convention
- Principle: Make controls match their effects

Why: GOV.UK and Baymard; Stripe prescribes no order. Rated 2.

Sources: [Ask users for payment card details (GOV.UK Design System pattern)](https://design-system.service.gov.uk/patterns/payment-card-details/); [Credit card form UX (L.L.Bean as best-in-class example)](https://baymard.com/blog/credit-card-form-ux-llbean)

Link: https://uxreference.com/forms/payment-card#rule-7

#### Rule 8. Weak

Keep the card details when an error elsewhere on the page sends the person back.

- Applies when: A submit was rejected.
- Based on: Practitioner research
- Principle: Keep people in control

Why: One practitioner source. Rated 2.

Sources: [Preserve credit card details when a validation error occurs](https://baymard.com/blog/preserve-card-details-on-error)

Link: https://uxreference.com/forms/payment-card#rule-8

#### Rule 9. Unsettled

Whether to ask for the name on the card is unsettled.

Until the evidence settles, use this default: Ask for it only if the payment processor requires it.

- Applies when: Always.
- Based on: Practitioner research
- Principle: Leave out what is not needed

Why: Baymard says it can be dropped; GOV.UK says do not assume it matches a name given elsewhere. Rated 1.

Sources: [Credit card form UX (L.L.Bean as best-in-class example)](https://baymard.com/blog/credit-card-form-ux-llbean); [Ask users for payment card details (GOV.UK Design System pattern)](https://design-system.service.gov.uk/patterns/payment-card-details/)

Link: https://uxreference.com/forms/payment-card#rule-9

#### Rule 10. Unsettled

Whether to move focus to the next field automatically when one is complete is unsettled.

Until the evidence settles, use this default: Do not move focus automatically.

- Applies when: Always.
- Based on: Convention
- Principle: Keep people in control

Why: One vendor recommends it without evidence; WCAG allows it only when people are told first, and government systems forbid it for dates. Rated 1.

Sources: [Credit card checkout UI design - what to include, what to skip](https://stripe.com/en-bg/resources/more/credit-card-checkout-ui-design); [Understanding SC 3.2.2 On Input (Level A)](https://www.w3.org/WAI/WCAG22/Understanding/on-input.html)

Link: https://uxreference.com/forms/payment-card#rule-10

## Accessibility requirements

- WCAG 2.2, 1.3.5 Identify Input Purpose (AA). (https://www.w3.org/WAI/WCAG22/Understanding/identify-input-purpose.html)
- WCAG 2.2, 3.2.2 On Input (A) for automatic focus moves. (https://www.w3.org/WAI/WCAG22/Understanding/on-input.html)
- WCAG 2.2, 3.3.4 Error Prevention (AA): a payment needs a chance to review or correct before it is final (see [Confirming vs undoing a destructive action](https://uxreference.com/deleting/confirm-vs-undo)). (https://www.w3.org/WAI/WCAG22/Understanding/error-prevention-legal-financial-data.html)

## Common mistakes

- Rejecting a card number typed with spaces ([rule 2](https://uxreference.com/forms/payment-card#rule-2)).
- A drop-down asking for the card type ([rule 5](https://uxreference.com/forms/payment-card#rule-5)).

## Still open

- Nearly all behavioral evidence is one firm's qualitative testing with unstated samples. No systematic review or published online experiment on card fields was found.
- Name field ([rule 9](https://uxreference.com/forms/payment-card#rule-9)) and automatic focus moves ([rule 10](https://uxreference.com/forms/payment-card#rule-10)).

## Related problems

- [Input masks and formatting as you type](https://uxreference.com/forms/input-masks): Accept the separators people type and clean them up yourself, and show the expected shape outside the field.
- [Autofill and identifying input purpose](https://uxreference.com/forms/autofill): Mark each field with what it is for, and never block autofill, pasting or password managers.
- [Entering a date](https://uxreference.com/forms/date-input): Let people type a date they know. Show a calendar only when they are choosing one, and still let them type.
- [Checkout steps](https://uxreference.com/shopping/checkout-steps): Before the order is placed, show what is being bought and the total, with a review where each part can be changed.

## Sources

- wcag22-1.3.5. n.d..
- [Payment forms (Learn Forms)](https://web.dev/learn/forms/payment). web.dev (Google), n.d., platform vendor guidance (expert opinion).
- [The credit card number field must allow and auto-format spaces](https://baymard.com/blog/credit-card-field-auto-format-spaces). Lars Soderlund, Baymard Institute, 2025, large-scale qualitative checkout testing plus benchmark (existing record in sources.yaml).
- [Ask users for payment card details (GOV.UK Design System pattern)](https://design-system.service.gov.uk/patterns/payment-card-details/). GOV.UK Design System / GOV.UK Pay team, n.d., pattern documentation backed by the team's stated quarterly user research on live GOV.UK Pay.
- [Credit card checkout UI design - what to include, what to skip](https://stripe.com/en-bg/resources/more/credit-card-checkout-ui-design). Stripe, 2025, company guidance (no experiments cited).
- [Credit card form UX (L.L.Bean as best-in-class example)](https://baymard.com/blog/credit-card-form-ux-llbean). Baymard Institute, 2020, large-scale qualitative checkout testing, manual benchmark audit of 600 card-form parameters across 60 sites, and a 4,560-person survey.
- [Format the Expiration Date fields exactly the same as the physical credit card](https://baymard.com/blog/how-to-format-expiration-date-fields). Iva Olah, Baymard Institute, 2023, qualitative checkout testing plus benchmark (existing record in sources.yaml).
- [Preserve credit card details when a validation error occurs](https://baymard.com/blog/preserve-card-details-on-error). Sonia Sousa, Baymard Institute, 2024, large-scale qualitative checkout usability testing plus site benchmark.
- [Understanding SC 3.2.2 On Input (Level A)](https://www.w3.org/WAI/WCAG22/Understanding/on-input.html). W3C WAI, n.d., normative standard.

---
From Solved Problems in UX by Athen Pellicci, an evidence-graded reference of web interface problems. CC BY 4.0. https://uxreference.com/
