Skip to content

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

feat(payments): expose card subtype, segment type and funding source (#14073)

Ayush Anand9616cbab767e
diff --git a/api-reference/v1/openapi_spec_v1.json b/api-reference/v1/openapi_spec_v1.json
index f0bc339f32..b642dd3160 100644
--- a/api-reference/v1/openapi_spec_v1.json
+++ b/api-reference/v1/openapi_spec_v1.json
@@ -16593,6 +16593,28 @@
"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",
@@ -16836,6 +16858,27 @@
"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
@@ -16906,6 +16949,26 @@
"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"
}
@@ -17327,6 +17390,27 @@
"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": [
{
@@ -17624,6 +17708,28 @@
"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",
@@ -28489,6 +28595,28 @@
"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",
@@ -46928,6 +47056,27 @@
}
],
"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 58459976b9..ef4935ef98 100644
--- a/api-reference/v2/openapi_spec_v2.json
+++ b/api-reference/v2/openapi_spec_v2.json
@@ -5589,6 +5589,27 @@
"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
@@ -11006,6 +11027,28 @@
"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",
@@ -11179,6 +11222,27 @@
],
"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",
@@ -11253,6 +11317,27 @@
"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
@@ -11539,6 +11624,27 @@
"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": [
{
@@ -11587,6 +11693,15 @@
}
}
},
+ "CardSegmentType": {
+ "type": "string",
+ "enum": [
+ "business",
+ "commercial",
+ "consumer",
+ "government"
+ ]
+ },
"CardSpecificFeatures": {
"type": "object",
"required": [
@@ -11827,6 +11942,28 @@
"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",
@@ -16299,6 +16436,16 @@
"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`.",
@@ -20335,6 +20482,28 @@
"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",
@@ -34274,6 +34443,27 @@
}
],
"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 5514422629..b569decd6e 100644
--- a/crates/api_models/src/mandates.rs
+++ b/crates/api_models/src/mandates.rs
@@ -245,6 +245,22 @@ 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 116f565611..f6f8bdd5a4 100644
--- a/crates/api_models/src/payment_methods.rs
+++ b/crates/api_models/src/payment_methods.rs
@@ -456,6 +456,9 @@ 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,
});
@@ -904,6 +907,17 @@ 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(
@@ -967,6 +981,17 @@ 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")]
@@ -1062,6 +1087,17 @@ 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)]
@@ -1102,6 +1138,17 @@ 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)]
@@ -1181,6 +1228,9 @@ impl CardDetailUpdate {
card_network: None,
card_issuer: None,
card_type: None,
+ card_subtype: None,
+ card_segment_type: None,
+ funding_source: None,
}
}
}
@@ -1220,6 +1270,9 @@ impl CardDetailUpdate {
card_network: None,
card_issuer: None,
card_type: None,
+ card_subtype: None,
+ card_segment_type: None,
+ funding_source: None,
card_cvc: None,
}
}
@@ -1267,7 +1320,7 @@ pub struct RawProxyCardDataResponse {
#[serde(rename_all = "snake_case")]
pub enum RawPaymentMethodData {
Card(CardDetail),
- CardWithNT(RawCardWithNTDetails),
+ CardWithNT(Box<RawCardWithNTDetails>),
BankDebit(BankDebitDetail),
ProxyCard(RawProxyCardDataResponse),
}
@@ -1682,6 +1735,9 @@ 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>,
@@ -1963,6 +2019,9 @@ 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,
}
}
}
@@ -2002,6 +2061,11 @@ 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,
}
@@ -2040,6 +2104,12 @@ 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,
}
@@ -2060,6 +2130,9 @@ 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,
@@ -2087,6 +2160,9 @@ 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,
@@ -2136,6 +2212,9 @@ 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,
}
}
@@ -2163,6 +2242,9 @@ 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,
}
}
@@ -2183,6 +2265,9 @@ 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,
}
@@ -2210,6 +2295,9 @@ 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,
@@ -2232,6 +2320,9 @@ 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,
@@ -2256,6 +2347,9 @@ 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),
}
@@ -2276,6 +2370,9 @@ 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,
@@ -4336,6 +4433,9 @@ 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,
@@ -4364,6 +4464,9 @@ 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
@@ -4478,6 +4581,17 @@ 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)]
@@ -4534,6 +4648,9 @@ 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 722da890e6..15620bf311 100644
--- a/crates/api_models/src/payments.rs
+++ b/crates/api_models/src/payments.rs
@@ -2609,6 +2609,22 @@ 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>,
@@ -2673,6 +2689,22 @@ 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>,
@@ -2705,6 +2737,9 @@ impl TryFrom<payment_methods::CardDetail> for Card {
nick_name,
card_network,
card_issuer,
+ card_subtype,
+ card_segment_type,
+ funding_source,
card_cvc,
..
} = value;
@@ -2720,6 +2755,9 @@ 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,
@@ -4167,6 +4205,19 @@ 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>,
@@ -5898,6 +5949,18 @@ 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>,
@@ -9503,6 +9566,9 @@ 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 fbc3dbb77e..e4a8a767ff 100644
--- a/crates/hyperswitch_connectors/src/connectors/recurly/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/recurly/transformers.rs
@@ -212,6 +212,9 @@ 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 fc61fc776a..610f9e0a43 100644
--- a/crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs
+++ b/crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs
@@ -576,6 +576,9 @@ 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 2a086a3d3b..335260f9cb 100644
--- a/crates/hyperswitch_domain_models/src/bulk_tokenization.rs
+++ b/crates/hyperswitch_domain_models/src/bulk_tokenization.rs
@@ -42,6 +42,9 @@ 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)]
@@ -64,6 +67,9 @@ 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>,
@@ -171,6 +177,9 @@ 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,
@@ -215,6 +224,9 @@ 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,
}
}
}
@@ -263,6 +275,9 @@ 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 14985bbf1d..5840b73e5f 100644
--- a/crates/hyperswitch_domain_models/src/mandates.rs
+++ b/crates/hyperswitch_domain_models/src/mandates.rs
@@ -780,6 +780,9 @@ 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 ce1bd667fb..48a67fedac 100644
--- a/crates/hyperswitch_domain_models/src/payment_method_data.rs
+++ b/crates/hyperswitch_domain_models/src/payment_method_data.rs
@@ -115,6 +115,12 @@ 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>,
@@ -473,6 +479,9 @@ 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>,
@@ -501,6 +510,14 @@ 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()
@@ -535,6 +552,9 @@ 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>,
@@ -580,6 +600,14 @@ 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()
@@ -647,6 +675,9 @@ 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>,
@@ -673,6 +704,14 @@ 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()
@@ -721,6 +760,9 @@ 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>,
@@ -737,6 +779,9 @@ 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>,
@@ -764,6 +809,14 @@ 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()
@@ -875,6 +928,9 @@ 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(),
@@ -894,6 +950,9 @@ 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,
@@ -913,6 +972,9 @@ 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,
@@ -2002,6 +2064,9 @@ 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,
@@ -2013,6 +2078,9 @@ 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,
@@ -2212,6 +2280,9 @@ impl
card_issuer,
card_network,
card_type,
+ card_subtype,
+ card_segment_type,
+ funding_source,
card_issuing_country,
card_issuing_country_code,
bank_code,
@@ -2226,6 +2297,9 @@ impl
card_issuer,
card_network,
card_type,
+ card_subtype,
+ card_segment_type,
+ funding_source,
card_issuing_country,
card_issuing_country_code,
bank_code,
@@ -2256,6 +2330,9 @@ impl
card_issuer,
card_network,
card_type,
+ card_subtype,
+ card_segment_type,
+ funding_source,
card_issuing_country,
card_issuing_country_code,
bank_code,
@@ -2270,6 +2347,9 @@ impl
card_issuer,
card_network,
card_type,
+ card_subtype,
+ card_segment_type,
+ funding_source,
card_issuing_country,
card_issuing_country_code,
bank_code,
@@ -2485,6 +2565,9 @@ 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,
@@ -2508,6 +2591,9 @@ 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),
}
}
@@ -4022,6 +4108,9 @@ 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>,
@@ -4040,6 +4129,9 @@ 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,
}
@@ -4095,6 +4187,9 @@ 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,
})
}
@@ -4109,6 +4204,9 @@ 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,
@@ -4145,6 +4243,9 @@ 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,
}
@@ -4168,6 +4269,9 @@ 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,
}
@@ -4199,6 +4303,9 @@ 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),
@@ -4220,6 +4327,9 @@ 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,
}
}
@@ -4239,6 +4349,9 @@ 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,
}
}
@@ -4333,6 +4446,9 @@ 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,
}
}
}
@@ -4352,6 +4468,9 @@ 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,
}
}
}
@@ -4469,6 +4588,9 @@ impl
card_issuing_country,
card_issuing_country_code,
card_type,
+ card_subtype,
+ card_segment_type,
+ funding_source,
..
},
card_token_data,
@@ -4501,6 +4623,9 @@ impl
card_issuer,
card_network,
card_type,
+ card_subtype,
+ card_segment_type,
+ funding_source,
card_issuing_country,
card_issuing_country_code,
bank_code: None,
@@ -4562,6 +4687,9 @@ 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,
@@ -4618,6 +4746,9 @@ 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 26ee656867..38f3abcd83 100644
--- a/crates/hyperswitch_domain_models/src/vault.rs
+++ b/crates/hyperswitch_domain_models/src/vault.rs
@@ -233,6 +233,9 @@ 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,
@@ -633,6 +636,9 @@ 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 90df76d52f..35548102c5 100644
--- a/crates/openapi/src/openapi_v2.rs
+++ b/crates/openapi/src/openapi_v2.rs
@@ -419,6 +419,8 @@ 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 8911314ac7..81e9f4639e 100644
--- a/crates/payment_methods/src/client/create.rs
+++ b/crates/payment_methods/src/client/create.rs
@@ -63,6 +63,9 @@ 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>>,
}
@@ -167,6 +170,9 @@ 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 81dab939ea..cbff632d80 100644
--- a/crates/payment_methods/src/core/migration/payment_methods.rs
+++ b/crates/payment_methods/src/core/migration/payment_methods.rs
@@ -381,6 +381,14 @@ 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 {
@@ -403,6 +411,9 @@ 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,
})
}
@@ -461,6 +472,14 @@ 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 {
@@ -483,6 +502,9 @@ 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 0e15825736..65cb208885 100644
--- a/crates/payment_methods/src/helpers.rs
+++ b/crates/payment_methods/src/helpers.rs
@@ -21,6 +21,9 @@ 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(),
@@ -45,6 +48,11 @@ 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(),
@@ -58,6 +66,9 @@ 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 e5d79955a1..1f6f5757d6 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(RawCardWithNTDetails),
+ CardWithNT(Box<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 b53a9d5951..f0b0a140bc 100644
--- a/crates/router/src/compatibility/stripe/payment_intents/types.rs
+++ b/crates/router/src/compatibility/stripe/payment_intents/types.rs
@@ -135,6 +135,9 @@ 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 8ec5bf4604..a300d7c680 100644
--- a/crates/router/src/compatibility/stripe/setup_intents/types.rs
+++ b/crates/router/src/compatibility/stripe/setup_intents/types.rs
@@ -104,6 +104,9 @@ 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/account_updater/store.rs b/crates/router/src/core/account_updater/store.rs
index 45149e1e2d..0e3c8d0c86 100644
--- a/crates/router/src/core/account_updater/store.rs
+++ b/crates/router/src/core/account_updater/store.rs
@@ -247,6 +247,9 @@ fn build_new_card(
.transpose()
.ok()
.flatten(),
+ card_subtype: stored.card_subtype.clone(),
+ card_segment_type: stored.card_segment_type,
+ funding_source: stored.funding_source,
card_cvc: None,
})
}
diff --git a/crates/router/src/core/payment_methods.rs b/crates/router/src/core/payment_methods.rs
index ef179fa84b..745a90bf79 100644
--- a/crates/router/src/core/payment_methods.rs
+++ b/crates/router/src/core/payment_methods.rs
@@ -1341,6 +1341,9 @@ 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 {
@@ -1458,6 +1461,9 @@ 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 {
@@ -1504,6 +1510,9 @@ 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 {
@@ -3927,6 +3936,15 @@ 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,
@@ -4054,6 +4072,9 @@ 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,
@@ -4074,6 +4095,9 @@ 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,
@@ -5967,12 +5991,12 @@ pub async fn retrieve_payment_method(
(
Some(payment_methods::RawPaymentMethodData::Card(card_details)),
Some(network_token_details),
- ) => Some(payment_methods::RawPaymentMethodData::CardWithNT(
+ ) => Some(payment_methods::RawPaymentMethodData::CardWithNT(Box::new(
payment_methods::RawCardWithNTDetails {
card_details,
network_token_details,
},
- )),
+ ))),
(raw_payment_method_data, _) => raw_payment_method_data,
};
@@ -6501,6 +6525,9 @@ 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 64b1d16f6e..223b3aa539 100644
--- a/crates/router/src/core/payment_methods/cards.rs
+++ b/crates/router/src/core/payment_methods/cards.rs
@@ -414,6 +414,9 @@ 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,
};
@@ -2002,6 +2005,11 @@ 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,
});
@@ -2609,6 +2617,15 @@ 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,
};
@@ -2900,6 +2917,9 @@ 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 9f3d677df4..8ac165d16f 100644
--- a/crates/router/src/core/payment_methods/tokenize.rs
+++ b/crates/router/src/core/payment_methods/tokenize.rs
@@ -277,6 +277,9 @@ 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
@@ -313,6 +316,9 @@ 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 99492ef281..ac77562697 100644
--- a/crates/router/src/core/payment_methods/tokenize/card_executor.rs
+++ b/crates/router/src/core/payment_methods/tokenize/card_executor.rs
@@ -127,6 +127,25 @@ 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| {
@@ -268,6 +287,9 @@ 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 {
@@ -569,6 +591,9 @@ 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 b880b18fd5..bde01f3b79 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,6 +146,18 @@ 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 12f25ac646..e411ec5eaa 100644
--- a/crates/router/src/core/payment_methods/transformers.rs
+++ b/crates/router/src/core/payment_methods/transformers.rs
@@ -589,6 +589,9 @@ 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 {
@@ -638,6 +641,9 @@ 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),
@@ -886,6 +892,9 @@ 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)
@@ -913,6 +922,9 @@ 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)
@@ -1737,6 +1749,9 @@ 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,
@@ -1769,6 +1784,9 @@ 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,
@@ -1908,6 +1926,9 @@ 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(),
@@ -1937,6 +1958,9 @@ 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 9a86895bf2..fa00ad5ba6 100644
--- a/crates/router/src/core/payment_methods/vault.rs
+++ b/crates/router/src/core/payment_methods/vault.rs
@@ -152,6 +152,9 @@ 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 3272a8845a..bb8b073c5e 100644
--- a/crates/router/src/core/payments/helpers.rs
+++ b/crates/router/src/core/payments/helpers.rs
@@ -3229,6 +3229,9 @@ 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,
@@ -3392,6 +3395,9 @@ 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,
@@ -3620,6 +3626,9 @@ 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
@@ -3667,6 +3676,9 @@ 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(),
@@ -6017,6 +6029,9 @@ 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(),
@@ -6052,6 +6067,11 @@ 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(),
@@ -6076,6 +6096,9 @@ 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,
@@ -6155,6 +6178,9 @@ 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(),
@@ -6190,6 +6216,11 @@ 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(),
@@ -6214,6 +6245,9 @@ 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,
@@ -6520,6 +6554,9 @@ 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(),
@@ -6555,6 +6592,11 @@ 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(),
@@ -6579,6 +6621,9 @@ 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,
@@ -6623,6 +6668,9 @@ 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(),
@@ -6665,6 +6713,11 @@ 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(),
@@ -6691,6 +6744,9 @@ 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 46cc7370bb..44fab4b692 100644
--- a/crates/router/src/core/payments/operations/payment_confirm.rs
+++ b/crates/router/src/core/payments/operations/payment_confirm.rs
@@ -2115,6 +2115,9 @@ 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 5034646677..98eb4a7761 100644
--- a/crates/router/src/core/payments/tokenization.rs
+++ b/crates/router/src/core/payments/tokenization.rs
@@ -910,6 +910,15 @@ 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,
});
@@ -1331,6 +1340,9 @@ 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 {
@@ -1705,6 +1717,9 @@ 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(
@@ -2426,6 +2441,9 @@ 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 e355fe556c..9861c5a230 100644
--- a/crates/router/src/core/payouts/helpers.rs
+++ b/crates/router/src/core/payouts/helpers.rs
@@ -396,6 +396,9 @@ 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(),
@@ -653,6 +656,11 @@ 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,
},
@@ -675,6 +683,9 @@ 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 ac80166a63..5b7dedf94a 100644
--- a/crates/router/src/core/unified_authentication_service/utils.rs
+++ b/crates/router/src/core/unified_authentication_service/utils.rs
@@ -592,6 +592,9 @@ 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 3b59eeccfa..9c1909bb88 100644
--- a/crates/router/src/core/unified_connector_service.rs
+++ b/crates/router/src/core/unified_connector_service.rs
@@ -132,6 +132,9 @@ 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 fbf669be71..e0633ce0ce 100644
--- a/crates/router/src/types/api/payments.rs
+++ b/crates/router/src/types/api/payments.rs
@@ -155,6 +155,9 @@ 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 56fb8482f8..974becc0b5 100644
--- a/crates/router/src/types/storage/revenue_recovery_redis_operation.rs
+++ b/crates/router/src/types/storage/revenue_recovery_redis_operation.rs
@@ -64,6 +64,9 @@ 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 2bdd3b8fc2..9c4cfd1c85 100644
--- a/crates/router/src/types/transformers.rs
+++ b/crates/router/src/types/transformers.rs
@@ -2866,6 +2866,9 @@ 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 6847642170..a5e31e1b58 100644
--- a/crates/router/src/utils/verify_connector.rs
+++ b/crates/router/src/utils/verify_connector.rs
@@ -21,6 +21,9 @@ 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 f6d4e08040..7d2c14e8ee 100644
--- a/crates/router/tests/connectors/adyen.rs
+++ b/crates/router/tests/connectors/adyen.rs
@@ -163,6 +163,9 @@ 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 088dde2f65..324aadcac9 100644
--- a/crates/router/tests/connectors/airwallex.rs
+++ b/crates/router/tests/connectors/airwallex.rs
@@ -79,6 +79,9 @@ 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 bd873e8d1c..dfef4003ae 100644
--- a/crates/router/tests/connectors/fiserv.rs
+++ b/crates/router/tests/connectors/fiserv.rs
@@ -50,6 +50,9 @@ 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 d00e8205b4..eb7a245c12 100644
--- a/crates/router/tests/connectors/rapyd.rs
+++ b/crates/router/tests/connectors/rapyd.rs
@@ -50,6 +50,9 @@ 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,
@@ -80,6 +83,9 @@ 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 ef54ce42fe..d55ca973bc 100644
--- a/crates/router/tests/connectors/trustpayments.rs
+++ b/crates/router/tests/connectors/trustpayments.rs
@@ -76,6 +76,9 @@ 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 919cdc6ee3..d603220e9c 100644
--- a/crates/router/tests/connectors/utils.rs
+++ b/crates/router/tests/connectors/utils.rs
@@ -972,6 +972,9 @@ 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 3d8a2568c2..72a2e97c8a 100644
--- a/crates/router/tests/connectors/worldline.rs
+++ b/crates/router/tests/connectors/worldline.rs
@@ -80,6 +80,9 @@ 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 681283750e..e342913bc1 100644
--- a/crates/router/tests/payments.rs
+++ b/crates/router/tests/payments.rs
@@ -348,6 +348,9 @@ 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,
@@ -661,6 +664,9 @@ 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 11c5488e88..437986d208 100644
--- a/crates/router/tests/payments2.rs
+++ b/crates/router/tests/payments2.rs
@@ -108,6 +108,9 @@ 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,
@@ -430,6 +433,9 @@ 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())),
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Airwallex.js b/cypress-tests/cypress/e2e/configs/Payment/Airwallex.js
index 8a2440629c..32d3125d8c 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Airwallex.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Airwallex.js
@@ -50,6 +50,9 @@ const payment_method_data_3ds = {
card: {
last4: "0062",
card_type: "DEBIT",
+ card_subtype: "CLASSIC",
+ card_segment_type: null,
+ funding_source: null,
card_network: "Visa",
card_issuer: "VISA PRODUCTION SUPPORT CLIENT BID 1",
card_issuing_country: "UNITEDSTATES",
@@ -69,6 +72,9 @@ const payment_method_data_no3ds = {
card: {
last4: "1111",
card_type: "DEBIT",
+ card_subtype: "VISA CLASSIC",
+ card_segment_type: "consumer",
+ funding_source: "DEBIT",
card_network: "Visa",
card_issuer: "CONOTOXIA SP Z OO",
card_issuing_country: "POLAND",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Archipel.js b/cypress-tests/cypress/e2e/configs/Payment/Archipel.js
index 3a51dd0404..3840ec2a50 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Archipel.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Archipel.js
@@ -30,6 +30,9 @@ const paymentMethodDataNo3DSResponse = {
card: {
last4: "7102",
card_type: "DEBIT",
+ card_subtype: null,
+ card_segment_type: null,
+ funding_source: null,
card_network: "Visa",
card_issuer: "MASTERCARD INTERNATIONAL",
card_issuing_country: "UNITEDSTATES",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Authipay.js b/cypress-tests/cypress/e2e/configs/Payment/Authipay.js
index c323f8159f..7f4d8f7212 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Authipay.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Authipay.js
@@ -75,6 +75,9 @@ const payment_method_data = {
card: {
last4: "0083",
card_type: null,
+ card_subtype: null,
+ card_segment_type: null,
+ funding_source: null,
card_network: null,
card_issuer: null,
card_issuing_country: null,
@@ -94,6 +97,9 @@ const payment_method_data_failed = {
card: {
last4: "0002",
card_type: null,
+ card_subtype: null,
+ card_segment_type: null,
+ funding_source: null,
card_network: null,
card_issuer: null,
card_issuing_country: null,
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Authorizedotnet.js b/cypress-tests/cypress/e2e/configs/Payment/Authorizedotnet.js
index 4ebe732fe4..55dfa97df1 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Authorizedotnet.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Authorizedotnet.js
@@ -36,6 +36,9 @@ const paymentMethodData = {
card: {
last4: "1111",
card_type: "DEBIT",
+ card_subtype: "VISA CLASSIC",
+ card_segment_type: "consumer",
+ funding_source: "DEBIT",
card_network: "Visa",
card_issuer: "CONOTOXIA SP Z OO",
card_issuing_country: "POLAND",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Bambora.js b/cypress-tests/cypress/e2e/configs/Payment/Bambora.js
index 9331aa71cc..f4c067415c 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Bambora.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Bambora.js
@@ -22,6 +22,9 @@ const payment_method_data_no3ds = {
card: {
last4: "3312",
card_type: "CREDIT",
+ card_subtype: null,
+ card_segment_type: null,
+ funding_source: null,
card_network: "Visa",
card_issuer: "INTL HDQTRS CENTER OWNED",
card_issuing_country: "TURKEY",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Bamboraapac.js b/cypress-tests/cypress/e2e/configs/Payment/Bamboraapac.js
index 1a1ee0f12e..75737a650c 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Bamboraapac.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Bamboraapac.js
@@ -52,6 +52,9 @@ const payment_method_data_no3ds = {
card: {
last4: "1111",
card_type: "CREDIT",
+ card_subtype: "VISA CLASSIC",
+ card_segment_type: "consumer",
+ funding_source: "DEBIT",
card_network: "Visa",
card_issuer: "JP Morgan",
card_issuing_country: "INDIA",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Barclaycard.js b/cypress-tests/cypress/e2e/configs/Payment/Barclaycard.js
index 9349fe88ba..8c0c652c17 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Barclaycard.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Barclaycard.js
@@ -42,6 +42,9 @@ const payment_method_data_3ds = {
card: {
last4: "2701",
card_type: "CREDIT",
+ card_subtype: "VISA TRADITIONAL",
+ card_segment_type: "consumer",
+ funding_source: "CREDIT",
card_network: "Visa",
card_issuer: "Intl Hdqtrs Center Owned",
card_issuing_country: "UNITED STATES OF AMERICA",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Billwerk.js b/cypress-tests/cypress/e2e/configs/Payment/Billwerk.js
index bf36b9c56c..aa30f3a1ab 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Billwerk.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Billwerk.js
@@ -96,6 +96,9 @@ const payment_method_data_no3ds = {
card: {
last4: "0009",
card_type: "CREDIT",
+ card_subtype: null,
+ card_segment_type: null,
+ funding_source: null,
card_network: "AmericanExpress",
card_issuer: "AMERICAN EXPRESS COMPANY",
card_issuing_country: "INDIA",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Braintree.js b/cypress-tests/cypress/e2e/configs/Payment/Braintree.js
index d50801bf3f..92e519b2d7 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Braintree.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Braintree.js
@@ -46,6 +46,9 @@ const paymentMethodDataNo3DSResponse = {
card: {
last4: "1881",
card_type: "CREDIT",
+ card_subtype: "CORPORATET&E",
+ card_segment_type: null,
+ funding_source: null,
card_network: "Visa",
card_issuer: "PT BANK HSBC INDONESIA",
card_issuing_country: "INDONESIA",
@@ -65,6 +68,9 @@ const paymentMethodData3DSResponse = {
card: {
last4: "7777",
card_type: "DEBIT",
+ card_subtype: "CLASSIC",
+ card_segment_type: null,
+ funding_source: null,
card_network: "Visa",
card_issuer: "VISA PRODUCTION SUPPORT CLIENT BID 1",
card_issuing_country: "UNITEDSTATES",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Celero.js b/cypress-tests/cypress/e2e/configs/Payment/Celero.js
index ccaa2f0683..bbf9b6e29b 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Celero.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Celero.js
@@ -54,6 +54,9 @@ const payment_method_data_amex = {
card: {
last4: "0005",
card_type: "CREDIT",
+ card_subtype: "CORPORATE",
+ card_segment_type: null,
+ funding_source: null,
card_network: "AmericanExpress",
card_issuer: null,
card_issuing_country: null,
@@ -73,6 +76,9 @@ const payment_method_data_failed = {
card: {
last4: "0002",
card_type: "CREDIT",
+ card_subtype: "VISA TRADITIONAL",
+ card_segment_type: "consumer",
+ funding_source: "CREDIT",
card_network: "Visa",
card_issuer: "Intl Hdqtrs Center Owned",
card_issuing_country: "UNITED STATES OF AMERICA",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Cybersource.js b/cypress-tests/cypress/e2e/configs/Payment/Cybersource.js
index 7742aa2dd6..84f787ae83 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Cybersource.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Cybersource.js
@@ -60,6 +60,9 @@ const payment_method_data_no3ds = {
card: {
last4: "4242",
card_type: "CREDIT",
+ card_subtype: null,
+ card_segment_type: null,
+ funding_source: null,
card_network: "Visa",
card_issuer: "STRIPE PAYMENTS UK LIMITED",
card_issuing_country: "UNITEDKINGDOM",
@@ -85,6 +88,9 @@ const payment_method_data_3ds = {
card: {
last4: "2701",
card_type: "CREDIT",
+ card_subtype: "VISA TRADITIONAL",
+ card_segment_type: "consumer",
+ funding_source: "CREDIT",
card_network: "Visa",
card_issuer: "INTL HDQTRS CENTER OWNED",
card_issuing_country: "UNITED STATES OF AMERICA",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Datatrans.js b/cypress-tests/cypress/e2e/configs/Payment/Datatrans.js
index b18dca6218..e7b763e4ae 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Datatrans.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Datatrans.js
@@ -47,6 +47,9 @@ const paymentMethodData3Ds = {
card: {
last4: "1111",
card_type: "DEBIT",
+ card_subtype: "VISA CLASSIC",
+ card_segment_type: "consumer",
+ funding_source: "DEBIT",
card_network: "Visa",
card_issuer: "CONOTOXIA SP Z OO",
card_issuing_country: "POLAND",
@@ -66,6 +69,9 @@ const paymentMethodDataNo3Ds = {
card: {
last4: "0018",
card_type: "CREDIT",
+ card_subtype: "VISA TRADITIONAL",
+ card_segment_type: "consumer",
+ funding_source: "CREDIT",
card_network: "Visa",
card_issuer: "INTL HDQTRS CENTER OWNED",
card_issuing_country: "UNITED STATES OF AMERICA",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Deutschebank.js b/cypress-tests/cypress/e2e/configs/Payment/Deutschebank.js
index c046dae993..fe10a722bf 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Deutschebank.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Deutschebank.js
@@ -13,6 +13,9 @@ const paymentMethodData3DSResponse = {
card: {
last4: "0088",
card_type: "DEBIT",
+ card_subtype: null,
+ card_segment_type: null,
+ funding_source: null,
card_network: "Visa",
card_issuer: "INTL HDQTRS CENTER OWNED",
card_issuing_country: "UNITEDSTATES",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Dlocal.js b/cypress-tests/cypress/e2e/configs/Payment/Dlocal.js
index 9ff3566e0f..d62b1ed87b 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Dlocal.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Dlocal.js
@@ -40,6 +40,9 @@ const payment_method_data_no3ds = {
card: {
last4: "1111",
card_type: "DEBIT",
+ card_subtype: "VISA CLASSIC",
+ card_segment_type: "consumer",
+ funding_source: "DEBIT",
card_network: "Visa",
card_issuer: "Conotoxia Sp Z Oo",
card_issuing_country: "POLAND",
@@ -58,6 +61,9 @@ const payment_method_data_no3ds_address = {
card: {
last4: "1111",
card_type: "DEBIT",
+ card_subtype: "VISA CLASSIC",
+ card_segment_type: "consumer",
+ funding_source: "DEBIT",
card_network: "Visa",
card_issuer: "Conotoxia Sp Z Oo",
card_issuing_country: "POLAND",
@@ -76,6 +82,9 @@ const payment_method_data_3ds_address = {
card: {
last4: "1111",
card_type: "DEBIT",
+ card_subtype: "VISA CLASSIC",
+ card_segment_type: "consumer",
+ funding_source: "DEBIT",
card_network: "Visa",
card_issuer: "Conotoxia Sp Z Oo",
card_issuing_country: "POLAND",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Fiserv.js b/cypress-tests/cypress/e2e/configs/Payment/Fiserv.js
index e683fa2ef3..a457d8de8f 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Fiserv.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Fiserv.js
@@ -120,6 +120,9 @@ const payment_method_data_no3ds = {
card: {
last4: "1111",
card_type: "DEBIT",
+ card_subtype: "VISA CLASSIC",
+ card_segment_type: "consumer",
+ funding_source: "DEBIT",
card_network: "Visa",
card_issuer: "CONOTOXIA SP Z OO",
card_issuing_country: "POLAND",
@@ -139,6 +142,9 @@ const payment_method_data_mastercard = {
card: {
last4: "9124",
card_type: "CREDIT",
+ card_subtype: null,
+ card_segment_type: null,
+ funding_source: null,
card_network: "Mastercard",
card_issuer: "Test Bank",
card_issuing_country: "UNITEDSTATES",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Forte.js b/cypress-tests/cypress/e2e/configs/Payment/Forte.js
index d0e47dff8b..ec1f9161bd 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Forte.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Forte.js
@@ -33,6 +33,9 @@ const payment_method_data_no3ds = {
card: {
last4: "1111",
card_type: "DEBIT",
+ card_subtype: "VISA CLASSIC",
+ card_segment_type: "consumer",
+ funding_source: "DEBIT",
card_network: "Visa",
card_issuer: "CONOTOXIA SP Z OO",
card_issuing_country: "POLAND",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Globalpay.js b/cypress-tests/cypress/e2e/configs/Payment/Globalpay.js
index 4ef1839584..c81281699c 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Globalpay.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Globalpay.js
@@ -54,6 +54,9 @@ const payment_method_data_no3ds = {
card: {
last4: "1111",
card_type: "DEBIT",
+ card_subtype: "VISA CLASSIC",
+ card_segment_type: "consumer",
+ funding_source: "DEBIT",
card_network: "Visa",
card_issuer: "CONOTOXIA SP Z OO",
card_issuing_country: "POLAND",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Hipay.js b/cypress-tests/cypress/e2e/configs/Payment/Hipay.js
index fba301bc01..a829016991 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Hipay.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Hipay.js
@@ -65,6 +65,9 @@ const paymentMethodDataNo3DSResponse = {
card_issuing_country: "POLAND",
card_network: "Visa",
card_type: "DEBIT",
+ card_subtype: "VISA CLASSIC",
+ card_segment_type: "consumer",
+ funding_source: "DEBIT",
last4: "1111",
payment_checks: null,
},
@@ -88,6 +91,9 @@ const paymentMethodData3DSResponse = {
card_issuing_country: "UNITED STATES OF AMERICA",
card_network: "Visa",
card_type: "CREDIT",
+ card_subtype: "VISA TRADITIONAL",
+ card_segment_type: "consumer",
+ funding_source: "CREDIT",
last4: "0002",
payment_checks: null,
},
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Noon.js b/cypress-tests/cypress/e2e/configs/Payment/Noon.js
index f26550e938..f582eb4424 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Noon.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Noon.js
@@ -46,6 +46,9 @@ const payment_method_data_3ds = {
card: {
last4: "1091",
card_type: "CREDIT",
+ card_subtype: "VISA TRADITIONAL",
+ card_segment_type: "consumer",
+ funding_source: "CREDIT",
card_network: "Visa",
card_issuer: "INTL HDQTRS CENTER OWNED",
card_issuing_country: "UNITED STATES OF AMERICA",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Payu.js b/cypress-tests/cypress/e2e/configs/Payment/Payu.js
index 431c56a386..68b6523b64 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Payu.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Payu.js
@@ -58,6 +58,9 @@ const paymentMethodData = {
card: {
last4: "1112",
card_type: "DEBIT",
+ card_subtype: "CLASSIC",
+ card_segment_type: null,
+ funding_source: null,
card_network: "Visa",
card_issuer: "VISA PRODUCTION SUPPORT CLIENT BID 1",
card_issuing_country: "UNITEDSTATES",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/PowerTranz.js b/cypress-tests/cypress/e2e/configs/Payment/PowerTranz.js
index 6160f30cc5..4fa516bb69 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/PowerTranz.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/PowerTranz.js
@@ -32,6 +32,9 @@ const payment_method_data_3ds = {
card: {
last4: "0071",
card_type: "DEBIT",
+ card_subtype: "CLASSIC",
+ card_segment_type: null,
+ funding_source: null,
card_network: "Visa",
card_issuer: "VISA PRODUCTION SUPPORT CLIENT BID 1",
card_issuing_country: "UNITEDSTATES",
@@ -51,6 +54,9 @@ const payment_method_data_no3ds = {
card: {
last4: "4242",
card_type: "CREDIT",
+ card_subtype: null,
+ card_segment_type: null,
+ funding_source: null,
card_network: "Visa",
card_issuer: "STRIPE PAYMENTS UK LIMITED",
card_issuing_country: "UNITEDKINGDOM",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Shift4.js b/cypress-tests/cypress/e2e/configs/Payment/Shift4.js
index 5b679f5ed2..dfc82e161c 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Shift4.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Shift4.js
@@ -45,6 +45,9 @@ const payment_method_data_3ds = {
card: {
last4: "0016",
card_type: "DEBIT",
+ card_subtype: "CLASSIC",
+ card_segment_type: null,
+ funding_source: null,
card_network: "Visa",
card_issuer: "VISA PRODUCTION SUPPORT CLIENT BID 1",
card_issuing_country: "UNITEDSTATES",
@@ -64,6 +67,9 @@ const payment_method_data_no3ds = {
card: {
last4: "4242",
card_type: "CREDIT",
+ card_subtype: null,
+ card_segment_type: null,
+ funding_source: null,
card_network: "Visa",
card_issuer: "STRIPE PAYMENTS UK LIMITED",
card_issuing_country: "UNITEDKINGDOM",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Silverflow.js b/cypress-tests/cypress/e2e/configs/Payment/Silverflow.js
index 26afd90ac8..cbfdcf1362 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Silverflow.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Silverflow.js
@@ -63,6 +63,9 @@ const payment_method_data_visa = {
card: {
last4: "1111",
card_type: "DEBIT",
+ card_subtype: "VISA CLASSIC",
+ card_segment_type: "consumer",
+ funding_source: "DEBIT",
card_network: "Visa",
card_issuer: "Conotoxia Sp Z Oo",
card_issuing_country: "POLAND",
@@ -82,6 +85,9 @@ const payment_method_data_amex = {
card: {
last4: "0005",
card_type: "CREDIT",
+ card_subtype: "CORPORATE",
+ card_segment_type: null,
+ funding_source: null,
card_network: "AmericanExpress",
card_issuer: null,
card_issuing_country: null,
@@ -101,6 +107,9 @@ const payment_method_data_failed = {
card: {
last4: "0002",
card_type: "CREDIT",
+ card_subtype: "VISA TRADITIONAL",
+ card_segment_type: "consumer",
+ funding_source: "CREDIT",
card_network: "Visa",
card_issuer: "Intl Hdqtrs Center Owned",
card_issuing_country: "UNITED STATES OF AMERICA",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Square.js b/cypress-tests/cypress/e2e/configs/Payment/Square.js
index 4b3136aadc..fce54d0ff6 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Square.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Square.js
@@ -29,6 +29,9 @@ const payment_method_data_no3ds = {
card: {
last4: "1111",
card_type: "DEBIT",
+ card_subtype: "VISA CLASSIC",
+ card_segment_type: "consumer",
+ funding_source: "DEBIT",
card_network: "Visa",
card_issuer: "Conotoxia Sp Z Oo",
card_issuing_country: "POLAND",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Stax.js b/cypress-tests/cypress/e2e/configs/Payment/Stax.js
index 6930c2326e..cf6a429a4e 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Stax.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Stax.js
@@ -64,6 +64,9 @@ const payment_method_data_no3ds = {
card: {
last4: "1111",
card_type: "DEBIT",
+ card_subtype: "VISA CLASSIC",
+ card_segment_type: "consumer",
+ funding_source: "DEBIT",
card_network: "Visa",
card_issuer: "CONOTOXIA SP Z OO",
card_issuing_country: "POLAND",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Stripe.js b/cypress-tests/cypress/e2e/configs/Payment/Stripe.js
index daea1f301c..3142781175 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Stripe.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Stripe.js
@@ -155,6 +155,9 @@ const payment_method_data_3ds = {
card: {
last4: "3155",
card_type: "CREDIT",
+ card_subtype: "VISA TRADITIONAL",
+ card_segment_type: "consumer",
+ funding_source: "CREDIT",
card_network: "Visa",
card_issuer: "INTL HDQTRS CENTER OWNED",
card_issuing_country: "UNITED STATES OF AMERICA",
@@ -174,6 +177,9 @@ const payment_method_data_no3ds = {
card: {
last4: "0005",
card_type: "CREDIT",
+ card_subtype: "CORPORATE",
+ card_segment_type: null,
+ funding_source: null,
card_network: "AmericanExpress",
card_issuer: "AMERICAN EXPRESS US CARS",
card_issuing_country: "UNITED STATES OF AMERICA",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/StripeConnect.js b/cypress-tests/cypress/e2e/configs/Payment/StripeConnect.js
index 5990baf822..d62249aad3 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/StripeConnect.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/StripeConnect.js
@@ -75,6 +75,9 @@ const payment_method_data_3ds = {
card: {
last4: "3155",
card_type: "CREDIT",
+ card_subtype: "VISA TRADITIONAL",
+ card_segment_type: "consumer",
+ funding_source: "CREDIT",
card_network: "Visa",
card_issuer: "INTL HDQTRS CENTER OWNED",
card_issuing_country: "UNITED STATES OF AMERICA",
@@ -94,6 +97,9 @@ const payment_method_data_no3ds = {
card: {
last4: "0005",
card_type: "CREDIT",
+ card_subtype: "CORPORATE",
+ card_segment_type: null,
+ funding_source: null,
card_network: "AmericanExpress",
card_issuer: "AMERICAN EXPRESS US CARS",
card_issuing_country: "UNITED STATES OF AMERICA",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Tsys.js b/cypress-tests/cypress/e2e/configs/Payment/Tsys.js
index 0d995b21b9..61b0080c86 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Tsys.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Tsys.js
@@ -38,6 +38,9 @@ const payment_method_data_visa = {
card: {
last4: "0026",
card_type: "DEBIT",
+ card_subtype: "CLASSIC",
+ card_segment_type: null,
+ funding_source: null,
card_network: "Visa",
card_issuer: "VISA PRODUCTION SUPPORT CLIENT BID 1",
card_issuing_country: "UNITEDSTATES",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/TsysTransit.js b/cypress-tests/cypress/e2e/configs/Payment/TsysTransit.js
index 3e41241e26..b97a1c61e2 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/TsysTransit.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/TsysTransit.js
@@ -53,6 +53,9 @@ const payment_method_data_visa = {
card: {
last4: "5439",
card_type: "DEBIT",
+ card_subtype: "CLASSIC",
+ card_segment_type: null,
+ funding_source: null,
card_network: "Visa",
card_issuer: "VISA PRODUCTION SUPPORT CLIENT BID 1",
card_issuing_country: "UNITEDSTATES",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/WorldPay.js b/cypress-tests/cypress/e2e/configs/Payment/WorldPay.js
index c8e8771d02..eb4641b8f5 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/WorldPay.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/WorldPay.js
@@ -57,6 +57,9 @@ const paymentMethodDataNoThreeDsResponse = {
card: {
last4: "4242",
card_type: "CREDIT",
+ card_subtype: null,
+ card_segment_type: null,
+ funding_source: null,
card_network: "Visa",
card_issuer: "STRIPE PAYMENTS UK LIMITED",
card_issuing_country: "UNITEDKINGDOM",
@@ -76,6 +79,9 @@ const paymentMethodDataThreeDsResponse = {
card: {
last4: "1091",
card_type: "CREDIT",
+ card_subtype: "VISA TRADITIONAL",
+ card_segment_type: "consumer",
+ funding_source: "CREDIT",
card_network: "Visa",
card_issuer: "INTL HDQTRS CENTER OWNED",
card_issuing_country: "UNITED STATES OF AMERICA",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Xendit.js b/cypress-tests/cypress/e2e/configs/Payment/Xendit.js
index 70bb1e340e..cac741ca83 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Xendit.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Xendit.js
@@ -24,6 +24,9 @@ const paymentMethodData3ds = {
card: {
last4: "1091",
card_type: "CREDIT",
+ card_subtype: "VISA TRADITIONAL",
+ card_segment_type: "consumer",
+ funding_source: "CREDIT",
card_network: "Visa",
card_issuer: "Intl Hdqtrs Center Owned",
card_issuing_country: "UNITED STATES OF AMERICA",
diff --git a/cypress-tests/cypress/e2e/configs/Payment/Zift.js b/cypress-tests/cypress/e2e/configs/Payment/Zift.js
index 4f0c0088a5..545db06a1d 100644
--- a/cypress-tests/cypress/e2e/configs/Payment/Zift.js
+++ b/cypress-tests/cypress/e2e/configs/Payment/Zift.js
@@ -53,6 +53,9 @@ const payment_method_data_no3ds = {
card: {
last4: "1111",
card_type: "DEBIT",
+ card_subtype: "VISA CLASSIC",
+ card_segment_type: "consumer",
+ funding_source: "DEBIT",
card_network: "Visa",
card_issuer: "CONOTOXIA SP Z OO",
card_issuing_country: "POLAND",