Skip to content

Commit 6189efe

Browse files
committed
Merge branch 'main' of github.com:juspay/hyperswitch into connector/facilitapay-pix-pmt
* 'main' of github.com:juspay/hyperswitch: fix(connector): revert noon-paypal (#7864) refactor(cypress): do not update `card_expiry` while updating card info (#7834) feat(vsaas): add processor_merchant_id and created_by column in payment_intents and payments_attempts for v1 (#7768) chore(dynamic-fields): remove billing details as required fields for Worldpay connector (#7853) feat(dynamic_routing): integration of elimination routing for core flows (#6816) chore(version): 2025.04.22.0 revert: fix(connector): [noon] address `next_action_url` being `null` for cards in 3ds payment (#7859) feat(dynamic_routing): add open router integration for success based routing (#7795) feat(refunds_v2): Add refund create core flow (#7619) fix(core): [CARD TESTING GUARD] Added Card Testing Guard Config response in case of NULL (#7478)
2 parents 2e8341f + 776bde0 commit 6189efe

File tree

81 files changed

+3077
-894
lines changed

Some content is hidden

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

81 files changed

+3077
-894
lines changed

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,32 @@
22

33
All notable changes to HyperSwitch will be documented here.
44

5+
- - -
6+
7+
## 2025.04.22.0
8+
9+
### Features
10+
11+
- **dynamic_routing:** Add open router integration for success based routing ([#7795](https://github.com/juspay/hyperswitch/pull/7795)) ([`a51c9f0`](https://github.com/juspay/hyperswitch/commit/a51c9f039ffc02f4880a301d8453d98dc90df1e1))
12+
- **refunds_v2:** Add refund create core flow ([#7619](https://github.com/juspay/hyperswitch/pull/7619)) ([`eabef32`](https://github.com/juspay/hyperswitch/commit/eabef328c665cfbaf953a5eb15bd15484c62dcf7))
13+
14+
### Bug Fixes
15+
16+
- **connector:** [noon] address `next_action_url` being `null` for cards in 3ds payment ([#7832](https://github.com/juspay/hyperswitch/pull/7832)) ([`662e45f`](https://github.com/juspay/hyperswitch/commit/662e45f0037c0aa039c1de72500c6004322f3ffb))
17+
- **core:** [CARD TESTING GUARD] Added Card Testing Guard Config response in case of NULL ([#7478](https://github.com/juspay/hyperswitch/pull/7478)) ([`73eb467`](https://github.com/juspay/hyperswitch/commit/73eb467d32a0cabb6e27c25dd084aea6bb38e861))
18+
19+
### Refactors
20+
21+
- **middleware:** Add middleware to record metrics for request count and duration ([#7803](https://github.com/juspay/hyperswitch/pull/7803)) ([`54a1719`](https://github.com/juspay/hyperswitch/commit/54a1719fe6aaabf22d5696606c1458ec1f49f037))
22+
- **required_fields:** Move pm required fields to pm crate ([#7539](https://github.com/juspay/hyperswitch/pull/7539)) ([`103a5c1`](https://github.com/juspay/hyperswitch/commit/103a5c182b9744faf27d367efd58fac669d5c2ba))
23+
24+
### Revert
25+
26+
- Fix(connector): [noon] address `next_action_url` being `null` for cards in 3ds payment ([#7859](https://github.com/juspay/hyperswitch/pull/7859)) ([`c89a412`](https://github.com/juspay/hyperswitch/commit/c89a4121a3450d5c8c613dbcbedb846cb9bfd176))
27+
28+
**Full Changelog:** [`2025.04.18.0...2025.04.22.0`](https://github.com/juspay/hyperswitch/compare/2025.04.18.0...2025.04.22.0)
29+
30+
531
- - -
632

733
## 2025.04.18.0

api-reference-v2/openapi_spec.json

Lines changed: 12 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -20394,82 +20394,6 @@
2039420394
}
2039520395
}
2039620396
},
20397-
"RefundRequest": {
20398-
"type": "object",
20399-
"required": [
20400-
"payment_id"
20401-
],
20402-
"properties": {
20403-
"payment_id": {
20404-
"type": "string",
20405-
"description": "The payment id against which refund is to be initiated",
20406-
"example": "pay_mbabizu24mvu3mela5njyhpit4",
20407-
"maxLength": 30,
20408-
"minLength": 30
20409-
},
20410-
"refund_id": {
20411-
"type": "string",
20412-
"description": "Unique Identifier for the Refund. This is to ensure idempotency for multiple partial refunds initiated against the same payment. If this is not passed by the merchant, this field shall be auto generated and provided in the API response. It is recommended to generate uuid(v4) as the refund_id.",
20413-
"example": "ref_mbabizu24mvu3mela5njyhpit4",
20414-
"nullable": true,
20415-
"maxLength": 30,
20416-
"minLength": 30
20417-
},
20418-
"merchant_id": {
20419-
"type": "string",
20420-
"description": "The identifier for the Merchant Account",
20421-
"example": "y3oqhf46pyzuxjbcn2giaqnb44",
20422-
"nullable": true,
20423-
"maxLength": 255
20424-
},
20425-
"amount": {
20426-
"type": "integer",
20427-
"format": "int64",
20428-
"description": "Total amount for which the refund is to be initiated. Amount for the payment in lowest denomination of the currency. (i.e) in cents for USD denomination, in paisa for INR denomination etc., If not provided, this will default to the full payment amount",
20429-
"example": 6540,
20430-
"nullable": true,
20431-
"minimum": 100
20432-
},
20433-
"reason": {
20434-
"type": "string",
20435-
"description": "Reason for the refund. Often useful for displaying to users and your customer support executive. In case the payment went through Stripe, this field needs to be passed with one of these enums: `duplicate`, `fraudulent`, or `requested_by_customer`",
20436-
"example": "Customer returned the product",
20437-
"nullable": true,
20438-
"maxLength": 255
20439-
},
20440-
"refund_type": {
20441-
"allOf": [
20442-
{
20443-
"$ref": "#/components/schemas/RefundType"
20444-
}
20445-
],
20446-
"default": "Instant",
20447-
"nullable": true
20448-
},
20449-
"metadata": {
20450-
"type": "object",
20451-
"description": "You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.",
20452-
"nullable": true
20453-
},
20454-
"merchant_connector_details": {
20455-
"allOf": [
20456-
{
20457-
"$ref": "#/components/schemas/MerchantConnectorDetailsWrap"
20458-
}
20459-
],
20460-
"nullable": true
20461-
},
20462-
"split_refunds": {
20463-
"allOf": [
20464-
{
20465-
"$ref": "#/components/schemas/SplitRefund"
20466-
}
20467-
],
20468-
"nullable": true
20469-
}
20470-
},
20471-
"additionalProperties": false
20472-
},
2047320397
"RefundResponse": {
2047420398
"type": "object",
2047520399
"required": [
@@ -20572,7 +20496,7 @@
2057220496
},
2057320497
"RefundType": {
2057420498
"type": "string",
20575-
"description": "To indicate whether to refund needs to be instant or scheduled",
20499+
"description": "To indicate whether the refund needs to be instant or scheduled",
2057620500
"enum": [
2057720501
"scheduled",
2057820502
"instant"
@@ -20599,7 +20523,8 @@
2059920523
"RefundsCreateRequest": {
2060020524
"type": "object",
2060120525
"required": [
20602-
"payment_id"
20526+
"payment_id",
20527+
"merchant_reference_id"
2060320528
],
2060420529
"properties": {
2060520530
"payment_id": {
@@ -20611,11 +20536,17 @@
2061120536
},
2061220537
"merchant_reference_id": {
2061320538
"type": "string",
20614-
"description": "Unique Identifier for the Refund. This is to ensure idempotency for multiple partial refunds initiated against the same payment.",
20539+
"description": "Unique Identifier for the Refund given by the Merchant.",
2061520540
"example": "ref_mbabizu24mvu3mela5njyhpit4",
20541+
"maxLength": 64,
20542+
"minLength": 1
20543+
},
20544+
"merchant_id": {
20545+
"type": "string",
20546+
"description": "The identifier for the Merchant Account",
20547+
"example": "y3oqhf46pyzuxjbcn2giaqnb44",
2061620548
"nullable": true,
20617-
"maxLength": 30,
20618-
"minLength": 30
20549+
"maxLength": 255
2061920550
},
2062020551
"amount": {
2062120552
"type": "integer",

config/config.example.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -584,9 +584,6 @@ debit = { country = "US,CA", currency = "USD" }
584584
[pm_filters.volt]
585585
open_banking_uk = { country = "DE,GB,AT,BE,CY,EE,ES,FI,FR,GR,HR,IE,IT,LT,LU,LV,MT,NL,PT,SI,SK,BG,CZ,DK,HU,NO,PL,RO,SE,AU,BR", currency = "EUR,GBP,DKK,NOK,PLN,SEK,AUD,BRL" }
586586

587-
[pm_filters.noon]
588-
paypal = { country = "AU,NZ,CN,JP,HK,MY,TH,KR,PH,ID,AE,KW,BR,ES,GB,SE,NO,SK,AT,NL,DE,HU,CY,LU,CH,BE,FR,DK,FI,RO,HR,UA,MT,SI,GI,PT,IE,CZ,EE,LT,LV,IT,PL,IS,CA,US", currency = "AUD,BRL,CAD,CZK,DKK,EUR,HKD,HUF,INR,JPY,MYR,MXN,NZD,NOK,PHP,PLN,RUB,GBP,SGD,SEK,CHF,THB,USD,AED,SAR"}
589-
590587
[pm_filters.razorpay]
591588
upi_collect = { country = "IN", currency = "INR" }
592589

@@ -989,4 +986,8 @@ primary_color = "#006DF9"
989986
background_color = "#FFFFFF" # Email background color
990987

991988
[billing_connectors_payment_sync]
992-
billing_connectors_which_require_payment_sync = "stripebilling, recurly" # List of billing connectors which has payment sync api call
989+
billing_connectors_which_require_payment_sync = "stripebilling, recurly" # List of billing connectors which has payment sync api call
990+
991+
[open_router]
992+
enabled = true # Enable or disable Open Router
993+
url = "http://localhost:8080" # Open Router URL

config/deployments/integration_test.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,9 +461,6 @@ paypal = { country = "AD,AE,AL,AM,AR,AT,AU,AZ,BA,BB,BD,BE,BG,BH,BI,BM,BN,BO,BR,B
461461
[pm_filters.volt]
462462
open_banking_uk = {country = "DE,GB,AT,BE,CY,EE,ES,FI,FR,GR,HR,IE,IT,LT,LU,LV,MT,NL,PT,SI,SK,BG,CZ,DK,HU,NO,PL,RO,SE,AU,BR", currency = "EUR,GBP,DKK,NOK,PLN,SEK,AUD,BRL"}
463463

464-
[pm_filters.noon]
465-
paypal = { country = "AU,NZ,CN,JP,HK,MY,TH,KR,PH,ID,AE,KW,BR,ES,GB,SE,NO,SK,AT,NL,DE,HU,CY,LU,CH,BE,FR,DK,FI,RO,HR,UA,MT,SI,GI,PT,IE,CZ,EE,LT,LV,IT,PL,IS,CA,US", currency = "AUD,BRL,CAD,CZK,DKK,EUR,HKD,HUF,INR,JPY,MYR,MXN,NZD,NOK,PHP,PLN,RUB,GBP,SGD,SEK,CHF,THB,USD,AED,SAR"}
466-
467464
[pm_filters.razorpay]
468465
upi_collect = {country = "IN", currency = "INR"}
469466

config/deployments/production.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -475,9 +475,6 @@ ach = { country = "US", currency = "USD" }
475475
[pm_filters.volt]
476476
open_banking_uk = {country = "DE,GB,AT,BE,CY,EE,ES,FI,FR,GR,HR,IE,IT,LT,LU,LV,MT,NL,PT,SI,SK,BG,CZ,DK,HU,NO,PL,RO,SE,AU,BR", currency = "EUR,GBP,DKK,NOK,PLN,SEK,AUD,BRL"}
477477

478-
[pm_filters.noon]
479-
paypal = { country = "AU,NZ,CN,JP,HK,MY,TH,KR,PH,ID,AE,KW,BR,ES,GB,SE,NO,SK,AT,NL,DE,HU,CY,LU,CH,BE,FR,DK,FI,RO,HR,UA,MT,SI,GI,PT,IE,CZ,EE,LT,LV,IT,PL,IS,CA,US", currency = "AUD,BRL,CAD,CZK,DKK,EUR,HKD,HUF,INR,JPY,MYR,MXN,NZD,NOK,PHP,PLN,RUB,GBP,SGD,SEK,CHF,THB,USD,AED,SAR"}
480-
481478
[pm_filters.razorpay]
482479
upi_collect = {country = "IN", currency = "INR"}
483480

config/deployments/sandbox.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -477,9 +477,6 @@ ach = { country = "US", currency = "USD" }
477477
[pm_filters.volt]
478478
open_banking_uk = { country = "DE,GB,AT,BE,CY,EE,ES,FI,FR,GR,HR,IE,IT,LT,LU,LV,MT,NL,PT,SI,SK,BG,CZ,DK,HU,NO,PL,RO,SE,AU,BR", currency = "EUR,GBP,DKK,NOK,PLN,SEK,AUD,BRL" }
479479

480-
[pm_filters.noon]
481-
paypal = { country = "AU,NZ,CN,JP,HK,MY,TH,KR,PH,ID,AE,KW,BR,ES,GB,SE,NO,SK,AT,NL,DE,HU,CY,LU,CH,BE,FR,DK,FI,RO,HR,UA,MT,SI,GI,PT,IE,CZ,EE,LT,LV,IT,PL,IS,CA,US", currency = "AUD,BRL,CAD,CZK,DKK,EUR,HKD,HUF,INR,JPY,MYR,MXN,NZD,NOK,PHP,PLN,RUB,GBP,SGD,SEK,CHF,THB,USD,AED,SAR"}
482-
483480
[pm_filters.razorpay]
484481
upi_collect = {country = "IN", currency = "INR"}
485482

config/development.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -434,9 +434,6 @@ ach = { country = "US", currency = "USD" }
434434
[pm_filters.volt]
435435
open_banking_uk = { country = "DE,GB,AT,BE,CY,EE,ES,FI,FR,GR,HR,IE,IT,LT,LU,LV,MT,NL,PT,SI,SK,BG,CZ,DK,HU,NO,PL,RO,SE,AU,BR", currency = "EUR,GBP,DKK,NOK,PLN,SEK,AUD,BRL" }
436436

437-
[pm_filters.noon]
438-
paypal = { country = "AU,NZ,CN,JP,HK,MY,TH,KR,PH,ID,AE,KW,BR,ES,GB,SE,NO,SK,AT,NL,DE,HU,CY,LU,CH,BE,FR,DK,FI,RO,HR,UA,MT,SI,GI,PT,IE,CZ,EE,LT,LV,IT,PL,IS,CA,US", currency = "AUD,BRL,CAD,CZK,DKK,EUR,HKD,HUF,INR,JPY,MYR,MXN,NZD,NOK,PHP,PLN,RUB,GBP,SGD,SEK,CHF,THB,USD,AED,SAR"}
439-
440437
[pm_filters.razorpay]
441438
upi_collect = { country = "IN", currency = "INR" }
442439

@@ -1016,7 +1013,7 @@ connector_list = "cybersource"
10161013

10171014
[grpc_client.dynamic_routing_client]
10181015
host = "localhost"
1019-
port = 7000
1016+
port = 8000
10201017
service = "dynamo"
10211018

10221019
[theme.storage]
@@ -1031,3 +1028,7 @@ background_color = "#FFFFFF"
10311028

10321029
[platform]
10331030
enabled = true
1031+
1032+
[open_router]
1033+
enabled = false
1034+
url = "http://localhost:8080"

config/docker_compose.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -486,9 +486,6 @@ debit = { country = "US,CA", currency = "USD" }
486486
[pm_filters.volt]
487487
open_banking_uk = { country = "DE,GB,AT,BE,CY,EE,ES,FI,FR,GR,HR,IE,IT,LT,LU,LV,MT,NL,PT,SI,SK,BG,CZ,DK,HU,NO,PL,RO,SE,AU,BR", currency = "EUR,GBP,DKK,NOK,PLN,SEK,AUD,BRL" }
488488

489-
[pm_filters.noon]
490-
paypal = { country = "AU,NZ,CN,JP,HK,MY,TH,KR,PH,ID,AE,KW,BR,ES,GB,SE,NO,SK,AT,NL,DE,HU,CY,LU,CH,BE,FR,DK,FI,RO,HR,UA,MT,SI,GI,PT,IE,CZ,EE,LT,LV,IT,PL,IS,CA,US", currency = "AUD,BRL,CAD,CZK,DKK,EUR,HKD,HUF,INR,JPY,MYR,MXN,NZD,NOK,PHP,PLN,RUB,GBP,SGD,SEK,CHF,THB,USD,AED,SAR"}
491-
492489
[pm_filters.razorpay]
493490
upi_collect = { country = "IN", currency = "INR" }
494491

@@ -816,9 +813,9 @@ enabled = false
816813
global_tenant = { tenant_id = "global", schema = "public", redis_key_prefix = "", clickhouse_database = "default" }
817814

818815
[multitenancy.tenants.public]
819-
base_url = "http://localhost:8080"
820-
schema = "public"
821-
accounts_schema = "public"
816+
base_url = "http://localhost:8080"
817+
schema = "public"
818+
accounts_schema = "public"
822819
redis_key_prefix = ""
823820
clickhouse_database = "default"
824821

@@ -902,3 +899,6 @@ background_color = "#FFFFFF"
902899

903900
[platform]
904901
enabled = true
902+
903+
[open_router]
904+
enabled = false

crates/api_models/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ olap = []
1717
openapi = ["common_enums/openapi", "olap", "recon", "dummy_connector", "olap"]
1818
recon = []
1919
v1 = ["common_utils/v1"]
20-
v2 = ["common_types/v2", "common_utils/v2", "customer_v2"]
20+
v2 = ["common_types/v2", "common_utils/v2", "customer_v2", "refunds_v2"]
2121
customer_v2 = ["common_utils/customer_v2"]
2222
payment_methods_v2 = ["common_utils/payment_methods_v2"]
23+
refunds_v2 = []
2324
dynamic_routing = []
2425
control_center_theme = ["dep:actix-web", "dep:actix-multipart"]
2526
revenue_recovery = []

crates/api_models/src/events/refund.rs

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
use common_utils::events::{ApiEventMetric, ApiEventsType};
22

3+
#[cfg(feature = "v1")]
4+
use crate::refunds::RefundRequest;
5+
#[cfg(feature = "v2")]
6+
use crate::refunds::RefundsCreateRequest;
37
use crate::refunds::{
48
RefundAggregateResponse, RefundListFilters, RefundListMetaData, RefundListRequest,
5-
RefundListResponse, RefundManualUpdateRequest, RefundRequest, RefundResponse,
6-
RefundUpdateRequest, RefundsRetrieveRequest,
9+
RefundListResponse, RefundManualUpdateRequest, RefundResponse, RefundUpdateRequest,
10+
RefundsRetrieveRequest,
711
};
812

913
#[cfg(feature = "v1")]
@@ -19,6 +23,13 @@ impl ApiEventMetric for RefundRequest {
1923
}
2024
}
2125

26+
#[cfg(feature = "v2")]
27+
impl ApiEventMetric for RefundsCreateRequest {
28+
fn get_api_event_type(&self) -> Option<ApiEventsType> {
29+
None
30+
}
31+
}
32+
2233
#[cfg(feature = "v1")]
2334
impl ApiEventMetric for RefundResponse {
2435
fn get_api_event_type(&self) -> Option<ApiEventsType> {

0 commit comments

Comments
 (0)