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
-
Determine the Correct Setting
Use the Settings for AVS table to determine which AVS setting best suits your needs.
-
Prepare the Iframe
Follow steps 1-2 of the Creating a save card page with the iframe tutorial.
-
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 } }'
-
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
-
Determine the Correct Setting
Use the Settings for AVS table to determine which AVS setting best suits your needs.
-
Prepare the Iframe
Follow steps 1-6 of the Creating a save card page with your own form tutorial.
-
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 } }'
-
Post Card Information to Nexio
Follow step 7b of the Creating a save card page with your own form tutorial.
-
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
-
Determine the Correct Setting
Use the Settings for AVS table to determine which AVS setting best suits your needs.
-
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 } }'
-
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 |
---|---|
0 | Do not perform AVS check |
1 | Always save card regardless of result |
2 | Do not save card if the address match fails |
3 | Do not save card if the postal code match fails |
4 | Do not save the card if either the address match fails OR the postal code match fails |
5 | Do 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
addressMatch | postalMatch | What will happen: |
---|---|---|
true | true | Card will be saved |
true | false | Card will be saved |
false | true | Card will be saved |
false | false | Card will be saved |
When verifyAvs is set to 2
addressMatch | postalMatch | What will happen: |
---|---|---|
true | true | Card will be saved |
true | false | Card will be saved |
false | true | Card will not be saved |
false | false | Card will not be saved |
When verifyAvs is set to 3
addressMatch | postalMatch | What will happen: |
---|---|---|
true | true | Card will be saved |
true | false | Card will not be saved |
false | true | Card will be saved |
false | false | Card will not be saved |
When verifyAvs is set to 4
addressMatch | postalMatch | What will happen: |
---|---|---|
true | true | Card will be saved |
true | false | Card will not be saved |
false | true | Card will not be saved |
false | false | Card will not be saved |
When verifyAvs is set to 5
addressMatch | postalMatch | What will happen: |
---|---|---|
true | true | Card will be saved |
true | false | Card will be saved |
false | true | Card will be saved |
false | false | Card will not be saved |
Updated 8 months ago