Advertisement

Square Sandbox Test Card Numbers

Card numbers for the Square Sandbox by brand, the CVV, postal code and expiry values that trigger errors, Strong Customer Authentication cards, and test payment tokens.

Advertisement

Cards that succeed

All succeed with the CVV shown. Square also lists a China UnionPay card, but its published number doesn’t pass the Luhn check, so it is not shown here — see Square’s page if you need it.

BrandNumberResultCVVCopy
Visa4111 1111 1111 1111SucceedsCVV 111
Mastercard5105 1051 0510 5100SucceedsCVV 111
Discover6011 0000 0000 0004SucceedsCVV 111
Diners Club3000 000000 0004SucceedsCVV 111
JCB3569 9900 1009 5841SucceedsCVV 111
American Express3400 000000 00009SucceedsCVV 1111
Square Gift Card7783 3200 0000 0000Square gift card succeedsno CVV

Source: Square Developer docs – Sandbox Payments · checked October 2026. Sandbox only — these numbers never work for real payments.

Advertisement

How Square test cards work

Square has a separate Sandbox environment with its own application ID and access token. The Sandbox doesn’t accept real cards, only the documented test values. You enter the card numbers in the Web Payments SDK or In-App Payments SDK to get a payment token, then send that token to CreatePayment.

Use any future expiry date. The CVV is 111 for most brands and 1111 for American Express. Payments in USD, CAD or GBP also need a valid postal code. In Japan, postal codes are not supported.

To test errors without a special card, use the error values: CVV 911, postal code 99999 or expiry 01/40. The token is created, and the payment then fails at CreatePayment.

Declined cards

The first card is declined when you create a payment with its token. The second simulates a declined authorization for a card on file.

BrandNumberResultCopy
Visa4000 0000 0000 0002Card declined (token fails at CreatePayment)
Visa4000 0000 0000 0010Card on file auth declined
Advertisement

Strong Customer Authentication (3DS) cards

Web Payments SDK and In-App Payments SDK use different cards. For “Modal with Verification Code” enter 123456. For the multi-select question, select both Paris and Lyon. JCB SCA testing is only available for sellers in Australia, Canada and Japan.

BrandNumberResultSDK · valuesCopy
Visa4800 0000 0000 0004No ChallengeWeb SDK · CVV 111
Mastercard5222 2200 0000 0005No ChallengeWeb SDK · CVV 111
Discover EU6011 0000 0020 1016No ChallengeWeb SDK · CVV 111
JCB3569 9900 0000 0017No ChallengeWeb SDK · CVV 111
Visa EU4310 0000 0020 1019Modal with Verification CodeWeb SDK · CVV 111 · code 123456
Mastercard5248 4800 0021 0026Modal with Verification CodeWeb SDK · CVV 111 · code 123456
Mastercard EU5500 0000 0020 1016Modal with Verification CodeWeb SDK · CVV 111 · code 123456
American Express EU3700 000002 01014Modal with Verification CodeWeb SDK · CVV 1111 · code 123456
JCB3569 9900 0000 0009Modal with Verification CodeWeb SDK · CVV 111 · code 123456
Visa4811 1100 0000 0008No Challenge with Failed VerificationWeb SDK · CVV 111
Visa4800 0000 0000 0012No ChallengeIn-App SDK · CVV 111
Mastercard5222 2200 0000 0013No ChallengeIn-App SDK · CVV 111
Discover EU6011 0000 0020 1024No ChallengeIn-App SDK · CVV 111
JCB3569 9900 0000 0041No ChallengeIn-App SDK · CVV 111
Visa EU4310 0000 0020 1027Modal with Verification CodeIn-App SDK · CVV 111 · code 123456
Mastercard5248 4800 0021 0034Modal with Verification CodeIn-App SDK · CVV 111 · code 123456
Mastercard EU5500 0000 0020 1024Modal with Verification CodeIn-App SDK · CVV 111 · code 123456
American Express EU3700 000002 01022Modal with Verification CodeIn-App SDK · CVV 1111 · code 123456
JCB3569 9900 0000 0033Modal with Verification CodeIn-App SDK · CVV 1111 · code 123456
Mastercard5333 3300 0000 0008Modal with Multi Select Challenge QuestionIn-App SDK · CVV 111
Visa4811 1100 0000 0016No Challenge with Failed VerificationIn-App SDK · CVV 111

Error values and test nonces

ValueResult
CVV 911Card CVV incorrect
Postal code 99999Card postal code incorrect
Expiry 01/40Card expiration date incorrect
Amount 2222 / 3333Risk evaluation MODERATE / HIGH (other amounts: NORMAL)
cnon:card-nonce-okPayment succeeds (no SDK needed)
cnon:card-nonce-declinedCard declined
cnon:card-nonce-rejected-cvvBad CVV
cnon:card-nonce-rejected-postalcodeBad postal code
cnon:card-nonce-rejected-expirationBad expiration date
ccof:customer-card-id-okCard on file succeeds

Testing Square payments step by step

  1. Open the Developer Console, pick your application and switch to Sandbox credentials.
  2. Load the Web Payments SDK with the Sandbox script URL and your Sandbox application ID.
  3. Tokenize a card from the success table and call CreatePayment with the token.
  4. Repeat with the error values (CVV 911, postal code 99999, expiry 01/40) and the declined card.
  5. For server-only tests, skip the SDK and pass a test nonce such as cnon:card-nonce-ok as source_id.

Common errors and fixes

Postal code required
USD, CAD and GBP payments need a valid postal code. Any value except 99999 works.
Real card rejected in Sandbox
Expected: the Sandbox only accepts test values.
Card-present testing
Square’s Sandbox doesn’t support card-present test cards; use the test nonces instead.

Sources

Every number on this page was copied from Square’s official documentation and passes the Luhn check. Checked October 2026; gateways change their test data from time to time, so if a number stops working, check the source:

Test cards only work in Square’s sandbox or test mode. To test your own form validation before a request reaches the gateway, use our card number generator and validator. Never use real customer cards in test environments.

Frequently asked questions

What is the Square sandbox test card number?

4111 1111 1111 1111 (Visa) with CVV 111, any future expiry date and a valid postal code.

How do I simulate a declined card in Square sandbox?

Use 4000 0000 0000 0002, or keep a normal test card and enter CVV 911, postal code 99999 or expiry 01/40.

What is cnon:card-nonce-ok?

A test payment token you can send as source_id to CreatePayment without the Web Payments SDK. Related nonces simulate a bad CVV, bad postal code, bad expiry or a decline.

Can I use these test cards on another gateway?

Usually not. Each gateway only recognises its own documented test numbers in its own sandbox. Some numbers, such as 4111 1111 1111 1111, appear in several lists, but the results they trigger differ. For format-only testing on your own forms, use our card generator.

Related tools

Advertisement