Simulating AVS Responses

Table 1

By default, all transactions will have an AVS response of "MATCH" (address information matches). In order to simulate a different response, add a single letter code from the table below in front of the value you include for the street parameter.

Prefix

AVS Code Description
X MATCH Both the address and zip code match
A MATCH_ADDRESS_ONLY

Address matches, but zip code does not

Z MATCH_ZIP_ONLY Zip code matches, but address does not
N NO_MATCH No part of the address matches
U NOT_PROCESSED Address information is unavailable
Q UNKNOWN Unknown response from issuer/bank
Example Request
cURL -X POST https://api.test.paysafe.com/cardpayments/v1/accounts/89987201/auths  \
-u devcentre322:B-qa2-0-53625f86-302c021476f52bdc9deab7aea876bb28762e62f92fc6712d0214736abf501e9675e55940e83ef77f5c304edc7968 \
-H 'Content-Type: application/json'  \
-d ' {
         "merchantRefNum" : "demo-1b",
         "amount" : 10098,
         "settleWithAuth":true,
         "card" : {
           "cardNum" : "4111111111111111",
           "cardExpiry":{
             "month":2,
             "year":2027
            },
            "cvv":123
          },
          "billingDetails":{
             "street":"12 100 Queen Street West",
             "city":"Toronto",
             "state":"ON",
             "country":"CA",
             "zip":"M5H 2N2"
          }
        }'
Example Response
{
  "links":[
    {
      "rel":"settlement",
      "href":"https://api.test.paysafe.com/cardpayments/v1/accounts/89987201/settlements/09275749-7b1a-4162-b130-3f3ab6c87734"
    },
    {
      "rel":"self",
      "href":"https://api.test.paysafe.com/cardpayments/v1/accounts/89987201/auths/09275749-7b1a-4162-b130-3f3ab6c87734"
    }
  ],
  "id":"09275749-7b1a-4162-b130-3f3ab6c87734",
  "merchantRefNum":"demo-1b",
  "txnTime":"2014-06-02T18:13:32Z",
  "status":"COMPLETED",
  "amount":10098,
  "settleWithAuth":true,
  "availableToSettle":0,
  "card":{
    "type":"VI",
    "lastDigits":"1111",
    "cardExpiry":{
      "month":2,
      "year":2027
    }
  },
  "authCode":"102392",
  "billingDetails":{
    "street":"Z 100 Queen Street West",
    "city":"Toronto",
    "state":"ON",
    "country":"CA",
    "zip":"M5H2N2"
  },
  "merchantDescriptor":{
    "dynamicDescriptor":"Test",
    "phone":"123-1234123"
  },
  "currencyCode":"CAD",
  "avsResponse":"MATCH_ZIP_ONLY",
  "cvvVerification":"MATCH",
  "settlements":[
    {
      "links":[
        {
          "rel":"self",
          "href":"https://api.test.paysafe.com/cardpayments/v1/accounts/89987201/settlements/09275749-7b1a-4162-b130-3f3ab6c87734"
        }
      ],
      "id":"09275749-7b1a-4162-b130-3f3ab6c87734",
      "merchantRefNum":"demo-1b",
      "txnTime":"2014-06-02T18:13:32Z",
      "status":"PENDING",
      "amount":10098,
      "availableToRefund":10098
    }
  ]
}

Table 2

By default, all transactions will have an AVS response of "MATCH" (address information matches). In order to simulate a different response, add a single letter code from the table below in front of the value you include for the street parameter. The system takes a match of first two digits. For example, if you have "1st street and 2nd block", then, it will match "12".

Prefix

AVS Code Description
10 MATCH Both the address and zip code match
11 MATCH_ADDRESS_ONLY

Address matches, but zip code does not

12 MATCH_ZIP_ONLY Zip code matches, but address does not
13 NO_MATCH No part of the address matches
14 NOT_PROCESSED Address information is unavailable
15 UNKNOWN Unknown response from issuer/bank
16 AVS_POSTAL_NOT_VERIFIED_STREET_ADDRESS_MATCH Postal Code is not verified and the street address matches.
17 AVS_POSTAL_CODE_MATCH_STREET_ADDRESS_NOT_VERIFIED Postal Code matches but the street address is not verified.
18 AVS_POSTAL_CODE_RETRY_STREET_ADDRESS_SYSTEM_UNAVAILABLE Retry the postal code as the street address system is unavailable.

Note: The above table only applies for UK/EU merchants for Acquiring.

Example Request
cURL -X POST https://api.test.paysafe.com/cardpayments/v1/accounts/89987201/auths  \
-u devcentre322:B-qa2-0-53625f86-302c021476f52bdc9deab7aea876bb28762e62f92fc6712d0214736abf501e9675e55940e83ef77f5c304edc7968 \
-H 'Content-Type: application/json'  \
-d ' {
         "merchantRefNum" : "demo-1b",
         "amount" : 10098,
         "settleWithAuth":true,
         "card" : {
           "cardNum" : "4111111111111111",
           "cardExpiry":{
             "month":2,
             "year":2027
            },
            "cvv":123
          },
          "billingDetails":{
             "street":"12 100 Queen Street West",
             "city":"Toronto",
             "state":"ON",
             "country":"CA",
             "zip":"M5H 2N2"
          }
        }'
Example Response
{
  "links":[
    {
      "rel":"settlement",
      "href":"https://api.test.paysafe.com/cardpayments/v1/accounts/89987201/settlements/09275749-7b1a-4162-b130-3f3ab6c87734"
    },
    {
      "rel":"self",
      "href":"https://api.test.paysafe.com/cardpayments/v1/accounts/89987201/auths/09275749-7b1a-4162-b130-3f3ab6c87734"
    }
  ],
  "id":"09275749-7b1a-4162-b130-3f3ab6c87734",
  "merchantRefNum":"demo-1b",
  "txnTime":"2014-06-02T18:13:32Z",
  "status":"COMPLETED",
  "amount":10098,
  "settleWithAuth":true,
  "availableToSettle":0,
  "card":{
    "type":"VI",
    "lastDigits":"1111",
    "cardExpiry":{
      "month":2,
      "year":2027
    }
  },
  "authCode":"102392",
  "billingDetails":{
    "street":"Z 100 Queen Street West",
    "city":"Toronto",
    "state":"ON",
    "country":"CA",
    "zip":"M5H2N2"
  },
  "merchantDescriptor":{
    "dynamicDescriptor":"Test",
    "phone":"123-1234123"
  },
  "currencyCode":"CAD",
  "avsResponse":"MATCH_ZIP_ONLY",
  "cvvVerification":"MATCH",
  "settlements":[
    {
      "links":[
        {
          "rel":"self",
          "href":"https://api.test.paysafe.com/cardpayments/v1/accounts/89987201/settlements/09275749-7b1a-4162-b130-3f3ab6c87734"
        }
      ],
      "id":"09275749-7b1a-4162-b130-3f3ab6c87734",
      "merchantRefNum":"demo-1b",
      "txnTime":"2014-06-02T18:13:32Z",
      "status":"PENDING",
      "amount":10098,
      "availableToRefund":10098
    }
  ]
}
Did you find this page useful?