Skip to main content
Blog Online Security

Prevent Credit Card Frauds By Implementing AVS With Paymetric

August 22, 2017 |

The online retail industry is a prime target for cybercrime, with credit cards, making various scams and frauds easier to conduct.

According to in 2014, 47 percent of fraudulent cross-border transactions on U.K. credit cards took place in the United States. U.S. credit card fraud is on the rise, too. About 31.8 million U.S. consumers had their credit cards breached in 2014, more than three times the number affected in 2013.


As shown in the statistics above, 14% of card fraud types are through lost or stolen cards that are used for transactions. An eCommerce website is not just a website but an online store and there is a greater responsibility of protecting the customer’s financial interests.

One of the ways to prevent the application from authorizing such transactions is to verify the billing address known as Address Verification System (AVS).

With the help of services like AVS, we can identify whether the user’s billing address zip code matches with the zip code associated with the credit card. If there is no match found, then the transaction is denied.

Implementing AVS Service With Paymetric

In this blog, we will go through steps on how to implement AVS service using PHP on web systems which have integrated Paymetric.

Earlier with Paymetric XiIntercept we would send the credit card details to Paymetric and receive the respective token and store it in our database. But with AVS we need to send this received token along with card holders address details to Paymetric XiPay for AVS.

Paymetric will send response code and based on our business logic, we can either allow them to proceed with the transaction or not. The diagram below shows the workflow of AVS with Paymetric.


To proceed with AVS we need following details from Paymetric such as XiPay URL, XiPay Host, XiPay Username, XiPay Password, XiPay MerchantID for both production and sandbox modes.

Once you have the details you can run the following PHP file by filling in the appropriate values.

XiPay supports the following processors: American Express, FDMS North, Paymentech Salem, Paymentech Tampa, and vital (TSYS). Based on the processor you’re using you need to send in the zip code and test the responses.

Normally XiPay will return response codes such as A (Address Match), Z (Zip Match), Y (Exact Match), NONE (Approval), U (Ver Unavailable) etc. Once we get the response codes we can work on our business logic to allow or not allow the user to proceed with further transactions.

This blog presents a high-level outline on implementing AVS with Paymetric. If you have any queries please write to us in the comment section below.


Venkateshwaran, Software Engineer at DCKAP has 3 + years of experience in Magento and WordPress. He is passionate about coding. He is a soccer fan and follows FC Barcelona team religiously.

More posts by Venkateshwaran