Square Test Cards — Sandbox Card Numbers
Verified Square sandbox test cards for the Square Payments API, Web Payments SDK, and In-App Payments SDK.
Square sandbox uses specific test card numbers for simulating payment outcomes via the Square Payments API, Web Payments SDK, and In-App Payments SDK. All test cards work only in the Square sandbox environment.
Showing 10 of 10 test cards
| Card Number | Network | Scenario | Code | Copy |
|---|---|---|---|---|
4111 1111 1111 1111TEST ONLY | Visa | Successful paymentGlobal | — | |
5105 1051 0510 5100TEST ONLY | Mastercard | Successful paymentGlobal | — | |
3782 822463 10005TEST ONLY | Amex | Successful paymentGlobal | — | |
6011 1111 1111 1117TEST ONLY | Discover | Successful paymentUS | — | |
4000 0000 0000 0002TEST ONLY | Visa | Declined — do not honorGlobal | GENERIC_DECLINE | |
4000 0000 0000 1000TEST ONLY | Visa | Declined — CVV failureGlobal | CVV_FAILURE | |
4000 0000 0000 1018TEST ONLY | Visa | Declined — address verification failureUS | ADDRESS_VERIFICATION_FAILURE | |
4000 0000 0000 1026TEST ONLY | Visa | Declined — invalid accountGlobal | INVALID_ACCOUNT | |
4000 0000 0000 1034TEST ONLY | Visa | Declined — card expiredGlobal | EXPIRED_CARD | |
4000 0000 0000 1042TEST ONLY | Visa | Declined — insufficient fundsGlobal | INSUFFICIENT_FUNDS |
TEST ONLY. These numbers will not process real transactions. Use only in Square's sandbox environment with test API credentials.
What it does
Square-specific test cards
Cards that only work in Square's sandbox environment with Square test credentials.
All major decline types
GENERIC_DECLINE, CVV_FAILURE, ADDRESS_VERIFICATION_FAILURE, EXPIRED_CARD, INSUFFICIENT_FUNDS, INVALID_ACCOUNT.
Multi-network support
Visa, Mastercard, Amex, and Discover test cards.
Use CVV 111, postal 11111
Square sandbox recommends CVV 111 and postal code 11111 for most test cards.
How to use Square Test Cards — Sandbox Card Numbers
- 1Create Square sandbox credentials
Go to developer.squareup.com, create a sandbox application, and get your sandbox access token.
- 2Use recommended test values
Use CVV 111 and postal code 11111 with the success card (4111 1111 1111 1111).
- 3Submit via Square SDK
Use the test card with the Web Payments SDK tokenize() method or directly in API calls.
- 4Check the error response
Square returns CARD_DECLINED with a specific detail code matching the card's expected scenario.
Square sandbox setup
Square sandbox uses a separate access token from production. Each sandbox application has its own access token in the format sandbox-sq0atb-... Always confirm you're using sandbox credentials. Square sandbox transactions appear in your Square Developer Dashboard under the sandbox tab, not in your production Square Dashboard.
Frequently Asked Questions
Does Square use the same test cards as Stripe?
- Some numbers overlap (4111 1111 1111 1111 works in both) but Square has its own scenario-triggering cards in the 4000 0000 0000 XXXX range with Square-specific error codes like CVV_FAILURE and ADDRESS_VERIFICATION_FAILURE.
What postal code should I use for Square tests?
- Use 11111 for the success card. For the address verification failure card, use a different postal code — that's what triggers the AVS failure scenario.
Do Square test cards work with Square POS?
- These cards work with the Square Payments API and SDKs. Square POS uses the Square Reader SDK with hardware; test card numbers apply to software integrations.
Related Tools
UUID Generator
Generate random UUID v4 identifiers. Bulk generate up to 100 UUIDs, toggle uppercase/lowercase and hyphen formatting.
JSON Formatter
Clean, minify, and validate JSON data structures.
JWT Decoder
Decode and inspect JWT tokens — header, payload, timestamps.
Regex Tester
Real-time expression matching and testing.