Skip to main content

Square Sandbox Test Cards

Official test card numbers for Square Web Payments SDK, token generation, delayed capture, and card decline testing.

Official Square Docs
Developer Notice: Square test cards are intended only for Square's designated test environment. They do not represent real financial accounts and are not intended for live payment authorization.
Source: Official Square testing documentation · Last verified against Square documentation: 16 September 2026
Verification methodology →
Need synthetic test numbers for frontend form validation? See our Test Credit Card Numbers guide to understand the difference between synthetic QA fixtures and Square's official sandbox values.
Read Guide
Scenario / Test Goal Test Card Number Expiry CVV Expected Result Verification
Success-state card (Visa)
4111 1111 1111 1111 Any future date 111 Generates a success-state payment token. CreatePayment is normally COMPLETED, or APPROVED when delayed capture is requested. Verified against official source Recorded: 2026-09-16 Verified against the linked official provider documentation on 2026-09-16.
Success-state card (Mastercard)
5105 1051 0510 5100 Any future date 111 Generates a success-state payment token. CreatePayment is normally COMPLETED, or APPROVED when delayed capture is requested. Verified against official source Recorded: 2026-09-16 Verified against the linked official provider documentation on 2026-09-16.
Card declined
4000 0000 0000 0002 Any future date 111 Generates a card-declined error when the payment token is processed by CreatePayment. Verified against official source Recorded: 2026-09-16 Verified against the linked official provider documentation on 2026-09-16.
Card on file auth declined
4000 0000 0000 0010 Any future date 111 Card on file authorization declined. Verified against official source Recorded: 2026-09-16 Verified against the linked official provider documentation on 2026-09-16.

Using Square Sandbox Cards in Development

Square Sandbox provides official test card numbers to verify payments created with the Web Payments SDK and Payments API.

1. Configure Square Sandbox Credentials

Use your Square Sandbox Application ID and Sandbox Access Token from the Square Developer Dashboard. Point API requests to connect.squareupsandbox.com.

2. Enter Test Card Credentials

In the Web Payments SDK card element, enter official test cards from the table above. Use any future expiration date, CVV 111, and any valid postal code format.

3. Generate Payment Tokens

Calling card.tokenize() generates a test payment token (cnon:...) to pass to your backend CreatePayment endpoint.

4. Verify Payment Status & Declines

Success cards produce payment objects with status COMPLETED (or APPROVED for delayed capture). Decline cards trigger card-declined errors for checkout UI verification.

Other Gateway Sandboxes: Stripe PayPal Adyen Braintree Razorpay

Related Payment Testing Tools & Resources