Interactive local test

Explore a test wallet

Two cards share the same last four digits. Change one card’s state or move the clock to see what should stay independent.

wallet-a VISA · •••• 6467

Expiry: 12/2026 · expires soon

State: active

wallet-b VISA · •••• 6467

Expiry: 01/2027 · expires soon

State: active

wallet-c AMEX · •••• 0005

Expiry: 11/2026 · expired

State: canceled

Synthetic display data with deliberately chosen IDs, lifecycle states and expiry dates. Not an issuing API schema.

Generate form inputs →

Inspect the current JSON
Enable JavaScript to inspect a changed state. The fixed cases and downloadable tests are documented below.

Three fixtures, three questions

This demo uses a fixed synthetic wallet rather than generating a new number every time. It lets you reproduce an identity collision, a lifecycle change and an expiry boundary in one place. No issuer request is sent, and a demo action does not freeze or cancel a real card. Use Generate form inputs above when you need fresh values from the full card generator.

FixtureStarting state at December 2026What to check
wallet-aActive; expires 12/2026; ends in 6467Freeze A without changing B; January makes A expired
wallet-bActive; expires 01/2027; also ends in 6467Keep its own ID, actions and expiry despite the same suffix
wallet-cCanceled; expired 11/2026No reactivation action; replacement is required in this model

Choose Freeze wallet-a, then change the test clock to January. A should remain inactive and become expired; B should stay active and expire soon. Cancel B and inspect the JSON: its lifecycle changes, but A and C keep their own states. Reset demo restores all three fixtures and the December clock. Changing the clock alone never resets lifecycle state.

Read the output as a view model

Copy wallet view (JSON) exports the selected clock and three masked records. Each record contains only id, network, last4, expiry, expiryState and lifecycle. There is no full number, security code or cardholder name in this output. The fixed source fixture contains synthetic input fields so the adapter’s allowlist can be tested; masking this view is not a claim that an entire payment application is compliant or never handles sensitive data.

The expires-soon rule includes the current and next calendar month. It is this demo’s explicit display rule, not a provider standard. inactive represents the local freeze state; active, inactive and canceled are fixture vocabulary, not a universal issuing API schema. Expiration is separate from lifecycle: an active card can still be expired.

Run the same model offline

Download the complete wallet and funding test project , extract it and run with Node.js 22 or later:

node --test virtual-wallet.test.mjs debit-funding.test.mjs

The browser imports the same payment-demo-core.mjs that these tests execute. The wallet checks cover suffix collisions, independent actions, canceled-state restrictions, December to January boundaries and the exact fields allowed into the exported view.

function toWalletCard(row, clock) {
  const monthsLeft = (Number(row.expirationYear) - clock.year) * 12 +
    Number(row.expirationMonth) - clock.month;
  // Allowlist fields: spreading row here would also copy the PAN and CVV.
  return {
    id: row.id,
    network: row.network,
    last4: row.number.slice(-4),
    expiry: `${row.expirationMonth}/${row.expirationYear}`,
    expiryState: monthsLeft < 0 ? 'expired' : monthsLeft <= 1 ? 'expires-soon' : 'current',
    lifecycle: row.lifecycle
  };
}

function setLifecycle(cards, id, next) {
  if (!['active', 'inactive', 'canceled'].includes(next)) throw new Error('Unknown state');
  if (!cards.some(card => card.id === id)) throw new Error('Unknown card');
  return cards.map(card => {
    if (card.id !== id) return card;
    if (card.lifecycle === 'canceled' && next !== 'canceled') throw new Error('Replace canceled card');
    return { ...card, lifecycle: next };
  });
}

Replace the adapter with your application’s view model to test your implementation. Keep the fixed inputs and expected results so that a later refactor cannot make the bug disappear by generating a different number. The browser stores changes only in memory; reloading or resetting discards them. A copied snapshot preserves your observation, not an issuer state.

Two defects this makes visible

Using last four digits as an identifier. A and B deliberately share 6467. A random batch may never expose that collision. Select, sort and reload your own wallet list using stable IDs, then check that actions still affect the intended record.

Keeping sensitive fields in a masked object. Spreading a source record and adding a masked label also retains its original fields. The allowlist above builds a new object. Its test inspects the exact keys and confirms that full source numbers are absent from the serialized view. Apply separate checks to request logs, persistence and error reporting.

For new display inputs, the main generator’s export contract uses expirationMonth and expirationYear. A single export is an object and a batch is an array; normalize that shape before adapting it. The bulk tool has a separate schema. IDs and lifecycle fields must be deliberately supplied by the test.

Where the issuing sandbox takes over

Real creation, spending controls, freeze requests and lifecycle webhooks require an issuing provider. Follow Stripe Issuing’s testing documentation or the equivalent for your integration. A real freeze can be pending, succeed or fail; this small local model starts from a confirmed state change and does not implement that asynchronous issuing workflow.

Use the funding demo to explore stale lookup responses and the tokenization guide for saved-method boundaries. For merchant approval and decline tests, choose a provider fixture in the homepage scenario selector.

Frequently Asked Questions

Does this page issue a real virtual card?
No. It displays a fixed synthetic wallet and changes local UI state. A usable virtual card requires an issuer and a supported account or card program.
Where do the fixture’s lifecycle and ID fields come from?
They are added explicitly by the test author. The generator’s status field is the warning Test card only; it is not an issuing lifecycle state.
Which expiry field names does the wallet adapter read?
It reads expirationMonth and expirationYear from the main generator schema. The bulk generator has a different schema and needs a different adapter. A single main-generator JSON export is an object; a batch is an array.
Does freezing a card in the example contact an issuer?
No. It changes an in-memory display model. Test real freeze requests, confirmations and failures with your issuing platform’s sandbox and its documented state contract.
Why use a fixed clock for the expiry checks?
The fixture needs to test the same current-month, next-month and expired cases every time it runs. Injecting a clock keeps those cases reproducible as the calendar changes.