A useful checkout checklist names an input, the observation it should produce and the layer responsible for it. “Test validation” is too vague: stripping a letter, losing a leading zero or treating an unavailable AVS check as a pass can all hide behind a green check mark.

Run the shared baseline first

Download the data-tool test project , extract it and run:

node --test data-tools.test.mjs
node fixture-demo.mjs > fixture.json

Use Node.js 22 or later. There are no package installs, credentials or network calls. data-tool-cases.json contains fixed inputs and expected states; the test file also exercises generators and export boundaries. For detailed card-number profile vectors, the card validator provides its companion validation bundle.

The following test loops read the downloadable cases rather than repeating values in prose and executable code independently:

for (const row of cases.iban) test('IBAN: ' + row.id, () => assert.equal(inspectIban(row.input, ibans).status, row.expected));
for (const row of cases.securityCodes) test('CVV: ' + row.id, () => assert.equal(inspectSecurityCode(row.value, row.length), row.valid));
for (const row of cases.avs) test('AVS: ' + row.id, () => assert.deepEqual(describeAvs(row.response), row.expected));
for (const row of cases.expiry) test('expiry: ' + row.id, () => assert.equal(expiryState(row.month, row.year, row.date), row.expected));

Input, result and policy are separate

Test input or interactionExpected observationShared check or tool
Prefix 00-1234Normalized prefix is the string 001234prefixBatch; prefix generator
Prefix 51x or pasted line breakCharacter error, not repaired to 51Prefix rejection cases
Generate on 4, edit to 51, export without regeneratingOld batch retains prefix: "4"Snapshot test and browser check
Current-month expiry 11/2026, reference 2026-11-30Current-or-futureexpiryState fixed cases
Previous month 10/2026, same referenceExpiredexpiryState fixed cases
"003" at width 3, then switch to width 4Pass, then fail without paddingsecurity-code fixtures
AVS line pass, postcode failTwo distinct observationsdescribeAvs cases
Missing AVS fieldsunknown, not approvalMissing-response case
German IBAN containing a letter but passing MOD-97BBAN errorIBAN format tool
19-digit card number and leading-zero code in CSVExact text preserved in the fileExport test; import columns as text

For card fields, check normalization, possible network, supported length and checksum separately. An incomplete or unknown prefix is not proof of an invalid account. A checksum failure is not, by itself, a universal instruction to block or allow submission. After the observation tests pass, add tests for your chosen form and provider policy: what message appears, whether submission is enabled and where the error is returned.

Address and AVS checks

The identity fixture tool labels addresses as format-only and omits phones where its profile lacks verified examples. Test empty phone, Unicode names and postcodes such as 0800 and 01067 without numeric conversion. A local street/postcode pair does not establish deliverability or an issuer billing match.

Keep pass, fail, unavailable, unchecked and unknown separate in response-handling tests. Then test the merchant decision that consumes them. A provider’s AVS result and its authorization result can be distinct. Use your sandbox’s documented response controls; a generated address cannot force a real AVS match.

Browser checks the unit suite cannot prove

Use a narrow viewport and keyboard navigation for each of these observations:

  • The first useful control appears without several screens of introductory prose. Controls and copy buttons have at least a 44-pixel target in these tools.
  • Every input has a persistent label. Error and result text is announced without depending on color alone.
  • Invalid text remains available to correct; moving between fields does not erase it silently.
  • Long result strings wrap inside their container. JSON/CSV previews scroll internally without widening the page.
  • Clipboard success is reported only after the clipboard call succeeds; a denial gives a manual-copy instruction.
  • A settings edit does not change the metadata attached to an older result set.
  • The card preview retains full long and RTL names, uses Amex/Diners grouping and exports the chosen side with its watermark.

Also test browser zoom, focus visibility, screen-reader order and your supported touch keyboards. A desktop screenshot and a unit test do not establish those behaviors across devices.

Provider flows need different fixtures

Use the sandbox test-card reference for approvals, declines, retries and authentication. Test cancellation, timeouts and a duplicate submit without assuming a locally valid number implies an approved transaction. Keep provider calls out of the offline suite so a networking failure does not look like a failed formatter.

For longer-running datasets, the test-data management guide supplies the replay manifest and versioning workflow. Record the bundle version, reference date and expected result with a failing case; a bare random number is not enough to reproduce the problem.

Updated 8 November 2026: the checklist now uses shared executable cases and no longer prescribes universal acceptance rules for Luhn failures or unknown prefixes.

Frequently Asked Questions

Should a Luhn failure always block checkout?
That is an application and provider policy decision. First report the checksum result accurately, then test the intended submission policy separately. The example suite does not impose one universal rule.
Should pasted letters simply be removed?
This suite removes only documented spaces and hyphens. Letters, line breaks and non-ASCII digits produce a character error, so malformed input is not silently changed into a different value.
Does an unknown card prefix mean a payment must fail?
It means the local profile has no definite candidate. Provider support, issuer status and merchant policy are different questions. Test their outcomes in the appropriate layer.
What still needs a real browser or sandbox?
Focus, screen-reader announcements, clipboard behavior, downloads, responsive rendering and font layout need browser checks. Authorization, declines, AVS integration and 3-D Secure need the provider sandbox.