Square Test Card Numbers

Square sandbox test card numbers, plus the CVV, postal code and expiry values that trigger each specific error state.

Square's sandbox accepts 4111 1111 1111 1111 (Visa) with CVV 111 and any future expiry date. American Express uses 3400 000000 00009 with CVV 1111. To force errors, keep a valid card and change one field: CVV 911, postal code 99999 or expiry 01/40.

Last verified against Square's official documentation on .

Expiry: Any future month and year
CVV: 111 (1111 for Amex)
Official documentation

Successful payments

Card numberBrandResultCopy
4111 1111 1111 1111Visa
Payment succeeds CVV 111
5105 1051 0510 5100Mastercard
Payment succeeds CVV 111
6011 0000 0000 0004Discover
Payment succeeds CVV 111
3000 000000 0004Diners Club
Payment succeeds CVV 111
3569 9900 1009 5841JCB
Payment succeeds CVV 111
3400 000000 00009American Express
Payment succeeds CVV 1111
6222 9888 1234 0000China UnionPay
Payment succeeds CVV 123

Declined cards

Card numberBrandResultCopy
4000 0000 0000 0002Visa
Card declined
4000 0000 0000 0010Visa
Card-on-file authentication declined

Error-state values

Submit a valid test card and change one of these fields to force the matching error.

ScenarioValueEffect
CVV911Card CVV incorrect
Postal code99999Card postal code incorrect
Expiration date01/40Card expiration date incorrect

Payment tokens

For testing the API directly without going through the SDKs, use these as source_id.

ScenarioValueEffect
Successful cardcnon:card-nonce-okPayment succeeds
Declined cardcnon:card-nonce-declinedPayment is declined
CVV errorcnon:card-nonce-rejected-cvvRejected 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.

How to use Square test cards

  1. Switch your Square integration to its test or sandbox environment and use test credentials. Live credentials reject these numbers.
  2. Enter a card number from the tables above. Expiry: Any future month and year. Security code: 111 (1111 for Amex).
  3. Start with a successful card to confirm the happy path, then work through the decline and error cards so every failure message in your checkout gets exercised.
  4. Use the trigger values (error-state values, payment tokens) to simulate outcomes that are not tied to a card number.

Square test card FAQ

What are the Square test card numbers?

Square's sandbox accepts 4111 1111 1111 1111 (Visa) with CVV 111 and any future expiry date. American Express uses 3400 000000 00009 with CVV 1111. To force errors, keep a valid card and change one field: CVV 911, postal code 99999 or expiry 01/40.

Do Square test cards work in production?

No. These numbers are only recognised by the Square test environment and are rejected by the live platform. They are not real cards and cannot be used for a purchase.

How do I test a declined payment with Square?

Square triggers failures through error-state values as well as dedicated card numbers. Both are listed on this page.