Square Test Card Numbers

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

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 0000 0000 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.