Skip to main content
S
Payment provider

Square Sandbox Test Card Numbers

The Square Sandbox does not accept real cards. Use these numbers in the Web Payments SDK or In-App Payments SDK to get a payment token, or pass a test source_id straight to CreatePayment.

Sandbox and test mode only. Never use real card numbers.
Source: Square docs, checked November 2026

Before you test

  • Expiry: any future month and year.
  • USD, CAD and GBP payments need a valid postal code. Payments in Japan do not support postal codes.
  • Card-present testing is not supported in the Sandbox.

Successful card numbers

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

Error values (SDK card entry)

The SDK still returns a payment token. CreatePayment fails when it processes that token.

ValueScenarioExpected result
4000000000000002
Card numberCard declined
4000000000000010
Card numberCard on file auth declined
911
CVVCard CVV incorrect
99999
Postal codeCard postal code incorrect
01/40
Expiration dateCard expiration date incorrect

Test source_id values for CreatePayment

source_idScenarioExpected resultDecline code
cnon:card-nonce-ok
Card payment succeedsSuccess
cnon:card-nonce-declined
Card declinedError
cnon:card-nonce-rejected-cvv
Bad CVVError
cnon:card-nonce-rejected-postalcode
Bad postal codeError
cnon:card-nonce-rejected-expiration
Bad expiration dateError
ccof:customer-card-id-ok
Card on file succeedsSuccess
ccof:customer-card-id-declined
Card on file declinedError
ccof:customer-card-id-rejected-expiration
Card on file, bad expirationError
bnon:bank-nonce-insufficient-funds
ACH insufficient fundsINSUFFICIENT_FUNDS (PENDING, then FAILED after 1 minute)Square INSUFFICIENT_FUNDS

SCA test cards (Web Payments SDK)

When a challenge appears, enter verification code 123456. In the Sandbox, verifyBuyer challenges in every region.

Card numberScenarioExpected result
4310 0000 0020 1019
Visa EU
CVV 111
Challenge with verification code 123456
5248 4800 0021 0026
Mastercard
CVV 111
Challenge with verification code 123456
5500 0000 0020 1016
Mastercard EU
CVV 111
Challenge with verification code 123456
3700 0000 0201 014
American Express EU
CVV 1111
Challenge with verification code 123456
4800 0000 0000 0004
Visa
CVV 111
No challenge
4811 1100 0000 0008
Visa
CVV 111
No challenge, failed verification

Testing failed subscription renewals on Square

Renewals on Square charge a card on file. The Sandbox has dedicated card-on-file values for that path.

  1. 1For the happy path, charge ccof:customer-card-id-ok as the source_id.
  2. 2For a failed renewal, charge ccof:customer-card-id-declined. CreatePayment returns a card declined error.
  3. 3To test a stored card with an outdated expiry, use ccof:customer-card-id-rejected-expiration.
  4. 4If you store cards through the SDK, 4000 0000 0000 0010 simulates a card on file whose authorization is declined.

In production, many failed renewals are soft declines that can succeed on a later attempt if the retry is timed right. See how Slicker smart retries pick the timing, gateway and amount for each failed payment.

Payment recovery

Your sandbox passes. What about the renewals failing in production?

Test cards prove your integration handles a decline. They do not show how much of your real failed Square volume is recoverable. We will look at your decline mix and tell you.

Talk to Sales

Square test card FAQ

What test card numbers work in the Square Sandbox?

Visa 4111 1111 1111 1111, Mastercard 5105 1051 0510 5100, Discover 6011 0000 0000 0004 and American Express 3400 000000 00009, with CVV 111 (1111 for Amex) and any future expiry.

How do I simulate a declined card on Square?

Enter 4000 0000 0000 0002 in the SDK, or pass cnon:card-nonce-declined as the source_id in CreatePayment.

What is the Square SCA test verification code?

Enter 123456 when the Sandbox shows the verification code challenge.

Sources

Values copied from the provider's documentation and checked November 2026. Providers change test values; if a number stops working, the source page is the reference.

Test cards for other providers

Cookie preferences

Your privacy matters

We use analytics to understand how you use our site and improve your experience. Privacy Policy