Update Merchant AVS Mode
curl --request PUT \
--url https://api.example.com/merchants/{id}/avsMode \
--header 'Content-Type: application/json' \
--data '
{
"data.type": "<string>",
"data.attributes.group": "<string>",
"data.attributes.AVS": "<string>"
}
'import requests
url = "https://api.example.com/merchants/{id}/avsMode"
payload = {
"data.type": "<string>",
"data.attributes.group": "<string>",
"data.attributes.AVS": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
'data.type': '<string>',
'data.attributes.group': '<string>',
'data.attributes.AVS': '<string>'
})
};
fetch('https://api.example.com/merchants/{id}/avsMode', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/merchants/{id}/avsMode",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'data.type' => '<string>',
'data.attributes.group' => '<string>',
'data.attributes.AVS' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/merchants/{id}/avsMode"
payload := strings.NewReader("{\n \"data.type\": \"<string>\",\n \"data.attributes.group\": \"<string>\",\n \"data.attributes.AVS\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/merchants/{id}/avsMode")
.header("Content-Type", "application/json")
.body("{\n \"data.type\": \"<string>\",\n \"data.attributes.group\": \"<string>\",\n \"data.attributes.AVS\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/merchants/{id}/avsMode")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"data.type\": \"<string>\",\n \"data.attributes.group\": \"<string>\",\n \"data.attributes.AVS\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyMerchants
Update Merchant AVS Mode
Update the Address Verification System (AVS) mode for a merchant
PUT
/
merchants
/
{id}
/
avsMode
Update Merchant AVS Mode
curl --request PUT \
--url https://api.example.com/merchants/{id}/avsMode \
--header 'Content-Type: application/json' \
--data '
{
"data.type": "<string>",
"data.attributes.group": "<string>",
"data.attributes.AVS": "<string>"
}
'import requests
url = "https://api.example.com/merchants/{id}/avsMode"
payload = {
"data.type": "<string>",
"data.attributes.group": "<string>",
"data.attributes.AVS": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
'data.type': '<string>',
'data.attributes.group': '<string>',
'data.attributes.AVS': '<string>'
})
};
fetch('https://api.example.com/merchants/{id}/avsMode', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/merchants/{id}/avsMode",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'data.type' => '<string>',
'data.attributes.group' => '<string>',
'data.attributes.AVS' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/merchants/{id}/avsMode"
payload := strings.NewReader("{\n \"data.type\": \"<string>\",\n \"data.attributes.group\": \"<string>\",\n \"data.attributes.AVS\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/merchants/{id}/avsMode")
.header("Content-Type", "application/json")
.body("{\n \"data.type\": \"<string>\",\n \"data.attributes.group\": \"<string>\",\n \"data.attributes.AVS\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/merchants/{id}/avsMode")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"data.type\": \"<string>\",\n \"data.attributes.group\": \"<string>\",\n \"data.attributes.AVS\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyEndpoint
PUT https://api.digitzs.com/merchants/{id}
Overview
Use this endpoint to update the AVS (Address Verification System) verification mode for a merchant account. AVS helps prevent fraudulent card transactions by verifying the cardholder’s billing address.Authentication
| Header | Value | Required |
|---|---|---|
x-api-key | Your API key | Yes |
Authorization | Bearer {appToken} | Yes |
appId | Your application ID | Yes |
Content-Type | application/json | Yes |
Path Parameters
string
required
The merchant account ID
Request Body
string
required
Must be
"merchants"string
required
Must be
"AVS"string
required
AVS mode to set:
"Standard"- Requires ZIP code match"Strict"- Requires full address match"Disabled"- No AVS verification
Example Request
{
"data": {
"type": "merchants",
"attributes": {
"group": "AVS",
"AVS": "Strict"
}
}
}
Response
Success Response (200 OK)
{
"links": {
"self": "https://api.digitzs.com/merchants/merchant_abc123"
},
"data": {
"type": "merchants",
"id": "merchant_abc123",
"attributes": {
"AVS": "Strict",
"updatedAt": "2024-01-20T16:00:00Z"
}
}
}
Code Examples
curl -X PUT https://api.digitzs.com/merchants/merchant_abc123 \
-H "x-api-key: your-api-key" \
-H "Authorization: Bearer your-app-token" \
-H "appId: your-app-id" \
-H "Content-Type: application/json" \
-d '{
"data": {
"type": "merchants",
"attributes": {
"group": "AVS",
"AVS": "Strict"
}
}
}'
const axios = require('axios');
async function updateMerchantAVS(merchantId, avsMode) {
const response = await axios.put(
`https://api.digitzs.com/merchants/${merchantId}`,
{
data: {
type: 'merchants',
attributes: {
group: 'AVS',
AVS: avsMode
}
}
},
{
headers: {
'x-api-key': 'your-api-key',
'Authorization': 'Bearer your-app-token',
'appId': 'your-app-id',
'Content-Type': 'application/json'
}
}
);
console.log(`AVS mode updated to: ${avsMode}`);
return response.data;
}
// Set to strict mode
updateMerchantAVS('merchant_abc123', 'Strict');
import requests
def update_merchant_avs(merchant_id, avs_mode):
url = f"https://api.digitzs.com/merchants/{merchant_id}"
headers = {
"x-api-key": "your-api-key",
"Authorization": "Bearer your-app-token",
"appId": "your-app-id",
"Content-Type": "application/json"
}
payload = {
"data": {
"type": "merchants",
"attributes": {
"group": "AVS",
"AVS": avs_mode
}
}
}
response = requests.put(url, headers=headers, json=payload)
response.raise_for_status()
print(f"AVS mode updated to: {avs_mode}")
return response.json()
# Set to strict mode
update_merchant_avs("merchant_abc123", "Strict")
<?php
function updateMerchantAVS($merchantId, $avsMode) {
$url = "https://api.digitzs.com/merchants/" . $merchantId;
$payload = json_encode([
"data" => [
"type" => "merchants",
"attributes" => [
"group" => "AVS",
"AVS" => $avsMode
]
]
]);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"x-api-key: your-api-key",
"Authorization: Bearer your-app-token",
"appId: your-app-id",
"Content-Type: application/json"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo "AVS mode updated to: $avsMode\n";
return json_decode($response, true);
}
// Set to strict mode
updateMerchantAVS("merchant_abc123", "Strict");
?>
require 'net/http'
require 'json'
def update_merchant_avs(merchant_id, avs_mode)
uri = URI("https://api.digitzs.com/merchants/#{merchant_id}")
request = Net::HTTP::Put.new(uri)
request['x-api-key'] = 'your-api-key'
request['Authorization'] = 'Bearer your-app-token'
request['appId'] = 'your-app-id'
request['Content-Type'] = 'application/json'
request.body = {
data: {
type: 'merchants',
attributes: {
group: 'AVS',
AVS: avs_mode
}
}
}.to_json
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(request)
end
puts "AVS mode updated to: #{avs_mode}"
JSON.parse(response.body)
end
# Set to strict mode
update_merchant_avs('merchant_abc123', 'Strict')
AVS Mode Comparison
| Mode | Verification Level | Fraud Protection | Customer Friction | Best For |
|---|---|---|---|---|
| Disabled | None | Low | None | Low-risk businesses, high trust environments |
| Standard | ZIP code match | Medium | Low | Most businesses, balanced approach |
| Strict | Full address match | High | Medium | High-risk categories, maximum security |
Understanding AVS
Standard Mode
Standard Mode
Requirements: ZIP/postal code must match billing address on file with card issuerPros:
- Good fraud prevention
- Minimal customer friction
- Industry standard
- Won’t catch address fraud if ZIP is correct
Strict Mode
Strict Mode
Requirements: Street address AND ZIP code must matchPros:
- Maximum fraud prevention
- Comprehensive address verification
- Protects high-value transactions
- Higher false decline rate
- More customer friction
- Legitimate typos cause failures
Disabled Mode
Disabled Mode
Requirements: No address verificationPros:
- No customer friction
- Faster checkout
- No legitimate decline from AVS
- Minimal fraud protection
- Higher chargeback risk
- May violate compliance requirements
Important Notes
Fraud Risk: Disabling AVS increases fraud risk. Only disable if you have alternative fraud prevention measures in place.
Immediate Effect: AVS mode changes apply immediately to all new transactions. In-flight transactions use the mode active at the time they were initiated.
Balance Security and Conversion: Standard mode provides good security while minimizing false declines. Start with Standard and adjust based on fraud patterns.
Best Practices
- Monitor Fraud Rates: Track chargeback rates after AVS changes
- Consider Your Industry: High-risk industries should use Strict mode
- Test Changes: Test AVS impact on legitimate transactions before switching modes
- Customer Communication: Inform customers about address verification requirements
- Gradual Changes: When increasing strictness, monitor conversion rates closely
When to Use Each Mode
Use Standard when:- Running general e-commerce
- Balancing security and conversion
- Processing medium-value transactions
- Selling high-value items ($500+)
- Operating in high-fraud industries
- Experiencing elevated chargeback rates
- Regulatory requirements demand it
- Processing known/trusted customers
- Running internal testing
- Accepting only low-value transactions
- Having comprehensive alternative fraud tools
Next Steps
Get Merchant Details
Verify updated AVS settings
Create Payment
Process payments with your AVS configuration

