Use a public Braintree test card such as Visa 4111 1111 1111 1111 with any future expiration date and a matching CVV. Braintree test cards work only in the sandbox and cannot charge a real card. Never use real card data in test mode.

What is a Braintree test card?

A Braintree test card is a published card number that Braintree accepts in its sandbox environment. It lets developers test payment forms, tokenization, declines, and error handling without moving money. These numbers are not issued to consumers and have no value outside test mode.

Common Braintree test card numbers

These are common Braintree sandbox values. Confirm them in the Braintree testing reference before you rely on them in automated tests.

  • Visa: 4111 1111 1111 1111
  • Mastercard: 5555 5555 5555 4444
  • American Express: 3782 822463 10005
  • Discover: 6011 1111 1111 1117
  • JCB: 3530 1113 3330 0000
  • Diners Club: 3056 9309 0259 04

How to use a Braintree test card in the sandbox

  1. Switch your Braintree SDK and API credentials to sandbox mode.
  2. Open your checkout form and enter a test card number from the list above.
  3. Use a future expiration date. For CVV, use 123 for Visa, Mastercard, and Discover, or 1234 for American Express.
  4. Submit the payment and inspect the response, token, and webhook events.

CVV and expiration rules for test cards

Braintree sandbox accepts a CVV value that matches the card type length. Use 123 for 3-digit CVV cards and 1234 for American Express. Use a future expiration date such as 12/2030. Some test scenarios require specific amounts or card numbers to trigger declines, so check the Braintree testing reference for advanced cases.

Testing declines and error paths

Sandbox testing should cover more than a successful charge. Use Braintree decline test values to simulate processor declines, CVV failures, and AVS mismatches. You can also test invalid card numbers, expired dates, and malformed CVV input to confirm your form validation and error messages. Record response codes and show clear customer-facing messages.

Safety rules for Braintree test cards

  • Use test cards only with sandbox credentials.
  • Never enter real cardholder data into a test form.
  • Do not store test card numbers in production configuration.
  • Keep sandbox and production API keys separate.
  • Review PCI DSS obligations before handling live card data.