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

revert(payments): expose card subtype, segment type and funding source (#14066)

Ayush Anand9e515b814043
diff --git a/api-reference/v1/openapi_spec_v1.json b/api-reference/v1/openapi_spec_v1.json
index e57f8c1496..5b2556a0e9 100644
--- a/api-reference/v1/openapi_spec_v1.json
+++ b/api-reference/v1/openapi_spec_v1.json
@@ -16593,28 +16593,6 @@
"example": "CREDIT",
"nullable": true
},
- "card_subtype": {
- "type": "string",
- "description": "The product the card is issued under, e.g. `CLASSIC` or `ELECTRON`",
- "example": "CLASSIC",
- "nullable": true
- },
- "card_segment_type": {
- "allOf": [
- {
- "$ref": "#/components/schemas/CardSegmentType"
- }
- ],
- "nullable": true
- },
- "funding_source": {
- "allOf": [
- {
- "$ref": "#/components/schemas/FundingSource"
- }
- ],
- "nullable": true
- },
"card_issuing_country": {
"type": "string",
"example": "INDIA",
@@ -16858,27 +16836,6 @@
"type": "string",
"description": "Card Type",
"nullable": true
- },
- "card_subtype": {
- "type": "string",
- "description": "The product the card is issued under, e.g. `CLASSIC` or `ELECTRON`",
- "nullable": true
- },
- "card_segment_type": {
- "allOf": [
- {
- "$ref": "#/components/schemas/CardSegmentType"
- }
- ],
- "nullable": true
- },
- "funding_source": {
- "allOf": [
- {
- "$ref": "#/components/schemas/FundingSource"
- }
- ],
- "nullable": true
}
},
"additionalProperties": false
@@ -16949,26 +16906,6 @@
"type": "string",
"nullable": true
},
- "card_subtype": {
- "type": "string",
- "nullable": true
- },
- "card_segment_type": {
- "allOf": [
- {
- "$ref": "#/components/schemas/CardSegmentType"
- }
- ],
- "nullable": true
- },
- "funding_source": {
- "allOf": [
- {
- "$ref": "#/components/schemas/FundingSource"
- }
- ],
- "nullable": true
- },
"saved_to_locker": {
"type": "boolean"
}
@@ -17390,27 +17327,6 @@
"type": "string",
"nullable": true
},
- "card_subtype": {
- "type": "string",
- "description": "The product the card is issued under, e.g. `CLASSIC` or `ELECTRON`.",
- "nullable": true
- },
- "card_segment_type": {
- "allOf": [
- {
- "$ref": "#/components/schemas/CardSegmentType"
- }
- ],
- "nullable": true
- },
- "funding_source": {
- "allOf": [
- {
- "$ref": "#/components/schemas/FundingSource"
- }
- ],
- "nullable": true
- },
"card_network": {
"allOf": [
{
@@ -17708,28 +17624,6 @@
"example": "CREDIT",
"nullable": true
},
- "card_subtype": {
- "type": "string",
- "description": "The product the card is issued under, e.g. `CLASSIC` or `ELECTRON`",
- "example": "CLASSIC",
- "nullable": true
- },
- "card_segment_type": {
- "allOf": [
- {
- "$ref": "#/components/schemas/CardSegmentType"
- }
- ],
- "nullable": true
- },
- "funding_source": {
- "allOf": [
- {
- "$ref": "#/components/schemas/FundingSource"
- }
- ],
- "nullable": true
- },
"card_issuing_country": {
"type": "string",
"example": "INDIA",
@@ -28569,28 +28463,6 @@
"example": "CREDIT",
"nullable": true
},
- "card_subtype": {
- "type": "string",
- "description": "The product the card is issued under, e.g. `CLASSIC` or `ELECTRON`",
- "example": "CLASSIC",
- "nullable": true
- },
- "card_segment_type": {
- "allOf": [
- {
- "$ref": "#/components/schemas/CardSegmentType"
- }
- ],
- "nullable": true
- },
- "funding_source": {
- "allOf": [
- {
- "$ref": "#/components/schemas/FundingSource"
- }
- ],
- "nullable": true
- },
"card_issuing_country": {
"type": "string",
"example": "INDIA",
@@ -46958,27 +46830,6 @@
}
],
"nullable": true
- },
- "card_subtype": {
- "type": "string",
- "description": "The product the card is issued under, e.g. `CLASSIC` or `ELECTRON`",
- "nullable": true
- },
- "card_segment_type": {
- "allOf": [
- {
- "$ref": "#/components/schemas/CardSegmentType"
- }
- ],
- "nullable": true
- },
- "funding_source": {
- "allOf": [
- {
- "$ref": "#/components/schemas/FundingSource"
- }
- ],
- "nullable": true
}
},
"additionalProperties": false
diff --git a/api-reference/v2/openapi_spec_v2.json b/api-reference/v2/openapi_spec_v2.json
index ef4935ef98..58459976b9 100644
--- a/api-reference/v2/openapi_spec_v2.json
+++ b/api-reference/v2/openapi_spec_v2.json
@@ -5589,27 +5589,6 @@
"description": "Card type, can be either `credit` or `debit`",
"nullable": true
},
- "card_subtype": {
- "type": "string",
- "description": "The product the card is issued under, e.g. `CLASSIC` or `ELECTRON`.\nFree form, as the value comes straight from the BIN record.",
- "nullable": true
- },
- "card_segment_type": {
- "allOf": [
- {
- "$ref": "#/components/schemas/CardSegmentType"
- }
- ],
- "nullable": true
- },
- "funding_source": {
- "allOf": [
- {
- "$ref": "#/components/schemas/FundingSource"
- }
- ],
- "nullable": true
- },
"card_issuing_country": {
"type": "string",
"nullable": true
@@ -11027,28 +11006,6 @@
"example": "CREDIT",
"nullable": true
},
- "card_subtype": {
- "type": "string",
- "description": "The product the card is issued under, e.g. `CLASSIC` or `ELECTRON`",
- "example": "CLASSIC",
- "nullable": true
- },
- "card_segment_type": {
- "allOf": [
- {
- "$ref": "#/components/schemas/CardSegmentType"
- }
- ],
- "nullable": true
- },
- "funding_source": {
- "allOf": [
- {
- "$ref": "#/components/schemas/FundingSource"
- }
- ],
- "nullable": true
- },
"card_issuing_country": {
"type": "string",
"example": "INDIA",
@@ -11222,27 +11179,6 @@
],
"nullable": true
},
- "card_subtype": {
- "type": "string",
- "description": "The product the card is issued under, e.g. `CLASSIC` or `ELECTRON`",
- "nullable": true
- },
- "card_segment_type": {
- "allOf": [
- {
- "$ref": "#/components/schemas/CardSegmentType"
- }
- ],
- "nullable": true
- },
- "funding_source": {
- "allOf": [
- {
- "$ref": "#/components/schemas/FundingSource"
- }
- ],
- "nullable": true
- },
"card_cvc": {
"type": "string",
"description": "The CVC number for the card\nThis is optional in case the card needs to be vaulted",
@@ -11317,27 +11253,6 @@
"example": "Credit",
"nullable": true
},
- "card_subtype": {
- "type": "string",
- "example": "CLASSIC",
- "nullable": true
- },
- "card_segment_type": {
- "allOf": [
- {
- "$ref": "#/components/schemas/CardSegmentType"
- }
- ],
- "nullable": true
- },
- "funding_source": {
- "allOf": [
- {
- "$ref": "#/components/schemas/FundingSource"
- }
- ],
- "nullable": true
- },
"saved_to_locker": {
"type": "boolean",
"example": true
@@ -11624,27 +11539,6 @@
"type": "string",
"nullable": true
},
- "card_subtype": {
- "type": "string",
- "description": "The product the card is issued under, e.g. `CLASSIC` or `ELECTRON`.",
- "nullable": true
- },
- "card_segment_type": {
- "allOf": [
- {
- "$ref": "#/components/schemas/CardSegmentType"
- }
- ],
- "nullable": true
- },
- "funding_source": {
- "allOf": [
- {
- "$ref": "#/components/schemas/FundingSource"
- }
- ],
- "nullable": true
- },
"card_network": {
"allOf": [
{
@@ -11693,15 +11587,6 @@
}
}
},
- "CardSegmentType": {
- "type": "string",
- "enum": [
- "business",
- "commercial",
- "consumer",
- "government"
- ]
- },
"CardSpecificFeatures": {
"type": "object",
"required": [
@@ -11942,28 +11827,6 @@
"example": "CREDIT",
"nullable": true
},
- "card_subtype": {
- "type": "string",
- "description": "The product the card is issued under, e.g. `CLASSIC` or `ELECTRON`",
- "example": "CLASSIC",
- "nullable": true
- },
- "card_segment_type": {
- "allOf": [
- {
- "$ref": "#/components/schemas/CardSegmentType"
- }
- ],
- "nullable": true
- },
- "funding_source": {
- "allOf": [
- {
- "$ref": "#/components/schemas/FundingSource"
- }
- ],
- "nullable": true
- },
"card_issuing_country": {
"type": "string",
"example": "INDIA",
@@ -16436,16 +16299,6 @@
"post"
]
},
- "FundingSource": {
- "type": "string",
- "enum": [
- "CREDIT",
- "DEBIT",
- "DEFERRED DEBIT",
- "PREPAID",
- "CHARGE CARD"
- ]
- },
"FutureUsage": {
"type": "string",
"description": "Specifies how the payment method can be used for future payments.\n- `off_session`: The payment method can be used for future payments when the customer is not present.\n- `on_session`: The payment method is intended for use only when the customer is present during checkout.\nIf omitted, defaults to `on_session`.",
@@ -20482,28 +20335,6 @@
"example": "CREDIT",
"nullable": true
},
- "card_subtype": {
- "type": "string",
- "description": "The product the card is issued under, e.g. `CLASSIC` or `ELECTRON`",
- "example": "CLASSIC",
- "nullable": true
- },
- "card_segment_type": {
- "allOf": [
- {
- "$ref": "#/components/schemas/CardSegmentType"
- }
- ],
- "nullable": true
- },
- "funding_source": {
- "allOf": [
- {
- "$ref": "#/components/schemas/FundingSource"
- }
- ],
- "nullable": true
- },
"card_issuing_country": {
"type": "string",
"example": "INDIA",
@@ -34443,27 +34274,6 @@
}
],
"nullable": true
- },
- "card_subtype": {
- "type": "string",
- "description": "The product the card is issued under, e.g. `CLASSIC` or `ELECTRON`",
- "nullable": true
- },
- "card_segment_type": {
- "allOf": [
- {
- "$ref": "#/components/schemas/CardSegmentType"
- }
- ],
- "nullable": true
- },
- "funding_source": {
- "allOf": [
- {
- "$ref": "#/components/schemas/FundingSource"
- }
- ],
- "nullable": true
}
},
"additionalProperties": false
diff --git a/crates/api_models/src/mandates.rs b/crates/api_models/src/mandates.rs
index b569decd6e..5514422629 100644
--- a/crates/api_models/src/mandates.rs
+++ b/crates/api_models/src/mandates.rs
@@ -245,22 +245,6 @@ pub struct NetworkTransactionIdAndCardDetails {
#[smithy(value_type = "Option<String>")]
pub card_type: Option<String>,
- /// The product the card is issued under, e.g. `CLASSIC` or `ELECTRON`
- #[schema(example = "CLASSIC")]
- #[smithy(value_type = "Option<String>")]
- pub card_subtype: Option<String>,
-
- /// The segment the card is issued to
- #[schema(value_type = Option<CardSegmentType>, example = "consumer")]
- #[smithy(value_type = "Option<CardSegmentType>")]
- pub card_segment_type: Option<api_enums::CardSegmentType>,
-
- /// How the card is funded. More granular than `card_type`, which collapses
- /// deferred debit and charge cards.
- #[schema(value_type = Option<FundingSource>, example = "CREDIT")]
- #[smithy(value_type = "Option<FundingSource>")]
- pub funding_source: Option<api_enums::FundingSource>,
-
#[schema(example = "INDIA")]
#[smithy(value_type = "Option<String>")]
pub card_issuing_country: Option<String>,
diff --git a/crates/api_models/src/payment_methods.rs b/crates/api_models/src/payment_methods.rs
index c0d4cdacb5..507156e9cb 100644
--- a/crates/api_models/src/payment_methods.rs
+++ b/crates/api_models/src/payment_methods.rs
@@ -454,9 +454,6 @@ impl PaymentMethodCreate {
card_network: payment_method_migrate_card.card_network.clone(),
card_issuer: payment_method_migrate_card.card_issuer.clone(),
card_type: payment_method_migrate_card.card_type.clone(),
- card_subtype: payment_method_migrate_card.card_subtype.clone(),
- card_segment_type: payment_method_migrate_card.card_segment_type,
- funding_source: payment_method_migrate_card.funding_source,
card_cvc: None,
});
@@ -905,17 +902,6 @@ pub struct CardDetail {
/// Card Type
pub card_type: Option<String>,
-
- /// The product the card is issued under, e.g. `CLASSIC` or `ELECTRON`
- pub card_subtype: Option<String>,
-
- /// The segment the card is issued to
- #[schema(value_type = Option<CardSegmentType>)]
- pub card_segment_type: Option<api_enums::CardSegmentType>,
-
- /// How the card is funded, as recorded against its BIN
- #[schema(value_type = Option<FundingSource>)]
- pub funding_source: Option<api_enums::FundingSource>,
}
#[derive(
@@ -979,17 +965,6 @@ pub struct CardDetail {
/// Card Type
pub card_type: Option<CardType>,
- /// The product the card is issued under, e.g. `CLASSIC` or `ELECTRON`
- pub card_subtype: Option<String>,
-
- /// The segment the card is issued to
- #[schema(value_type = Option<CardSegmentType>)]
- pub card_segment_type: Option<api_enums::CardSegmentType>,
-
- /// How the card is funded, as recorded against its BIN
- #[schema(value_type = Option<FundingSource>)]
- pub funding_source: Option<api_enums::FundingSource>,
-
/// The CVC number for the card
/// This is optional in case the card needs to be vaulted
#[schema(value_type = String, example = "242")]
@@ -1085,17 +1060,6 @@ pub struct MigrateCardDetail {
/// Card Type
pub card_type: Option<String>,
-
- /// The product the card is issued under, e.g. `CLASSIC` or `ELECTRON`
- pub card_subtype: Option<String>,
-
- /// The segment the card is issued to
- #[schema(value_type = Option<CardSegmentType>)]
- pub card_segment_type: Option<api_enums::CardSegmentType>,
-
- /// How the card is funded, as recorded against its BIN
- #[schema(value_type = Option<FundingSource>)]
- pub funding_source: Option<api_enums::FundingSource>,
}
#[derive(Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)]
@@ -1136,17 +1100,6 @@ pub struct MigrateNetworkTokenData {
/// Card Type
pub card_type: Option<String>,
-
- /// The product the card is issued under, e.g. `CLASSIC` or `ELECTRON`
- pub card_subtype: Option<String>,
-
- /// The segment the card is issued to
- #[schema(value_type = Option<CardSegmentType>)]
- pub card_segment_type: Option<api_enums::CardSegmentType>,
-
- /// How the card is funded, as recorded against its BIN
- #[schema(value_type = Option<FundingSource>)]
- pub funding_source: Option<api_enums::FundingSource>,
}
#[derive(Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)]
@@ -1226,9 +1179,6 @@ impl CardDetailUpdate {
card_network: None,
card_issuer: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
}
}
}
@@ -1268,9 +1218,6 @@ impl CardDetailUpdate {
card_network: None,
card_issuer: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_cvc: None,
}
}
@@ -1318,7 +1265,7 @@ pub struct RawProxyCardDataResponse {
#[serde(rename_all = "snake_case")]
pub enum RawPaymentMethodData {
Card(CardDetail),
- CardWithNT(Box<RawCardWithNTDetails>),
+ CardWithNT(RawCardWithNTDetails),
BankDebit(BankDebitDetail),
ProxyCard(RawProxyCardDataResponse),
}
@@ -1733,9 +1680,6 @@ pub struct CardDetailsPaymentMethod {
pub card_issuer: Option<String>,
pub card_network: Option<api_enums::CardNetwork>,
pub card_type: Option<String>,
- pub card_subtype: Option<String>,
- pub card_segment_type: Option<api_enums::CardSegmentType>,
- pub funding_source: Option<api_enums::FundingSource>,
#[serde(default = "saved_in_locker_default")]
pub saved_to_locker: bool,
pub co_badged_card_data: Option<CoBadgedCardDataToBeSaved>,
@@ -2017,9 +1961,6 @@ impl From<(Card, Option<common_enums::CardNetwork>)> for CardDetail {
card_network,
card_issuer: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
}
}
}
@@ -2059,11 +2000,6 @@ pub struct CardDetailFromLocker {
pub card_isin: Option<String>,
pub card_issuer: Option<String>,
pub card_type: Option<String>,
- pub card_subtype: Option<String>,
- #[schema(value_type = Option<CardSegmentType>)]
- pub card_segment_type: Option<api_enums::CardSegmentType>,
- #[schema(value_type = Option<FundingSource>)]
- pub funding_source: Option<api_enums::FundingSource>,
pub saved_to_locker: bool,
}
@@ -2102,12 +2038,6 @@ pub struct CardDetailFromLocker {
pub card_issuer: Option<String>,
#[schema(value_type=Option<String>, example = "Credit")]
pub card_type: Option<String>,
- #[schema(value_type=Option<String>, example = "CLASSIC")]
- pub card_subtype: Option<String>,
- #[schema(value_type = Option<CardSegmentType>)]
- pub card_segment_type: Option<api_enums::CardSegmentType>,
- #[schema(value_type = Option<FundingSource>)]
- pub funding_source: Option<api_enums::FundingSource>,
#[schema(value_type=bool, example = true)]
pub saved_to_locker: bool,
}
@@ -2128,9 +2058,6 @@ impl From<CardDetailFromLocker> for payments::AdditionalCardInfo {
card_issuer: item.card_issuer,
card_network: item.card_network,
card_type: item.card_type,
- card_subtype: item.card_subtype,
- card_segment_type: item.card_segment_type,
- funding_source: item.funding_source,
card_issuing_country: item.issuer_country,
card_issuing_country_code: item.issuer_country_code,
bank_code: None,
@@ -2158,9 +2085,6 @@ impl From<CardDetailFromLocker> for payments::AdditionalCardInfo {
card_issuer: item.card_issuer,
card_network: item.card_network,
card_type: item.card_type,
- card_subtype: item.card_subtype,
- card_segment_type: item.card_segment_type,
- funding_source: item.funding_source,
card_issuing_country: item.issuer_country.map(|country| country.to_string()),
card_issuing_country_code: None,
bank_code: None,
@@ -2210,9 +2134,6 @@ impl From<CardDetailsPaymentMethod> for CardDetailFromLocker {
card_issuer: item.card_issuer,
card_network: item.card_network,
card_type: item.card_type,
- card_subtype: item.card_subtype,
- card_segment_type: item.card_segment_type,
- funding_source: item.funding_source,
saved_to_locker: item.saved_to_locker,
}
}
@@ -2240,9 +2161,6 @@ impl From<CardDetailsPaymentMethod> for CardDetailFromLocker {
card_issuer: item.card_issuer,
card_network: item.card_network,
card_type: item.card_type,
- card_subtype: item.card_subtype,
- card_segment_type: item.card_segment_type,
- funding_source: item.funding_source,
saved_to_locker: item.saved_to_locker,
}
}
@@ -2263,9 +2181,6 @@ impl From<CardDetail> for CardDetailFromLocker {
card_issuer: item.card_issuer,
card_network: item.card_network,
card_type: item.card_type.map(|card| card.to_string()),
- card_subtype: item.card_subtype,
- card_segment_type: item.card_segment_type,
- funding_source: item.funding_source,
saved_to_locker: true,
card_fingerprint: None,
}
@@ -2293,9 +2208,6 @@ impl From<CardDetail> for CardDetailFromLocker {
card_issuer: item.card_issuer,
card_network: item.card_network,
card_type: item.card_type.map(|card| card.to_string()),
- card_subtype: item.card_subtype,
- card_segment_type: item.card_segment_type,
- funding_source: item.funding_source,
saved_to_locker: true,
card_fingerprint: None,
scheme: card_scheme,
@@ -2318,9 +2230,6 @@ impl From<CardDetail> for CardDetailsPaymentMethod {
card_issuer: item.card_issuer,
card_network: item.card_network,
card_type: item.card_type.map(|card| card.to_string()),
- card_subtype: item.card_subtype,
- card_segment_type: item.card_segment_type,
- funding_source: item.funding_source,
saved_to_locker: true,
co_badged_card_data: None,
issuer_country_code: None,
@@ -2345,9 +2254,6 @@ impl From<(CardDetailFromLocker, Option<&CoBadgedCardData>)> for CardDetailsPaym
card_issuer: item.card_issuer,
card_network: item.card_network,
card_type: item.card_type,
- card_subtype: item.card_subtype,
- card_segment_type: item.card_segment_type,
- funding_source: item.funding_source,
saved_to_locker: item.saved_to_locker,
co_badged_card_data: co_badged_card_data.map(CoBadgedCardDataToBeSaved::from),
}
@@ -2368,9 +2274,6 @@ impl From<CardDetailFromLocker> for CardDetailsPaymentMethod {
card_issuer: item.card_issuer,
card_network: item.card_network,
card_type: item.card_type,
- card_subtype: item.card_subtype,
- card_segment_type: item.card_segment_type,
- funding_source: item.funding_source,
saved_to_locker: item.saved_to_locker,
co_badged_card_data: None,
issuer_country_code: None,
@@ -4411,9 +4314,6 @@ impl
card_holder_name: record.card_holder_name.clone().or(record.name.clone()),
card_network: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_issuer: None,
card_issuing_country: None,
card_issuing_country_code: None,
@@ -4442,9 +4342,6 @@ impl
card_network: None,
card_issuer: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
},
network_token_requestor_ref_id: record
.network_token_requestor_ref_id
@@ -4559,17 +4456,6 @@ pub struct TokenizeCardRequest {
/// Card Type
pub card_type: Option<CardType>,
-
- /// The product the card is issued under, e.g. `CLASSIC` or `ELECTRON`
- pub card_subtype: Option<String>,
-
- /// The segment the card is issued to
- #[schema(value_type = Option<CardSegmentType>)]
- pub card_segment_type: Option<api_enums::CardSegmentType>,
-
- /// How the card is funded, as recorded against its BIN
- #[schema(value_type = Option<FundingSource>)]
- pub funding_source: Option<api_enums::FundingSource>,
}
#[derive(Default, Debug, Clone, serde::Deserialize, serde::Serialize, ToSchema)]
@@ -4626,9 +4512,6 @@ impl From<&Card> for MigrateCardDetail {
card_network: None,
card_issuer: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
}
}
}
diff --git a/crates/api_models/src/payments.rs b/crates/api_models/src/payments.rs
index c70b2a3475..946a0a5f10 100644
--- a/crates/api_models/src/payments.rs
+++ b/crates/api_models/src/payments.rs
@@ -2607,22 +2607,6 @@ pub struct Card {
#[smithy(value_type = "Option<String>")]
pub card_type: Option<String>,
- /// The product the card is issued under, e.g. `CLASSIC` or `ELECTRON`
- #[schema(example = "CLASSIC")]
- #[smithy(value_type = "Option<String>")]
- pub card_subtype: Option<String>,
-
- /// The segment the card is issued to
- #[schema(value_type = Option<CardSegmentType>, example = "consumer")]
- #[smithy(value_type = "Option<CardSegmentType>")]
- pub card_segment_type: Option<api_enums::CardSegmentType>,
-
- /// How the card is funded. More granular than `card_type`, which collapses
- /// deferred debit and charge cards.
- #[schema(value_type = Option<FundingSource>, example = "CREDIT")]
- #[smithy(value_type = "Option<FundingSource>")]
- pub funding_source: Option<api_enums::FundingSource>,
-
#[schema(example = "INDIA")]
#[smithy(value_type = "Option<String>")]
pub card_issuing_country: Option<String>,
@@ -2687,22 +2671,6 @@ pub struct CardWithNoCVC {
#[smithy(value_type = "Option<String>")]
pub card_type: Option<String>,
- /// The product the card is issued under, e.g. `CLASSIC` or `ELECTRON`
- #[schema(example = "CLASSIC")]
- #[smithy(value_type = "Option<String>")]
- pub card_subtype: Option<String>,
-
- /// The segment the card is issued to
- #[schema(value_type = Option<CardSegmentType>, example = "consumer")]
- #[smithy(value_type = "Option<CardSegmentType>")]
- pub card_segment_type: Option<api_enums::CardSegmentType>,
-
- /// How the card is funded. More granular than `card_type`, which collapses
- /// deferred debit and charge cards.
- #[schema(value_type = Option<FundingSource>, example = "CREDIT")]
- #[smithy(value_type = "Option<FundingSource>")]
- pub funding_source: Option<api_enums::FundingSource>,
-
#[schema(example = "INDIA")]
#[smithy(value_type = "Option<String>")]
pub card_issuing_country: Option<String>,
@@ -2735,9 +2703,6 @@ impl TryFrom<payment_methods::CardDetail> for Card {
nick_name,
card_network,
card_issuer,
- card_subtype,
- card_segment_type,
- funding_source,
card_cvc,
..
} = value;
@@ -2753,9 +2718,6 @@ impl TryFrom<payment_methods::CardDetail> for Card {
card_issuer,
card_network,
card_type: None,
- card_subtype,
- card_segment_type,
- funding_source,
card_issuing_country: None,
card_issuing_country_code: None,
bank_code: None,
@@ -4203,19 +4165,6 @@ pub struct AdditionalCardInfo {
/// Card type, can be either `credit` or `debit`
pub card_type: Option<String>,
- /// The product the card is issued under, e.g. `CLASSIC` or `ELECTRON`.
- /// Free form, as the value comes straight from the BIN record.
- pub card_subtype: Option<String>,
-
- /// The segment the card is issued to, as recorded against its BIN
- #[schema(value_type = Option<CardSegmentType>, example = "consumer")]
- pub card_segment_type: Option<api_enums::CardSegmentType>,
-
- /// How the card is funded, as recorded against its BIN. More granular than
- /// `card_type`, which collapses deferred debit and charge cards.
- #[schema(value_type = Option<FundingSource>, example = "CREDIT")]
- pub funding_source: Option<api_enums::FundingSource>,
-
pub card_issuing_country: Option<String>,
pub card_issuing_country_code: Option<String>,
pub bank_code: Option<String>,
@@ -5947,18 +5896,6 @@ pub struct CardResponse {
pub last4: Option<String>,
#[smithy(value_type = "Option<String>")]
pub card_type: Option<String>,
- /// The product the card is issued under, e.g. `CLASSIC` or `ELECTRON`.
- #[smithy(value_type = "Option<String>")]
- pub card_subtype: Option<String>,
- /// The segment the card is issued to, as recorded against its BIN
- #[schema(value_type = Option<CardSegmentType>, example = "consumer")]
- #[smithy(value_type = "Option<CardSegmentType>")]
- pub card_segment_type: Option<api_enums::CardSegmentType>,
- /// How the card is funded, as recorded against its BIN. More granular than
- /// `card_type`, which collapses deferred debit and charge cards.
- #[schema(value_type = Option<FundingSource>, example = "CREDIT")]
- #[smithy(value_type = "Option<FundingSource>")]
- pub funding_source: Option<api_enums::FundingSource>,
#[schema(value_type = Option<CardNetwork>, example = "Visa")]
#[smithy(value_type = "Option<CardNetwork>")]
pub card_network: Option<api_enums::CardNetwork>,
@@ -9550,9 +9487,6 @@ impl From<AdditionalCardInfo> for CardResponse {
Self {
last4: card.last4,
card_type: card.card_type,
- card_subtype: card.card_subtype,
- card_segment_type: card.card_segment_type,
- funding_source: card.funding_source,
card_network: card.card_network,
card_issuer: card.card_issuer,
card_issuing_country: card.card_issuing_country,
diff --git a/crates/hyperswitch_connectors/src/connectors/recurly/transformers.rs b/crates/hyperswitch_connectors/src/connectors/recurly/transformers.rs
index e4a8a767ff..fbc3dbb77e 100644
--- a/crates/hyperswitch_connectors/src/connectors/recurly/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/recurly/transformers.rs
@@ -212,9 +212,6 @@ impl
card_isin: Some(item.response.payment_method.first_six),
card_issuer: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_issuing_country: None,
card_issuing_country_code: None,
bank_code: None,
diff --git a/crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs b/crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs
index 610f9e0a43..fc61fc776a 100644
--- a/crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs
@@ -576,9 +576,6 @@ impl
card_isin: None,
card_issuer: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_issuing_country: None,
card_issuing_country_code: None,
bank_code: None,
diff --git a/crates/hyperswitch_domain_models/src/bulk_tokenization.rs b/crates/hyperswitch_domain_models/src/bulk_tokenization.rs
index 335260f9cb..2a086a3d3b 100644
--- a/crates/hyperswitch_domain_models/src/bulk_tokenization.rs
+++ b/crates/hyperswitch_domain_models/src/bulk_tokenization.rs
@@ -42,9 +42,6 @@ pub struct TokenizeCardRequest {
pub card_network: Option<enums::CardNetwork>,
pub card_issuer: Option<String>,
pub card_type: Option<payment_methods_api::CardType>,
- pub card_subtype: Option<String>,
- pub card_segment_type: Option<enums::CardSegmentType>,
- pub funding_source: Option<enums::FundingSource>,
}
#[derive(Clone, Debug)]
@@ -67,9 +64,6 @@ pub struct CardNetworkTokenizeRecord {
pub card_network: Option<enums::CardNetwork>,
pub card_issuer: Option<String>,
pub card_type: Option<payment_methods_api::CardType>,
- pub card_subtype: Option<String>,
- pub card_segment_type: Option<enums::CardSegmentType>,
- pub funding_source: Option<enums::FundingSource>,
// Payment method details
pub payment_method_id: Option<String>,
@@ -177,9 +171,6 @@ impl ForeignTryFrom<CardNetworkTokenizeRecord> for payment_methods_api::CardNetw
card_network: record.card_network,
card_issuer: record.card_issuer,
card_type: record.card_type.clone(),
- card_subtype: record.card_subtype,
- card_segment_type: record.card_segment_type,
- funding_source: record.funding_source,
},
),
billing,
@@ -224,9 +215,6 @@ impl ForeignFrom<&TokenizeCardRequest> for payment_methods_api::MigrateCardDetai
.card_type
.as_ref()
.map(|card_type| card_type.to_string()),
- card_subtype: card.card_subtype.clone(),
- card_segment_type: card.card_segment_type,
- funding_source: card.funding_source,
}
}
}
@@ -275,9 +263,6 @@ impl ForeignFrom<payment_methods_api::TokenizeDataRequest> for TokenizeDataReque
card_network: card.card_network,
card_issuer: card.card_issuer,
card_type: card.card_type,
- card_subtype: card.card_subtype,
- card_segment_type: card.card_segment_type,
- funding_source: card.funding_source,
})
}
payment_methods_api::TokenizeDataRequest::ExistingPaymentMethod(pm) => {
diff --git a/crates/hyperswitch_domain_models/src/mandates.rs b/crates/hyperswitch_domain_models/src/mandates.rs
index 5840b73e5f..14985bbf1d 100644
--- a/crates/hyperswitch_domain_models/src/mandates.rs
+++ b/crates/hyperswitch_domain_models/src/mandates.rs
@@ -780,9 +780,6 @@ impl From<&UpdatedMandateDetails> for api_models::payments::AdditionalCardInfo {
card_isin: card_info.card_isin.clone(),
card_issuer: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_issuing_country: None,
card_issuing_country_code: None,
bank_code: None,
diff --git a/crates/hyperswitch_domain_models/src/payment_method_data.rs b/crates/hyperswitch_domain_models/src/payment_method_data.rs
index 7db3c5a516..b27bbea94a 100644
--- a/crates/hyperswitch_domain_models/src/payment_method_data.rs
+++ b/crates/hyperswitch_domain_models/src/payment_method_data.rs
@@ -115,12 +115,6 @@ pub struct NetworkTransactionIdAndCardDetails {
pub card_type: Option<String>,
- pub card_subtype: Option<String>,
-
- pub card_segment_type: Option<api_enums::CardSegmentType>,
-
- pub funding_source: Option<api_enums::FundingSource>,
-
pub card_issuing_country: Option<String>,
pub card_issuing_country_code: Option<String>,
@@ -456,9 +450,6 @@ pub struct Card {
pub card_issuer: Option<String>,
pub card_network: Option<common_enums::CardNetwork>,
pub card_type: Option<String>,
- pub card_subtype: Option<String>,
- pub card_segment_type: Option<common_enums::CardSegmentType>,
- pub funding_source: Option<common_enums::FundingSource>,
pub card_issuing_country: Option<String>,
pub card_issuing_country_code: Option<String>,
pub bank_code: Option<String>,
@@ -487,14 +478,6 @@ impl Card {
.clone()
.or(additional_card_info.card_network.clone()),
card_type: self.card_type.clone().or(additional_card_info.card_type),
- card_subtype: self
- .card_subtype
- .clone()
- .or(additional_card_info.card_subtype),
- card_segment_type: self
- .card_segment_type
- .or(additional_card_info.card_segment_type),
- funding_source: self.funding_source.or(additional_card_info.funding_source),
card_issuing_country: self
.card_issuing_country
.clone()
@@ -529,9 +512,6 @@ pub struct CardWithOptionalCVC {
pub card_issuer: Option<String>,
pub card_network: Option<common_enums::CardNetwork>,
pub card_type: Option<String>,
- pub card_subtype: Option<String>,
- pub card_segment_type: Option<common_enums::CardSegmentType>,
- pub funding_source: Option<common_enums::FundingSource>,
pub card_issuing_country: Option<String>,
pub card_issuing_country_code: Option<String>,
pub bank_code: Option<String>,
@@ -577,14 +557,6 @@ impl CardWithOptionalCVC {
.clone()
.or(additional_card_info.card_network.clone()),
card_type: self.card_type.clone().or(additional_card_info.card_type),
- card_subtype: self
- .card_subtype
- .clone()
- .or(additional_card_info.card_subtype),
- card_segment_type: self
- .card_segment_type
- .or(additional_card_info.card_segment_type),
- funding_source: self.funding_source.or(additional_card_info.funding_source),
card_issuing_country: self
.card_issuing_country
.clone()
@@ -652,9 +624,6 @@ pub struct CardDetailsForNetworkTransactionId {
pub card_issuer: Option<String>,
pub card_network: Option<common_enums::CardNetwork>,
pub card_type: Option<String>,
- pub card_subtype: Option<String>,
- pub card_segment_type: Option<common_enums::CardSegmentType>,
- pub funding_source: Option<common_enums::FundingSource>,
pub card_issuing_country: Option<String>,
pub card_issuing_country_code: Option<String>,
pub bank_code: Option<String>,
@@ -681,14 +650,6 @@ impl CardDetailsForNetworkTransactionId {
.clone()
.or(additional_card_info.card_network.clone()),
card_type: self.card_type.clone().or(additional_card_info.card_type),
- card_subtype: self
- .card_subtype
- .clone()
- .or(additional_card_info.card_subtype),
- card_segment_type: self
- .card_segment_type
- .or(additional_card_info.card_segment_type),
- funding_source: self.funding_source.or(additional_card_info.funding_source),
card_issuing_country: self
.card_issuing_country
.clone()
@@ -737,9 +698,6 @@ pub struct CardDetail {
pub card_issuer: Option<String>,
pub card_network: Option<api_enums::CardNetwork>,
pub card_type: Option<String>,
- pub card_subtype: Option<String>,
- pub card_segment_type: Option<common_enums::CardSegmentType>,
- pub funding_source: Option<common_enums::FundingSource>,
pub card_issuing_country: Option<String>,
pub card_issuing_country_code: Option<String>,
pub bank_code: Option<String>,
@@ -756,9 +714,6 @@ pub struct CardWithLimitedDetails {
pub card_issuer: Option<String>,
pub card_network: Option<api_enums::CardNetwork>,
pub card_type: Option<String>,
- pub card_subtype: Option<String>,
- pub card_segment_type: Option<common_enums::CardSegmentType>,
- pub funding_source: Option<common_enums::FundingSource>,
pub card_issuing_country: Option<String>,
pub card_issuing_country_code: Option<String>,
pub bank_code: Option<String>,
@@ -786,14 +741,6 @@ impl CardWithLimitedDetails {
.clone()
.or(additional_card_info.card_network.clone()),
card_type: self.card_type.clone().or(additional_card_info.card_type),
- card_subtype: self
- .card_subtype
- .clone()
- .or(additional_card_info.card_subtype),
- card_segment_type: self
- .card_segment_type
- .or(additional_card_info.card_segment_type),
- funding_source: self.funding_source.or(additional_card_info.funding_source),
card_issuing_country: self
.card_issuing_country
.clone()
@@ -905,9 +852,6 @@ impl From<&Card> for CardDetail {
card_issuer: item.card_issuer.to_owned(),
card_network: item.card_network.to_owned(),
card_type: item.card_type.to_owned(),
- card_subtype: item.card_subtype.to_owned(),
- card_segment_type: item.card_segment_type,
- funding_source: item.funding_source,
card_issuing_country: item.card_issuing_country.to_owned(),
card_issuing_country_code: item.card_issuing_country_code.to_owned(),
bank_code: item.bank_code.to_owned(),
@@ -927,9 +871,6 @@ impl From<CardWithLimitedData> for CardWithLimitedDetails {
card_issuer: None,
card_network: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_issuing_country: None,
card_issuing_country_code: None,
bank_code: None,
@@ -949,9 +890,6 @@ impl From<NetworkTransactionIdAndCardDetails> for CardDetailsForNetworkTransacti
card_issuer: card_details_for_nti.card_issuer,
card_network: card_details_for_nti.card_network,
card_type: card_details_for_nti.card_type,
- card_subtype: card_details_for_nti.card_subtype,
- card_segment_type: card_details_for_nti.card_segment_type,
- funding_source: card_details_for_nti.funding_source,
card_issuing_country: card_details_for_nti.card_issuing_country,
card_issuing_country_code: card_details_for_nti.card_issuing_country_code,
bank_code: card_details_for_nti.bank_code,
@@ -2041,9 +1979,6 @@ impl TryFrom<payment_methods::PaymentMethodCreateData> for PaymentMethodData {
card_issuer,
card_network,
card_type,
- card_subtype,
- card_segment_type,
- funding_source,
card_issuing_country,
nick_name,
card_holder_name,
@@ -2055,9 +1990,6 @@ impl TryFrom<payment_methods::PaymentMethodCreateData> for PaymentMethodData {
card_issuer,
card_network,
card_type: card_type.map(|card_type| card_type.to_string()),
- card_subtype,
- card_segment_type,
- funding_source,
card_issuing_country: card_issuing_country.map(|country| country.to_string()),
card_issuing_country_code: None,
bank_code: None,
@@ -2257,9 +2189,6 @@ impl
card_issuer,
card_network,
card_type,
- card_subtype,
- card_segment_type,
- funding_source,
card_issuing_country,
card_issuing_country_code,
bank_code,
@@ -2274,9 +2203,6 @@ impl
card_issuer,
card_network,
card_type,
- card_subtype,
- card_segment_type,
- funding_source,
card_issuing_country,
card_issuing_country_code,
bank_code,
@@ -2307,9 +2233,6 @@ impl
card_issuer,
card_network,
card_type,
- card_subtype,
- card_segment_type,
- funding_source,
card_issuing_country,
card_issuing_country_code,
bank_code,
@@ -2324,9 +2247,6 @@ impl
card_issuer,
card_network,
card_type,
- card_subtype,
- card_segment_type,
- funding_source,
card_issuing_country,
card_issuing_country_code,
bank_code,
@@ -2537,9 +2457,6 @@ impl
card_issuer: card_detail.card_issuer,
card_network: card_detail.card_network,
card_type: card_detail.card_type.map(|val| val.to_string()),
- card_subtype: card_detail.card_subtype,
- card_segment_type: card_detail.card_segment_type,
- funding_source: card_detail.funding_source,
card_issuing_country: card_detail.card_issuing_country.map(|val| val.to_string()),
card_issuing_country_code: None,
bank_code: None,
@@ -2563,9 +2480,6 @@ impl From<Card> for payment_methods::CardDetail {
card_network: card.card_network,
card_issuer: card.card_issuer,
card_type: None,
- card_subtype: card.card_subtype,
- card_segment_type: card.card_segment_type,
- funding_source: card.funding_source,
card_cvc: Some(card.card_cvc),
}
}
@@ -4080,9 +3994,6 @@ pub struct CardDetailsPaymentMethod {
pub card_issuer: Option<String>,
pub card_network: Option<api_enums::CardNetwork>,
pub card_type: Option<String>,
- pub card_subtype: Option<String>,
- pub card_segment_type: Option<common_enums::CardSegmentType>,
- pub funding_source: Option<common_enums::FundingSource>,
#[serde(default = "saved_in_locker_default")]
pub saved_to_locker: bool,
pub co_badged_card_data: Option<payment_methods::CoBadgedCardDataToBeSaved>,
@@ -4101,9 +4012,6 @@ pub struct CardDetailsPaymentMethod {
pub card_issuer: Option<String>,
pub card_network: Option<api_enums::CardNetwork>,
pub card_type: Option<String>,
- pub card_subtype: Option<String>,
- pub card_segment_type: Option<common_enums::CardSegmentType>,
- pub funding_source: Option<common_enums::FundingSource>,
#[serde(default = "saved_in_locker_default")]
pub saved_to_locker: bool,
}
@@ -4159,9 +4067,6 @@ impl TryFrom<CardNumberWithStoredDetails> for payment_methods::CardDetail {
card_type: item
.card_type
.and_then(|card_type| payment_methods::CardType::from_str(&card_type).ok()),
- card_subtype: item.card_subtype,
- card_segment_type: item.card_segment_type,
- funding_source: item.funding_source,
card_cvc,
})
}
@@ -4176,9 +4081,6 @@ impl CardDetailsPaymentMethod {
card_issuer: self.card_issuer.clone(),
card_network: self.card_network.clone(),
card_type: self.card_type.clone(),
- card_subtype: self.card_subtype.clone(),
- card_segment_type: self.card_segment_type,
- funding_source: self.funding_source,
issuer_country: self.clone().get_issuer_country_alpha2(),
last4_digits: self.last4_digits,
expiry_month: self.expiry_month,
@@ -4215,9 +4117,6 @@ impl From<CardDetailsPaymentMethod> for payment_methods::CardDetailsPaymentMetho
card_issuer: domain_card.card_issuer,
card_network: domain_card.card_network,
card_type: domain_card.card_type,
- card_subtype: domain_card.card_subtype,
- card_segment_type: domain_card.card_segment_type,
- funding_source: domain_card.funding_source,
saved_to_locker: domain_card.saved_to_locker,
co_badged_card_data: None,
}
@@ -4241,9 +4140,6 @@ impl From<payment_methods::CardDetail> for CardDetailsPaymentMethod {
card_issuer: item.card_issuer,
card_network: item.card_network,
card_type: item.card_type.map(|card| card.to_string()),
- card_subtype: item.card_subtype,
- card_segment_type: item.card_segment_type,
- funding_source: item.funding_source,
saved_to_locker: true,
co_badged_card_data: None,
}
@@ -4275,9 +4171,6 @@ impl
card_issuer: item.card_issuer,
card_network: item.card_network,
card_type: item.card_type,
- card_subtype: item.card_subtype,
- card_segment_type: item.card_segment_type,
- funding_source: item.funding_source,
saved_to_locker: item.saved_to_locker,
co_badged_card_data: co_badged_card_data
.map(payment_methods::CoBadgedCardDataToBeSaved::from),
@@ -4299,9 +4192,6 @@ impl From<payment_methods::CardDetailsPaymentMethod> for CardDetailsPaymentMetho
card_issuer: item.card_issuer,
card_network: item.card_network,
card_type: item.card_type,
- card_subtype: item.card_subtype,
- card_segment_type: item.card_segment_type,
- funding_source: item.funding_source,
saved_to_locker: item.saved_to_locker,
}
}
@@ -4321,9 +4211,6 @@ impl From<payment_methods::CardDetail> for CardDetailsPaymentMethod {
card_issuer: item.card_issuer,
card_network: item.card_network,
card_type: item.card_type.map(|card| card.to_string()),
- card_subtype: item.card_subtype,
- card_segment_type: item.card_segment_type,
- funding_source: item.funding_source,
saved_to_locker: true,
}
}
@@ -4418,9 +4305,6 @@ impl From<Card> for payment_methods::CardDetail {
card_network: card_data.card_network.clone(),
card_issuer: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
}
}
}
@@ -4440,9 +4324,6 @@ impl From<NetworkTokenData> for payment_methods::CardDetail {
card_network: network_token_data.card_network.clone(),
card_issuer: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
}
}
}
@@ -4560,9 +4441,6 @@ impl
card_issuing_country,
card_issuing_country_code,
card_type,
- card_subtype,
- card_segment_type,
- funding_source,
..
},
card_token_data,
@@ -4595,9 +4473,6 @@ impl
card_issuer,
card_network,
card_type,
- card_subtype,
- card_segment_type,
- funding_source,
card_issuing_country,
card_issuing_country_code,
bank_code: None,
@@ -4659,9 +4534,6 @@ impl
card_issuer: card_details.card_issuer,
card_network: card_details.card_network,
card_type: card_details.card_type,
- card_subtype: card_details.card_subtype,
- card_segment_type: card_details.card_segment_type,
- funding_source: card_details.funding_source,
card_issuing_country: card_details.issuer_country,
card_issuing_country_code: card_details.issuer_country_code,
bank_code: None,
@@ -4718,9 +4590,6 @@ impl From<api_mandates::NetworkTransactionIdAndCardDetails> for NetworkTransacti
card_issuer: value.card_issuer,
card_network: value.card_network,
card_type: value.card_type,
- card_subtype: value.card_subtype,
- card_segment_type: value.card_segment_type,
- funding_source: value.funding_source,
card_issuing_country: value.card_issuing_country,
card_issuing_country_code: value.card_issuing_country_code,
bank_code: value.bank_code,
diff --git a/crates/hyperswitch_domain_models/src/vault.rs b/crates/hyperswitch_domain_models/src/vault.rs
index 38f3abcd83..26ee656867 100644
--- a/crates/hyperswitch_domain_models/src/vault.rs
+++ b/crates/hyperswitch_domain_models/src/vault.rs
@@ -233,9 +233,6 @@ impl PaymentMethodVaultingData {
card_issuer: None,
card_network: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
saved_to_locker: false,
#[cfg(feature = "v1")]
co_badged_card_data: None,
@@ -636,9 +633,6 @@ impl From<payment_methods::Card> for PaymentMethodVaultingData {
card_issuing_country: None,
card_issuer: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
})
}
}
diff --git a/crates/openapi/src/openapi_v2.rs b/crates/openapi/src/openapi_v2.rs
index 35548102c5..90df76d52f 100644
--- a/crates/openapi/src/openapi_v2.rs
+++ b/crates/openapi/src/openapi_v2.rs
@@ -419,8 +419,6 @@ Never share your secret api keys. Keep them guarded and secure.
api_models::enums::PaymentLinkSdkLabelType,
api_models::enums::PaymentLinkShowSdkTerms,
api_models::enums::OrganizationType,
- api_models::enums::FundingSource,
- api_models::enums::CardSegmentType,
api_models::enums::GooglePayCardFundingSource,
api_models::enums::VaultTokenType,
api_models::enums::StorageType,
diff --git a/crates/payment_methods/src/client/create.rs b/crates/payment_methods/src/client/create.rs
index 81e9f4639e..8911314ac7 100644
--- a/crates/payment_methods/src/client/create.rs
+++ b/crates/payment_methods/src/client/create.rs
@@ -63,9 +63,6 @@ pub struct CardDetail {
pub card_network: Option<common_enums::CardNetwork>,
pub card_issuer: Option<String>,
pub card_type: Option<common_enums::CardType>,
- pub card_subtype: Option<String>,
- pub card_segment_type: Option<common_enums::CardSegmentType>,
- pub funding_source: Option<common_enums::FundingSource>,
pub card_cvc: Option<Secret<String>>,
}
@@ -170,9 +167,6 @@ impl TryFrom<PaymentMethodData> for PaymentMethodCreateData {
card_network: card.card_network,
card_issuer: card.card_issuer,
card_type: None,
- card_subtype: card.card_subtype,
- card_segment_type: card.card_segment_type,
- funding_source: card.funding_source,
card_cvc: Some(card.card_cvc),
};
Ok(Self::Card(card_detail))
diff --git a/crates/payment_methods/src/core/migration/payment_methods.rs b/crates/payment_methods/src/core/migration/payment_methods.rs
index cbff632d80..81dab939ea 100644
--- a/crates/payment_methods/src/core/migration/payment_methods.rs
+++ b/crates/payment_methods/src/core/migration/payment_methods.rs
@@ -381,14 +381,6 @@ impl
.clone()
.or(card_bin_info.card_network),
card_type: card_details.card_type.clone().or(card_bin_info.card_type),
- card_subtype: card_details
- .card_subtype
- .clone()
- .or(card_bin_info.card_subtype),
- card_segment_type: card_details.card_segment_type.or(card_bin_info
- .card_segment_type
- .and_then(|segment_type| segment_type.parse().ok())),
- funding_source: card_details.funding_source.or(card_bin_info.funding_source),
saved_to_locker: false,
})
} else {
@@ -411,9 +403,6 @@ impl
card_issuer: card_details.card_issuer.clone(),
card_network: card_details.card_network.clone(),
card_type: card_details.card_type.clone(),
- card_subtype: card_details.card_subtype.clone(),
- card_segment_type: card_details.card_segment_type,
- funding_source: card_details.funding_source,
saved_to_locker: false,
})
}
@@ -472,14 +461,6 @@ impl
.clone()
.or(card_bin_info.card_network),
card_type: card_details.card_type.clone().or(card_bin_info.card_type),
- card_subtype: card_details
- .card_subtype
- .clone()
- .or(card_bin_info.card_subtype),
- card_segment_type: card_details.card_segment_type.or(card_bin_info
- .card_segment_type
- .and_then(|segment_type| segment_type.parse().ok())),
- funding_source: card_details.funding_source.or(card_bin_info.funding_source),
saved_to_locker: false,
})
} else {
@@ -502,9 +483,6 @@ impl
card_issuer: card_details.card_issuer.clone(),
card_network: card_details.card_network.clone(),
card_type: card_details.card_type.clone(),
- card_subtype: card_details.card_subtype.clone(),
- card_segment_type: card_details.card_segment_type,
- funding_source: card_details.funding_source,
saved_to_locker: false,
})
}
diff --git a/crates/payment_methods/src/helpers.rs b/crates/payment_methods/src/helpers.rs
index 65cb208885..0e15825736 100644
--- a/crates/payment_methods/src/helpers.rs
+++ b/crates/payment_methods/src/helpers.rs
@@ -21,9 +21,6 @@ pub async fn populate_bin_details_for_payment_method_create(
card_issuer: card_details.card_issuer.to_owned(),
card_network: card_details.card_network.clone(),
card_type: card_details.card_type.to_owned(),
- card_subtype: card_details.card_subtype.to_owned(),
- card_segment_type: card_details.card_segment_type,
- funding_source: card_details.funding_source,
card_issuing_country: card_details.card_issuing_country.to_owned(),
card_issuing_country_code: card_details.card_issuing_country_code.to_owned(),
card_exp_month: card_details.card_exp_month.clone(),
@@ -48,11 +45,6 @@ pub async fn populate_bin_details_for_payment_method_create(
card_issuer: card_info.card_issuer,
card_network: card_info.card_network.clone(),
card_type: card_info.card_type,
- card_subtype: card_info.card_subtype,
- card_segment_type: card_info
- .card_segment_type
- .and_then(|segment_type| segment_type.parse().ok()),
- funding_source: card_info.funding_source,
card_issuing_country: card_info.card_issuing_country,
card_issuing_country_code: card_details.card_issuing_country_code,
card_exp_month: card_details.card_exp_month.clone(),
@@ -66,9 +58,6 @@ pub async fn populate_bin_details_for_payment_method_create(
card_issuer: None,
card_network: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_issuing_country: None,
card_issuing_country_code: None,
card_cvc: card_details.card_cvc.clone(),
diff --git a/crates/payment_methods/src/types.rs b/crates/payment_methods/src/types.rs
index 1f6f5757d6..e5d79955a1 100644
--- a/crates/payment_methods/src/types.rs
+++ b/crates/payment_methods/src/types.rs
@@ -116,7 +116,7 @@ pub struct ModularPMRetrieveResponse {
#[serde(rename_all = "snake_case")]
pub enum RawPaymentMethodData {
Card(CardDetail),
- CardWithNT(Box<RawCardWithNTDetails>),
+ CardWithNT(RawCardWithNTDetails),
BankDebit(BankDebitDetail),
ProxyCard(RawProxyCardDataResponse),
}
diff --git a/crates/router/src/compatibility/stripe/payment_intents/types.rs b/crates/router/src/compatibility/stripe/payment_intents/types.rs
index f0b0a140bc..b53a9d5951 100644
--- a/crates/router/src/compatibility/stripe/payment_intents/types.rs
+++ b/crates/router/src/compatibility/stripe/payment_intents/types.rs
@@ -135,9 +135,6 @@ impl From<StripeCard> for payments::Card {
card_issuing_country: None,
card_issuing_country_code: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
nick_name: None,
}
}
diff --git a/crates/router/src/compatibility/stripe/setup_intents/types.rs b/crates/router/src/compatibility/stripe/setup_intents/types.rs
index a300d7c680..8ec5bf4604 100644
--- a/crates/router/src/compatibility/stripe/setup_intents/types.rs
+++ b/crates/router/src/compatibility/stripe/setup_intents/types.rs
@@ -104,9 +104,6 @@ impl From<StripeCard> for payments::Card {
card_issuing_country: None,
card_issuing_country_code: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
nick_name: None,
}
}
diff --git a/crates/router/src/core/payment_methods.rs b/crates/router/src/core/payment_methods.rs
index 3bf1a81546..3f37dfd026 100644
--- a/crates/router/src/core/payment_methods.rs
+++ b/crates/router/src/core/payment_methods.rs
@@ -1343,9 +1343,6 @@ pub(crate) fn get_payment_method_create_request(
.transpose()
.ok()
.flatten(),
- card_subtype: card.card_subtype.clone(),
- card_segment_type: card.card_segment_type,
- funding_source: card.funding_source,
card_cvc: Some(card.card_cvc.clone()),
};
let payment_method_request = payment_methods::PaymentMethodCreate {
@@ -1463,9 +1460,6 @@ pub(crate) async fn get_payment_method_create_request(
card_network: card_network.clone(),
card_issuer: card.card_issuer.clone(),
card_type: card.card_type.clone(),
- card_subtype: card.card_subtype.clone(),
- card_segment_type: card.card_segment_type,
- funding_source: card.funding_source,
card_cvc: None, // DO NOT POPULATE CVC FOR ADDITIONAL PAYMENT METHOD DATA
};
let payment_method_request = payment_methods::PaymentMethodCreate {
@@ -1512,9 +1506,6 @@ pub(crate) async fn get_payment_method_create_request(
card_network: card_network.clone(),
card_issuer: card.card_issuer.clone(),
card_type: card.card_type.clone(),
- card_subtype: card.card_subtype.clone(),
- card_segment_type: card.card_segment_type,
- funding_source: card.funding_source,
card_cvc: None, // DO NOT POPULATE CVC FOR ADDITIONAL PAYMENT METHOD DATA
};
let payment_method_request = payment_methods::PaymentMethodCreate {
@@ -3938,15 +3929,6 @@ impl PaymentMethodExt for domain::PaymentMethodVaultingData {
.ok()
.flatten()
}),
- card_subtype: card_info
- .as_ref()
- .and_then(|val| val.card_subtype.clone()),
- card_segment_type: card_info.as_ref().and_then(|val| {
- val.card_segment_type
- .as_deref()
- .and_then(|segment_type| segment_type.parse().ok())
- }),
- funding_source: card_info.as_ref().and_then(|val| val.funding_source),
card_cvc: card.card_cvc.clone(),
}),
payment_method_subtype,
@@ -4074,9 +4056,6 @@ impl PaymentMethodExt for payment_methods::PaymentMethodCreateData {
card_network: card_details.card_network,
card_issuer: card_details.card_issuer,
card_type: card_details.card_type,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_isin: card_details.bin_number,
saved_to_locker: false,
co_badged_card_data: None,
@@ -4097,9 +4076,6 @@ impl PaymentMethodExt for payment_methods::PaymentMethodCreateData {
card_type: card_details
.card_type
.map(|card_type| card_type.to_string()),
- card_subtype: card_details.card_subtype,
- card_segment_type: card_details.card_segment_type,
- funding_source: card_details.funding_source,
saved_to_locker: false,
card_isin: None,
last4_digits: None,
@@ -5993,12 +5969,12 @@ pub async fn retrieve_payment_method(
(
Some(payment_methods::RawPaymentMethodData::Card(card_details)),
Some(network_token_details),
- ) => Some(payment_methods::RawPaymentMethodData::CardWithNT(Box::new(
+ ) => Some(payment_methods::RawPaymentMethodData::CardWithNT(
payment_methods::RawCardWithNTDetails {
card_details,
network_token_details,
},
- ))),
+ )),
(raw_payment_method_data, _) => raw_payment_method_data,
};
@@ -6481,9 +6457,6 @@ impl RawPaymentMethodFetchAccess {
card_network: network_token_details.card_network,
card_issuer: network_token_details.card_issuer,
card_type: network_token_details.card_type,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_cvc: None,
}),
_ => Err(report!(errors::ApiErrorResponse::GenericNotFoundError {
diff --git a/crates/router/src/core/payment_methods/cards.rs b/crates/router/src/core/payment_methods/cards.rs
index 223b3aa539..64b1d16f6e 100644
--- a/crates/router/src/core/payment_methods/cards.rs
+++ b/crates/router/src/core/payment_methods/cards.rs
@@ -414,9 +414,6 @@ impl PaymentMethodsController for PmCards<'_> {
card_network: network_token_data.card_network.clone(),
card_issuer: network_token_data.card_issuer.clone(),
card_type: network_token_data.card_type.clone(),
- card_subtype: network_token_data.card_subtype.clone(),
- card_segment_type: network_token_data.card_segment_type,
- funding_source: network_token_data.funding_source,
card_cvc: None,
};
@@ -2005,11 +2002,6 @@ impl PaymentMethodsController for PmCards<'_> {
card_network: card.card_network.or(existing_pm_data.card_network),
card_issuer: card.card_issuer.or(existing_pm_data.card_issuer),
card_type: card.card_type.or(existing_pm_data.card_type),
- card_subtype: card.card_subtype.or(existing_pm_data.card_subtype),
- card_segment_type: card
- .card_segment_type
- .or(existing_pm_data.card_segment_type),
- funding_source: card.funding_source.or(existing_pm_data.funding_source),
saved_to_locker: true,
});
@@ -2617,15 +2609,6 @@ pub async fn add_payment_method_data(
card_isin: Some(card_isin),
card_issuer: card_info.as_ref().and_then(|ci| ci.card_issuer.clone()),
card_type: card_info.as_ref().and_then(|ci| ci.card_type.clone()),
- card_subtype: card_info
- .as_ref()
- .and_then(|ci| ci.card_subtype.clone()),
- card_segment_type: card_info.as_ref().and_then(|ci| {
- ci.card_segment_type
- .as_deref()
- .and_then(|segment_type| segment_type.parse().ok())
- }),
- funding_source: card_info.as_ref().and_then(|ci| ci.funding_source),
saved_to_locker: true,
co_badged_card_data: None,
};
@@ -2917,9 +2900,6 @@ pub async fn update_customer_payment_method(
card_isin: existing_card_data.card_isin,
card_issuer: card_update.card_issuer.or(existing_card_data.card_issuer),
card_type: existing_card_data.card_type,
- card_subtype: existing_card_data.card_subtype,
- card_segment_type: existing_card_data.card_segment_type,
- funding_source: existing_card_data.funding_source,
saved_to_locker: true,
});
diff --git a/crates/router/src/core/payment_methods/tokenize.rs b/crates/router/src/core/payment_methods/tokenize.rs
index 8ac165d16f..9f3d677df4 100644
--- a/crates/router/src/core/payment_methods/tokenize.rs
+++ b/crates/router/src/core/payment_methods/tokenize.rs
@@ -277,9 +277,6 @@ where
card_issuer: card_details.card_issuer.clone(),
card_network: card_details.card_network.clone(),
card_type: card_details.card_type.clone(),
- card_subtype: card_details.card_subtype.clone(),
- card_segment_type: card_details.card_segment_type,
- funding_source: card_details.funding_source,
saved_to_locker,
co_badged_card_data: card_details
.co_badged_card_data
@@ -316,9 +313,6 @@ where
card_issuer: card_details.card_issuer.clone(),
card_network: card_details.card_network.clone(),
card_type: card_details.card_type.clone(),
- card_subtype: card_details.card_subtype.clone(),
- card_segment_type: card_details.card_segment_type,
- funding_source: card_details.funding_source,
saved_to_locker,
co_badged_card_data: None,
});
diff --git a/crates/router/src/core/payment_methods/tokenize/card_executor.rs b/crates/router/src/core/payment_methods/tokenize/card_executor.rs
index ac77562697..99492ef281 100644
--- a/crates/router/src/core/payment_methods/tokenize/card_executor.rs
+++ b/crates/router/src/core/payment_methods/tokenize/card_executor.rs
@@ -127,25 +127,6 @@ impl<'a> NetworkTokenizationBuilder<'a, CardRequestValidated> {
.map(|card_type| card_type.to_string()),
|card_info| card_info.card_type.clone(),
),
- card_subtype: optional_card_info
- .as_ref()
- .map_or(card_req.card_subtype.clone(), |card_info| {
- card_info.card_subtype.clone()
- }),
- card_segment_type: optional_card_info.as_ref().map_or(
- card_req.card_segment_type,
- |card_info| {
- card_info
- .card_segment_type
- .as_deref()
- .and_then(|segment_type| segment_type.parse().ok())
- },
- ),
- funding_source: optional_card_info
- .as_ref()
- .map_or(card_req.funding_source, |card_info| {
- card_info.funding_source
- }),
card_issuing_country: optional_card_info
.as_ref()
.map_or(card_req.card_issuing_country.clone(), |card_info| {
@@ -287,9 +268,6 @@ impl<'a> NetworkTokenizationBuilder<'a, CardTokenStored> {
card_isin: Some(card.card_number.clone().get_card_isin()),
card_issuer: card.card_issuer.clone(),
card_type: card.card_type.clone(),
- card_subtype: card.card_subtype.clone(),
- card_segment_type: card.card_segment_type,
- funding_source: card.funding_source,
saved_to_locker: true,
});
let payment_method_response = api::PaymentMethodResponse {
@@ -591,9 +569,6 @@ impl CardNetworkTokenizeExecutor<'_, domain::TokenizeCardRequest> {
card_network: card_details.card_network.clone(),
card_issuer: card_details.card_issuer.clone(),
card_type: card_details.card_type.clone(),
- card_subtype: card_details.card_subtype.clone(),
- card_segment_type: card_details.card_segment_type,
- funding_source: card_details.funding_source,
card_cvc: None, // DO NOT POPULATE CVC FOR ADDITIONAL PAYMENT METHOD DATA
}),
metadata: None,
diff --git a/crates/router/src/core/payment_methods/tokenize/payment_method_executor.rs b/crates/router/src/core/payment_methods/tokenize/payment_method_executor.rs
index bde01f3b79..b880b18fd5 100644
--- a/crates/router/src/core/payment_methods/tokenize/payment_method_executor.rs
+++ b/crates/router/src/core/payment_methods/tokenize/payment_method_executor.rs
@@ -146,18 +146,6 @@ impl<'a> NetworkTokenizationBuilder<'a, PmValidated> {
card_type: optional_card_info
.as_ref()
.and_then(|card_info| card_info.card_type.clone()),
- card_subtype: optional_card_info
- .as_ref()
- .and_then(|card_info| card_info.card_subtype.clone()),
- card_segment_type: optional_card_info.as_ref().and_then(|card_info| {
- card_info
- .card_segment_type
- .as_deref()
- .and_then(|segment_type| segment_type.parse().ok())
- }),
- funding_source: optional_card_info
- .as_ref()
- .and_then(|card_info| card_info.funding_source),
card_issuing_country: optional_card_info
.as_ref()
.and_then(|card_info| card_info.card_issuing_country.clone()),
diff --git a/crates/router/src/core/payment_methods/transformers.rs b/crates/router/src/core/payment_methods/transformers.rs
index e411ec5eaa..12f25ac646 100644
--- a/crates/router/src/core/payment_methods/transformers.rs
+++ b/crates/router/src/core/payment_methods/transformers.rs
@@ -589,9 +589,6 @@ pub fn mk_add_card_response_hs(
card_issuer: card.card_issuer,
card_network: card.card_network,
card_type: card.card_type,
- card_subtype: card.card_subtype,
- card_segment_type: card.card_segment_type,
- funding_source: card.funding_source,
saved_to_locker: true,
};
domain::PaymentMethodResponse {
@@ -641,9 +638,6 @@ pub fn generate_pm_vaulting_req_from_update_request(
card_network: card_create.card_network,
card_issuer: card_create.card_issuer,
card_type: card_create.card_type,
- card_subtype: card_create.card_subtype,
- card_segment_type: card_create.card_segment_type,
- funding_source: card_create.funding_source,
card_holder_name: update_card
.card_holder_name
.or(card_create.card_holder_name),
@@ -892,9 +886,6 @@ pub fn get_card_detail(
issuer_country_code: None,
card_network: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
saved_to_locker: true,
};
Ok(card_detail)
@@ -922,9 +913,6 @@ pub fn get_card_detail(
card_issuer: None,
card_network: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
saved_to_locker: true,
};
Ok(card_detail)
@@ -1749,9 +1737,6 @@ impl
card_issuer: card_detail.card_issuer,
card_network: card_detail.card_network,
card_type: card_detail.card_type.map(|card_type| card_type.to_string()),
- card_subtype: card_detail.card_subtype,
- card_segment_type: card_detail.card_segment_type,
- funding_source: card_detail.funding_source,
card_issuing_country: card_detail.card_issuing_country,
card_issuing_country_code: None,
bank_code: None,
@@ -1784,9 +1769,6 @@ impl
.card_details
.card_type
.map(|card_type| card_type.to_string()),
- card_subtype: card_with_nt.card_details.card_subtype,
- card_segment_type: card_with_nt.card_details.card_segment_type,
- funding_source: card_with_nt.card_details.funding_source,
card_issuing_country: card_with_nt.card_details.card_issuing_country,
card_issuing_country_code: None,
bank_code: None,
@@ -1926,9 +1908,6 @@ impl<'a>
card_issuer: card_data.card_issuer.clone(),
card_network: card_data.card_network.clone(),
card_type: card_data.card_type.clone(),
- card_subtype: card_data.card_subtype.clone(),
- card_segment_type: card_data.card_segment_type,
- funding_source: card_data.funding_source,
card_issuing_country: card_data.card_issuing_country.clone(),
card_issuing_country_code: card_data.card_issuing_country_code.clone(),
bank_code: card_data.bank_code.clone(),
@@ -1958,9 +1937,6 @@ impl<'a>
card_issuer: card_data.card_issuer.clone(),
card_network: card_data.card_network.clone(),
card_type: card_data.card_type.clone(),
- card_subtype: card_data.card_subtype.clone(),
- card_segment_type: card_data.card_segment_type,
- funding_source: card_data.funding_source,
card_issuing_country: card_data.card_issuing_country.clone(),
card_issuing_country_code: card_data.card_issuing_country_code.clone(),
bank_code: card_data.bank_code.clone(),
diff --git a/crates/router/src/core/payment_methods/vault.rs b/crates/router/src/core/payment_methods/vault.rs
index fa00ad5ba6..9a86895bf2 100644
--- a/crates/router/src/core/payment_methods/vault.rs
+++ b/crates/router/src/core/payment_methods/vault.rs
@@ -152,9 +152,6 @@ impl Vaultable for domain::Card {
card_issuing_country: None,
card_issuing_country_code: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
nick_name: value1.nickname.map(hyperswitch_masking::Secret::new),
card_holder_name: value1.card_holder_name,
co_badged_card_data: None,
diff --git a/crates/router/src/core/payments/helpers.rs b/crates/router/src/core/payments/helpers.rs
index bb8b073c5e..3272a8845a 100644
--- a/crates/router/src/core/payments/helpers.rs
+++ b/crates/router/src/core/payments/helpers.rs
@@ -3229,9 +3229,6 @@ pub async fn fetch_card_details_from_internal_locker(
.ok()
.flatten(),
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_issuing_country: None,
card_issuing_country_code: None,
bank_code: None,
@@ -3395,9 +3392,6 @@ pub async fn fetch_card_details_for_network_transaction_flow_from_locker(
card_issuer: None,
card_network,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_issuing_country: None,
card_issuing_country_code: None,
bank_code: None,
@@ -3626,9 +3620,6 @@ impl<'a>
card_issuer: card_details.card_issuer.clone(),
card_network: card_details.card_network.clone(),
card_type: card_details.card_type.clone(),
- card_subtype: card_details.card_subtype.clone(),
- card_segment_type: card_details.card_segment_type,
- funding_source: card_details.funding_source,
card_issuing_country: card_details.card_issuing_country.clone(),
card_issuing_country_code: card_details
.card_issuing_country_code
@@ -3676,9 +3667,6 @@ impl<'a>
card_issuer: card_details.card_issuer.clone(),
card_network: card_details.card_network.clone(),
card_type: card_details.card_type.clone(),
- card_subtype: card_details.card_subtype.clone(),
- card_segment_type: card_details.card_segment_type,
- funding_source: card_details.funding_source,
card_issuing_country: card_details.card_issuing_country.clone(),
card_issuing_country_code: card_details.card_issuing_country_code.clone(),
bank_code: card_details.bank_code.clone(),
@@ -6029,9 +6017,6 @@ pub async fn get_additional_payment_data(
card_issuer: card_data.card_issuer.to_owned(),
card_network,
card_type: card_data.card_type.to_owned(),
- card_subtype: card_data.card_subtype.to_owned(),
- card_segment_type: card_data.card_segment_type,
- funding_source: card_data.funding_source,
card_issuing_country: card_data.card_issuing_country.to_owned(),
card_issuing_country_code: card_data.card_issuing_country_code.to_owned(),
bank_code: card_data.bank_code.to_owned(),
@@ -6067,11 +6052,6 @@ pub async fn get_additional_payment_data(
card_network: card_network.clone().or(card_info.card_network),
bank_code: card_info.bank_code,
card_type: card_info.card_type,
- card_subtype: card_info.card_subtype,
- card_segment_type: card_info
- .card_segment_type
- .and_then(|segment_type| segment_type.parse().ok()),
- funding_source: card_info.funding_source,
card_issuing_country: card_info.card_issuing_country,
card_issuing_country_code: card_info.country_code,
last4: last4.clone(),
@@ -6096,9 +6076,6 @@ pub async fn get_additional_payment_data(
card_network,
bank_code: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_issuing_country: None,
card_issuing_country_code: None,
last4,
@@ -6178,9 +6155,6 @@ pub async fn get_additional_payment_data(
card_issuer: card_data.card_issuer.to_owned(),
card_network,
card_type: card_data.card_type.to_owned(),
- card_subtype: card_data.card_subtype.to_owned(),
- card_segment_type: card_data.card_segment_type,
- funding_source: card_data.funding_source,
card_issuing_country: card_data.card_issuing_country.to_owned(),
card_issuing_country_code: card_data.card_issuing_country_code.to_owned(),
bank_code: card_data.bank_code.to_owned(),
@@ -6216,11 +6190,6 @@ pub async fn get_additional_payment_data(
card_network: card_network.clone().or(card_info.card_network),
bank_code: card_info.bank_code,
card_type: card_info.card_type,
- card_subtype: card_info.card_subtype,
- card_segment_type: card_info
- .card_segment_type
- .and_then(|segment_type| segment_type.parse().ok()),
- funding_source: card_info.funding_source,
card_issuing_country: card_info.card_issuing_country,
card_issuing_country_code: card_info.country_code,
last4: last4.clone(),
@@ -6245,9 +6214,6 @@ pub async fn get_additional_payment_data(
card_network,
bank_code: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_issuing_country: None,
card_issuing_country_code: None,
last4,
@@ -6554,9 +6520,6 @@ pub async fn get_additional_payment_data(
card_issuer: card_data.card_issuer.to_owned(),
card_network,
card_type: card_data.card_type.to_owned(),
- card_subtype: card_data.card_subtype.to_owned(),
- card_segment_type: card_data.card_segment_type,
- funding_source: card_data.funding_source,
card_issuing_country: card_data.card_issuing_country.to_owned(),
card_issuing_country_code: card_data.card_issuing_country_code.to_owned(),
bank_code: card_data.bank_code.to_owned(),
@@ -6592,11 +6555,6 @@ pub async fn get_additional_payment_data(
card_network: card_network.clone().or(card_info.card_network),
bank_code: card_info.bank_code,
card_type: card_info.card_type,
- card_subtype: card_info.card_subtype,
- card_segment_type: card_info
- .card_segment_type
- .and_then(|segment_type| segment_type.parse().ok()),
- funding_source: card_info.funding_source,
card_issuing_country: card_info.card_issuing_country,
card_issuing_country_code: card_info.country_code,
last4: last4.clone(),
@@ -6621,9 +6579,6 @@ pub async fn get_additional_payment_data(
card_network,
bank_code: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_issuing_country: None,
card_issuing_country_code: None,
last4,
@@ -6668,9 +6623,6 @@ pub async fn get_additional_payment_data(
card_issuer: card_with_limited_details.card_issuer.to_owned(),
card_network: card_with_limited_details.card_network.clone(),
card_type: card_with_limited_details.card_type.to_owned(),
- card_subtype: card_with_limited_details.card_subtype.to_owned(),
- card_segment_type: card_with_limited_details.card_segment_type,
- funding_source: card_with_limited_details.funding_source,
card_issuing_country: card_with_limited_details
.card_issuing_country
.to_owned(),
@@ -6713,11 +6665,6 @@ pub async fn get_additional_payment_data(
.or(card_info.card_network),
bank_code: card_info.bank_code,
card_type: card_info.card_type,
- card_subtype: card_info.card_subtype,
- card_segment_type: card_info
- .card_segment_type
- .and_then(|segment_type| segment_type.parse().ok()),
- funding_source: card_info.funding_source,
card_issuing_country: card_info.card_issuing_country,
card_issuing_country_code: card_info.country_code,
last4: last4.clone(),
@@ -6744,9 +6691,6 @@ pub async fn get_additional_payment_data(
card_network: card_with_limited_details.card_network.clone(),
bank_code: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_issuing_country: None,
card_issuing_country_code: None,
last4,
diff --git a/crates/router/src/core/payments/operations/payment_confirm.rs b/crates/router/src/core/payments/operations/payment_confirm.rs
index 44fab4b692..46cc7370bb 100644
--- a/crates/router/src/core/payments/operations/payment_confirm.rs
+++ b/crates/router/src/core/payments/operations/payment_confirm.rs
@@ -2115,9 +2115,6 @@ impl<F: Clone + Send + Sync> Domain<F, api::PaymentsRequest, PaymentData<F>> for
card_issuer: card.card_issuer,
card_network: card.card_network,
card_type: card.card_type,
- card_subtype: card.card_subtype,
- card_segment_type: card.card_segment_type,
- funding_source: card.funding_source,
card_issuing_country: card.card_issuing_country,
card_issuing_country_code: card.card_issuing_country_code,
bank_code: card.bank_code,
diff --git a/crates/router/src/core/payments/tokenization.rs b/crates/router/src/core/payments/tokenization.rs
index 98eb4a7761..5034646677 100644
--- a/crates/router/src/core/payments/tokenization.rs
+++ b/crates/router/src/core/payments/tokenization.rs
@@ -910,15 +910,6 @@ where
.or(existing_pm_data.card_network),
card_issuer: card.card_issuer.or(existing_pm_data.card_issuer),
card_type: card.card_type.or(existing_pm_data.card_type),
- card_subtype: card
- .card_subtype
- .or(existing_pm_data.card_subtype),
- card_segment_type: card
- .card_segment_type
- .or(existing_pm_data.card_segment_type),
- funding_source: card
- .funding_source
- .or(existing_pm_data.funding_source),
saved_to_locker: true,
});
@@ -1340,9 +1331,6 @@ async fn skip_saving_card_in_locker(
card_issuer: card.card_issuer.clone(),
card_network: card.card_network.clone(),
card_type: card.card_type.clone(),
- card_subtype: card.card_subtype.clone(),
- card_segment_type: card.card_segment_type,
- funding_source: card.funding_source,
saved_to_locker: false,
};
let pm_resp = domain::PaymentMethodResponse {
@@ -1717,9 +1705,6 @@ pub async fn save_network_token_in_locker(
card_network: Some(token_response.card_brand.clone()),
card_issuer: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
};
let (res, dc) = Box::pin(PmCards { state, provider }.add_card_to_locker(
@@ -2441,9 +2426,6 @@ impl From<NetworkTokenizationCardData<'_>> for domain::Card {
card_type: None,
card_issuing_country: None,
card_issuing_country_code: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
bank_code: None,
card_holder_name: tracking_data.billing_name.clone(),
nick_name: locker_card.nick_name.clone().map(Secret::new),
diff --git a/crates/router/src/core/payouts/helpers.rs b/crates/router/src/core/payouts/helpers.rs
index 9861c5a230..e355fe556c 100644
--- a/crates/router/src/core/payouts/helpers.rs
+++ b/crates/router/src/core/payouts/helpers.rs
@@ -396,9 +396,6 @@ pub async fn save_payout_data_to_locker(
card_network: None,
card_issuer: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
};
let payload = StoreLockerReq::LockerCard(StoreCardReq {
merchant_id: platform.get_processor().get_account().get_id().clone(),
@@ -656,11 +653,6 @@ pub async fn save_payout_data_to_locker(
card_issuer: card_info.card_issuer,
card_network: card_info.card_network,
card_type: card_info.card_type,
- card_subtype: card_info.card_subtype,
- card_segment_type: card_info
- .card_segment_type
- .and_then(|segment_type| segment_type.parse().ok()),
- funding_source: card_info.funding_source,
saved_to_locker: true,
co_badged_card_data: None,
},
@@ -683,9 +675,6 @@ pub async fn save_payout_data_to_locker(
card_issuer: None,
card_network: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
saved_to_locker: true,
co_badged_card_data: None,
},
diff --git a/crates/router/src/core/unified_authentication_service/utils.rs b/crates/router/src/core/unified_authentication_service/utils.rs
index 5b7dedf94a..ac80166a63 100644
--- a/crates/router/src/core/unified_authentication_service/utils.rs
+++ b/crates/router/src/core/unified_authentication_service/utils.rs
@@ -592,9 +592,6 @@ fn get_vault_details(
card_issuer: None,
card_network: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_issuing_country: None,
card_issuing_country_code: None,
card_holder_name: None,
diff --git a/crates/router/src/core/unified_connector_service.rs b/crates/router/src/core/unified_connector_service.rs
index 4370e8c843..7f46764f94 100644
--- a/crates/router/src/core/unified_connector_service.rs
+++ b/crates/router/src/core/unified_connector_service.rs
@@ -123,9 +123,6 @@ impl ForeignTryFrom<payments_grpc::PaymentMethod> for domain_pm::PaymentMethodDa
card_type: card.card_type,
card_issuing_country: card.card_issuing_country_alpha2,
card_issuing_country_code: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
bank_code: card.bank_code,
nick_name: card.nick_name.map(Secret::new),
co_badged_card_data: None,
diff --git a/crates/router/src/types/api/payments.rs b/crates/router/src/types/api/payments.rs
index e0633ce0ce..fbf669be71 100644
--- a/crates/router/src/types/api/payments.rs
+++ b/crates/router/src/types/api/payments.rs
@@ -155,9 +155,6 @@ mod payments_test {
card_issuing_country: None,
card_issuing_country_code: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
nick_name: Some(hyperswitch_masking::Secret::new("nick_name".into())),
}
}
diff --git a/crates/router/src/types/storage/revenue_recovery_redis_operation.rs b/crates/router/src/types/storage/revenue_recovery_redis_operation.rs
index 974becc0b5..56fb8482f8 100644
--- a/crates/router/src/types/storage/revenue_recovery_redis_operation.rs
+++ b/crates/router/src/types/storage/revenue_recovery_redis_operation.rs
@@ -64,9 +64,6 @@ impl From<&PaymentProcessorTokenDetails> for api_models::payments::AdditionalCar
card_issuer: data.card_issuer.clone(),
card_network: data.card_network.clone(),
card_type: data.card_type.clone(),
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
last4: data.last_four_digits.clone(),
card_isin: data.card_isin.clone(),
card_issuing_country: None,
diff --git a/crates/router/src/types/transformers.rs b/crates/router/src/types/transformers.rs
index 9c4cfd1c85..2bdd3b8fc2 100644
--- a/crates/router/src/types/transformers.rs
+++ b/crates/router/src/types/transformers.rs
@@ -2866,9 +2866,6 @@ impl ForeignFrom<&revenue_recovery_redis_operation::PaymentProcessorTokenStatus>
card_issuer: card_info.card_issuer.to_owned(),
card_network: card_info.card_network.to_owned(),
card_type: card_info.card_type.to_owned(),
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_issuing_country: None,
card_issuing_country_code: None,
bank_code: None,
diff --git a/crates/router/src/utils/verify_connector.rs b/crates/router/src/utils/verify_connector.rs
index a5e31e1b58..6847642170 100644
--- a/crates/router/src/utils/verify_connector.rs
+++ b/crates/router/src/utils/verify_connector.rs
@@ -21,9 +21,6 @@ pub fn generate_card_from_details(
card_exp_month: hyperswitch_masking::Secret::new(card_exp_month),
nick_name: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_issuing_country: None,
card_issuing_country_code: None,
bank_code: None,
diff --git a/crates/router/tests/connectors/adyen.rs b/crates/router/tests/connectors/adyen.rs
index 7d2c14e8ee..f6d4e08040 100644
--- a/crates/router/tests/connectors/adyen.rs
+++ b/crates/router/tests/connectors/adyen.rs
@@ -163,9 +163,6 @@ impl AdyenTest {
card_issuer: None,
card_network: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_issuing_country: None,
card_issuing_country_code: None,
bank_code: None,
diff --git a/crates/router/tests/connectors/airwallex.rs b/crates/router/tests/connectors/airwallex.rs
index 324aadcac9..088dde2f65 100644
--- a/crates/router/tests/connectors/airwallex.rs
+++ b/crates/router/tests/connectors/airwallex.rs
@@ -79,9 +79,6 @@ fn payment_method_details() -> Option<types::PaymentsAuthorizeData> {
card_issuer: None,
card_network: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_issuing_country: None,
card_issuing_country_code: None,
bank_code: None,
diff --git a/crates/router/tests/connectors/fiserv.rs b/crates/router/tests/connectors/fiserv.rs
index dfef4003ae..bd873e8d1c 100644
--- a/crates/router/tests/connectors/fiserv.rs
+++ b/crates/router/tests/connectors/fiserv.rs
@@ -50,9 +50,6 @@ fn payment_method_details() -> Option<types::PaymentsAuthorizeData> {
card_issuer: None,
card_network: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_issuing_country: None,
card_issuing_country_code: None,
bank_code: None,
diff --git a/crates/router/tests/connectors/rapyd.rs b/crates/router/tests/connectors/rapyd.rs
index eb7a245c12..d00e8205b4 100644
--- a/crates/router/tests/connectors/rapyd.rs
+++ b/crates/router/tests/connectors/rapyd.rs
@@ -50,9 +50,6 @@ async fn should_only_authorize_payment() {
card_issuer: None,
card_network: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_issuing_country: None,
card_issuing_country_code: None,
bank_code: None,
@@ -83,9 +80,6 @@ async fn should_authorize_and_capture_payment() {
card_issuer: None,
card_network: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_issuing_country: None,
card_issuing_country_code: None,
bank_code: None,
diff --git a/crates/router/tests/connectors/trustpayments.rs b/crates/router/tests/connectors/trustpayments.rs
index d55ca973bc..ef54ce42fe 100644
--- a/crates/router/tests/connectors/trustpayments.rs
+++ b/crates/router/tests/connectors/trustpayments.rs
@@ -76,9 +76,6 @@ fn payment_method_details() -> Option<types::PaymentsAuthorizeData> {
card_issuer: None,
card_network: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_issuing_country: None,
card_issuing_country_code: None,
bank_code: None,
diff --git a/crates/router/tests/connectors/utils.rs b/crates/router/tests/connectors/utils.rs
index d603220e9c..919cdc6ee3 100644
--- a/crates/router/tests/connectors/utils.rs
+++ b/crates/router/tests/connectors/utils.rs
@@ -972,9 +972,6 @@ impl Default for CCardType {
card_issuer: None,
card_network: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_issuing_country: None,
card_issuing_country_code: None,
bank_code: None,
diff --git a/crates/router/tests/connectors/worldline.rs b/crates/router/tests/connectors/worldline.rs
index 72a2e97c8a..3d8a2568c2 100644
--- a/crates/router/tests/connectors/worldline.rs
+++ b/crates/router/tests/connectors/worldline.rs
@@ -80,9 +80,6 @@ impl WorldlineTest {
card_issuer: None,
card_network: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_issuing_country: None,
card_issuing_country_code: None,
bank_code: None,
diff --git a/crates/router/tests/payments.rs b/crates/router/tests/payments.rs
index b1f81e3158..022259f52e 100644
--- a/crates/router/tests/payments.rs
+++ b/crates/router/tests/payments.rs
@@ -348,9 +348,6 @@ async fn payments_create_core() {
card_issuer: None,
card_network: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_issuing_country: None,
card_issuing_country_code: None,
bank_code: None,
@@ -662,9 +659,6 @@ async fn payments_create_core_adyen_no_redirect() {
card_issuer: None,
card_network: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_issuing_country: None,
card_issuing_country_code: None,
bank_code: None,
diff --git a/crates/router/tests/payments2.rs b/crates/router/tests/payments2.rs
index 91723583e4..fe78b3b671 100644
--- a/crates/router/tests/payments2.rs
+++ b/crates/router/tests/payments2.rs
@@ -108,9 +108,6 @@ async fn payments_create_core() {
card_issuer: None,
card_network: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_issuing_country: None,
card_issuing_country_code: None,
bank_code: None,
@@ -431,9 +428,6 @@ async fn payments_create_core_adyen_no_redirect() {
card_issuer: None,
card_network: None,
card_type: None,
- card_subtype: None,
- card_segment_type: None,
- funding_source: None,
card_issuing_country: None,
card_issuing_country_code: None,
nick_name: Some(hyperswitch_masking::Secret::new("nick_name".into())),