What an AVS test is
An AVS test is a request a payment processor sends to the card issuer to compare the billing address on an order with the address on file for the card. AVS stands for Address Verification System. It runs on card-not-present transactions: online orders, phone orders, mail orders. The issuer returns a one-letter or two-letter code, and the merchant decides what to do with that code.
AVS checks two fields: the numeric part of the street address and the billing ZIP code. It does not check the cardholder name. It does not check the CVV. Those are separate checks with separate response codes.
address verification system test
How the check runs
- The customer enters a billing address at checkout.
- The merchant sends an authorization request containing the street number and ZIP.
- The issuer compares those values against its records for the account.
- The issuer returns an authorization response plus an AVS code.
The exchange adds no separate step for the customer. It travels inside the normal authorization message and returns in the same round trip.
Common AVS response codes
- Y: street address and 5-digit ZIP match.
- A: street address matches, ZIP does not.
- Z: 5-digit ZIP matches, street address does not.
- N: neither the street address nor the ZIP matches.
- U: the issuer does not support AVS, or the data is unavailable.
- R: the issuer system is unavailable. Retry.
- S: the issuer does not support AVS for this card type.
- G: non-US issuer. Address not verified.
- W: 9-digit ZIP matches, street address does not.
- X: street address and all nine ZIP digits match.
Mastercard uses different letters in some cases. Check the processor documentation for the exact list that applies to your gateway.
Address Verification System Test: A Comprehensive Guide
AVS test transactions in a sandbox
Processors publish test card numbers and test addresses. A developer sends an authorization with a given test card and a given ZIP, and the sandbox returns a fixed AVS code. This confirms that checkout code handles Y, N, and U correctly before launch. Test values are documented per processor and per gateway. They do not work against live card numbers.
What AVS does not do
AVS is one signal among several. A Y response does not prove the person placing the order holds the card. Address data can be stale after a move. Issuer support varies by country and card type, and many non-US issuers return U or G for most transactions.
A merchant that declines every non-Y response will decline valid orders. A merchant that accepts every response gets no protection. Most set thresholds: require a ZIP match, allow an address mismatch with review, and route mismatches to manual review.
Chargeback rules
Card network rules let a merchant contest a fraud chargeback when AVS and CVV checks ran and the transaction met the network criteria. Criteria differ by network and transaction type. Merchants should store the AVS code and the CVV response code with the order record.