Enabling the Address Verification Service

Background
Before starting this tutorial, make sure you understand the following topics from the Quick start section:

You can use the AVS while saving a card token with the iframe, with your own form, or through the API for US-based addresses.

Contact Integrations Support if you have questions about address verification.

With the iframe

  1. Determine the Correct Setting

    Use the Settings for AVS table to determine which AVS setting best suits your needs.

  2. Prepare the Iframe

    Follow steps 1-2 of the Creating a save card page with the iframe tutorial.

  3. Request a One-time-use Token

    Request an e-commerce one-time-use token.

    Include the object "processingOptions": { "verifyAvs": <your_AVS_setting_from_step_1> }
    in the body of your request.

    curl -X POST https://api.nexiopaysandbox.com/pay/v3/token \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Basic [Base64_encoded_login]'
      -d '{
      "processingOptions": {
        "verifyAvs": 3
      }
    }'
    

  4. Load the Iframe

    Follow steps 4-6 of the Creating a save card page with the iframe.

    Now, when the iframe is loaded an AVS check will be performed.

    Nexio will return the results back to you in the AVS response.

With your own form

  1. Determine the Correct Setting

    Use the Settings for AVS table to determine which AVS setting best suits your needs.

  2. Prepare the Iframe

    Follow steps 1-6 of the Creating a save card page with your own form tutorial.

  3. Request a One-time-use Token

    Request an e-commerce one-time-use token.

    Include the object "processingOptions": { "verifyAvs": <your_AVS_setting_from_step_1> }
    in the body of your request.

    (This is step 7a of the Creating a save card page with your own form tutorial.)

    curl -X POST https://api.nexiopaysandbox.com/pay/v3/token \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Basic [Base64_encoded_login]'
      -d '{
      "processingOptions": {
        "verifyAvs": 3
      }
    }'
    

  4. Post Card Information to Nexio

    Follow step 7b of the Creating a save card page with your own form tutorial.

  5. Listen for Nexio's Response

    Follow step 8 of the Creating a save card page with your own form tutorial.
    See the AVS response page for more information about the possible results included in the response.

With the API

  1. Determine the Correct Setting

    Use the Settings for AVS table to determine which AVS setting best suits your needs.

  2. Request a One-time-use Token

    Request an e-commerce one-time-use token.

    Include the object "processingOptions": { "verifyAvs": <your_AVS_setting_from_step_1> }
    in the body of your request.

    curl -X POST https://api.nexiopaysandbox.com/pay/v3/token \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Authorization: Basic [Base64_encoded_login]'
      -d '{
      "processingOptions": {
        "verifyAvs": 3
      }
    }'
    

  3. Post Card Information to Nexio

    Follow step 3 of the Saving a card token with the API tutorial.

Settings for AVS

verifyAvs set to:Purpose
0Do not perform AVS check
1Always save card regardless of result
2Do not save card if the address match fails
3Do not save card if the postal code match fails
4Do not save the card if either the address match fails OR the postal code match fails
5Do not save the card if both the address match AND the postal code match fail

When verifyAvs is set to 0

You will not receive an avsResponse object.

When verifyAvs is set to 1

addressMatchpostalMatchWhat will happen:
truetrueCard will be saved
truefalseCard will be saved
falsetrueCard will be saved
falsefalseCard will be saved

When verifyAvs is set to 2

addressMatchpostalMatchWhat will happen:
truetrueCard will be saved
truefalseCard will be saved
falsetrueCard will not be saved
falsefalseCard will not be saved

When verifyAvs is set to 3

addressMatchpostalMatchWhat will happen:
truetrueCard will be saved
truefalseCard will not be saved
falsetrueCard will be saved
falsefalseCard will not be saved

When verifyAvs is set to 4

addressMatchpostalMatchWhat will happen:
truetrueCard will be saved
truefalseCard will not be saved
falsetrueCard will not be saved
falsefalseCard will not be saved

When verifyAvs is set to 5

addressMatchpostalMatchWhat will happen:
truetrueCard will be saved
truefalseCard will be saved
falsetrueCard will be saved
falsefalseCard will not be saved