A Braintree test card is a sandbox-only card number that simulates a real payment so you can run charges, refunds, and declines without moving money. The most widely used Braintree test card is 4111111111111111 (Visa), used with any future expiration date, any 3-digit CVV, and any well-formed billing postal code.
What a Braintree test card actually does
In sandbox mode, Braintree routes the transaction through a simulated processor instead of a real bank network. That means the number is checked for format and Luhn validity, then mapped to a canned response. A test card can return an approval, a decline, a CVV mismatch, or an address verification failure depending on which number you use.
Nothing settles, no funds move, and no real cardholder is involved. The point is to let developers exercise checkout, vaulting, subscriptions, and error handling before going live.
Common Braintree sandbox card numbers
These are the standard test numbers published for sandbox use. Confirm the current list against the Braintree developer documentation before you build automated tests around them.
- Visa: 4111111111111111
- Visa (alternate): 4012888888881881
- Mastercard: 5555555555554444
- Mastercard (alternate): 5105105105105100
- American Express: 378282246310005
- American Express (alternate): 371449635398431
- Discover: 6011111111111117
- Diners Club: 30569309025904
- JCB: 3530111333300000
Expiration, CVV, and postal code values
Any expiration date in the future is accepted. Use a 3-digit CVV for Visa, Mastercard, and Discover, and a 4-digit CVV for American Express. Postal codes should match the format of the country you are billing in. Braintree also ships specific test values that force CVV and AVS mismatch responses, which is useful when you want to check how your UI handles a failed verification step.
How to use a test card in the Braintree sandbox
- Create a sandbox account in the Braintree Control Panel.
- Generate sandbox API credentials: merchant ID, public key, and private key.
- Point your integration at the sandbox environment rather than production.
- Submit a transaction with one of the test numbers above.
- Open the Control Panel and inspect the response, status, and any gateway rejection reason.
Repeat with different numbers to cover the outcomes your checkout needs to handle.
Scenarios you can verify
- Successful authorization and settlement
- Processor declines and soft declines
- CVV and AVS mismatch handling
- Refunds, voids, and partial captures
- Vaulting a card and creating a customer record
- Recurring billing and subscription logic
- 3D Secure and other verification flows
Test cards do not work in production
Braintree blocks known test numbers on live accounts, and a sandbox number will never charge a real account. If you need to test against the live environment, Braintree requires you to use your own real card. Handling genuine card data also brings PCI DSS obligations, which is one reason the sandbox exists.
Buying, selling, or using card numbers that belong to other people is card fraud in every jurisdiction and is not the same thing as sandbox testing. Test numbers are public fixtures that only work in a development environment.
Frequently asked questions
Is 4111111111111111 accepted by Braintree?
Yes, in sandbox mode. It is the classic approval number and appears across most payment gateway test suites.
Why did my test card get declined?
Some test numbers are deliberately wired to fail so you can test error paths. Swap in a different number, and check that your API keys are sandbox keys rather than production keys.
Do test cards expire?
The number itself does not. Use any future expiration date and the sandbox will accept it.