CVV Test Mode: How Sandbox Card Verification Works
CVV test mode is a payment gateway sandbox. It accepts fake CVC values, contacts no issuer, and charges no card.
Any 3-digit value works as a CVV in the Authorize.Net sandbox, and any 4-digit value works for American Express test cards. The sandbox does not check the card code against a real issuer, so 123 and 1234 return normal approvals on the standard test card numbers. The CVV field matters in testing when you want to see how your code reacts to a card code mismatch, a missing code, or a code the issuer cannot verify.
Use 123 for Visa, Mastercard, Discover, JCB, and Diners Club test cards. Use 1234 for the American Express test card. The value is not compared to anything in test mode, so any digits of the right length pass.
Format rules from production still apply. Send 3 or 4 digits, no spaces, and pass the value as a string so a leading zero survives. An empty field is not the same as a valid code, and the gateway reports it as a different result.
AIM uses the field x_card_code. Direct Post adds the same value to the form it posts to the gateway. Both carry the CVV inside the transaction request, so it never lands in your own database.
The JSON API nests the value as cardCode inside payment.creditCard. Accept.js and Accept Hosted tokenize the card before the request reaches your server, which keeps the CVV out of your logs.
Test traffic goes to the sandbox host, not the production host. The JSON endpoint is https://apitest.authorize.net/xml/v1/request.api and the AIM endpoint is https://test.authorize.net/gateway/transact.dll.
The transaction response carries one letter for the card code result. Your integration decides what to do with each letter.
Authorize.Net returns these letters in AIM field 39 and in the JSON API transaction response. In the sandbox, an M shows up for the plain test cards with any 3 or 4 digit code you send.
Old forum posts quote card numbers for each failure case. Treat those with care, because Authorize.Net has revised the list more than once. Pull the number from the current guide on the developer site instead.
No. In production the issuer decides, and a mismatch can decline the charge or pass through with a flag, based on your account settings. The sandbox skips the issuer step, so it cannot reproduce issuer-side results such as U.
PCI DSS bars storing the card verification code after authorization, in test data and live data alike. Never write x_card_code or cardCode to a log file, and never put a full test card number in a ticket where a real one could be mistaken for it.
For the plain success test cards, yes. Cards that Authorize.Net maps to a specific failure return their mapped result no matter which digits you send.
Do not. A real number in the sandbox does not reach an issuer, and the test account is not built for it.
1234. American Express uses a 4-digit code, and the length check still applies in test mode.
The card number you used is one that Authorize.Net maps to a no-match result. Swap it for a plain test card if you wanted an approval.
Yes. If the setting is off in the Merchant Interface, the gateway skips the check and the card code response stays empty.
CVV test mode is a payment gateway sandbox. It accepts fake CVC values, contacts no issuer, and charges no card.
Learn how to effectively test a payment gateway CVV for secure online transactions.
A Checkout.com test CVV is a sandbox-only code paired with a test card number to simulate card verification results without using a real card.
The Worldpay test CVV is a sandbox-only value tied to a test card in your developer account. Here is where to find it and how CVV checks behave in test.
The 2Checkout test CVV is 123 for Visa, Mastercard, and Discover sandbox cards, and 1234 for American Express. Learn which test values the gateway accepts.
Learn how to effectively test CVV for Razorpay transactions to ensure smooth online payment processing.
Discover what Square Test CVV is, its importance in online transactions, and how to use it effectively to enhance security.
An Adyen test CVV is the card verification value used with Adyen sandbox test cards. See which CVC to enter and how to test CVC checks safely.
Learn what a Braintree test CVV is, which digits to enter with sandbox test cards, and how to force a CVV failure for testing.