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(router): Add field type for gift card number and CVC (v2) (#10433)

Anurag Thakurfd23bedb004d
diff --git a/api-reference/v1/openapi_spec_v1.json b/api-reference/v1/openapi_spec_v1.json
index 89691ea10f..56582c20cd 100644
--- a/api-reference/v1/openapi_spec_v1.json
+++ b/api-reference/v1/openapi_spec_v1.json
@@ -18316,6 +18316,12 @@
"user_card_number"
]
},
+ {
+ "type": "string",
+ "enum": [
+ "user_gift_card_number"
+ ]
+ },
{
"type": "string",
"enum": [
@@ -18334,6 +18340,12 @@
"user_card_cvc"
]
},
+ {
+ "type": "string",
+ "enum": [
+ "user_gift_card_pin"
+ ]
+ },
{
"type": "string",
"enum": [
diff --git a/api-reference/v2/openapi_spec_v2.json b/api-reference/v2/openapi_spec_v2.json
index e1218c55df..cafff274a1 100644
--- a/api-reference/v2/openapi_spec_v2.json
+++ b/api-reference/v2/openapi_spec_v2.json
@@ -11965,6 +11965,12 @@
"user_card_number"
]
},
+ {
+ "type": "string",
+ "enum": [
+ "user_gift_card_number"
+ ]
+ },
{
"type": "string",
"enum": [
@@ -11983,6 +11989,12 @@
"user_card_cvc"
]
},
+ {
+ "type": "string",
+ "enum": [
+ "user_gift_card_pin"
+ ]
+ },
{
"type": "string",
"enum": [
diff --git a/config/payment_required_fields_v2.toml b/config/payment_required_fields_v2.toml
index 47de2192c3..8435c63bb2 100644
--- a/config/payment_required_fields_v2.toml
+++ b/config/payment_required_fields_v2.toml
@@ -2332,8 +2332,8 @@ non_mandate = []
# Payment method type: Givex
[required_fields.gift_card.givex.fields.Adyen]
common = [
- { required_field = "payment_method_data.gift_card.givex.number", display_name = "gift_card_number", field_type = "user_card_number" },
- { required_field = "payment_method_data.gift_card.givex.cvc", display_name = "gift_card_cvc", field_type = "user_card_cvc" }
+ { required_field = "payment_method_data.gift_card.givex.number", display_name = "gift_card_number", field_type = "user_gift_card_number" },
+ { required_field = "payment_method_data.gift_card.givex.cvc", display_name = "gift_card_cvc", field_type = "user_gift_card_pin" }
]
mandate = []
non_mandate = []
diff --git a/crates/api_models/src/enums.rs b/crates/api_models/src/enums.rs
index 2b09009d1c..cbd4c6308e 100644
--- a/crates/api_models/src/enums.rs
+++ b/crates/api_models/src/enums.rs
@@ -253,9 +253,11 @@ pub struct UnresolvedResponseReason {
#[strum(serialize_all = "snake_case")]
pub enum FieldType {
UserCardNumber,
+ UserGiftCardNumber,
UserCardExpiryMonth,
UserCardExpiryYear,
UserCardCvc,
+ UserGiftCardPin,
UserCardNetwork,
UserFullName,
UserEmailAddress,