Address Verification Service
Address Verification Service (AVS) is a security feature where the billing address entered by the payer is compared with the records held by the card issuer. An AVS response code (response.cardholderVerification.avs.gatewayCode
) is returned in the transaction response message indicating the extent to which the addresses match or fail to match.
The gateway checks the response code against your configuration in the Merchant Administration and takes appropriate action (allows the payment to be processed normally, automatically rejects it, or waits for you to manually determine how to handle it). The transaction can also be rejected based on the risk assessment result received from the risk management service, which uses the AVS response during the assessment. For more information, contact your payment service provider.
If you are configured to use AVS, the AVS check is done to all card transactions you send.
Supported methods and transactions
Integration methods | Payment methods | Transactions |
---|---|---|
|
|
|
- AVS is only supported by some acquirers. Furthermore, not all banks support AVS. If the issuing bank does not support AVS, any AVS data passed in the transaction request is ignored.
- You can test your integration with test cards that return specific AVS check results. For details, see Test Cards.
Before you start using AVS, configure the rules for how the Mastercard Gateway must react to specific AVS results in the Merchant Administration’s Transaction Filtering > AVS Rules menu.
When sending a transaction request, include in the request as many details about the payer's name and billing address as possible. Also, if you want to override the rules you have defined in the Merchant Administration, include the order.transactionFiltering.avsResponseCodeRules
object with the new rules in the request.
Sample request and response
This section details a sample AVS request and response.
{ "apiOperation": "PAY", "billing": { "address": { "postcodeZip": "CR1 012", "street": "Leamington Street" } }, "order": { "amount": "100.00", "currency": "EUR", "transactionFiltering": { "avsResponseCodeRules": [ { "avsResponseCode": "ADDRESS_MATCH", "action": "NO_ACTION" }, { "avsResponseCode": "ADDRESS_ZIP_MATCH", "action": "NO_ACTION" }, { "avsResponseCode": "NAME_ADDRESS_MATCH", "action": "REVIEW" }, { "avsResponseCode": "NAME_MATCH", "action": "NO_ACTION" }, { "avsResponseCode": "NAME_ZIP_MATCH", "action": "REJECT" }, { "avsResponseCode": "NOT_AVAILABLE", "action": "REVIEW" }, { "avsResponseCode": "NOT_REQUESTED", "action": "NO_ACTION" }, { "avsResponseCode": "NOT_VERIFIED", "action": "REJECT" }, { "avsResponseCode": "NO_MATCH", "action": "REVIEW" }, { "avsResponseCode": "SERVICE_NOT_AVAILABLE_RETRY", "action": "NO_ACTION" }, { "avsResponseCode": "SERVICE_NOT_SUPPORTED", "action": "REJECT" }, { "avsResponseCode": "ZIP_MATCH", "action": "REVIEW" } ] } }, "sourceOfFunds": { "provided": { "card": { "expiry": { "month": "05", "year": "20" }, "number": "<16-digit card number>", "nameOnCard": "TESTNAME" } }, "type": "CARD" } }
The transaction response contains the result of the AVS check in the response
object:
response.gatewayCode
Summary of the result of the operation.response.gatewayRecommendation
Action taken by the gateway based on the result.
"acquirerCode": "0000", "cardSecurityCode": { "acquirerCode": "M", "gatewayCode": "MATCH" }, "cardholderVerification": { "avs": { "acquirerCode": "M", "gatewayCode": "ADDRESS_ZIP_MATCH" } }, "gatewayCode": "APPROVED", "gatewayRecommendation": "NO_ACTION" }