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.
| Brand | Number | Result | Copy |
|---|---|---|---|
| Visa | 4000 0000 0000 0002 | Card declined (token fails at CreatePayment) | |
| Visa | 4000 0000 0000 0010 | Card on file auth declined |
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.
| Brand | Number | Result | SDK · values | Copy |
|---|---|---|---|---|
| Visa | 4800 0000 0000 0004 | No Challenge | Web SDK · CVV 111 | |
| Mastercard | 5222 2200 0000 0005 | No Challenge | Web SDK · CVV 111 | |
| Discover EU | 6011 0000 0020 1016 | No Challenge | Web SDK · CVV 111 | |
| JCB | 3569 9900 0000 0017 | No Challenge | Web SDK · CVV 111 | |
| Visa EU | 4310 0000 0020 1019 | Modal with Verification Code | Web SDK · CVV 111 · code 123456 | |
| Mastercard | 5248 4800 0021 0026 | Modal with Verification Code | Web SDK · CVV 111 · code 123456 | |
| Mastercard EU | 5500 0000 0020 1016 | Modal with Verification Code | Web SDK · CVV 111 · code 123456 | |
| American Express EU | 3700 000002 01014 | Modal with Verification Code | Web SDK · CVV 1111 · code 123456 | |
| JCB | 3569 9900 0000 0009 | Modal with Verification Code | Web SDK · CVV 111 · code 123456 | |
| Visa | 4811 1100 0000 0008 | No Challenge with Failed Verification | Web SDK · CVV 111 | |
| Visa | 4800 0000 0000 0012 | No Challenge | In-App SDK · CVV 111 | |
| Mastercard | 5222 2200 0000 0013 | No Challenge | In-App SDK · CVV 111 | |
| Discover EU | 6011 0000 0020 1024 | No Challenge | In-App SDK · CVV 111 | |
| JCB | 3569 9900 0000 0041 | No Challenge | In-App SDK · CVV 111 | |
| Visa EU | 4310 0000 0020 1027 | Modal with Verification Code | In-App SDK · CVV 111 · code 123456 | |
| Mastercard | 5248 4800 0021 0034 | Modal with Verification Code | In-App SDK · CVV 111 · code 123456 | |
| Mastercard EU | 5500 0000 0020 1024 | Modal with Verification Code | In-App SDK · CVV 111 · code 123456 | |
| American Express EU | 3700 000002 01022 | Modal with Verification Code | In-App SDK · CVV 1111 · code 123456 | |
| JCB | 3569 9900 0000 0033 | Modal with Verification Code | In-App SDK · CVV 1111 · code 123456 | |
| Mastercard | 5333 3300 0000 0008 | Modal with Multi Select Challenge Question | In-App SDK · CVV 111 | |
| Visa | 4811 1100 0000 0016 | No Challenge with Failed Verification | In-App SDK · CVV 111 |
Error values and test nonces
| Value | Result |
|---|---|
CVV 911 | Card CVV incorrect |
Postal code 99999 | Card postal code incorrect |
Expiry 01/40 | Card expiration date incorrect |
Amount 2222 / 3333 | Risk evaluation MODERATE / HIGH (other amounts: NORMAL) |
cnon:card-nonce-ok | Payment succeeds (no SDK needed) |
cnon:card-nonce-declined | Card declined |
cnon:card-nonce-rejected-cvv | Bad CVV |
cnon:card-nonce-rejected-postalcode | Bad postal code |
cnon:card-nonce-rejected-expiration | Bad expiration date |
ccof:customer-card-id-ok | Card on file succeeds |
Testing Square payments step by step
- Open the Developer Console, pick your application and switch to Sandbox credentials.
- Load the Web Payments SDK with the Sandbox script URL and your Sandbox application ID.
- Tokenize a card from the success table and call
CreatePaymentwith the token. - Repeat with the error values (CVV 911, postal code 99999, expiry 01/40) and the declined card.
- For server-only tests, skip the SDK and pass a test nonce such as
cnon:card-nonce-okassource_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:
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.