Use these provider-published numbers to test approvals, declines and 3-D Secure flows in sandbox mode. For input masks, length checks and form-only QA, use the credit card generator. Follow your provider’s expiry and CVV requirements alongside each table.

Source-check dates are shown with each provider reference. These record a documentation comparison, not a payment executed in a sandbox. The selected cases are not an exhaustive provider test suite.

Stripe

Use test credentials in your Stripe sandbox. For interactive card entry, use a future expiry and a CVC of the required length. Automated integrations should use Stripe’s documented test PaymentMethods where supported. Account settings, Radar and the request still affect the flow; a card number is not the entire test configuration.

Card numberScenarioSandbox expectation
4242424242424242VisaSuccessful sandbox card scenario
4000056655665556Visa debitSuccessful sandbox card scenario
5555555555554444MastercardSuccessful sandbox card scenario
2223003122003222Mastercard 2-seriesSuccessful sandbox card scenario
5200828282828210Mastercard debitSuccessful sandbox card scenario
378282246310005American ExpressSuccessful sandbox card scenario
6011111111111117DiscoverSuccessful sandbox card scenario
3056930009020004Diners ClubSuccessful sandbox card scenario
3566002020360505JCBSuccessful sandbox card scenario
6200000000000005UnionPaySuccessful sandbox card scenario

Source: Stripe testing documentation. Selected fixtures checked 2026-11-08. These local checks do not call Stripe.

Card numberScenarioSandbox expectation
4000000000000002Genericcard_declined / generic_decline
4000000000009995Fundscard_declined / insufficient_funds
4000000000009987Lostcard_declined / lost_card
4000000000009979Stolencard_declined / stolen_card
4000000000000069Expiredexpired_card
4000000000000127Cvcincorrect_cvc
4000000000000119Processingprocessing_error
4000000000006975Velocitycard_declined / card_velocity_exceeded
4242424242424241Checksumincorrect_number

Source: Stripe testing documentation. Selected fixtures checked 2026-11-08. These local checks do not call Stripe.

Card numberScenarioSandbox expectation
40000000000032203DS requiredAuthentication required; default Radar rules request 3DS. Complete the test challenge.
4000008400001629Authenticate, then declineSuccessful authentication followed by card_declined. Authentication is not payment success.
4000000032200000Frictionless 3DSRequired authentication completes through a frictionless flow.
40000084000012803DS lookup errorAuthentication lookup fails; payment returns card_declined.

Source: Stripe testing documentation. Selected fixtures checked 2026-11-08. These local checks do not call Stripe.

The deliberately incorrect-number fixture fails Luhn. Use the Stripe integration guide for server-order checks and the 3DS section below for challenge recovery. This selected set is shared by those guides; it is not an exhaustive copy of Stripe’s reference.

PayPal

PayPal’s sandbox splits the work differently: the card number selects the brand, and the cardholder name selects the outcome. That is unusual enough to catch people out.

Card numberBrand
4012 8888 8888 1881Visa
4005 5192 0000 0004Visa
2223 0000 4840 0011Mastercard
3714 496353 98431American Express
3646 1510 0000 39Diners Club
6304 0000 0000 0000Maestro
3636 5000 0000 0260JCB
6200 6800 0000 0004UnionPay

The following selected cases apply to Expanded Checkout card payments with a sandbox client ID and sandbox API endpoints. The capture result must be checked separately from order creation. Use the same documented Visa fixture with the appropriate name trigger:

ScenarioFirst Name / Name on CardExpected sandbox result
Successful paymentOrdinary test name; no rejection triggerSuccessful sandbox card capture scenario
Insufficient fundsCCREJECT-IF5120 / INSUFFICIENT_FUNDS
Card refusedCCREJECT-REFUSED0500 / DO_NOT_HONOR
Expired card responseCCREJECT-EC5400 / EXPIRED_CARD
Security code check failureCCREJECT-CVV_F00N7 / CVV2_FAILURE_POSSIBLE_RETRY_WITH_CVV

For these selected cases use Visa 4012888888881881, any future date and any 3 digits. Rejection triggers are case-sensitive. Choose and copy a complete test setup, or follow the PayPal sandbox guide to inspect the capture state.

Source: PayPal card testing. Selected cases checked 2026-11-08.

Braintree

Scope: Sandbox card verification and transactions.

Use separate sandbox credentials. Card verification depends on the number; transaction responses depend on the amount, regardless of currency. AVS/CVV rules can affect results.

Braintree — selected card fixtures
Card numberBrandVerification fixture
4111111111111111VisaNormal
5555555555554444MastercardNormal
2223000048400011Mastercard 2-seriesNormal
378282246310005AmexNormal
4000111111111115VisaProcessor declined
5105105105105100MastercardProcessor declined
Braintree — inputs, expectations and application checks
Input / routeDocumented expectationCheck in your application
Amount 0.01–1999.99Authorized; settlement path: SettledAssert both stages separately.
Amount 2000.00–2999.99Processor declinedKeep the order unpaid.
Amount 3000.00–3000.99Failed; processor response 3000Keep failure distinct from decline.
Amount 5001.00Gateway rejected: application incompleteCheck the rejection reason.
Verify 4000111111111115Verification: processor declinedDo not infer a transaction result from verification.

Authorization is not settlement. Submit for settlement when testing that stage; use the documented testing routes to advance it. These are selected cases.

Braintree documentation · Source checked . Documentation comparison; not a live sandbox execution.

Adyen

Scope: Test environment; payment-method-specific fixtures.

Use the test account and the exact expiry and security-code instructions for the chosen payment method. Co-badged numbers do not have one universal CVC requirement.

Adyen — selected card fixtures
Card numberPayment method / routeExpirySecurity code
4111111111111111Visa03/2030737
5555555555554444Mastercard03/2030737
370000000000002Amex03/20307373
8171999927660000UnionPay ExpressPay10/2030737
6771798021000008Maestro03/2030737
5127880999999990Bancontact (BCMC route)03/2030None
5127880999999990Mastercard Debit route03/2030737
Adyen — inputs, expectations and application checks
Input / routeDocumented expectationCheck in your application
Co-badged fixture through BCMCNo CVC; simulator login: user / passwordKeep this route separate from Mastercard.
Same co-badged fixture through MastercardSecurity code 737Do not reuse the BCMC field contract.
Online Maestro payment3D Secure requiredObserve authentication and payment separately.

Online Maestro requires 3D Secure. A number alone does not select every authentication or refusal outcome. Follow the linked integration instructions for the enabled route.

Adyen documentation · Source checked . Documentation comparison; not a live sandbox execution.

Square

Scope: Web Payments SDK / In-App Payments SDK; card-not-present sandbox.

Use a future expiry. USD, CAD and GBP payments require a valid postal code; Japan does not support postal codes. Tokenize with the sandbox SDK, then submit the token to CreatePayment.

Square — selected card fixtures
Card numberBrandCVV
4111111111111111Visa111
5105105105105100Mastercard111
6011000000000004Discover111
340000000000009Amex1111
3569990010095841JCB111
Square — inputs, expectations and application checks
Input / routeDocumented expectationCheck in your application
CVV 911Card CVV incorrectShow the failed field.
Postal code 99999Card postal code incorrectKeep the cart available.
Expiry 01/40Card expiration date incorrectUse this trigger, not a past date.
Card 4000000000000002Card declinedDo not mark the order paid.
Card 4000000000000010Card-on-file authorization declinedCheck the saved-card path.

The error triggers below act when CreatePayment processes the token. Card-present testing is unsupported here. Server-only tests have separate documented source IDs.

Square documentation · Source checked . Documentation comparison; not a live sandbox execution.

Authorize.Net

Scope: Separate sandbox account, credentials and endpoint.

Keep the sandbox account in Live Mode; this is still the sandbox, not production. Test Mode does not store transactions and returns transaction ID 0. Use a future expiry and a brand-appropriate security-code length.

Authorize.Net — selected card fixtures
Card numberBrand
4111111111111111Visa
4007000000027Visa (13 digits)
5424000000000015Mastercard
2223000010309703Mastercard 2-series
370000000000002Amex
6011000000000012Discover
3088000000000017JCB
38000000000006Diners Club
Authorize.Net — inputs, expectations and application checks
Input / routeDocumented expectationCheck in your application
Billing ZIP 46282Response code 2: declinedKeep the order unpaid.
Billing ZIP 46203AVS E: invalid or disallowedInspect AVS independently.
Billing ZIP 46205AVS N: address and ZIP mismatchApply the configured AVS policy.
Card code 900CVV M: matchAlso inspect transaction status.
Card code 901CVV N: no matchPreserve the failed check.
Card code 904CVV P: not processedDo not convert this to a match.

General transaction responses, AVS and CVV results are separate fields. Check each applicable response and your configured handling; a CVV match alone is not payment approval.

Authorize.Net documentation · Source checked . Documentation comparison; not a live sandbox execution.

Other gateways in brief

For a provider outside the selected tables, start with its own product-specific testing instructions:

Check the product, region, credentials and response stage before copying a fixture. A card-entry flow, a stored-card payment and a subscription may require different setup even within the same provider.

Commonly reused examples

These familiar values can exercise your own form’s formatting and checksum rules. Their appearance in several references does not give them a portable sandbox outcome. Hosted payment fields may require the provider’s own fixtures even before a payment request is submitted.

NumberBrandNotes
4111 1111 1111 1111VisaAppears in several provider references
4012 8888 8888 1881VisaCommon in older documentation
5555 5555 5555 4444Mastercard5-series
5105 1051 0510 5100Mastercard5-series
2223 0031 2200 3222Mastercard2-series — test your 2-series support
3782 822463 10005American Express15-digit
3714 496353 98431American Express15-digit
6011 1111 1111 1117Discover16-digit
3530 1113 3330 0000JCB16-digit
3056 9309 0259 04Diners Club14-digit

These familiar examples are intended for testing. A number appearing in a dataset does not prove the whole dataset is synthetic or safe to share. Inspect local format and checksum results with the card validator, and generate fresh equivalents per network from the Visa and Mastercard pages.

Reproduce the reference checks

The Stripe tables above render from stripe-fixtures.json, which is included in the offline guide project . This executed check catches duplicate fixture identifiers and unintended checksum changes:

const stripeFixtures=read('stripe-fixtures.json');
test('Provider reference IDs are unique and checksum expectations are explicit', () => {
  assert.equal(new Set(stripeFixtures.cards.map(c=>c.id)).size,stripeFixtures.cards.length);
  for (const card of stripeFixtures.cards) assert.equal(luhnValid(card.number),card.luhnValid,card.id);
  assert.ok(stripeFixtures.cards.some(c=>!c.luhnValid));
});

The Braintree, Adyen, Square and Authorize.Net sections also render from the shared gateway reference data in that ZIP. Run node --test gateway-reference.test.mjs to check fixture shape and the route-specific exceptions described above. These tests preserve the documented distinctions; they do not contact a provider.

The complete Stripe test file supplies read, test, assert and luhnValid; extract the ZIP and run node --test payment-guide-examples.test.mjs with Node.js 22 or later. This is a local reference-integrity check. It does not assert that a gateway produced a decline. Run provider scenarios separately in the correct sandbox and compare the documented error field, which may be an error code rather than a nested decline code.

3-D Secure and SCA testing

Authentication, payment authorization and capture are separate outcomes. A frictionless flow can complete authentication without an interactive challenge, while a challenge flow asks the customer to act. Provider settings, the scenario and applicable authentication requirements affect which path occurs.

Use the shared Stripe 3DS table above for specific sandbox cases. A successful authentication can still be followed by a declined payment. The 3D Secure testing guide covers cancellation, lookup errors and both browser/server arrival orders. For another provider, use its current authentication documentation rather than assuming Stripe’s fixture behavior transfers.

Setting up a sandbox account

The pattern is the same nearly everywhere: register a developer account, and you get a pair of API keys — one test, one live — that select the environment. Stripe and Square ship both in a single dashboard with a toggle. PayPal and Braintree issue a separate sandbox business account with its own credentials. Adyen provisions a test company account on request. Authorize.Net has a dedicated sandbox portal at sandbox.authorize.net, distinct from the production login.

Never commit test API keys to a public repository. Even test keys reveal your account structure, and several providers rate-limit or disable keys they find in public code.

Which one do I need?

What you are testingUse
Input mask, digit groupingGenerated numbers
Card brand detection (logo switching)Generated numbers
Length and Luhn validationGenerated numbers
CVV field length by brandGenerated numbers
Bulk test fixtures and database seedingGenerated numbers
Successful authorisationGateway sandbox
Specific decline codes (insufficient funds, expired, lost or stolen)Gateway sandbox
3-D Secure and SCA challenge flowsGateway sandbox
Refunds, partial refunds, voidsGateway sandbox
Disputes and chargebacksGateway sandbox
Subscriptions and recurring billingGateway sandbox
Webhook deliveryGateway sandbox
Multi-currency behaviourGateway sandbox

Generated data is useful for form logic and storage that you control. Hosted fields and provider SDKs can apply their own checks before your server receives anything. For those components and all processor responses, follow the relevant provider’s test setup.

Generated numbers vs sandbox numbers

Generated numbersGateway sandbox numbers
Passes Luhn and format checksDepends on the configured positive or negative caseSome negative cases deliberately fail
Exercises brand detectionAccording to the selected local profileAccording to the provider and route
Fixture varietyLocally generated datasetsProvider-defined cards, tokens and scenarios
Portable gateway behaviorNot establishedFollow the specific product documentation
Returns an authorisation responseNoA correctly configured sandbox can simulate one
Triggers named decline codesNoYes
Drives 3-D Secure flowsNoYes
Exercises refunds and disputesNoYes

Common testing mistakes

  1. Using a test card with live keys. It fails at the network, and repeated attempts feed the card-testing fraud signals processors watch on your merchant account.
  2. Letting test numbers reach a production database. Seed data has a way of migrating. Tag it at creation so it can be found and removed later.
  3. Assuming sandbox behaviour equals production behaviour. The usual gap is 3-D Secure: sandboxes frequently skip a challenge that production will demand.
  4. Backdating the expiry to test an expired card. Most sandboxes reject a past date at validation, so you test your own form instead of the processor. Use the documented expired-card number instead.
  5. Sending a three-digit CVV with an American Express number. Amex uses a four-digit code, and a length check keyed to the brand is exactly the kind of bug a test suite should catch.
  6. Never testing 2-series Mastercard. The 2221–2720 range has been live since 2017 and validation written against ^5[1-5] still rejects it. 2223 0031 2200 3222 takes one line to add.

The tool directory lists every generator on the site, the FAQ covers what a Luhn-valid number does and does not prove, and our editorial policy explains the six-month re-check cycle this page sits in.

Frequently Asked Questions

What is a test card number?
A fixture used for payment-software testing. Local synthetic values exercise input rules and may intentionally fail them; provider-published sandbox values select documented simulated scenarios. Neither generation nor a checksum establishes an issued account, ownership or permission to attempt a live payment.
Do Stripe test cards work with other gateways?
Some values appear in several providers’ references, but their behavior is not portable. Use the documented fixture, expiry, security code and request configuration for the specific provider and product you are testing.
Can I use a test card in production?
Use test fixtures only in the intended local or authorized sandbox environment. They do not establish a legitimate payment instrument. Follow the provider’s testing rules; Stripe explicitly prohibits testing live mode with real payment details.
Why did my test card get declined in the sandbox?
Possible causes include: you used a number that is specifically documented to decline, you sent it with live rather than test credentials, you used an expiry date in the past, or you hit a trigger the gateway keys on something other than the number. Square decides on the CVV and postal code you send, Braintree transaction tests on the amount, PayPal Expanded Checkout cases on the cardholder name, and selected Authorize.Net cases on the billing ZIP — so an unmodified success card can still decline if another field carries a trigger value.
What expiry date should I use with a test card?
Any future date, unless the provider pins one. Stripe, Braintree and Square accept any future month and year. Adyen documents a specific expiry per card — 03/2030 on most of its set — and its examples are worth copying exactly. If you are testing the expired-card path, use a card documented to return that error rather than backdating a success card, because some sandboxes reject a past date at validation and never produce the processor response you wanted to see.
What CVV should I use with a test card?
Copy the provider-specific value and route. Adyen commonly lists 737 or 7373 for Amex, but its Bancontact BCMC route lists no CVC; the Mastercard debit route for that same number lists 737. Square uses 111 (1111 for Amex) for its success fixtures and 911 as a CVV failure trigger at the payment stage. Do not substitute a random value for a documented scenario.
Are test card numbers the same across all payment providers?
No. Some numbers recur in multiple references, but the product, fields and request configuration determine the simulated result. A reused number does not make decline codes, authentication flows or error triggers portable.
Where do I find test cards for a gateway not listed here?
Look for the processor’s developer documentation rather than a third-party list, and search within it for testing, sandbox, or test cards. The page you want almost always sits under a developer or docs subdomain and is public without an account. If a search result offers you test numbers for a gateway but does not link to that gateway’s own documentation, do not trust the numbers.