Skip to content

Commit d32c61a

Browse files
feat(payment_methods): add external_vault_details for payments v2 sdk session call (#8003)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
1 parent 65acf59 commit d32c61a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+2308
-100
lines changed

api-reference-v2/openapi_spec.json

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8110,6 +8110,7 @@
81108110
"gpayments",
81118111
"hipay",
81128112
"helcim",
8113+
"hyperswitch_vault",
81138114
"inespay",
81148115
"iatapay",
81158116
"itaubank",
@@ -10712,6 +10713,14 @@
1071210713
"type": "string",
1071310714
"description": "Merchant Connector id to be stored for vault connector",
1071410715
"nullable": true
10716+
},
10717+
"vault_sdk": {
10718+
"allOf": [
10719+
{
10720+
"$ref": "#/components/schemas/VaultSdk"
10721+
}
10722+
],
10723+
"nullable": true
1071510724
}
1071610725
}
1071710726
},
@@ -12210,6 +12219,33 @@
1221012219
}
1221112220
}
1221212221
},
12222+
"HyperswitchVaultSessionDetails": {
12223+
"type": "object",
12224+
"required": [
12225+
"payment_method_session_id",
12226+
"client_secret",
12227+
"publishable_key",
12228+
"profile_id"
12229+
],
12230+
"properties": {
12231+
"payment_method_session_id": {
12232+
"type": "string",
12233+
"description": "Session ID for Hyperswitch Vault"
12234+
},
12235+
"client_secret": {
12236+
"type": "string",
12237+
"description": "Client secret for Hyperswitch Vault"
12238+
},
12239+
"publishable_key": {
12240+
"type": "string",
12241+
"description": "Publishable key for Hyperswitch Vault"
12242+
},
12243+
"profile_id": {
12244+
"type": "string",
12245+
"description": "Profile ID for Hyperswitch Vault"
12246+
}
12247+
}
12248+
},
1221312249
"IfStatement": {
1221412250
"type": "object",
1221512251
"description": "Represents an IF statement with conditions and optional nested IF statements\n\n```text\npayment.method = card {\npayment.method.cardtype = (credit, debit) {\npayment.method.network = (amex, rupay, diners)\n}\n}\n```",
@@ -18824,6 +18860,14 @@
1882418860
"$ref": "#/components/schemas/SessionToken"
1882518861
},
1882618862
"description": "The list of session token object"
18863+
},
18864+
"vault_details": {
18865+
"allOf": [
18866+
{
18867+
"$ref": "#/components/schemas/VaultSessionDetails"
18868+
}
18869+
],
18870+
"nullable": true
1882718871
}
1882818872
}
1882918873
},
@@ -24333,6 +24377,39 @@
2433324377
"propertyName": "type"
2433424378
}
2433524379
},
24380+
"VaultSdk": {
24381+
"type": "string",
24382+
"enum": [
24383+
"vgs_sdk",
24384+
"hyperswitch_sdk"
24385+
]
24386+
},
24387+
"VaultSessionDetails": {
24388+
"oneOf": [
24389+
{
24390+
"type": "object",
24391+
"required": [
24392+
"vgs"
24393+
],
24394+
"properties": {
24395+
"vgs": {
24396+
"$ref": "#/components/schemas/VgsSessionDetails"
24397+
}
24398+
}
24399+
},
24400+
{
24401+
"type": "object",
24402+
"required": [
24403+
"hyperswitch_vault"
24404+
],
24405+
"properties": {
24406+
"hyperswitch_vault": {
24407+
"$ref": "#/components/schemas/HyperswitchVaultSessionDetails"
24408+
}
24409+
}
24410+
}
24411+
]
24412+
},
2433624413
"Venmo": {
2433724414
"type": "object",
2433824415
"required": [
@@ -24358,6 +24435,23 @@
2435824435
}
2435924436
}
2436024437
},
24438+
"VgsSessionDetails": {
24439+
"type": "object",
24440+
"required": [
24441+
"external_vault_id",
24442+
"sdk_env"
24443+
],
24444+
"properties": {
24445+
"external_vault_id": {
24446+
"type": "string",
24447+
"description": "The identifier of the external vault"
24448+
},
24449+
"sdk_env": {
24450+
"type": "string",
24451+
"description": "The environment for the external vault initiation"
24452+
}
24453+
}
24454+
},
2436124455
"VoucherData": {
2436224456
"oneOf": [
2436324457
{

api-reference/openapi_spec.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9973,6 +9973,7 @@
99739973
"gpayments",
99749974
"hipay",
99759975
"helcim",
9976+
"hyperswitch_vault",
99769977
"inespay",
99779978
"iatapay",
99789979
"itaubank",

config/config.example.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ gocardless.base_url = "https://api-sandbox.gocardless.com"
230230
gpayments.base_url = "https://{{merchant_endpoint_prefix}}-test.api.as1.gpayments.net"
231231
helcim.base_url = "https://api.helcim.com/"
232232
hipay.base_url = "https://stage-secure-gateway.hipay-tpp.com/rest/"
233+
hyperswitch_vault.base_url = "https://integ-api.hyperswitch.io"
233234
hipay.secondary_base_url = "https://stage-secure2-vault.hipay-tpp.com/rest/"
234235
hipay.third_base_url = "https://stage-api-gateway.hipay.com/"
235236
iatapay.base_url = "https://sandbox.iata-pay.iata.org/api/v1"
@@ -352,6 +353,7 @@ cards = [
352353
"gpayments",
353354
"helcim",
354355
"hipay",
356+
"hyperswitch_vault",
355357
"mollie",
356358
"moneris",
357359
"paypal",
@@ -822,7 +824,7 @@ credit = {country = "AU,NZ,CN,HK,IN,LK,KR,MY,SG,GB,BE,FR,DE,IT,ME,NL,PL,ES,ZA,AR
822824
debit = {country = "AU,NZ,CN,HK,IN,LK,KR,MY,SG,GB,BE,FR,DE,IT,ME,NL,PL,ES,ZA,AR,BR,CO,MX,PA,UY,US,CA", currency = "AFN,ALL,DZD,AOA,ARS,AMD,AWG,AUD,AZN,BSD,BHD,BDT,BBD,BYN,BZD,BMD,BTN,BOB,VES,BAM,BWP,BRL,BND,BGN,BIF,KHR,CAD,CVE,KYD,XAF,CLP,CNY,COP,KMF,CDF,CRC,HRK,CUP,CZK,DKK,DJF,DOP,XCD,EGP,ERN,ETB,EUR,FKP,FJD,XPF,GMD,GEL,GHS,GIP,GTQ,GNF,GYD,HTG,HNL,HKD,HUF,ISK,INR,IDR,IRR,IQD,ILS,JMD,JPY,JOD,KZT,KES,KGS,KWD,LAK,LBP,LSL,LRD,LYD,MOP,MKD,MGA,MWK,MYR,MVR,MRU,MUR,MXN,MDL,MNT,MAD,MZN,MMK,NAD,NPR,ANG,NZD,NIO,NGN,VUV,KPW,NOK,OMR,PKR,PAB,PGK,PYG,PEN,PHP,PLN,GBP,QAR,RON,RUB,RWF,SHP,SVC,WST,STN,SAR,RSD,SCR,SLL,SGD,SBD,SOS,ZAR,KRW,SSP,LKR,SDG,SRD,SZL,SEK,CHF,SYP,TWD,TJS,TZS,THB,TOP,TTD,TND,TRY,TMT,UGX,UAH,AED,USD,UYU,UZS,VND,XOF,YER,ZMW,ZWL"}
823825

824826
[connector_customer]
825-
connector_list = "gocardless,stax,stripe,facilitapay"
827+
connector_list = "gocardless,stax,stripe,facilitapay,hyperswitch_vault"
826828
payout_connector_list = "nomupay,stripe,wise"
827829

828830
[bank_config.online_banking_fpx]

config/deployments/integration_test.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ gocardless.base_url = "https://api-sandbox.gocardless.com"
6969
gpayments.base_url = "https://{{merchant_endpoint_prefix}}-test.api.as1.gpayments.net"
7070
helcim.base_url = "https://api.helcim.com/"
7171
hipay.base_url = "https://stage-secure-gateway.hipay-tpp.com/rest/"
72+
hyperswitch_vault.base_url = "https://integ-api.hyperswitch.io"
7273
hipay.secondary_base_url = "https://stage-secure2-vault.hipay-tpp.com/rest/"
7374
hipay.third_base_url = "https://stage-api-gateway.hipay.com/"
7475
iatapay.base_url = "https://sandbox.iata-pay.iata.org/api/v1"
@@ -173,7 +174,7 @@ force_cookies = true
173174
enabled = true
174175

175176
[connector_customer]
176-
connector_list = "gocardless,stax,stripe,facilitapay"
177+
connector_list = "gocardless,stax,stripe,facilitapay,hyperswitch_vault"
177178
payout_connector_list = "nomupay,stripe,wise"
178179

179180
[delayed_session_response]

config/deployments/production.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ open_banking_uk.adyen.banks = "aib,bank_of_scotland,danske_bank,first_direct,fir
1515
przelewy24.stripe.banks = "alior_bank,bank_millennium,bank_nowy_bfg_sa,bank_pekao_sa,banki_spbdzielcze,blik,bnp_paribas,boz,citi,credit_agricole,e_transfer_pocztowy24,getin_bank,idea_bank,inteligo,mbank_mtransfer,nest_przelew,noble_pay,pbac_z_ipko,plus_bank,santander_przelew24,toyota_bank,volkswagen_bank"
1616

1717
[connector_customer]
18-
connector_list = "stax,stripe,gocardless,facilitapay"
18+
connector_list = "stax,stripe,gocardless,facilitapay,hyperswitch_vault"
1919
payout_connector_list = "nomupay,stripe,wise"
2020

2121
# Connector configuration, provided attributes will be used to fulfill API requests.
@@ -73,6 +73,7 @@ gocardless.base_url = "https://api.gocardless.com"
7373
gpayments.base_url = "https://{{merchant_endpoint_prefix}}-test.api.as1.gpayments.net"
7474
helcim.base_url = "https://api.helcim.com/"
7575
hipay.base_url = "https://secure-gateway.hipay-tpp.com/rest/"
76+
hyperswitch_vault.base_url = "https://sandbox.hyperswitch.io"
7677
hipay.secondary_base_url = "https://secure2-vault.hipay-tpp.com/rest/"
7778
hipay.third_base_url = "https://api-gateway.hipay.com/"
7879
iatapay.base_url = "https://iata-pay.iata.org/api/v1"

config/deployments/sandbox.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ open_banking_uk.adyen.banks = "aib,bank_of_scotland,danske_bank,first_direct,fir
1515
przelewy24.stripe.banks = "alior_bank,bank_millennium,bank_nowy_bfg_sa,bank_pekao_sa,banki_spbdzielcze,blik,bnp_paribas,boz,citi,credit_agricole,e_transfer_pocztowy24,getin_bank,idea_bank,inteligo,mbank_mtransfer,nest_przelew,noble_pay,pbac_z_ipko,plus_bank,santander_przelew24,toyota_bank,volkswagen_bank"
1616

1717
[connector_customer]
18-
connector_list = "stax,stripe,gocardless,facilitapay"
18+
connector_list = "stax,stripe,gocardless,facilitapay,hyperswitch_vault"
1919
payout_connector_list = "nomupay,stripe,wise"
2020

2121
# Connector configuration, provided attributes will be used to fulfill API requests.
@@ -73,6 +73,7 @@ gocardless.base_url = "https://api-sandbox.gocardless.com"
7373
gpayments.base_url = "https://{{merchant_endpoint_prefix}}-test.api.as1.gpayments.net"
7474
helcim.base_url = "https://api.helcim.com/"
7575
hipay.base_url = "https://stage-secure-gateway.hipay-tpp.com/rest/"
76+
hyperswitch_vault.base_url = "https://sandbox.hyperswitch.io"
7677
hipay.secondary_base_url = "https://stage-secure2-vault.hipay-tpp.com/rest/"
7778
hipay.third_base_url = "https://stage-api-gateway.hipay.com/"
7879
iatapay.base_url = "https://sandbox.iata-pay.iata.org/api/v1"

config/development.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ cards = [
133133
"gpayments",
134134
"helcim",
135135
"hipay",
136+
"hyperswitch_vault",
136137
"iatapay",
137138
"inespay",
138139
"itaubank",
@@ -261,6 +262,7 @@ gocardless.base_url = "https://api-sandbox.gocardless.com"
261262
gpayments.base_url = "https://{{merchant_endpoint_prefix}}-test.api.as1.gpayments.net"
262263
helcim.base_url = "https://api.helcim.com/"
263264
hipay.base_url = "https://stage-secure-gateway.hipay-tpp.com/rest/"
265+
hyperswitch_vault.base_url = "https://integ-api.hyperswitch.io"
264266
hipay.secondary_base_url = "https://stage-secure2-vault.hipay-tpp.com/rest/"
265267
hipay.third_base_url = "https://stage-api-gateway.hipay.com/"
266268
iatapay.base_url = "https://sandbox.iata-pay.iata.org/api/v1"
@@ -866,7 +868,7 @@ nexixpay = { payment_method = "card" }
866868
redsys = { payment_method = "card" }
867869

868870
[connector_customer]
869-
connector_list = "gocardless,stax,stripe,facilitapay"
871+
connector_list = "gocardless,stax,stripe,facilitapay,hyperswitch_vault"
870872
payout_connector_list = "nomupay,stripe,wise"
871873

872874
[dummy_connector]

config/docker_compose.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ gocardless.base_url = "https://api-sandbox.gocardless.com"
156156
gpayments.base_url = "https://{{merchant_endpoint_prefix}}-test.api.as1.gpayments.net"
157157
helcim.base_url = "https://api.helcim.com/"
158158
hipay.base_url = "https://stage-secure-gateway.hipay-tpp.com/rest/"
159+
hyperswitch_vault.base_url = "https://integ-api.hyperswitch.io"
159160
hipay.secondary_base_url = "https://stage-secure2-vault.hipay-tpp.com/rest/"
160161
hipay.third_base_url = "https://stage-api-gateway.hipay.com/"
161162
iatapay.base_url = "https://sandbox.iata-pay.iata.org/api/v1"
@@ -278,6 +279,7 @@ cards = [
278279
"gpayments",
279280
"helcim",
280281
"hipay",
282+
"hyperswitch_vault",
281283
"iatapay",
282284
"inespay",
283285
"itaubank",
@@ -877,7 +879,7 @@ card.debit = { connector_list = "cybersource" }
877879
connector_list = "adyen,archipel,cybersource,novalnet,stripe,worldpay"
878880

879881
[connector_customer]
880-
connector_list = "gocardless,stax,stripe,facilitapay"
882+
connector_list = "gocardless,stax,stripe,facilitapay,hyperswitch_vault"
881883
payout_connector_list = "nomupay,stripe,wise"
882884

883885

crates/api_models/src/admin.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,10 @@ pub struct ExternalVaultConnectorDetails {
287287
/// Merchant Connector id to be stored for vault connector
288288
#[schema(value_type = Option<String>)]
289289
pub vault_connector_id: id_type::MerchantConnectorAccountId,
290+
291+
/// External vault to be used for storing payment method information
292+
#[schema(value_type = Option<VaultSdk>)]
293+
pub vault_sdk: Option<common_enums::VaultSdk>,
290294
}
291295

292296
#[derive(Clone, Debug, Deserialize, Serialize, ToSchema)]

crates/api_models/src/enums.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,14 @@ pub enum BillingConnectors {
175175
#[strum(serialize_all = "snake_case")]
176176
pub enum VaultConnectors {
177177
Vgs,
178+
HyperswitchVault,
178179
}
179180

180181
impl From<VaultConnectors> for Connector {
181182
fn from(value: VaultConnectors) -> Self {
182183
match value {
183184
VaultConnectors::Vgs => Self::Vgs,
185+
VaultConnectors::HyperswitchVault => Self::HyperswitchVault,
184186
}
185187
}
186188
}

0 commit comments

Comments
 (0)