Kivel
← Blog

Credit card generators for testing: what the output means

Create clearly labeled credit-card fixtures for checkout tests. Understand sandbox numbers, sample CVCs, PaymentMethod identifiers, and checksum limits.

Generate a fixture, not an account

A credit card generator is useful when you are building a payment form, writing a test, or checking how a card summary looks. Its output should be recognizable as test data, with no real customer information mixed in.

The default mode creates unique synthetic numbers, names, expiry pairs and CVVs. Seven brands cover different prefixes, lengths and number grouping. Optional sample billing addresses include a country. These are fake records for forms and fixtures, not usable payment cards.

Pick a brand and generate

Choose one to 50 generated records across Visa, Mastercard, American Express, Discover, JCB, Diners Club and UnionPay. Expiry years are one to five calendar years ahead. Every number, name, expiry pair and CVV in a generated batch is different.

The preview groups the number for its brand and shows a name, expiry and CVV. Copy individual fields or export all records as JSON or CSV. Browser generation runs on your device.

Use the right fixture in automated tests

Select Payment sandbox numbers when exercising a payment processor. Choose Stripe, Adyen, Braintree or PayPal and use only that provider’s documented test values. Stripe fixtures also include their PaymentMethod identifier for API test code. Generated numbers do not promise sandbox acceptance.

You can also generate the same structured output through the Kivel API. Hosted generation uses the normal tool allowance. The response output is JSON text; parse it once before reading the cards array.

Generate two credit-card fixtures
curl https://kivel.io/api/tools/developer-credit-card-generator/run \
  -H 'Content-Type: application/json' \
  -d '{"options":{"brand":"visa","count":"2"}}'

Check the interface as well as the request

Verify that your form accepts the intended number length, displays the right brand, keeps the expiry readable, and handles the different CVC length on an American Express fixture. Check keyboard entry, validation messages, and narrow layouts.

Generated fixtures cover your interface, not a payment outcome. For declines or authentication challenges, choose the corresponding fixture from your provider’s documentation. A random number that passes Luhn does not select a particular payment outcome.

Keep the boundaries visible

All records are labeled testOnly. Sandbox records name the provider and link its documentation. The available distinct official numbers limit sandbox batch size; the tool never fabricates a provider test number.

Use separate fixture IDs in your own test records when uniqueness matters. Do not use a card number as an application record key, and do not put real customer card data into a general-purpose developer tool.

Sources