Skip to content

Commit d6f7f3c

Browse files
srujanchikkeChikke SrujanChikke Srujanhyperswitch-bot[bot]
authored
feat(payouts): add country, currency filters for payout methods (#5130)
Signed-off-by: Chikke Srujan <[email protected]> Co-authored-by: Chikke Srujan <[email protected]> Co-authored-by: Chikke Srujan <[email protected]> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
1 parent 6f754ea commit d6f7f3c

File tree

12 files changed

+140
-37
lines changed

12 files changed

+140
-37
lines changed

config/config.example.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -578,8 +578,13 @@ logo = "https://app.hyperswitch.io/HyperswitchFavicon.png"
578578
merchant_name = "HyperSwitch"
579579
[generic_link.payout_link.enabled_payment_methods]
580580
card = "credit,debit"
581-
bank_transfer = "ach,bacs,sepa"
582-
wallet = "paypal,pix,venmo"
581+
582+
#Payout Method Filters Based on Country and Currency
583+
[payout_method_filters.adyenplatform]
584+
sepa = { country = "ES,SK,AT,NL,DE,BE,FR,FI,PT,IE,EE,LT,LV,IT,CZ,DE,HU,NO,PL,SE,GB,CH" , currency = "EUR,CZK,DKK,HUF,NOK,PLN,SEK,GBP,CHF" }
585+
586+
[payout_method_filters.stripe]
587+
ach = { country = "US", currency = "USD" }
583588

584589
[payment_link]
585590
sdk_url = "http://localhost:9090/0.16.7/v0/HyperLoader.js"

config/deployments/env_specific.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,6 @@ logo = "https://app.hyperswitch.io/HyperswitchFavicon.png"
179179
merchant_name = "HyperSwitch"
180180
[generic_link.payout_link.enabled_payment_methods]
181181
card = "credit,debit"
182-
bank_transfer = "ach,bacs,sepa"
183-
wallet = "paypal,pix,venmo"
184182

185183
[payment_link]
186184
sdk_url = "http://localhost:9090/0.16.7/v0/HyperLoader.js"

config/deployments/integration_test.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,12 @@ red_pagos = { country = "UY", currency = "UYU" }
308308
[pm_filters.zsl]
309309
local_bank_transfer = { country = "CN", currency = "CNY" }
310310

311+
[payout_method_filters.adyenplatform]
312+
sepa = { country = "ES,SK,AT,NL,DE,BE,FR,FI,PT,IE,EE,LT,LV,IT,CZ,DE,HU,NO,PL,SE,GB,CH" , currency = "EUR,CZK,DKK,HUF,NOK,PLN,SEK,GBP,CHF" }
313+
314+
[payout_method_filters.stripe]
315+
ach = { country = "US", currency = "USD" }
316+
311317
[temp_locker_enable_config]
312318
bluesnap.payment_method = "card"
313319
nuvei.payment_method = "card"

config/deployments/production.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,12 @@ red_pagos = { country = "UY", currency = "UYU" }
327327
[pm_filters.zsl]
328328
local_bank_transfer = { country = "CN", currency = "CNY" }
329329

330+
[payout_method_filters.adyenplatform]
331+
sepa = { country = "ES,SK,AT,NL,DE,BE,FR,FI,PT,IE,EE,LT,LV,IT,CZ,DE,HU,NO,PL,SE,GB,CH" , currency = "EUR,CZK,DKK,HUF,NOK,PLN,SEK,GBP,CHF" }
332+
333+
[payout_method_filters.stripe]
334+
ach = { country = "US", currency = "USD" }
335+
330336
[temp_locker_enable_config]
331337
bluesnap.payment_method = "card"
332338
nuvei.payment_method = "card"

config/deployments/sandbox.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -331,6 +331,12 @@ red_pagos = { country = "UY", currency = "UYU" }
331331
[pm_filters.zsl]
332332
local_bank_transfer = { country = "CN", currency = "CNY" }
333333

334+
[payout_method_filters.adyenplatform]
335+
sepa = { country = "ES,SK,AT,NL,DE,BE,FR,FI,PT,IE,EE,LT,LV,IT,CZ,DE,HU,NO,PL,SE,GB,CH" , currency = "EUR,CZK,DKK,HUF,NOK,PLN,SEK,GBP,CHF" }
336+
337+
[payout_method_filters.stripe]
338+
ach = { country = "US", currency = "USD" }
339+
334340
[temp_locker_enable_config]
335341
bluesnap.payment_method = "card"
336342
nuvei.payment_method = "card"

config/development.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,8 +591,12 @@ logo = "https://app.hyperswitch.io/HyperswitchFavicon.png"
591591
merchant_name = "HyperSwitch"
592592
[generic_link.payout_link.enabled_payment_methods]
593593
card = "credit,debit"
594-
bank_transfer = "ach,bacs,sepa"
595-
wallet = "paypal,pix,venmo"
594+
595+
[payout_method_filters.adyenplatform]
596+
sepa = { country = "ES,SK,AT,NL,DE,BE,FR,FI,PT,IE,EE,LT,LV,IT,CZ,DE,HU,NO,PL,SE,GB,CH" , currency = "EUR,CZK,DKK,HUF,NOK,PLN,SEK,GBP,CHF" }
597+
598+
[payout_method_filters.stripe]
599+
ach = { country = "US", currency = "USD" }
596600

597601
[payment_link]
598602
sdk_url = "http://localhost:9050/HyperLoader.js"

config/docker_compose.toml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,5 +543,9 @@ logo = "https://app.hyperswitch.io/HyperswitchFavicon.png"
543543
merchant_name = "HyperSwitch"
544544
[generic_link.payout_link.enabled_payment_methods]
545545
card = "credit,debit"
546-
bank_transfer = "ach,bacs,sepa"
547-
wallet = "paypal,pix,venmo"
546+
547+
[payout_method_filters.adyenplatform]
548+
sepa = { country = "ES,SK,AT,NL,DE,BE,FR,FI,PT,IE,EE,LT,LV,IT,CZ,DE,HU,NO,PL,SE,GB,CH" , currency = "EUR,CZK,DKK,HUF,NOR,PLN,SEK,GBP,CHF" }
549+
550+
[payout_method_filters.stripe]
551+
ach = { country = "US", currency = "USD" }

crates/connector_configs/toml/development.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2705,10 +2705,6 @@ api_key="Api Key"
27052705
payment_method_type = "CartesBancaires"
27062706
[[adyen_payout.debit]]
27072707
payment_method_type = "UnionPay"
2708-
[[adyen_payout.bank_transfer]]
2709-
payment_method_type = "ach"
2710-
[[adyen_payout.bank_transfer]]
2711-
payment_method_type = "bacs"
27122708
[[adyen_payout.bank_transfer]]
27132709
payment_method_type = "sepa"
27142710
[[adyen_payout.wallet]]

crates/connector_configs/toml/sandbox.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2706,10 +2706,6 @@ api_key="Api Key"
27062706
payment_method_type = "CartesBancaires"
27072707
[[adyen_payout.debit]]
27082708
payment_method_type = "UnionPay"
2709-
[[adyen_payout.bank_transfer]]
2710-
payment_method_type = "ach"
2711-
[[adyen_payout.bank_transfer]]
2712-
payment_method_type = "bacs"
27132709
[[adyen_payout.bank_transfer]]
27142710
payment_method_type = "sepa"
27152711
[[adyen_payout.wallet]]

crates/router/src/configs/secrets_transformers.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ pub(crate) async fn fetch_raw_secrets(
349349
jwekey,
350350
webhooks: conf.webhooks,
351351
pm_filters: conf.pm_filters,
352+
payout_method_filters: conf.payout_method_filters,
352353
bank_config: conf.bank_config,
353354
api_keys,
354355
file_storage: conf.file_storage,

0 commit comments

Comments
 (0)