From 81b340d3a9e20bf278d97d76f9457d29a5bff8e2 Mon Sep 17 00:00:00 2001 From: Anurag Thakur Date: Mon, 1 Sep 2025 18:47:00 +0530 Subject: [PATCH] feat(router): Payment Intent and MCA changes for split payments (#9049) --- api-reference/v2/openapi_spec_v2.json | 36 ++++++++++++++++++- crates/api_models/src/admin.rs | 12 +++++++ crates/api_models/src/payments.rs | 4 +++ crates/common_enums/src/enums.rs | 23 ++++++++++++ crates/diesel_models/src/business_profile.rs | 5 +++ crates/diesel_models/src/payment_intent.rs | 3 ++ crates/diesel_models/src/schema_v2.rs | 4 +++ .../src/business_profile.rs | 18 ++++++++++ .../hyperswitch_domain_models/src/payments.rs | 3 ++ .../src/payments/payment_intent.rs | 5 ++- crates/openapi/src/openapi_v2.rs | 1 + crates/router/src/core/admin.rs | 2 ++ .../router/src/core/payments/transformers.rs | 1 + .../src/services/kafka/payment_intent.rs | 3 ++ .../services/kafka/payment_intent_event.rs | 3 ++ crates/router/src/types/api/admin.rs | 1 + .../down.sql | 2 ++ .../up.sql | 2 ++ .../down.sql | 2 ++ .../up.sql | 2 ++ 20 files changed, 130 insertions(+), 2 deletions(-) create mode 100644 v2_compatible_migrations/2025-08-25-090221_add-split-txns-enabled-in-payment-intent/down.sql create mode 100644 v2_compatible_migrations/2025-08-25-090221_add-split-txns-enabled-in-payment-intent/up.sql create mode 100644 v2_compatible_migrations/2025-08-29-040411_add-split-txns-enabled-in-business-profile/down.sql create mode 100644 v2_compatible_migrations/2025-08-29-040411_add-split-txns-enabled-in-business-profile/up.sql diff --git a/api-reference/v2/openapi_spec_v2.json b/api-reference/v2/openapi_spec_v2.json index 9dc8fcd756..4cf8b42437 100644 --- a/api-reference/v2/openapi_spec_v2.json +++ b/api-reference/v2/openapi_spec_v2.json @@ -19321,6 +19321,7 @@ "apply_mit_exemption", "payment_link_enabled", "request_incremental_authorization", + "split_txns_enabled", "expires_on", "request_external_three_ds_authentication", "payment_type" @@ -19472,6 +19473,14 @@ "request_incremental_authorization": { "$ref": "#/components/schemas/RequestIncrementalAuthorization" }, + "split_txns_enabled": { + "allOf": [ + { + "$ref": "#/components/schemas/SplitTxnsEnabled" + } + ], + "default": "skip" + }, "expires_on": { "type": "string", "format": "date-time", @@ -22083,6 +22092,15 @@ } ], "nullable": true + }, + "split_txns_enabled": { + "allOf": [ + { + "$ref": "#/components/schemas/SplitTxnsEnabled" + } + ], + "default": "skip", + "nullable": true } }, "additionalProperties": false @@ -22116,7 +22134,8 @@ "is_tax_connector_enabled", "is_network_tokenization_enabled", "is_click_to_pay_enabled", - "is_clear_pan_retries_enabled" + "is_clear_pan_retries_enabled", + "split_txns_enabled" ], "properties": { "merchant_id": { @@ -22368,6 +22387,14 @@ } ], "nullable": true + }, + "split_txns_enabled": { + "allOf": [ + { + "$ref": "#/components/schemas/SplitTxnsEnabled" + } + ], + "default": "skip" } } }, @@ -24819,6 +24846,13 @@ ], "description": "Charge specific fields for controlling the revert of funds from either platform or connected account. Check sub-fields for more details." }, + "SplitTxnsEnabled": { + "type": "string", + "enum": [ + "enable", + "skip" + ] + }, "StaticRoutingAlgorithm": { "oneOf": [ { diff --git a/crates/api_models/src/admin.rs b/crates/api_models/src/admin.rs index 81ec2ce218..f0af4a2e46 100644 --- a/crates/api_models/src/admin.rs +++ b/crates/api_models/src/admin.rs @@ -2349,6 +2349,10 @@ pub struct ProfileCreate { /// It is used in payment processing, fraud detection, and regulatory compliance to determine regional rules and routing behavior. #[schema(value_type = Option, example = "840")] pub merchant_country_code: Option, + + /// Enable split payments, i.e., split the amount between multiple payment methods + #[schema(value_type = Option, default = "skip")] + pub split_txns_enabled: Option, } #[cfg(feature = "v1")] @@ -2695,6 +2699,10 @@ pub struct ProfileResponse { /// It is used in payment processing, fraud detection, and regulatory compliance to determine regional rules and routing behavior. #[schema(value_type = Option, example = "840")] pub merchant_country_code: Option, + + /// Enable split payments, i.e., split the amount between multiple payment methods + #[schema(value_type = SplitTxnsEnabled, default = "skip")] + pub split_txns_enabled: common_enums::SplitTxnsEnabled, } #[cfg(feature = "v1")] @@ -3013,6 +3021,10 @@ pub struct ProfileUpdate { #[schema(value_type = Option, example = "cascading")] pub revenue_recovery_retry_algorithm_type: Option, + + /// Enable split payments, i.e., split the amount between multiple payment methods + #[schema(value_type = Option, default = "skip")] + pub split_txns_enabled: Option, } #[derive(Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema)] diff --git a/crates/api_models/src/payments.rs b/crates/api_models/src/payments.rs index eabca23ed0..4789ec15df 100644 --- a/crates/api_models/src/payments.rs +++ b/crates/api_models/src/payments.rs @@ -643,6 +643,10 @@ pub struct PaymentsIntentResponse { #[schema(value_type = RequestIncrementalAuthorization)] pub request_incremental_authorization: common_enums::RequestIncrementalAuthorization, + /// Enable split payments, i.e., split the amount between multiple payment methods + #[schema(value_type = SplitTxnsEnabled, default = "skip")] + pub split_txns_enabled: common_enums::SplitTxnsEnabled, + ///Will be used to expire client secret after certain amount of time to be supplied in seconds #[serde(with = "common_utils::custom_serde::iso8601")] pub expires_on: PrimitiveDateTime, diff --git a/crates/common_enums/src/enums.rs b/crates/common_enums/src/enums.rs index ed7fa4d9ba..67c5efb00a 100644 --- a/crates/common_enums/src/enums.rs +++ b/crates/common_enums/src/enums.rs @@ -2860,6 +2860,29 @@ pub enum RequestIncrementalAuthorization { Default, } +#[derive( + Clone, + Debug, + Copy, + Default, + Eq, + Hash, + PartialEq, + serde::Deserialize, + serde::Serialize, + strum::Display, + strum::EnumString, + ToSchema, +)] +#[router_derive::diesel_enum(storage_type = "text")] +#[serde(rename_all = "snake_case")] +#[strum(serialize_all = "snake_case")] +pub enum SplitTxnsEnabled { + Enable, + #[default] + Skip, +} + #[derive(Clone, Copy, Eq, Hash, PartialEq, Debug, Serialize, Deserialize, strum::Display, ToSchema,)] #[rustfmt::skip] pub enum CountryAlpha3 { diff --git a/crates/diesel_models/src/business_profile.rs b/crates/diesel_models/src/business_profile.rs index 8a76b648d0..a51887a94d 100644 --- a/crates/diesel_models/src/business_profile.rs +++ b/crates/diesel_models/src/business_profile.rs @@ -412,6 +412,7 @@ pub struct Profile { pub revenue_recovery_retry_algorithm_data: Option, pub is_external_vault_enabled: Option, pub external_vault_connector_details: Option, + pub split_txns_enabled: Option, } impl Profile { @@ -487,6 +488,7 @@ pub struct ProfileNew { pub is_iframe_redirection_enabled: Option, pub is_external_vault_enabled: Option, pub external_vault_connector_details: Option, + pub split_txns_enabled: Option, } #[cfg(feature = "v2")] @@ -546,6 +548,7 @@ pub struct ProfileUpdateInternal { pub is_iframe_redirection_enabled: Option, pub is_external_vault_enabled: Option, pub external_vault_connector_details: Option, + pub split_txns_enabled: Option, } #[cfg(feature = "v2")] @@ -602,6 +605,7 @@ impl ProfileUpdateInternal { external_vault_connector_details, merchant_category_code, merchant_country_code, + split_txns_enabled, } = self; Profile { id: source.id, @@ -698,6 +702,7 @@ impl ProfileUpdateInternal { merchant_category_code: merchant_category_code.or(source.merchant_category_code), merchant_country_code: merchant_country_code.or(source.merchant_country_code), dispute_polling_interval: None, + split_txns_enabled: split_txns_enabled.or(source.split_txns_enabled), } } } diff --git a/crates/diesel_models/src/payment_intent.rs b/crates/diesel_models/src/payment_intent.rs index acc8d4b21f..a152d4085d 100644 --- a/crates/diesel_models/src/payment_intent.rs +++ b/crates/diesel_models/src/payment_intent.rs @@ -95,6 +95,7 @@ pub struct PaymentIntent { pub routing_algorithm_id: Option, pub payment_link_config: Option, pub id: common_utils::id_type::GlobalPaymentId, + pub split_txns_enabled: Option, } #[cfg(feature = "v1")] @@ -355,6 +356,7 @@ pub struct PaymentIntentNew { pub tax_details: Option, pub skip_external_tax_calculation: Option, pub enable_partial_authorization: Option, + pub split_txns_enabled: Option, pub merchant_reference_id: Option, pub billing_address: Option, pub shipping_address: Option, @@ -800,6 +802,7 @@ impl PaymentIntentUpdateInternal { duty_amount: source.duty_amount, order_date: source.order_date, enable_partial_authorization: None, + split_txns_enabled: source.split_txns_enabled, } } } diff --git a/crates/diesel_models/src/schema_v2.rs b/crates/diesel_models/src/schema_v2.rs index 4711143d32..ea3980d942 100644 --- a/crates/diesel_models/src/schema_v2.rs +++ b/crates/diesel_models/src/schema_v2.rs @@ -263,6 +263,8 @@ diesel::table! { revenue_recovery_retry_algorithm_data -> Nullable, is_external_vault_enabled -> Nullable, external_vault_connector_details -> Nullable, + #[max_length = 16] + split_txns_enabled -> Nullable, } } @@ -1039,6 +1041,8 @@ diesel::table! { payment_link_config -> Nullable, #[max_length = 64] id -> Varchar, + #[max_length = 16] + split_txns_enabled -> Nullable, } } diff --git a/crates/hyperswitch_domain_models/src/business_profile.rs b/crates/hyperswitch_domain_models/src/business_profile.rs index 4408987266..581754d601 100644 --- a/crates/hyperswitch_domain_models/src/business_profile.rs +++ b/crates/hyperswitch_domain_models/src/business_profile.rs @@ -1074,6 +1074,7 @@ pub struct Profile { pub external_vault_connector_details: Option, pub merchant_category_code: Option, pub merchant_country_code: Option, + pub split_txns_enabled: common_enums::SplitTxnsEnabled, } #[cfg(feature = "v2")] @@ -1131,6 +1132,7 @@ pub struct ProfileSetter { pub external_vault_connector_details: Option, pub merchant_category_code: Option, pub merchant_country_code: Option, + pub split_txns_enabled: common_enums::SplitTxnsEnabled, } #[cfg(feature = "v2")] @@ -1193,6 +1195,7 @@ impl From for Profile { external_vault_connector_details: value.external_vault_connector_details, merchant_category_code: value.merchant_category_code, merchant_country_code: value.merchant_country_code, + split_txns_enabled: value.split_txns_enabled, } } } @@ -1380,6 +1383,7 @@ pub struct ProfileGeneralUpdate { pub merchant_category_code: Option, pub merchant_country_code: Option, pub revenue_recovery_retry_algorithm_type: Option, + pub split_txns_enabled: Option, } #[cfg(feature = "v2")] @@ -1461,6 +1465,7 @@ impl From for ProfileUpdateInternal { merchant_category_code, merchant_country_code, revenue_recovery_retry_algorithm_type, + split_txns_enabled, } = *update; Self { profile_name, @@ -1514,6 +1519,7 @@ impl From for ProfileUpdateInternal { external_vault_connector_details, merchant_category_code, merchant_country_code, + split_txns_enabled, } } ProfileUpdate::RoutingAlgorithmUpdate { @@ -1570,6 +1576,7 @@ impl From for ProfileUpdateInternal { external_vault_connector_details: None, merchant_category_code: None, merchant_country_code: None, + split_txns_enabled: None, }, ProfileUpdate::ExtendedCardInfoUpdate { is_extended_card_info_enabled, @@ -1624,6 +1631,7 @@ impl From for ProfileUpdateInternal { external_vault_connector_details: None, merchant_category_code: None, merchant_country_code: None, + split_txns_enabled: None, }, ProfileUpdate::ConnectorAgnosticMitUpdate { is_connector_agnostic_mit_enabled, @@ -1678,6 +1686,7 @@ impl From for ProfileUpdateInternal { external_vault_connector_details: None, merchant_category_code: None, merchant_country_code: None, + split_txns_enabled: None, }, ProfileUpdate::DefaultRoutingFallbackUpdate { default_fallback_routing, @@ -1732,6 +1741,7 @@ impl From for ProfileUpdateInternal { external_vault_connector_details: None, merchant_category_code: None, merchant_country_code: None, + split_txns_enabled: None, }, ProfileUpdate::NetworkTokenizationUpdate { is_network_tokenization_enabled, @@ -1786,6 +1796,7 @@ impl From for ProfileUpdateInternal { external_vault_connector_details: None, merchant_category_code: None, merchant_country_code: None, + split_txns_enabled: None, }, ProfileUpdate::CollectCvvDuringPaymentUpdate { should_collect_cvv_during_payment, @@ -1840,6 +1851,7 @@ impl From for ProfileUpdateInternal { external_vault_connector_details: None, merchant_category_code: None, merchant_country_code: None, + split_txns_enabled: None, }, ProfileUpdate::DecisionManagerRecordUpdate { three_ds_decision_manager_config, @@ -1894,6 +1906,7 @@ impl From for ProfileUpdateInternal { external_vault_connector_details: None, merchant_category_code: None, merchant_country_code: None, + split_txns_enabled: None, }, ProfileUpdate::CardTestingSecretKeyUpdate { card_testing_secret_key, @@ -1948,6 +1961,7 @@ impl From for ProfileUpdateInternal { external_vault_connector_details: None, merchant_category_code: None, merchant_country_code: None, + split_txns_enabled: None, }, ProfileUpdate::RevenueRecoveryAlgorithmUpdate { revenue_recovery_retry_algorithm_type, @@ -2003,6 +2017,7 @@ impl From for ProfileUpdateInternal { external_vault_connector_details: None, merchant_category_code: None, merchant_country_code: None, + split_txns_enabled: None, }, } } @@ -2082,6 +2097,7 @@ impl super::behaviour::Conversion for Profile { merchant_category_code: self.merchant_category_code, merchant_country_code: self.merchant_country_code, dispute_polling_interval: None, + split_txns_enabled: Some(self.split_txns_enabled), }) } @@ -2177,6 +2193,7 @@ impl super::behaviour::Conversion for Profile { external_vault_connector_details: item.external_vault_connector_details, merchant_category_code: item.merchant_category_code, merchant_country_code: item.merchant_country_code, + split_txns_enabled: item.split_txns_enabled.unwrap_or_default(), }) } .await @@ -2247,6 +2264,7 @@ impl super::behaviour::Conversion for Profile { external_vault_connector_details: self.external_vault_connector_details, merchant_category_code: self.merchant_category_code, merchant_country_code: self.merchant_country_code, + split_txns_enabled: Some(self.split_txns_enabled), }) } } diff --git a/crates/hyperswitch_domain_models/src/payments.rs b/crates/hyperswitch_domain_models/src/payments.rs index 4f8e12fa7c..58a859acbc 100644 --- a/crates/hyperswitch_domain_models/src/payments.rs +++ b/crates/hyperswitch_domain_models/src/payments.rs @@ -460,6 +460,8 @@ pub struct PaymentIntent { pub updated_by: String, /// Denotes whether merchant requested for incremental authorization to be enabled for this payment. pub request_incremental_authorization: storage_enums::RequestIncrementalAuthorization, + /// Denotes whether merchant requested for split payments to be enabled for this payment + pub split_txns_enabled: storage_enums::SplitTxnsEnabled, /// Denotes the number of authorizations that have been made for the payment. pub authorization_count: Option, /// Denotes the client secret expiry for the payment. This is the time at which the client secret will expire. @@ -657,6 +659,7 @@ impl PaymentIntent { request_external_three_ds_authentication: request .request_external_three_ds_authentication .unwrap_or_default(), + split_txns_enabled: profile.split_txns_enabled, frm_metadata: request.frm_metadata, customer_details: None, merchant_reference_id: request.merchant_reference_id, diff --git a/crates/hyperswitch_domain_models/src/payments/payment_intent.rs b/crates/hyperswitch_domain_models/src/payments/payment_intent.rs index c96209d2b4..8dbdd1761b 100644 --- a/crates/hyperswitch_domain_models/src/payments/payment_intent.rs +++ b/crates/hyperswitch_domain_models/src/payments/payment_intent.rs @@ -752,7 +752,6 @@ impl TryFrom for diesel_models::PaymentIntentUpdateInternal frm_metadata, request_external_three_ds_authentication: request_external_three_ds_authentication.map(|val| val.as_bool()), - updated_by, force_3ds_challenge, is_iframe_redirection_enabled, @@ -1665,6 +1664,7 @@ impl behaviour::Conversion for PaymentIntent { frm_merchant_decision, updated_by, request_incremental_authorization, + split_txns_enabled, authorization_count, session_expiry, request_external_three_ds_authentication, @@ -1734,6 +1734,7 @@ impl behaviour::Conversion for PaymentIntent { updated_by, request_incremental_authorization: Some(request_incremental_authorization), + split_txns_enabled: Some(split_txns_enabled), authorization_count, session_expiry, request_external_three_ds_authentication: Some( @@ -1887,6 +1888,7 @@ impl behaviour::Conversion for PaymentIntent { request_incremental_authorization: storage_model .request_incremental_authorization .unwrap_or_default(), + split_txns_enabled: storage_model.split_txns_enabled.unwrap_or_default(), authorization_count: storage_model.authorization_count, session_expiry: storage_model.session_expiry, request_external_three_ds_authentication: storage_model @@ -1975,6 +1977,7 @@ impl behaviour::Conversion for PaymentIntent { updated_by: self.updated_by, request_incremental_authorization: Some(self.request_incremental_authorization), + split_txns_enabled: Some(self.split_txns_enabled), authorization_count: self.authorization_count, session_expiry: self.session_expiry, request_external_three_ds_authentication: Some( diff --git a/crates/openapi/src/openapi_v2.rs b/crates/openapi/src/openapi_v2.rs index 66ab8ead91..e5d36a3a2a 100644 --- a/crates/openapi/src/openapi_v2.rs +++ b/crates/openapi/src/openapi_v2.rs @@ -652,6 +652,7 @@ Never share your secret api keys. Keep them guarded and secure. api_models::enums::MitExemptionRequest, api_models::enums::EnablePaymentLinkRequest, api_models::enums::RequestIncrementalAuthorization, + api_models::enums::SplitTxnsEnabled, api_models::enums::External3dsAuthenticationRequest, api_models::enums::TaxCalculationOverride, api_models::enums::SurchargeCalculationOverride, diff --git a/crates/router/src/core/admin.rs b/crates/router/src/core/admin.rs index 3e41150e05..767917dd6d 100644 --- a/crates/router/src/core/admin.rs +++ b/crates/router/src/core/admin.rs @@ -3626,6 +3626,7 @@ impl ProfileCreateBridge for api::ProfileCreate { .map(ForeignInto::foreign_into), merchant_category_code: self.merchant_category_code, merchant_country_code: self.merchant_country_code, + split_txns_enabled: self.split_txns_enabled.unwrap_or_default(), })) } } @@ -4114,6 +4115,7 @@ impl ProfileUpdateBridge for api::ProfileUpdate { merchant_category_code: self.merchant_category_code, merchant_country_code: self.merchant_country_code, revenue_recovery_retry_algorithm_type, + split_txns_enabled: self.split_txns_enabled, }, ))) } diff --git a/crates/router/src/core/payments/transformers.rs b/crates/router/src/core/payments/transformers.rs index cfdf17b627..66de9b4ee6 100644 --- a/crates/router/src/core/payments/transformers.rs +++ b/crates/router/src/core/payments/transformers.rs @@ -2236,6 +2236,7 @@ where .clone() .map(ForeignFrom::foreign_from), request_incremental_authorization: payment_intent.request_incremental_authorization, + split_txns_enabled: payment_intent.split_txns_enabled, expires_on: payment_intent.session_expiry, frm_metadata: payment_intent.frm_metadata.clone(), request_external_three_ds_authentication: payment_intent diff --git a/crates/router/src/services/kafka/payment_intent.rs b/crates/router/src/services/kafka/payment_intent.rs index e5caffc4a5..85cf80cd8a 100644 --- a/crates/router/src/services/kafka/payment_intent.rs +++ b/crates/router/src/services/kafka/payment_intent.rs @@ -143,6 +143,7 @@ pub struct KafkaPaymentIntent<'a> { pub updated_by: &'a String, pub surcharge_applicable: Option, pub request_incremental_authorization: RequestIncrementalAuthorization, + pub split_txns_enabled: common_enums::SplitTxnsEnabled, pub authorization_count: Option, #[serde(with = "time::serde::timestamp")] pub session_expiry: OffsetDateTime, @@ -209,6 +210,7 @@ impl<'a> KafkaPaymentIntent<'a> { frm_merchant_decision, updated_by, request_incremental_authorization, + split_txns_enabled, authorization_count, session_expiry, request_external_three_ds_authentication, @@ -265,6 +267,7 @@ impl<'a> KafkaPaymentIntent<'a> { updated_by, surcharge_applicable: None, request_incremental_authorization: *request_incremental_authorization, + split_txns_enabled: *split_txns_enabled, authorization_count: *authorization_count, session_expiry: session_expiry.assume_utc(), request_external_three_ds_authentication: *request_external_three_ds_authentication, diff --git a/crates/router/src/services/kafka/payment_intent_event.rs b/crates/router/src/services/kafka/payment_intent_event.rs index db6de3cce1..edfb570901 100644 --- a/crates/router/src/services/kafka/payment_intent_event.rs +++ b/crates/router/src/services/kafka/payment_intent_event.rs @@ -96,6 +96,7 @@ pub struct KafkaPaymentIntentEvent<'a> { pub updated_by: &'a String, pub surcharge_applicable: Option, pub request_incremental_authorization: RequestIncrementalAuthorization, + pub split_txns_enabled: common_enums::SplitTxnsEnabled, pub authorization_count: Option, #[serde(with = "time::serde::timestamp::nanoseconds")] pub session_expiry: OffsetDateTime, @@ -221,6 +222,7 @@ impl<'a> KafkaPaymentIntentEvent<'a> { frm_merchant_decision, updated_by, request_incremental_authorization, + split_txns_enabled, authorization_count, session_expiry, request_external_three_ds_authentication, @@ -277,6 +279,7 @@ impl<'a> KafkaPaymentIntentEvent<'a> { updated_by, surcharge_applicable: None, request_incremental_authorization: *request_incremental_authorization, + split_txns_enabled: *split_txns_enabled, authorization_count: *authorization_count, session_expiry: session_expiry.assume_utc(), request_external_three_ds_authentication: *request_external_three_ds_authentication, diff --git a/crates/router/src/types/api/admin.rs b/crates/router/src/types/api/admin.rs index e0866e13eb..8035959dd3 100644 --- a/crates/router/src/types/api/admin.rs +++ b/crates/router/src/types/api/admin.rs @@ -319,6 +319,7 @@ impl ForeignTryFrom for ProfileResponse { .map(ForeignInto::foreign_into), merchant_category_code: item.merchant_category_code, merchant_country_code: item.merchant_country_code, + split_txns_enabled: item.split_txns_enabled, }) } } diff --git a/v2_compatible_migrations/2025-08-25-090221_add-split-txns-enabled-in-payment-intent/down.sql b/v2_compatible_migrations/2025-08-25-090221_add-split-txns-enabled-in-payment-intent/down.sql new file mode 100644 index 0000000000..becd303be3 --- /dev/null +++ b/v2_compatible_migrations/2025-08-25-090221_add-split-txns-enabled-in-payment-intent/down.sql @@ -0,0 +1,2 @@ +-- This file should undo anything in `up.sql` +ALTER TABLE payment_intent DROP COLUMN IF EXISTS split_txns_enabled; diff --git a/v2_compatible_migrations/2025-08-25-090221_add-split-txns-enabled-in-payment-intent/up.sql b/v2_compatible_migrations/2025-08-25-090221_add-split-txns-enabled-in-payment-intent/up.sql new file mode 100644 index 0000000000..c765ec9e03 --- /dev/null +++ b/v2_compatible_migrations/2025-08-25-090221_add-split-txns-enabled-in-payment-intent/up.sql @@ -0,0 +1,2 @@ +-- Your SQL goes here +ALTER TABLE payment_intent ADD COLUMN IF NOT EXISTS split_txns_enabled VARCHAR(16); \ No newline at end of file diff --git a/v2_compatible_migrations/2025-08-29-040411_add-split-txns-enabled-in-business-profile/down.sql b/v2_compatible_migrations/2025-08-29-040411_add-split-txns-enabled-in-business-profile/down.sql new file mode 100644 index 0000000000..a0fb769851 --- /dev/null +++ b/v2_compatible_migrations/2025-08-29-040411_add-split-txns-enabled-in-business-profile/down.sql @@ -0,0 +1,2 @@ +-- This file should undo anything in `up.sql` +ALTER TABLE business_profile DROP COLUMN IF EXISTS split_txns_enabled; \ No newline at end of file diff --git a/v2_compatible_migrations/2025-08-29-040411_add-split-txns-enabled-in-business-profile/up.sql b/v2_compatible_migrations/2025-08-29-040411_add-split-txns-enabled-in-business-profile/up.sql new file mode 100644 index 0000000000..d5cc041c28 --- /dev/null +++ b/v2_compatible_migrations/2025-08-29-040411_add-split-txns-enabled-in-business-profile/up.sql @@ -0,0 +1,2 @@ +-- Your SQL goes here +ALTER TABLE business_profile ADD COLUMN IF NOT EXISTS split_txns_enabled VARCHAR(16); \ No newline at end of file