Skip to content

Open source, composable payments platform | PCI compliant | SaaS and Self-host options | Enables connectivity to multiple payment, payout, fraud, vault and tokenization providers | Uplifts authorization with intelligent routing and revenue recovery | Reduce payment processing costs with cost observability | Reduces payment ops with reconciliation

feat(core): add support for avs check flag (#14689)

Shubhodip pal01365da86035
diff --git a/api-reference/v1/openapi_spec_v1.json b/api-reference/v1/openapi_spec_v1.json
index 5c17acddbb..bfacfd0335 100644
--- a/api-reference/v1/openapi_spec_v1.json
+++ b/api-reference/v1/openapi_spec_v1.json
@@ -35872,6 +35872,13 @@
}
],
"nullable": true
+ },
+ "enable_avs_check": {
+ "type": "boolean",
+ "description": "Request address verification using the billing address for supported card payments.\nOmit this field on updates or confirmation to preserve the existing setting.",
+ "default": false,
+ "example": true,
+ "nullable": true
}
}
},
@@ -36454,6 +36461,13 @@
}
],
"nullable": true
+ },
+ "enable_avs_check": {
+ "type": "boolean",
+ "description": "Request address verification using the billing address for supported card payments.\nOmit this field on updates or confirmation to preserve the existing setting.",
+ "default": false,
+ "example": true,
+ "nullable": true
}
}
},
@@ -37280,6 +37294,12 @@
"description": "A connector-specific identifier representing the stored payment instrument",
"nullable": true,
"maxLength": 255
+ },
+ "enable_avs_check": {
+ "type": "boolean",
+ "description": "Whether address verification was requested for this payment.",
+ "example": true,
+ "nullable": true
}
}
},
@@ -38315,6 +38335,13 @@
}
],
"nullable": true
+ },
+ "enable_avs_check": {
+ "type": "boolean",
+ "description": "Request address verification using the billing address for supported card payments.\nOmit this field on updates or confirmation to preserve the existing setting.",
+ "default": false,
+ "example": true,
+ "nullable": true
}
},
"additionalProperties": false
@@ -39167,6 +39194,12 @@
"description": "A connector-specific identifier representing the stored payment instrument",
"nullable": true,
"maxLength": 255
+ },
+ "enable_avs_check": {
+ "type": "boolean",
+ "description": "Whether address verification was requested for this payment.",
+ "example": true,
+ "nullable": true
}
}
},
@@ -39913,6 +39946,13 @@
}
],
"nullable": true
+ },
+ "enable_avs_check": {
+ "type": "boolean",
+ "description": "Request address verification using the billing address for supported card payments.\nOmit this field on updates or confirmation to preserve the existing setting.",
+ "default": false,
+ "example": true,
+ "nullable": true
}
}
},
diff --git a/api-reference/v2/openapi_spec_v2.json b/api-reference/v2/openapi_spec_v2.json
index 49f99d9257..b73981d5b1 100644
--- a/api-reference/v2/openapi_spec_v2.json
+++ b/api-reference/v2/openapi_spec_v2.json
@@ -25826,6 +25826,13 @@
"description": "The webhook endpoint URL to receive payment status notifications",
"example": "https://merchant.example.com/webhooks/payment",
"nullable": true
+ },
+ "enable_avs_check": {
+ "type": "boolean",
+ "description": "Request address verification using the billing address for supported card payments.\nOmit this field on updates or confirmation to preserve the existing setting.",
+ "default": false,
+ "example": true,
+ "nullable": true
}
},
"additionalProperties": false
@@ -26051,6 +26058,13 @@
}
],
"nullable": true
+ },
+ "enable_avs_check": {
+ "type": "boolean",
+ "description": "Request address verification using the billing address for supported card payments.",
+ "default": false,
+ "example": true,
+ "nullable": true
}
},
"additionalProperties": false
@@ -26434,6 +26448,12 @@
}
],
"nullable": true
+ },
+ "enable_avs_check": {
+ "type": "boolean",
+ "description": "Whether address verification was requested for this payment.",
+ "example": true,
+ "nullable": true
}
},
"additionalProperties": false
@@ -26928,6 +26948,13 @@
}
],
"nullable": true
+ },
+ "enable_avs_check": {
+ "type": "boolean",
+ "description": "Request address verification using the billing address for supported card payments.\nOmit this field on updates or confirmation to preserve the existing setting.",
+ "default": false,
+ "example": true,
+ "nullable": true
}
},
"additionalProperties": false
@@ -27152,6 +27179,12 @@
"type": "object",
"description": "You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.",
"nullable": true
+ },
+ "enable_avs_check": {
+ "type": "boolean",
+ "description": "Whether address verification was requested for this payment.",
+ "example": true,
+ "nullable": true
}
}
},
@@ -27436,6 +27469,13 @@
}
],
"nullable": true
+ },
+ "enable_avs_check": {
+ "type": "boolean",
+ "description": "Request address verification using the billing address for supported card payments.\nOmit this field on updates or confirmation to preserve the existing setting.",
+ "default": false,
+ "example": true,
+ "nullable": true
}
},
"additionalProperties": false
diff --git a/crates/api_models/src/payments.rs b/crates/api_models/src/payments.rs
index c0ea3db493..aa40e64f59 100644
--- a/crates/api_models/src/payments.rs
+++ b/crates/api_models/src/payments.rs
@@ -380,6 +380,10 @@ pub struct PaymentsCreateIntentRequest {
/// Details of the party receiving the funds in an account funded transaction.
#[schema(value_type = Option<RecipientDetails>)]
pub recipient_details: Option<RecipientDetails>,
+
+ /// Request address verification using the billing address for supported card payments.
+ #[schema(default = false, example = true)]
+ pub enable_avs_check: Option<bool>,
}
#[cfg(feature = "v2")]
#[derive(Debug, serde::Serialize, serde::Deserialize, Clone, ToSchema)]
@@ -568,6 +572,11 @@ pub struct PaymentsUpdateIntentRequest {
/// Details of the party receiving the funds in an account funded transaction.
#[schema(value_type = Option<RecipientDetails>)]
pub recipient_details: Option<RecipientDetails>,
+
+ /// Request address verification using the billing address for supported card payments.
+ /// Omit this field on updates or confirmation to preserve the existing setting.
+ #[schema(default = false, example = true)]
+ pub enable_avs_check: Option<bool>,
}
#[cfg(feature = "v2")]
@@ -603,6 +612,7 @@ impl PaymentsUpdateIntentRequest {
enable_partial_authorization: None,
is_account_funded_transaction: None,
recipient_details: None,
+ enable_avs_check: None,
}
}
}
@@ -759,6 +769,10 @@ pub struct PaymentsIntentResponse {
/// Partially masked details of the party receiving the funds in an account funded transaction.
#[schema(value_type = Option<MaskedRecipientDetails>)]
pub recipient_details: Option<MaskedRecipientDetails>,
+
+ /// Whether address verification was requested for this payment.
+ #[schema(example = true)]
+ pub enable_avs_check: Option<bool>,
}
#[derive(Debug, serde::Serialize, Clone, ToSchema)]
@@ -1658,6 +1672,12 @@ pub struct PaymentsRequest {
/// The strategy to use when applying surcharge for this payment.
#[schema(value_type = Option<SurchargeStrategy>)]
pub external_surcharge_strategy: Option<common_enums::SurchargeStrategy>,
+
+ /// Request address verification using the billing address for supported card payments.
+ /// Omit this field on updates or confirmation to preserve the existing setting.
+ #[schema(default = false, example = true)]
+ #[smithy(value_type = "Option<bool>")]
+ pub enable_avs_check: Option<bool>,
}
#[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize, ToSchema, SmithyModel)]
@@ -8106,6 +8126,11 @@ pub struct PaymentsResponse {
)]
#[smithy(value_type = "Option<String>")]
pub sender_payment_instrument_id: Option<String>,
+
+ /// Whether address verification was requested for this payment.
+ #[schema(example = true)]
+ #[smithy(value_type = "Option<bool>")]
+ pub enable_avs_check: Option<bool>,
}
#[cfg(feature = "v1")]
@@ -8407,6 +8432,11 @@ pub struct PaymentsConfirmIntentRequest {
/// The webhook endpoint URL to receive payment status notifications
#[schema(value_type = Option<String>, example = "https://merchant.example.com/webhooks/payment")]
pub webhook_url: Option<common_utils::types::Url>,
+
+ /// Request address verification using the billing address for supported card payments.
+ /// Omit this field on updates or confirmation to preserve the existing setting.
+ #[schema(default = false, example = true)]
+ pub enable_avs_check: Option<bool>,
}
#[cfg(feature = "v2")]
@@ -8649,6 +8679,11 @@ pub struct PaymentsRequest {
/// Details of the party receiving the funds in an account funded transaction.
#[schema(value_type = Option<RecipientDetails>)]
pub recipient_details: Option<RecipientDetails>,
+
+ /// Request address verification using the billing address for supported card payments.
+ /// Omit this field on updates or confirmation to preserve the existing setting.
+ #[schema(default = false, example = true)]
+ pub enable_avs_check: Option<bool>,
}
#[cfg(feature = "v2")]
@@ -8686,6 +8721,7 @@ impl From<&PaymentsRequest> for PaymentsCreateIntentRequest {
enable_partial_authorization: request.enable_partial_authorization,
is_account_funded_transaction: request.is_account_funded_transaction,
recipient_details: request.recipient_details.clone(),
+ enable_avs_check: request.enable_avs_check,
}
}
}
@@ -8707,6 +8743,7 @@ impl From<&PaymentsRequest> for PaymentsConfirmIntentRequest {
return_raw_connector_response: request.return_raw_connector_response,
split_payment_method_data: None,
webhook_url: request.webhook_url.clone(),
+ enable_avs_check: request.enable_avs_check,
}
}
}
@@ -9016,6 +9053,10 @@ pub struct PaymentsResponse {
/// You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.
#[schema(value_type = Option<Object>, example = r#"{ "udf1": "some-value", "udf2": "some-value" }"#)]
pub metadata: Option<pii::SecretSerdeValue>,
+
+ /// Whether address verification was requested for this payment.
+ #[schema(example = true)]
+ pub enable_avs_check: Option<bool>,
}
#[cfg(feature = "v2")]
diff --git a/crates/diesel_models/src/payment_intent.rs b/crates/diesel_models/src/payment_intent.rs
index c453cbdc80..c30dbce09c 100644
--- a/crates/diesel_models/src/payment_intent.rs
+++ b/crates/diesel_models/src/payment_intent.rs
@@ -92,6 +92,7 @@ pub struct PaymentIntent {
pub external_surcharge_applicable: Option<bool>,
pub is_account_funded_transaction: Option<bool>,
pub recipient_details: Option<Encryption>,
+ pub enable_avs_check: Option<bool>,
pub merchant_reference_id: Option<common_utils::id_type::PaymentReferenceId>,
pub billing_address: Option<Encryption>,
pub shipping_address: Option<Encryption>,
@@ -218,6 +219,7 @@ pub struct PaymentIntent {
pub external_surcharge_applicable: Option<bool>,
pub is_account_funded_transaction: Option<bool>,
pub recipient_details: Option<Encryption>,
+ pub enable_avs_check: Option<bool>,
}
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize, diesel::AsExpression, PartialEq)]
@@ -444,6 +446,7 @@ pub struct PaymentIntentNew {
pub external_surcharge_applicable: Option<bool>,
pub is_account_funded_transaction: Option<bool>,
pub recipient_details: Option<Encryption>,
+ pub enable_avs_check: Option<bool>,
}
#[cfg(feature = "v1")]
@@ -540,6 +543,7 @@ pub struct PaymentIntentNew {
pub external_surcharge_applicable: Option<bool>,
pub is_account_funded_transaction: Option<bool>,
pub recipient_details: Option<Encryption>,
+ pub enable_avs_check: Option<bool>,
}
#[cfg(feature = "v2")]
@@ -685,6 +689,7 @@ pub struct PaymentIntentUpdateFields {
pub profile_acquirer_id: Option<common_utils::id_type::ProfileAcquirerId>,
pub external_surcharge_strategy: Option<common_enums::SurchargeStrategy>,
pub external_surcharge_applicable: Option<bool>,
+ pub enable_avs_check: Option<bool>,
}
#[cfg(feature = "v1")]
@@ -737,6 +742,7 @@ pub struct PaymentIntentUpdateFields {
pub external_surcharge_applicable: Option<bool>,
pub is_account_funded_transaction: Option<bool>,
pub recipient_details: Option<Encryption>,
+ pub enable_avs_check: Option<bool>,
}
// TODO: uncomment fields as necessary
@@ -789,6 +795,7 @@ pub struct PaymentIntentUpdateInternal {
pub profile_acquirer_id: Option<common_utils::id_type::ProfileAcquirerId>,
pub external_surcharge_strategy: Option<common_enums::SurchargeStrategy>,
pub external_surcharge_applicable: Option<bool>,
+ pub enable_avs_check: Option<bool>,
}
#[cfg(feature = "v1")]
@@ -855,6 +862,7 @@ pub struct PaymentIntentUpdateInternal {
pub external_surcharge_applicable: Option<bool>,
pub is_account_funded_transaction: Option<bool>,
pub recipient_details: Option<Encryption>,
+ pub enable_avs_check: Option<bool>,
}
#[cfg(feature = "v1")]
@@ -930,6 +938,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
external_surcharge_applicable: None,
is_account_funded_transaction: None,
recipient_details: None,
+ enable_avs_check: None,
},
PaymentIntentUpdate::StateMetadataUpdate {
state_metadata,
@@ -993,6 +1002,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
external_surcharge_applicable: None,
is_account_funded_transaction: None,
recipient_details: None,
+ enable_avs_check: None,
},
PaymentIntentUpdate::Update(value) => Self {
amount: Some(value.amount),
@@ -1054,6 +1064,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
external_surcharge_applicable: value.external_surcharge_applicable,
is_account_funded_transaction: value.is_account_funded_transaction,
recipient_details: value.recipient_details,
+ enable_avs_check: value.enable_avs_check,
},
PaymentIntentUpdate::PaymentCreateUpdate {
return_url,
@@ -1122,6 +1133,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
external_surcharge_applicable: None,
is_account_funded_transaction: None,
recipient_details: None,
+ enable_avs_check: None,
},
PaymentIntentUpdate::PGStatusUpdate {
status,
@@ -1187,6 +1199,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
external_surcharge_applicable: None,
is_account_funded_transaction: None,
recipient_details: None,
+ enable_avs_check: None,
},
PaymentIntentUpdate::MerchantStatusUpdate {
status,
@@ -1252,6 +1265,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
external_surcharge_applicable: None,
is_account_funded_transaction: None,
recipient_details: None,
+ enable_avs_check: None,
},
PaymentIntentUpdate::ResponseUpdate {
// amount,
@@ -1325,6 +1339,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
external_surcharge_applicable: None,
is_account_funded_transaction: None,
recipient_details: None,
+ enable_avs_check: None,
},
PaymentIntentUpdate::PaymentAttemptAndAttemptCountUpdate {
active_attempt_id,
@@ -1389,6 +1404,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
external_surcharge_applicable: None,
is_account_funded_transaction: None,
recipient_details: None,
+ enable_avs_check: None,
},
PaymentIntentUpdate::StatusAndAttemptUpdate {
status,
@@ -1454,6 +1470,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
external_surcharge_applicable: None,
is_account_funded_transaction: None,
recipient_details: None,
+ enable_avs_check: None,
},
PaymentIntentUpdate::ApproveUpdate {
status,
@@ -1518,6 +1535,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
external_surcharge_applicable: None,
is_account_funded_transaction: None,
recipient_details: None,
+ enable_avs_check: None,
},
PaymentIntentUpdate::RejectUpdate {
status,
@@ -1582,6 +1600,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
external_surcharge_applicable: None,
is_account_funded_transaction: None,
recipient_details: None,
+ enable_avs_check: None,
},
PaymentIntentUpdate::SurchargeApplicableUpdate {
surcharge_applicable,
@@ -1645,6 +1664,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
external_surcharge_applicable: None,
is_account_funded_transaction: None,
recipient_details: None,
+ enable_avs_check: None,
},
PaymentIntentUpdate::ExternalSurchargeApplicableUpdate {
external_surcharge_applicable,
@@ -1708,6 +1728,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
external_surcharge_strategy: None,
is_account_funded_transaction: None,
recipient_details: None,
+ enable_avs_check: None,
},
PaymentIntentUpdate::IncrementalAuthorizationAmountUpdate { amount } => Self {
amount: Some(amount),
@@ -1768,6 +1789,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
external_surcharge_applicable: None,
is_account_funded_transaction: None,
recipient_details: None,
+ enable_avs_check: None,
},
PaymentIntentUpdate::AuthorizationCountUpdate {
authorization_count,
@@ -1830,6 +1852,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
external_surcharge_applicable: None,
is_account_funded_transaction: None,
recipient_details: None,
+ enable_avs_check: None,
},
PaymentIntentUpdate::CompleteAuthorizeUpdate {
shipping_address_id,
@@ -1892,6 +1915,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
external_surcharge_applicable: None,
is_account_funded_transaction: None,
recipient_details: None,
+ enable_avs_check: None,
},
PaymentIntentUpdate::ManualUpdate {
status,
@@ -1956,6 +1980,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
external_surcharge_applicable: None,
is_account_funded_transaction: None,
recipient_details: None,
+ enable_avs_check: None,
},
PaymentIntentUpdate::SessionResponseUpdate {
tax_details,
@@ -2021,6 +2046,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
external_surcharge_applicable: None,
is_account_funded_transaction: None,
recipient_details: None,
+ enable_avs_check: None,
},
PaymentIntentUpdate::RecurrenceUpdate { status, updated_by } => Self {
status: Some(status),
@@ -2081,6 +2107,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
external_surcharge_applicable: None,
is_account_funded_transaction: None,
recipient_details: None,
+ enable_avs_check: None,
},
}
}
diff --git a/crates/diesel_models/src/schema.rs b/crates/diesel_models/src/schema.rs
index d04da3b748..6a100eeec2 100644
--- a/crates/diesel_models/src/schema.rs
+++ b/crates/diesel_models/src/schema.rs
@@ -1370,6 +1370,7 @@ diesel::table! {
external_surcharge_applicable -> Nullable<Bool>,
is_account_funded_transaction -> Nullable<Bool>,
recipient_details -> Nullable<Bytea>,
+ enable_avs_check -> Nullable<Bool>,
}
}
diff --git a/crates/diesel_models/src/schema_v2.rs b/crates/diesel_models/src/schema_v2.rs
index 7ea24c309a..a01cf964d3 100644
--- a/crates/diesel_models/src/schema_v2.rs
+++ b/crates/diesel_models/src/schema_v2.rs
@@ -1282,6 +1282,7 @@ diesel::table! {
external_surcharge_applicable -> Nullable<Bool>,
is_account_funded_transaction -> Nullable<Bool>,
recipient_details -> Nullable<Bytea>,
+ enable_avs_check -> Nullable<Bool>,
#[max_length = 64]
merchant_reference_id -> Nullable<Varchar>,
billing_address -> Nullable<Bytea>,
diff --git a/crates/hyperswitch_connectors/src/utils.rs b/crates/hyperswitch_connectors/src/utils.rs
index dd017510ef..94a0139e1a 100644
--- a/crates/hyperswitch_connectors/src/utils.rs
+++ b/crates/hyperswitch_connectors/src/utils.rs
@@ -7772,6 +7772,7 @@ pub(crate) fn convert_setup_mandate_router_data_to_authorize_router_data(
recipient_details: data.request.recipient_details.clone(),
business_country: data.request.business_country,
connector_intent_metadata: data.request.connector_intent_metadata.clone(),
+ enable_avs_check: data.request.enable_avs_check,
}
}
diff --git a/crates/hyperswitch_domain_models/src/payments.rs b/crates/hyperswitch_domain_models/src/payments.rs
index b6390d4fbe..496a20102d 100644
--- a/crates/hyperswitch_domain_models/src/payments.rs
+++ b/crates/hyperswitch_domain_models/src/payments.rs
@@ -159,6 +159,7 @@ pub struct PaymentIntent {
pub is_account_funded_transaction: Option<bool>,
#[encrypt]
pub recipient_details: Option<Encryptable<Secret<Value>>>,
+ pub enable_avs_check: Option<bool>,
}
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
@@ -1043,6 +1044,7 @@ pub struct PaymentIntent {
/// The details of the party receiving the funds in an account funded transaction.
#[encrypt]
pub recipient_details: Option<Encryptable<Secret<Value>>>,
+ pub enable_avs_check: Option<bool>,
}
#[cfg(feature = "v2")]
@@ -1255,6 +1257,7 @@ impl PaymentIntent {
external_surcharge_applicable: None,
is_account_funded_transaction: request.is_account_funded_transaction,
recipient_details: decrypted_payment_intent.recipient_details,
+ enable_avs_check: request.enable_avs_check,
})
}
diff --git a/crates/hyperswitch_domain_models/src/payments/payment_intent.rs b/crates/hyperswitch_domain_models/src/payments/payment_intent.rs
index 4972e192ca..74350b6a00 100644
--- a/crates/hyperswitch_domain_models/src/payments/payment_intent.rs
+++ b/crates/hyperswitch_domain_models/src/payments/payment_intent.rs
@@ -246,6 +246,7 @@ pub struct PaymentIntentUpdateFields {
pub profile_acquirer_id: Option<id_type::ProfileAcquirerId>,
pub external_surcharge_strategy: Option<common_enums::SurchargeStrategy>,
pub external_surcharge_applicable: Option<bool>,
+ pub enable_avs_check: Option<bool>,
}
#[cfg(feature = "v1")]
@@ -299,6 +300,7 @@ pub struct PaymentIntentUpdateFields {
pub external_surcharge_applicable: Option<bool>,
pub is_account_funded_transaction: Option<bool>,
pub recipient_details: Option<Encryptable<Secret<serde_json::Value>>>,
+ pub enable_avs_check: Option<bool>,
}
#[cfg(feature = "v1")]
@@ -534,6 +536,7 @@ pub struct PaymentIntentUpdateInternal {
pub external_surcharge_applicable: Option<bool>,
pub is_account_funded_transaction: Option<bool>,
pub recipient_details: Option<Encryptable<Secret<serde_json::Value>>>,
+ pub enable_avs_check: Option<bool>,
}
// This conversion is used in the `update_payment_intent` function
@@ -591,6 +594,7 @@ impl TryFrom<PaymentIntentUpdate> for diesel_models::PaymentIntentUpdateInternal
profile_acquirer_id: None,
external_surcharge_strategy: None,
external_surcharge_applicable: None,
+ enable_avs_check: None,
}),
PaymentIntentUpdate::ConfirmIntentPostUpdate {
@@ -643,6 +647,7 @@ impl TryFrom<PaymentIntentUpdate> for diesel_models::PaymentIntentUpdateInternal
profile_acquirer_id: None,
external_surcharge_strategy: None,
external_surcharge_applicable: None,
+ enable_avs_check: None,
}),
PaymentIntentUpdate::SyncUpdate {
status,
@@ -693,6 +698,7 @@ impl TryFrom<PaymentIntentUpdate> for diesel_models::PaymentIntentUpdateInternal
profile_acquirer_id: None,
external_surcharge_strategy: None,
external_surcharge_applicable: None,
+ enable_avs_check: None,
}),
PaymentIntentUpdate::CaptureUpdate {
status,
@@ -743,6 +749,7 @@ impl TryFrom<PaymentIntentUpdate> for diesel_models::PaymentIntentUpdateInternal
profile_acquirer_id: None,
external_surcharge_strategy: None,
external_surcharge_applicable: None,
+ enable_avs_check: None,
}),
PaymentIntentUpdate::SessionIntentUpdate {
prerouting_algorithm,
@@ -796,6 +803,7 @@ impl TryFrom<PaymentIntentUpdate> for diesel_models::PaymentIntentUpdateInternal
profile_acquirer_id: None,
external_surcharge_strategy: None,
external_surcharge_applicable: None,
+ enable_avs_check: None,
}),
PaymentIntentUpdate::UpdateIntent(boxed_intent) => {
let PaymentIntentUpdateFields {
@@ -839,6 +847,7 @@ impl TryFrom<PaymentIntentUpdate> for diesel_models::PaymentIntentUpdateInternal
profile_acquirer_id,
external_surcharge_strategy,
external_surcharge_applicable,
+ enable_avs_check,
} = *boxed_intent;
Ok(Self {
status: None,
@@ -891,6 +900,7 @@ impl TryFrom<PaymentIntentUpdate> for diesel_models::PaymentIntentUpdateInternal
profile_acquirer_id,
external_surcharge_strategy,
external_surcharge_applicable,
+ enable_avs_check,
})
}
PaymentIntentUpdate::RecordUpdate {
@@ -944,6 +954,7 @@ impl TryFrom<PaymentIntentUpdate> for diesel_models::PaymentIntentUpdateInternal
profile_acquirer_id: None,
external_surcharge_strategy: None,
external_surcharge_applicable: None,
+ enable_avs_check: None,
}),
PaymentIntentUpdate::VoidUpdate { status, updated_by } => Ok(Self {
status: Some(status),
@@ -991,6 +1002,7 @@ impl TryFrom<PaymentIntentUpdate> for diesel_models::PaymentIntentUpdateInternal
profile_acquirer_id: None,
external_surcharge_strategy: None,
external_surcharge_applicable: None,
+ enable_avs_check: None,
}),
PaymentIntentUpdate::AttemptGroupUpdate {
updated_by,
@@ -1041,6 +1053,7 @@ impl TryFrom<PaymentIntentUpdate> for diesel_models::PaymentIntentUpdateInternal
profile_acquirer_id: None,
external_surcharge_strategy: None,
external_surcharge_applicable: None,
+ enable_avs_check: None,
}),
PaymentIntentUpdate::SplitPaymentStatusUpdate { status, updated_by } => Ok(Self {
status: Some(status),
@@ -1087,6 +1100,7 @@ impl TryFrom<PaymentIntentUpdate> for diesel_models::PaymentIntentUpdateInternal
profile_acquirer_id: None,
external_surcharge_strategy: None,
external_surcharge_applicable: None,
+ enable_avs_check: None,
}),
}
}
@@ -1371,6 +1385,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
external_surcharge_applicable: None,
is_account_funded_transaction: None,
recipient_details: None,
+ enable_avs_check: None,
},
PaymentIntentUpdate::RecurrenceUpdate { status, updated_by } => Self {
status: Some(status),
@@ -1430,6 +1445,7 @@ impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal {
external_surcharge_applicable: None,
is_account_funded_transaction: None,
recipient_details: None,
+ enable_avs_check: None,
},
}
}
@@ -1541,6 +1557,7 @@ impl From<PaymentIntentUpdate> for DieselPaymentIntentUpdate {
external_surcharge_applicable: None,
is_account_funded_transaction: value.is_account_funded_transaction,
recipient_details: value.recipient_details.map(Encryption::from),
+ enable_avs_check: value.enable_avs_check,
}))
}
PaymentIntentUpdate::PaymentCreateUpdate {
@@ -1736,6 +1753,7 @@ impl From<PaymentIntentUpdateInternal> for diesel_models::PaymentIntentUpdateInt
external_surcharge_applicable,
is_account_funded_transaction,
recipient_details,
+ enable_avs_check,
} = value;
Self {
amount,
@@ -1797,6 +1815,7 @@ impl From<PaymentIntentUpdateInternal> for diesel_models::PaymentIntentUpdateInt
external_surcharge_applicable,
is_account_funded_transaction,
recipient_details: recipient_details.map(Encryption::from),
+ enable_avs_check,
}
}
}
@@ -2262,6 +2281,7 @@ impl behaviour::Conversion for PaymentIntent {
external_surcharge_applicable,
is_account_funded_transaction,
recipient_details,
+ enable_avs_check,
} = self;
Ok(DieselPaymentIntent {
skip_external_tax_calculation: Some(amount_details.get_external_tax_action_as_bool()),
@@ -2378,6 +2398,7 @@ impl behaviour::Conversion for PaymentIntent {
external_surcharge_applicable,
is_account_funded_transaction,
recipient_details: recipient_details.map(Encryption::from),
+ enable_avs_check,
})
}
async fn convert_back(
@@ -2537,6 +2558,7 @@ impl behaviour::Conversion for PaymentIntent {
external_surcharge_applicable: storage_model.external_surcharge_applicable,
is_account_funded_transaction: storage_model.is_account_funded_transaction,
recipient_details: data.recipient_details,
+ enable_avs_check: storage_model.enable_avs_check,
})
}
.await
@@ -2653,6 +2675,7 @@ impl behaviour::Conversion for PaymentIntent {
external_surcharge_applicable: self.external_surcharge_applicable,
is_account_funded_transaction: self.is_account_funded_transaction,
recipient_details: self.recipient_details.map(Encryption::from),
+ enable_avs_check: self.enable_avs_check,
})
}
}
@@ -2749,6 +2772,7 @@ impl behaviour::Conversion for PaymentIntent {
external_surcharge_applicable: self.external_surcharge_applicable,
is_account_funded_transaction: self.is_account_funded_transaction,
recipient_details: self.recipient_details.map(Encryption::from),
+ enable_avs_check: self.enable_avs_check,
})
}
@@ -2871,6 +2895,7 @@ impl behaviour::Conversion for PaymentIntent {
external_surcharge_applicable: storage_model.external_surcharge_applicable,
is_account_funded_transaction: storage_model.is_account_funded_transaction,
recipient_details: data.recipient_details,
+ enable_avs_check: storage_model.enable_avs_check,
})
}
.await
@@ -2965,6 +2990,7 @@ impl behaviour::Conversion for PaymentIntent {
external_surcharge_applicable: self.external_surcharge_applicable,
is_account_funded_transaction: self.is_account_funded_transaction,
recipient_details: self.recipient_details.map(Encryption::from),
+ enable_avs_check: self.enable_avs_check,
})
}
}
diff --git a/crates/hyperswitch_domain_models/src/revenue_recovery.rs b/crates/hyperswitch_domain_models/src/revenue_recovery.rs
index 09265d88fd..0d1d49e491 100644
--- a/crates/hyperswitch_domain_models/src/revenue_recovery.rs
+++ b/crates/hyperswitch_domain_models/src/revenue_recovery.rs
@@ -177,6 +177,7 @@ impl From<&RevenueRecoveryInvoiceData> for api_payments::PaymentsCreateIntentReq
enable_partial_authorization: data.enable_partial_authorization,
is_account_funded_transaction: None,
recipient_details: None,
+ enable_avs_check: None,
}
}
}
diff --git a/crates/hyperswitch_domain_models/src/router_request_types.rs b/crates/hyperswitch_domain_models/src/router_request_types.rs
index 316fe6e56c..ca0ece6d62 100644
--- a/crates/hyperswitch_domain_models/src/router_request_types.rs
+++ b/crates/hyperswitch_domain_models/src/router_request_types.rs
@@ -176,6 +176,7 @@ pub struct PaymentsAuthorizeData {
/// The merchant's business country for this payment. Connectors use it for requirements that
/// apply only to merchants in particular countries.
pub business_country: Option<common_enums::CountryAlpha2>,
+ pub enable_avs_check: Option<bool>,
}
impl PaymentsAuthorizeData {
@@ -1926,6 +1927,7 @@ pub struct SetupMandateRequestData {
/// The merchant's business country for this payment. Connectors use it for requirements that
/// apply only to merchants in particular countries.
pub business_country: Option<common_enums::CountryAlpha2>,
+ pub enable_avs_check: Option<bool>,
}
impl SetupMandateRequestData {
diff --git a/crates/router/src/core/payments/helpers.rs b/crates/router/src/core/payments/helpers.rs
index 75e5010d21..1db01cccec 100644
--- a/crates/router/src/core/payments/helpers.rs
+++ b/crates/router/src/core/payments/helpers.rs
@@ -5161,6 +5161,7 @@ mod tests {
profile_acquirer_id: None,
external_surcharge_strategy: None,
external_surcharge_applicable: None,
+ enable_avs_check: None,
};
let req_cs = Some("1".to_string());
assert!(authenticate_client_secret(req_cs.as_ref(), &payment_intent).is_ok());
@@ -5257,6 +5258,7 @@ mod tests {
profile_acquirer_id: None,
external_surcharge_strategy: None,
external_surcharge_applicable: None,
+ enable_avs_check: None,
};
let req_cs = Some("1".to_string());
assert!(authenticate_client_secret(req_cs.as_ref(), &payment_intent,).is_err())
@@ -5351,6 +5353,7 @@ mod tests {
profile_acquirer_id: None,
external_surcharge_strategy: None,
external_surcharge_applicable: None,
+ enable_avs_check: None,
};
let req_cs = Some("1".to_string());
assert!(authenticate_client_secret(req_cs.as_ref(), &payment_intent).is_err())
diff --git a/crates/router/src/core/payments/operations/payment_confirm.rs b/crates/router/src/core/payments/operations/payment_confirm.rs
index 6f222f190d..f8201bd70c 100644
--- a/crates/router/src/core/payments/operations/payment_confirm.rs
+++ b/crates/router/src/core/payments/operations/payment_confirm.rs
@@ -525,6 +525,8 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsRequest>
)
})
.unwrap_or(Ok(payment_intent.request_incremental_authorization))?;
+ payment_intent.enable_avs_check =
+ request.enable_avs_check.or(payment_intent.enable_avs_check);
payment_intent.enable_partial_authorization = request
.enable_partial_authorization
.or(payment_intent.enable_partial_authorization);
@@ -3127,6 +3129,7 @@ impl<F: Clone + Sync> UpdateTracker<F, PaymentData<F>, api::PaymentsRequest> for
external_surcharge_applicable: payment_data
.payment_intent
.external_surcharge_applicable,
+ enable_avs_check: payment_data.payment_intent.enable_avs_check,
})),
&m_key_store,
storage_scheme,
diff --git a/crates/router/src/core/payments/operations/payment_create.rs b/crates/router/src/core/payments/operations/payment_create.rs
index f1f8707df5..3e27d298c0 100644
--- a/crates/router/src/core/payments/operations/payment_create.rs
+++ b/crates/router/src/core/payments/operations/payment_create.rs
@@ -2013,6 +2013,7 @@ impl PaymentCreate {
profile_acquirer_id: request.profile_acquirer_id.clone(),
external_surcharge_strategy: request.external_surcharge_strategy,
external_surcharge_applicable: None,
+ enable_avs_check: request.enable_avs_check,
})
}
}
diff --git a/crates/router/src/core/payments/operations/payment_update.rs b/crates/router/src/core/payments/operations/payment_update.rs
index 34eb8b5ced..422911a714 100644
--- a/crates/router/src/core/payments/operations/payment_update.rs
+++ b/crates/router/src/core/payments/operations/payment_update.rs
@@ -468,6 +468,8 @@ impl<F: Send + Clone + Sync> GetTracker<F, PaymentData<F>, api::PaymentsRequest>
.clone()
.or(payment_intent.payment_channel);
+ payment_intent.enable_avs_check =
+ request.enable_avs_check.or(payment_intent.enable_avs_check);
payment_intent.enable_partial_authorization = request
.enable_partial_authorization
.or(payment_intent.enable_partial_authorization);
@@ -1391,6 +1393,7 @@ impl PaymentUpdate {
external_surcharge_applicable: payment_data
.payment_intent
.external_surcharge_applicable,
+ enable_avs_check: payment_data.payment_intent.enable_avs_check,
}));
Ok((payment_data, attempt_update, intent_update))
diff --git a/crates/router/src/core/payments/operations/payment_update_intent.rs b/crates/router/src/core/payments/operations/payment_update_intent.rs
index 37377ea354..ebcc971f30 100644
--- a/crates/router/src/core/payments/operations/payment_update_intent.rs
+++ b/crates/router/src/core/payments/operations/payment_update_intent.rs
@@ -197,6 +197,7 @@ impl<F: Send + Clone> GetTracker<F, payments::PaymentIntentData<F>, PaymentsUpda
enable_partial_authorization,
is_account_funded_transaction,
recipient_details,
+ enable_avs_check,
} = request.clone();
let batch_encrypted_data = domain_types::crypto_operation(
@@ -312,6 +313,7 @@ impl<F: Send + Clone> GetTracker<F, payments::PaymentIntentData<F>, PaymentsUpda
.recipient_details
.clone()
.or(payment_intent.recipient_details.clone()),
+ enable_avs_check: enable_avs_check.or(payment_intent.enable_avs_check),
..payment_intent
};
@@ -408,6 +410,7 @@ impl<F: Clone> UpdateTracker<F, payments::PaymentIntentData<F>, PaymentsUpdateIn
profile_acquirer_id: intent.profile_acquirer_id,
external_surcharge_strategy: intent.external_surcharge_strategy,
external_surcharge_applicable: intent.external_surcharge_applicable,
+ enable_avs_check: intent.enable_avs_check,
}));
let new_payment_intent = db
diff --git a/crates/router/src/core/payments/transformers.rs b/crates/router/src/core/payments/transformers.rs
index b94f20f0ae..7766415b20 100644
--- a/crates/router/src/core/payments/transformers.rs
+++ b/crates/router/src/core/payments/transformers.rs
@@ -522,6 +522,7 @@ pub async fn construct_payment_router_data_for_authorize<'a>(
is_account_funded_transaction: payment_data.payment_intent.is_account_funded_transaction,
recipient_details,
business_country: None,
+ enable_avs_check: payment_data.payment_intent.enable_avs_check,
};
let connector_mandate_request_reference_id = payment_data
.payment_attempt
@@ -1870,6 +1871,7 @@ pub async fn construct_payment_router_data_for_setup_mandate<'a>(
is_account_funded_transaction: payment_data.payment_intent.is_account_funded_transaction,
recipient_details,
business_country: None,
+ enable_avs_check: payment_data.payment_intent.enable_avs_check,
};
let connector_mandate_request_reference_id = payment_data
.payment_attempt
@@ -3059,6 +3061,7 @@ where
enable_partial_authorization: Some(payment_intent.enable_partial_authorization),
is_account_funded_transaction: payment_intent.is_account_funded_transaction,
recipient_details: masked_recipient_details,
+ enable_avs_check: payment_intent.enable_avs_check,
},
vec![],
)))
@@ -3235,6 +3238,7 @@ where
.feature_metadata
.map(|feature_metadata| feature_metadata.convert_back()),
metadata: payment_intent.metadata,
+ enable_avs_check: payment_intent.enable_avs_check,
};
Ok(services::ApplicationResponse::JsonWithHeaders((
@@ -3391,6 +3395,7 @@ impl GenerateResponse<api_models::payments::PaymentsResponse>
.feature_metadata
.map(|feature_metadata| feature_metadata.convert_back()),
metadata: payment_intent.metadata,
+ enable_avs_check: payment_intent.enable_avs_check,
};
Ok(services::ApplicationResponse::JsonWithHeaders((
@@ -3517,6 +3522,7 @@ where
.feature_metadata
.map(|feature_metadata| feature_metadata.convert_back()),
metadata: payment_intent.metadata,
+ enable_avs_check: payment_intent.enable_avs_check,
};
Ok(services::ApplicationResponse::JsonWithHeaders((
@@ -4531,6 +4537,7 @@ where
installment_data: payment_data.get_installment_details().cloned(),
connector_response_metadata,
sender_payment_instrument_id: payment_attempt.sender_payment_instrument_id.clone(),
+ enable_avs_check: payment_intent.enable_avs_check,
};
services::ApplicationResponse::JsonWithHeaders((payments_response, headers))
@@ -5040,6 +5047,7 @@ impl ForeignFrom<(storage::PaymentIntent, storage::PaymentAttempt)> for api::Pay
installment_options: pi.installment_options,
installment_data: pa.installment_data,
sender_payment_instrument_id: pa.sender_payment_instrument_id.clone(),
+ enable_avs_check: pi.enable_avs_check,
}
}
}
@@ -5430,6 +5438,7 @@ impl<F: Clone> TryFrom<PaymentAdditionalData<'_, F>> for types::PaymentsAuthoriz
.is_account_funded_transaction,
recipient_details,
business_country: None,
+ enable_avs_check: payment_data.payment_intent.enable_avs_check,
})
}
}
@@ -5713,6 +5722,7 @@ impl<F: Clone> TryFrom<PaymentAdditionalData<'_, F>> for types::PaymentsAuthoriz
.is_account_funded_transaction,
recipient_details,
business_country: payment_data.payment_intent.business_country,
+ enable_avs_check: payment_data.payment_intent.enable_avs_check,
})
}
}
@@ -7374,6 +7384,7 @@ impl<F: Clone> TryFrom<PaymentAdditionalData<'_, F>> for types::SetupMandateRequ
.is_account_funded_transaction,
recipient_details,
business_country: payment_data.payment_intent.business_country,
+ enable_avs_check: payment_data.payment_intent.enable_avs_check,
})
}
}
diff --git a/crates/router/src/core/unified_connector_service/transformers.rs b/crates/router/src/core/unified_connector_service/transformers.rs
index 5d0c1e9bc5..8d58d741fc 100644
--- a/crates/router/src/core/unified_connector_service/transformers.rs
+++ b/crates/router/src/core/unified_connector_service/transformers.rs
@@ -876,7 +876,7 @@ impl
.as_ref()
.map(payments_grpc::AdditionalConnectorDetails::foreign_from),
business_country: router_data.request.business_country.map(|c| c.to_string()),
- enable_avs_check: None,
+ enable_avs_check: router_data.request.enable_avs_check,
})
}
}
@@ -2632,7 +2632,7 @@ impl
.as_ref()
.map(payments_grpc::AdditionalConnectorDetails::foreign_from),
business_country: router_data.request.business_country.map(|c| c.to_string()),
- enable_avs_check: None,
+ enable_avs_check: router_data.request.enable_avs_check,
})
}
}
diff --git a/crates/router/src/db/events.rs b/crates/router/src/db/events.rs
index d7b370a95a..1924db7285 100644
--- a/crates/router/src/db/events.rs
+++ b/crates/router/src/db/events.rs
@@ -2237,6 +2237,7 @@ mod tests {
connector_customer_id: None,
sender_payment_instrument_id: None,
payment_account_reference: None,
+ enable_avs_check: None,
};
let content =
api_webhooks::OutgoingWebhookContent::PaymentDetails(Box::new(expected_response));
diff --git a/crates/router/src/services/kafka/payment_intent.rs b/crates/router/src/services/kafka/payment_intent.rs
index 6880b4f5ec..cd20f055aa 100644
--- a/crates/router/src/services/kafka/payment_intent.rs
+++ b/crates/router/src/services/kafka/payment_intent.rs
@@ -255,6 +255,7 @@ impl<'a> KafkaPaymentIntent<'a> {
external_surcharge_applicable: _,
is_account_funded_transaction: _,
recipient_details: _,
+ enable_avs_check: _,
} = intent;
let revenue_recovery_algorithm_type = feature_metadata
diff --git a/crates/router/src/services/kafka/payment_intent_event.rs b/crates/router/src/services/kafka/payment_intent_event.rs
index ff1f011729..568a8292f4 100644
--- a/crates/router/src/services/kafka/payment_intent_event.rs
+++ b/crates/router/src/services/kafka/payment_intent_event.rs
@@ -269,6 +269,7 @@ impl<'a> KafkaPaymentIntentEvent<'a> {
external_surcharge_applicable: _,
is_account_funded_transaction: _,
recipient_details: _,
+ enable_avs_check: _,
} = intent;
let revenue_recovery_algorithm_type = feature_metadata
diff --git a/crates/router/src/types.rs b/crates/router/src/types.rs
index 1d14538569..b406c19821 100644
--- a/crates/router/src/types.rs
+++ b/crates/router/src/types.rs
@@ -1448,6 +1448,7 @@ impl ForeignFrom<&SetupMandateRouterData> for PaymentsAuthorizeData {
feature_metadata: None,
installment_details: None,
connector_intent_metadata: None,
+ enable_avs_check: data.request.enable_avs_check,
}
}
}
diff --git a/crates/router/src/types/api/verify_connector.rs b/crates/router/src/types/api/verify_connector.rs
index 2a7f557ca9..fc93d83acd 100644
--- a/crates/router/src/types/api/verify_connector.rs
+++ b/crates/router/src/types/api/verify_connector.rs
@@ -81,6 +81,7 @@ impl VerifyConnectorData {
feature_metadata: None,
installment_details: None,
connector_intent_metadata: None,
+ enable_avs_check: None,
}
}
diff --git a/crates/router/src/utils/user/sample_data.rs b/crates/router/src/utils/user/sample_data.rs
index 9263f34073..10d846a03d 100644
--- a/crates/router/src/utils/user/sample_data.rs
+++ b/crates/router/src/utils/user/sample_data.rs
@@ -308,6 +308,7 @@ pub async fn generate_sample_data(
profile_acquirer_id: None,
external_surcharge_strategy: None,
external_surcharge_applicable: None,
+ enable_avs_check: None,
};
let (connector_transaction_id, processor_transaction_data) =
ConnectorTransactionId::form_id_and_data(attempt_id.clone());
diff --git a/crates/router/tests/connectors/utils.rs b/crates/router/tests/connectors/utils.rs
index 526c18b605..b5848247d6 100644
--- a/crates/router/tests/connectors/utils.rs
+++ b/crates/router/tests/connectors/utils.rs
@@ -1048,6 +1048,7 @@ impl Default for PaymentAuthorizeType {
installment_details: None,
connector_intent_metadata: None,
business_country: None,
+ enable_avs_check: None,
};
Self(data)
}
diff --git a/crates/router/tests/payments.rs b/crates/router/tests/payments.rs
index bb98e9bb6a..18a171d0b8 100644
--- a/crates/router/tests/payments.rs
+++ b/crates/router/tests/payments.rs
@@ -498,6 +498,7 @@ async fn payments_create_core() {
connector_customer_id: None,
sender_payment_instrument_id: None,
payment_account_reference: None,
+ enable_avs_check: None,
};
let expected_response =
services::ApplicationResponse::JsonWithHeaders((expected_response, vec![]));
@@ -816,6 +817,7 @@ async fn payments_create_core_adyen_no_redirect() {
connector_customer_id: None,
sender_payment_instrument_id: None,
payment_account_reference: None,
+ enable_avs_check: None,
},
vec![],
));
diff --git a/crates/router/tests/payments2.rs b/crates/router/tests/payments2.rs
index 4cd81059a7..c1dd4c2116 100644
--- a/crates/router/tests/payments2.rs
+++ b/crates/router/tests/payments2.rs
@@ -258,6 +258,7 @@ async fn payments_create_core() {
connector_customer_id: None,
sender_payment_instrument_id: None,
payment_account_reference: None,
+ enable_avs_check: None,
};
let expected_response =
@@ -585,6 +586,7 @@ async fn payments_create_core_adyen_no_redirect() {
connector_customer_id: None,
sender_payment_instrument_id: None,
payment_account_reference: None,
+ enable_avs_check: None,
},
vec![],
));
diff --git a/migrations/2026-10-08-120000_add_enable_avs_check_to_payment_intent/down.sql b/migrations/2026-10-08-120000_add_enable_avs_check_to_payment_intent/down.sql
new file mode 100644
index 0000000000..d75357297f
--- /dev/null
+++ b/migrations/2026-10-08-120000_add_enable_avs_check_to_payment_intent/down.sql
@@ -0,0 +1 @@
+ALTER TABLE payment_intent DROP COLUMN IF EXISTS enable_avs_check;
diff --git a/migrations/2026-10-08-120000_add_enable_avs_check_to_payment_intent/up.sql b/migrations/2026-10-08-120000_add_enable_avs_check_to_payment_intent/up.sql
new file mode 100644
index 0000000000..c5f737852a
--- /dev/null
+++ b/migrations/2026-10-08-120000_add_enable_avs_check_to_payment_intent/up.sql
@@ -0,0 +1 @@
+ALTER TABLE payment_intent ADD COLUMN IF NOT EXISTS enable_avs_check BOOLEAN;