A Square test card is a sandbox-only card number that developers use to simulate approved, declined, and error responses in Square's test environment. It acts like a real card inside your code but never moves real money, and it never works on a live Square account.
What is a Square test card used for?
Test cards let you build and debug payments without touching a real cardholder's data. You can verify checkout flows, order creation, refunds, and webhook handling before you accept a single live payment. Because the numbers are fake, you can run the same transaction hundreds of times without triggering risk rules.
Which test card numbers does Square publish?
Square's developer documentation lists sandbox values for the major card brands. Commonly referenced numbers include:
- Visa: 4111 1111 1111 1111
- Mastercard: 5105 1051 0510 5100
- American Express: 3782 822463 10005
- Discover: 6011 1111 1111 1117
Use any future expiration date, any three or four digit CVV, and any valid postal code format. Square can add or rotate sandbox values, so confirm the current list in your developer dashboard before you build automated test suites around it.
How do you test a declined payment?
Most payment platforms publish trigger values that force a decline, such as a number tied to insufficient funds or a CVV that always fails verification. Square's sandbox follows the same pattern and returns response codes you can map to your own error messaging. Always test the unhappy paths: expired card, CVV mismatch, postal code mismatch, and a hard decline.
Can you use a Square test card on a live account?
No. Sandbox numbers are rejected outside the test environment. Pushing a test value through a live gateway to obtain goods or funds is payment card fraud under federal law and a violation of card network rules.
Why test cards matter for checkout QA
A checkout that only handles the success case will fail in production. Sandbox cards let you confirm that refunds, partial captures, 3D Secure challenges, and idempotency keys behave as expected. They also let QA teams run regression tests on every release without storing sensitive data.
Frequently asked questions
Do Square test cards expire?
Sandbox numbers generally accept any future expiration date, so pick a date years ahead and keep it in your test fixtures.
Do test cards work with Square hardware?
Sandbox mode covers API and web based testing. Testing physical readers uses Square's separate device guidance, which is limited to approved developer units.