Testing card verification in Braintree starts with knowing which security code to type into your sandbox form. The CVV you enter in test mode determines whether the fake transaction approves, declines, or fails verification, which makes it the fastest way to exercise every branch of your checkout logic. This guide covers the standard test values, how they behave with different card brands, and how to keep your integration predictable.
What CVV value should I use for a successful Braintree test?
In the sandbox, the value 123 is the standard three-digit CVV for a successful verification on most test cards, including Visa, Mastercard, and Discover. American Express test cards use a four-digit CID, so pair them with 1234 instead. Always confirm against Braintree's current test values page, since the list is occasionally updated.
How do I simulate a CVV failure or a processor decline?
Alternate test values are designed to return specific verification results: one commonly documented value returns "CVV does not match" and another returns "CVV not verified," both of which typically surface as a processor decline in the response object. Use them to confirm your error messaging and retry flow behave correctly.
Do test CVVs work on every Braintree test card?
Yes. CVV responses are driven by the value you enter rather than the card number, so the same test codes work across Braintree's published sandbox cards. The check only runs when CVV rules are enabled on the merchant account, so test with the rules on and off to see both outcomes.
Key Features
- Sandbox-only CVV values that produce approved, declined, and unverified responses
- Compatible with every published Braintree test card number
- Four-digit CID support for American Express test transactions
- Repeatable, instant results with no real funds and no settlement
- Works with Drop-in UI, Hosted Fields, and direct API calls
- CVV rules can be toggled in the Control Panel to test both pass and fail paths
- Pairs with address verification (AVS) tests for complete fraud-tool coverage
Specs and setup: you need a Braintree sandbox account, a test API key pair, and one of the official test card numbers from the developer documentation. Test CVVs are three digits for Visa, Mastercard, and Discover and four digits for American Express. Everything runs in Braintree's hosted environment, so no live card data, no PCI-scoped storage, and no bank connection is involved. Never enter a real card number or a real security code in any test form.
Shipping and returns: the sandbox is a hosted service, so there is nothing to ship and nothing to return. Test transactions never move money, and sandbox charges can be voided or refunded freely while you experiment. If you hit an unexpected response, Braintree support and the developer documentation cover response codes in detail.