Square Test Card Numbers
Square sandbox test card numbers, plus the CVV, postal code and expiry values that trigger each specific error state.
Successful payments
| Card number | Brand | Result | Copy |
|---|---|---|---|
4111 1111 1111 1111 | Visa | Payment succeeds CVV 111 | |
5105 1051 0510 5100 | Mastercard | Payment succeeds CVV 111 | |
6011 0000 0000 0004 | Discover | Payment succeeds CVV 111 | |
3000 0000 0000 0004 | Diners Club | Payment succeeds CVV 111 | |
3569 9900 1009 5841 | JCB | Payment succeeds CVV 111 | |
3400 000000 00009 | American Express | Payment succeeds CVV 1111 | |
6222 9888 1234 0000 | China UnionPay | Payment succeeds CVV 123 |
Declined cards
| Card number | Brand | Result | Copy |
|---|---|---|---|
4000 0000 0000 0002 | Visa | Card declined | |
4000 0000 0000 0010 | Visa | Card-on-file authentication declined |
Error-state values
Submit a valid test card and change one of these fields to force the matching error.
| Scenario | Value | Effect |
|---|---|---|
| CVV | 911 | Card CVV incorrect |
| Postal code | 99999 | Card postal code incorrect |
| Expiration date | 01/40 | Card expiration date incorrect |
Payment tokens
For testing the API directly without going through the SDKs, use these as source_id.
| Scenario | Value | Effect |
|---|---|---|
| Successful card | cnon:card-nonce-ok | Payment succeeds |
| Declined card | cnon:card-nonce-declined | Payment is declined |
| CVV error | cnon:card-nonce-rejected-cvv | Rejected for CVV mismatch |
Before you use these
- Sandbox only. Set the expiry to any future month and year.
- These numbers are published by Square for sandbox testing. They are not real cards and cannot be used for a real purchase.