Braintree Test CVV: Sandbox CVV Values Explained

A Braintree test CVV is the dummy security code you enter alongside a sandbox test card number while building an integration. In the Braintree sandbox, ordinary test cards accept almost any 3-digit CVV, and American Express test cards accept 4 digits, while a small set of published test numbers exists to force a CVV verification failure so you can exercise your error handling.

How CVV fits into a Braintree sandbox payment

Braintree separates the card number, the expiration date, and the CVV when it tokenizes a payment method. The CVV never gets stored on your servers, and in the sandbox it never reaches a real card network. When you request a payment method nonce with the verifyCard option enabled, Braintree runs CVV and address verification checks against the test number first. Without that option, the sandbox still accepts the card, but the verification results stay empty.

Which CVV value should you type?

Always pull the current pairs from the official test card table, since values are occasionally adjusted and the table is the only reliable source for which number triggers which response.

Testing a CVV failure on purpose

A CVV failure is a normal outcome, not a bug. To reproduce one, submit the test card that is documented as failing CVV verification with verifyCard set to true. Braintree then returns a CVV response code along with the result, and the common values you will see are M for a match and N for no match. Your checkout should treat an unmatched CVV as a decline that the shopper can retry with a corrected code, and you should log the response code rather than the code the shopper typed.

Reading the response

Common Braintree test CVV problems

Keep real card data out of the sandbox

Sandbox environments exist so that no live account number, and no real CVV, is ever typed into a test form. Storing a card verification value after authorization is prohibited by the card network rules, and using live data in a test account creates a compliance problem for your business. Keep the test numbers in a shared fixture file, rotate them when the documentation changes, and confirm that your production keys are never loaded in a development build.

More

Read our complete guide: Buy CVV Cheap: Pricing, Risks, and What First-Time Buyers Need to Know