A Square test card is a fake card number that Square publishes for sandbox testing. It approves or declines inside a simulated environment and never touches a real account. Square's sandbox accepts 4111 1111 1111 1111 (Visa), 5105 1051 0510 5100 (Mastercard), 3782 822463 10005 (American Express), 6011 0009 9013 9424 (Discover), and 3569 9900 1009 5841 (JCB), paired with any future expiration date, CVV 111, and a postal code such as 10003.
How do Square test cards work?
Test cards run against the Square sandbox, which is a separate environment from production. Requests sent with a sandbox application ID and sandbox access token return simulated results, including payment IDs, statuses, and error codes.
The sandbox behaves like the live Payments API. A successful charge returns a COMPLETED payment, and a simulated failure returns the same decline response your production code would receive.
Which Square test card numbers can you use?
Square lists one approval card per major brand. Use these in the sandbox to confirm that your checkout handles each card type.
- Visa: 4111 1111 1111 1111
- Mastercard: 5105 1051 0510 5100
- American Express: 3782 822463 10005
- Discover: 6011 0009 9013 9424
- JCB: 3569 9900 1009 5841
These numbers are synthetic and check-digit valid, so client-side validation passes. They are published openly by Square for developer use.
What expiration, CVV, and ZIP should you enter?
Use any expiration date in the future, such as 12/30. Square's sandbox accepts 111 as the CVV and a valid-format postal code like 10003.
Do not use an expired date unless you are deliberately testing validation. Field-level errors come from your own form logic at that point, not from the gateway.
How do you test declines and errors?
Square's sandbox documentation includes additional numbers that trigger declines, such as insufficient funds or a generic card decline. Check the current card table in the developer docs before you build test cases, because entries change between API versions.
Wrap decline handling in the same code path you use for live traffic. Map the returned error category to your user message so the sandbox result matches production behavior.
Are Square test cards safe to use?
Yes. Test card numbers are public strings that cannot be charged, so they carry no risk to any cardholder.
Never paste a real card number into a sandbox or staging system. PCI DSS requires that live account numbers stay out of pre-production environments.
Frequently asked questions
Do Square test cards work in production?
No. Sandbox card numbers only resolve inside the sandbox, and a production request with one of them returns a decline.
Can you generate a Square test card?
No. Square publishes a fixed list, so there is nothing to generate. Any site offering a Square test card generator is giving you the same public numbers or invented digits.
Why was my Square test card declined?
A decline usually means you are pointing at the production endpoint or using the wrong application ID. Confirm that your credentials start with the sandbox prefix and that your SDK is in sandbox mode.