# CardGenr

> Free developer tools for payment testing: Luhn-valid test credit card generation, official sandbox test card numbers for payment gateways, Luhn validation, BIN lookup across ~375,000 BIN ranges, and test IBANs. For building and testing payment software only; nothing on the site works for real purchases.

Key facts:

- Generated card numbers use real network prefixes and a correct Luhn check digit, but are not linked to any account and will not pass a real authorisation.
- Payment gateway sandboxes only accept the test numbers each gateway publishes. For sandbox payments, use the gateway test card pages below; generated numbers are for form validation, UI and seed data.
- Every gateway test card page lists only numbers from that gateway's official documentation, links to the source, and shows the date it was last verified.
- A free REST API (no key) and a remote MCP server expose the same tools.

## Tools

- [Credit card generator](https://cardgenr.com/): Luhn-valid test cards for Visa, Mastercard, Amex, Discover, Diners, JCB, UnionPay, Maestro, RuPay and Mir, with expiry, CVV, name and address.
- [VISA generator](https://cardgenr.com/credit-card-generator/visa): VISA test numbers plus the official VISA test cards of each gateway.
- [MasterCard generator](https://cardgenr.com/credit-card-generator/mastercard): MasterCard test numbers plus the official MasterCard test cards of each gateway.
- [American Express generator](https://cardgenr.com/credit-card-generator/amex): American Express test numbers plus the official American Express test cards of each gateway.
- [Discover generator](https://cardgenr.com/credit-card-generator/discover): Discover test numbers plus the official Discover test cards of each gateway.
- [Diners Club generator](https://cardgenr.com/credit-card-generator/diners): Diners Club test numbers plus the official Diners Club test cards of each gateway.
- [JCB generator](https://cardgenr.com/credit-card-generator/jcb): JCB test numbers plus the official JCB test cards of each gateway.
- [China UnionPay generator](https://cardgenr.com/credit-card-generator/unionpay): China UnionPay test numbers plus the official China UnionPay test cards of each gateway.
- [Maestro generator](https://cardgenr.com/credit-card-generator/maestro): Maestro test numbers plus the official Maestro test cards of each gateway.
- [RuPay generator](https://cardgenr.com/credit-card-generator/rupay): RuPay test numbers plus the official RuPay test cards of each gateway.
- [MIR generator](https://cardgenr.com/credit-card-generator/mir): MIR test numbers plus the official MIR test cards of each gateway.
- [Bulk generator](https://cardgenr.com/bulk-credit-card-generator): up to 1,000 cards as JSON, CSV, XML or pipe-delimited text.
- [Credit card validator](https://cardgenr.com/credit-card-validator): Luhn check plus network, length and MII detection.
- [BIN checker](https://cardgenr.com/credit-card-bin-checker): brand, type, level, issuing bank and country for the first 6-8 digits of a card.
- [IBAN generator](https://cardgenr.com/iban-generator): random test IBANs with valid MOD-97 check digits for 30 countries.

## Gateway test cards

- [All gateways](https://cardgenr.com/test-cards): one table with each gateway's default test card, expiry and CVV.
- [Stripe test cards](https://cardgenr.com/test-cards/stripe): The standard Stripe test card is 4242 4242 4242 4242 (Visa). Use any future expiry date such as 12/34 and any 3-digit CVC, and the payment succeeds in test mode. To test failures, use 4000 0000 0000 0002 for a generic decline or 4000 0000 0000 9995 for insufficient funds. For 3D Secure, 4000 0000 0000 3220 always requires authentication. (verified 2026-10-19)
- [PayPal test cards](https://cardgenr.com/test-cards/paypal): PayPal's sandbox accepts test cards such as 4012 8888 8888 1881 (Visa) and 3714 496353 98431 (Amex), with any future expiry date and a 3-digit CVV (4 for Amex). PayPal simulates declines through the cardholder name rather than separate numbers. Set the name to CCREJECT-REFUSED, CCREJECT-SF, CCREJECT-EC or CCREJECT-IF. (verified 2026-10-19)
- [Adyen test cards](https://cardgenr.com/test-cards/adyen): Adyen uses one canonical test card per scheme, such as 4111 1111 1111 1111 for Visa and 5555 5555 5555 4444 for Mastercard. On the Adyen test platform, use expiry 03/2030 and CVC 737 (CID 7373 for American Express). (verified 2026-10-19)
- [Braintree test cards](https://cardgenr.com/test-cards/braintree): Braintree's sandbox accepts 4111 1111 1111 1111 (Visa), 5555 5555 5555 4444 (Mastercard) and 3782 822463 10005 (Amex) with any future expiry date. Declines are driven mainly by the amount. Any amount from $2,000.00 to $2,999.99 returns a processor decline whose response code equals the amount. (verified 2026-10-19)
- [Square test cards](https://cardgenr.com/test-cards/square): Square's sandbox accepts 4111 1111 1111 1111 (Visa) with CVV 111 and any future expiry date. American Express uses 3400 000000 00009 with CVV 1111. To force errors, keep a valid card and change one field: CVV 911, postal code 99999 or expiry 01/40. (verified 2026-10-19)
- [Razorpay test cards](https://cardgenr.com/test-cards/razorpay): In Razorpay test mode, use 4100 2800 0000 1007 (Visa, domestic) or 5555 5555 5555 4444 (Mastercard, international) with any future expiry and any CVV. The OTP decides the result: any OTP of 4 or more digits succeeds, and anything shorter fails. (verified 2026-10-19)
- [Authorize.Net test cards](https://cardgenr.com/test-cards/authorize-net): Authorize.Net's sandbox accepts test numbers such as 4111 1111 1111 1111 (Visa), 5424 0000 0000 0015 (Mastercard) and 3700 000000 00002 (Amex) with any expiration date after today. Responses are driven by the billing ZIP code and CVV rather than the card number. ZIP 46282 returns a decline and CVV 901 a CVV mismatch. (verified 2026-10-19)
- [NMI test cards](https://cardgenr.com/test-cards/nmi): NMI sandbox accounts accept 4111 1111 1111 1111 (Visa), 5431 1111 1111 1111 (Mastercard) and 3411 111111 11111 (Amex) with expiry 10/29. Submit an amount below 1.00 to trigger a decline. For 3-D Secure, use the dedicated frictionless, challenge and bypassed cards. (verified 2026-10-19)
- [Cybersource test cards](https://cardgenr.com/test-cards/cybersource): Cybersource's sandbox accepts 4111 1111 1111 1111 (Visa), 5555 5555 5555 4444 (Mastercard) and 3782 822463 10005 (Amex) with any future expiration date. To test a decline, send 4111 1111 1111 1112, which fails the Luhn check and returns DECLINE with INVALID_DATA. (verified 2026-10-19)
- [Worldpay test cards](https://cardgenr.com/test-cards/worldpay): In the Access Worldpay Payments API Try environment, the cardholder name sets the result, not the card number. Use a test PAN such as 4000 0000 0000 2701 (Visa) or 5200 0000 0000 2235 (Mastercard). Then set the cardholder name to AUTHORISED, REFUSED or ERROR. (verified 2026-10-19)
- [Checkout.com test cards](https://cardgenr.com/test-cards/checkout-com): Checkout.com's standard approved test card is 4242 4242 4242 4242 (Visa), which returns response code 10000 with any future expiry and any valid CVV. 4539 4679 8710 9256 returns a decline (20005). 5385 3083 6013 5181 tests a 3DS2 challenge, using the simulator password Checkout1!. (verified 2026-10-19)
- [Shopify test cards](https://cardgenr.com/test-cards/shopify): To test a Shopify store without real money, activate the Bogus Gateway and set the name on the card to "Test payment gateway". Then enter 1 as the card number for an approved order, 2 for a decline or 3 for a gateway failure. With Shopify Payments in test mode, use 4242 4242 4242 4242 (Visa) or 5555 5555 5555 4444 (Mastercard) with any future expiry date. (verified 2026-10-19)
- [Apple Pay test cards](https://cardgenr.com/test-cards/apple-pay): Apple Pay sandbox testing uses special cards added to the Wallet of a sandbox tester's device. Examples are 5204 2452 5046 0049 (Mastercard, expiry 01/30, CVC 111) and 4622 9431 2318 9285 (Visa, expiry 12/2028, CVV 096). Each card has its own expiry and security code, listed below. (verified 2026-10-19)
- [Mollie test cards](https://cardgenr.com/test-cards/mollie): Mollie test mode accepts 2223 0000 1047 9399 (Mastercard), 4543 4740 0224 9996 (Visa) and 3782 822463 10005 (Amex), with any expiry date and any CVV. To simulate a failure, create a test payment for a specific EUR amount, such as €1,007.00 for insufficient_funds, and mark it as failed. (verified 2026-10-19)
- [Paystack test cards](https://cardgenr.com/test-cards/paystack): Paystack test mode accepts 4084 0840 8408 4081 (Visa) with CVV 408 and any future expiry date, with no PIN or OTP needed. Verve test cards cover the PIN and OTP flows. 4084 0800 0000 5408 (CVV 001) returns a decline. (verified 2026-10-19)
- [Mercado Pago test cards](https://cardgenr.com/test-cards/mercado-pago): Mercado Pago's Brazil test cards include 5480 8328 0103 3311 (Mastercard) and 4235 6477 2802 5682 (Visa), with expiry 11/30 and CVV 123 (1234 for Amex). The cardholder name sets the outcome. APRO approves the payment, FUND rejects it for insufficient funds and OTHE returns a general error. (verified 2026-10-19)

## Reference

- [Luhn algorithm](https://cardgenr.com/luhn-algorithm): how mod 10 works, a step-by-step checker, a check digit calculator and code in five languages.
- [BIN database](https://cardgenr.com/bin-list): BIN ranges by country, card brand and issuing bank; each BIN has its own page at https://cardgenr.com/bin/<6 digits>.
- [United States credit card generator](https://cardgenr.com/credit-card-generator/country/united-states): test cards with United States billing addresses.
- [United Kingdom credit card generator](https://cardgenr.com/credit-card-generator/country/united-kingdom): test cards with United Kingdom billing addresses.
- [Canada credit card generator](https://cardgenr.com/credit-card-generator/country/canada): test cards with Canada billing addresses.
- [Australia credit card generator](https://cardgenr.com/credit-card-generator/country/australia): test cards with Australia billing addresses.
- [Germany credit card generator](https://cardgenr.com/credit-card-generator/country/germany): test cards with Germany billing addresses.
- [France credit card generator](https://cardgenr.com/credit-card-generator/country/france): test cards with France billing addresses.
- [Italy credit card generator](https://cardgenr.com/credit-card-generator/country/italy): test cards with Italy billing addresses.
- [Spain credit card generator](https://cardgenr.com/credit-card-generator/country/spain): test cards with Spain billing addresses.
- [Netherlands credit card generator](https://cardgenr.com/credit-card-generator/country/netherlands): test cards with Netherlands billing addresses.
- [Belgium credit card generator](https://cardgenr.com/credit-card-generator/country/belgium): test cards with Belgium billing addresses.
- [Austria credit card generator](https://cardgenr.com/credit-card-generator/country/austria): test cards with Austria billing addresses.
- [Switzerland credit card generator](https://cardgenr.com/credit-card-generator/country/switzerland): test cards with Switzerland billing addresses.

## API

- [API documentation](https://cardgenr.com/api): REST endpoints for generation, validation and BIN lookup. No API key.
- [OpenAPI 3.1 spec](https://cardgenr.com/openapi.json)
- MCP server: https://cardgenr.com/mcp (Streamable HTTP, no auth). Tools: generate_test_cards, get_gateway_test_cards, validate_card_number, lookup_bin, luhn_check_digit.

## Optional

- [About and methodology](https://cardgenr.com/about): how numbers are generated, how gateway cards are verified, and what the BIN data covers.
- Other languages: [Português](https://cardgenr.com/pt/gerador-de-cartao-de-credito), [Español](https://cardgenr.com/es/generador-de-tarjetas-de-credito), [Français](https://cardgenr.com/fr/generateur-de-carte-bancaire), [Deutsch](https://cardgenr.com/de/kreditkarten-generator)
