Dataset Viewer
prompt
stringlengths 24
70.5k
| response
stringlengths 271
16.7k
| metadata
stringlengths 145
152
|
|---|---|---|
feat(analytics): add `sessionized_metrics` for disputes (backwards compatibility)
## Current Behaviour
- There is no `sessionized_metrics` module for disputes like there is for `payments` and `payment_intents`
## Proposed Changes
- create `sessionized_metrics` module for disputes
|
<think>
PR Context:
- Title: feat(analytics): add `sessionized_metrics` for disputes analytics
- Merged: 2024-11-26T13:58:33Z
- Files changed: 13 files
- Commits: 6 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [x] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
- Add sessionized metrics module and implement backwards compatibility.
- Add the `sessionizer_dispute` table support for Sessionized metrics.
### Fixes #6572
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(analytics): add `sessionized_metrics` for disputes analytics (#6573)
Co-authored-by: hyperswitc
Files to modify:
**crates/analytics/src/clickhouse.rs**
Modify existing code
**crates/analytics/src/disputes/accumulators.rs**
Modify existing code
**crates/analytics/src/disputes/core.rs**
Modify existing code
**crates/analytics/src/disputes/metrics.rs**
Add:
- mod: private::sessionized_metrics
**crates/analytics/src/disputes/metrics/sessionized_metrics/dispute_status_metric.rs**
Add:
- function: private::load_metrics
- struct: pub::DisputeStatusMetric
- impl: impl super::DisputeMetric<T> for DisputeStatusMetric
**crates/analytics/src/disputes/metrics/sessionized_metrics/mod.rs**
Add:
- mod: private::dispute_status_metric
- mod: private::total_amount_disputed
- mod: private::total_dispute_lost_amount
**crates/analytics/src/disputes/metrics/sessionized_metrics/total_amount_disputed.rs**
Add:
- function: private::load_metrics
- struct: pub::TotalAmountDisputed
- impl: impl super::DisputeMetric<T> for TotalAmountDisputed
**crates/analytics/src/disputes/metrics/sessionized_metrics/total_dispute_lost_amount.rs**
Add:
- function: private::load_metrics
- struct: pub::TotalDisputeLostAmount
- impl: impl super::DisputeMetric<T> for TotalDisputeLostAmount
**crates/analytics/src/sqlx.rs**
Modify existing code
**crates/analytics/src/types.rs**
Modify existing code
**crates/api_models/src/analytics.rs**
Add:
- struct: pub::DisputesAnalyticsMetadata
- struct: pub::DisputesMetricsResponse
**crates/api_models/src/analytics/disputes.rs**
Modify existing code
**crates/api_models/src/events.rs**
Add:
- function: private::get_api_event_type
- impl: impl ApiEventMetric for DisputesMetricsResponse<T>
|
{"issue_number": 6572, "pr_number": 6573, "commits_count": 1, "files_changed": 13, "response_length": 2614, "file_count": 15, "needs_breakdown": false}
|
[FEATURE] add tokenization action handling to payment flow in v2
### Feature Description
This feature add connector-level tokenization to Hyperswitch V2, allowing secure storage of card data as tokens at payment connectors like Braintree.
### Possible Implementation
For connector-level tokenization:
1.When a payment comes with raw card data and the connector supports tokenization, send the card details to the connector’s tokenization API.
2. Receive the tokenized payment method ID.
3. Use the token for the subsequent authorization or capture call.
### Have you spent some time checking if this feature request has been raised before?
- [x] I checked and didn't find a similar issue
### Have you read the Contributing Guidelines?
- [x] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### Are you willing to submit a PR?
Yes, I am willing to submit a PR!
|
<think>
PR Context:
- Title: feat(payments): add tokenization action handling to payment flow for braintree
- Merged: 2025-09-30T08:07:13Z
- Files changed: 3 files
- Commits: 5 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [X] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
This feature add connector-level tokenization to Hyperswitch V2, allowing secure storage of card data as tokens at payment connectors like Braintree.
Additionally Tokenization in router is not implemented, because of temp locker mechanism whi
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(payments): add tokenization action handling to payment flow for braintree (#9506)
Files to modify:
**crates/router/src/core/payments.rs**
Add:
- function: private::is_payment_method_tokenization_enabled_for_connector
- function: private::is_payment_flow_allowed_for_connector
- enum: pub::TokenizationAction
**crates/router/src/core/payments/operations.rs**
Add:
- function: private::get_connector_tokenization_action
**crates/router/src/core/payments/operations/payment_confirm_intent.rs**
Add:
- function: private::get_connector_tokenization_action
|
{"issue_number": 9501, "pr_number": 9506, "commits_count": 1, "files_changed": 3, "response_length": 1396, "file_count": 5, "needs_breakdown": false}
|
chore(codeowners): add codeowners data for PR reviews
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
## Description
Adding a CODEOWNERS file for facilitating PR reviews for teams
### Additional Changes
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!-- Provide links to the files with corresponding changes -->
## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless its an obvious bug or documentation fix
that will have little conversation).
-->
This leads to better ownership boundaries & increased efficiency for reviewers
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
Doesn't need to be tested
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
|
<think>
PR Context:
- Title: feat(core): Add click to pay support in hyperswitch
- Merged: 2024-12-16T14:25:44Z
- Files changed: 30 files
- Commits: 30 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] New feature
## Description
<!-- Describe your changes in detail -->
Add click to pay and unified authentication service integration in core
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
check payments sanity
#1 : Create Business profile with `"is_click_to_pay_enabled": true`
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(core): Add click to pay support in hyperswitch (#6769)
Co-authored-by: sai-harsha-vardhan <hars
Files to modify:
**crates/api_models/src/connector_enums.rs**
Modify existing code
**crates/common_enums/src/enums.rs**
Modify existing code
**crates/connector_configs/src/connector.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors.rs**
Add:
- mod: pub::ctp_mastercard
**crates/hyperswitch_connectors/src/connectors/ctp_mastercard.rs**
Add:
- function: private::build_headers
- function: private::id
- function: private::base_url
- function: private::get_webhook_object_reference_id
- function: private::get_webhook_event_type
- function: private::get_webhook_resource_object
- struct: pub::CtpMastercard
- impl: impl api::Payment for CtpMastercard
- impl: impl api::PaymentSession for CtpMastercard
- impl: impl api::ConnectorAccessToken for CtpMastercard
- impl: impl api::MandateSetup for CtpMastercard
- impl: impl api::PaymentAuthorize for CtpMastercard
- impl: impl api::PaymentSync for CtpMastercard
- impl: impl api::PaymentCapture for CtpMastercard
- impl: impl api::PaymentVoid for CtpMastercard
- impl: impl api::Refund for CtpMastercard
- impl: impl api::RefundExecute for CtpMastercard
- impl: impl api::RefundSync for CtpMastercard
- impl: impl api::PaymentToken for CtpMastercard
- impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for CtpMastercard
- impl: impl ConnectorCommonExt<Flow, Request, Response> for CtpMastercard
- impl: impl ConnectorCommon for CtpMastercard
- impl: impl ConnectorValidation for CtpMastercard
- impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for CtpMastercard
- impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for CtpMastercard
- impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for CtpMastercard
- impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for CtpMastercard
- impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for CtpMastercard
- impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for CtpMastercard
- impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for CtpMastercard
- impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for CtpMastercard
- impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for CtpMastercard
- impl: impl webhooks::IncomingWebhook for CtpMastercard
**crates/hyperswitch_connectors/src/connectors/unified_authentication_service.rs**
Remove:
- function: private::get_auth_header
- function: private::get_headers
- function: private::get_content_type
- impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for unified_authentication_service::UnifiedAuthenticationServicePaymentsRequest::try_from(
req: &PaymentsAuthorizeRouterData,
.url(&types::PaymentsAuthorizeType::get_url(
.headers(types::PaymentsAuthorizeType::get_headers(
.set_body(types::PaymentsAuthorizeType::get_request_body(
data: &PaymentsAuthorizeRouterData,
) -> CustomResult<PaymentsAuthorizeRouterData, errors::ConnectorError> {
let response: unified_authentication_service::UnifiedAuthenticationServicePaymentsResponse =
.parse_struct("UnifiedAuthenticationService PaymentsAuthorizeResponse")
impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData>
for UnifiedAuthenticationService
req: &PaymentsSyncRouterData,
_req: &PaymentsSyncRouterData,
_connectors: &Connectors,
) -> CustomResult<String, errors::ConnectorError> {
Err(errors::ConnectorError::NotImplemented("get_url method".to_string()).into())
}
fn build_request(
&self,
req: &PaymentsSyncRouterData,
connectors: &Connectors,
) -> CustomResult<Option<Request>, errors::ConnectorError> {
Ok(Some(
RequestBuilder::new()
.method(Method::Get)
.url(&types::PaymentsSyncType::get_url(self, req, connectors)?)
.attach_default_headers()
.headers(types::PaymentsSyncType::get_headers(self, req, connectors)?)
.build(),
))
}
fn handle_response(
&self,
data: &PaymentsSyncRouterData,
event_builder: Option<&mut ConnectorEvent>,
res: Response,
) -> CustomResult<PaymentsSyncRouterData, errors::ConnectorError> {
let response: unified_authentication_service::UnifiedAuthenticationServicePaymentsResponse =
res.response
.parse_struct("unified_authentication_service PaymentsSyncResponse")
.change_context(errors::ConnectorError::ResponseDeserializationFailed)?;
event_builder.map(|i| i.set_response_body(&response));
router_env::logger::info!(connector_response=?response);
RouterData::try_from(ResponseRouterData {
response,
data: data.clone(),
http_code: res.status_code,
})
}
fn get_error_response(
&self,
res: Response,
event_builder: Option<&mut ConnectorEvent>,
) -> CustomResult<ErrorResponse, errors::ConnectorError>
- impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for UnifiedAuthenticationService
Add:
- impl: impl api::UnifiedAuthenticationService for UnifiedAuthenticationService
- impl: impl api::UasPreAuthentication for UnifiedAuthenticationService
- impl: impl api::UasPostAuthentication for UnifiedAuthenticationService
**crates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs**
Remove:
- function: private::from
- function: private::from
- struct: pub::UnifiedAuthenticationServicePaymentsRequest
- struct: pub::UnifiedAuthenticationServicePaymentsResponse
- enum: pub::UnifiedAuthenticationServicePaymentStatus
- impl: impl From<(StringMinorUnit, T)> for UnifiedAuthenticationServiceRouterData<T>
- impl: impl From<UnifiedAuthenticationServicePaymentStatus> for common_enums::AttemptStatus
Add:
- struct: pub::UnifiedAuthenticationServicePreAuthenticateRequest
- struct: pub::PaymentDetails
- struct: pub::TransactionDetails
- struct: pub::ThreeDSData
- struct: pub::Acquirer
- struct: pub::BrowserInfo
- struct: pub::AuthenticationInfo
- struct: pub::CtpServiceDetails
- struct: pub::ServiceSessionIds
- struct: pub::MerchantDetails
- struct: pub::Address
- enum: pub::AuthType
**crates/hyperswitch_connectors/src/constants.rs**
Modify existing code
**crates/hyperswitch_connectors/src/default_implementations.rs**
Modify existing code
**crates/hyperswitch_connectors/src/default_implementations_v2.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/payment_method_data.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/router_flow_types.rs**
Add:
- mod: pub::unified_authentication_service
**crates/hyperswitch_domain_models/src/router_flow_types/unified_authentication_service.rs**
Add:
- struct: pub::PreAuthenticate
- struct: pub::PostAuthenticate
**crates/hyperswitch_domain_models/src/router_request_types/unified_authentication_service.rs**
Remove:
- struct: pub::UasPostAuthenticationRequestData
Add:
- struct: pub::UasPostAuthenticationRequestData
**crates/hyperswitch_domain_models/src/types.rs**
Modify existing code
**crates/hyperswitch_interfaces/src/api.rs**
Add:
- trait: pub::UnifiedAuthenticationService
- trait: pub::UasPreAuthentication
- trait: pub::UasPostAuthentication
- trait: pub::UnifiedAuthenticationServiceV2
- trait: pub::UasPreAuthenticationV2
- trait: pub::UasPostAuthenticationV2
**crates/hyperswitch_interfaces/src/configs.rs**
Add:
- function: pub::validate
- struct: pub::NoParams
- impl: impl NoParams
**crates/hyperswitch_interfaces/src/types.rs**
Modify existing code
**crates/router/src/connector.rs**
Modify existing code
**crates/router/src/connector/adyen/transformers.rs**
Remove:
- function: private::get_optional_shopper_email
Add:
- function: private::try_from
- function: private::try_from
- impl: impl TryFrom<(&domain::NetworkTokenData, Option<Secret<String>>)> for AdyenPaymentMethod<'_>
- impl: impl TryFrom<(
&AdyenRouterData<&types::PaymentsAuthorizeRouterData>,
&domain::NetworkTokenData,
)> for AdyenPaymentRequest<'_>
**crates/router/src/core/admin.rs**
Modify existing code
**crates/router/src/core/payment_methods.rs**
Modify existing code
**crates/router/src/core/payment_methods/network_tokenization.rs**
Modify existing code
**crates/router/src/core/payments.rs**
Modify existing code
**crates/router/src/core/payments/connector_integration_v2_impls.rs**
Remove:
- impl: impl api::UasPreAuthenticationV2 for $connector
- impl: impl api::UasPostAuthenticationV2 for $connector
Add:
- impl: impl UasPreAuthenticationV2 for $connector
- impl: impl UasPostAuthenticationV2 for $connector
**crates/router/src/core/payments/flows.rs**
Remove:
- impl: impl api::UnifiedAuthenticationService for connector::DummyConnector<T>
**crates/router/src/core/payments/helpers.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_complete_authorize.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_confirm.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_create.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_update.rs**
Modify existing code
**crates/router/src/core/payments/transformers.rs**
Modify existing code
**crates/router/src/core/unified_authentication_service.rs**
Modify existing code
**crates/router/src/core/unified_authentication_service/transformers.rs**
Modify existing code
**crates/router/src/core/unified_authentication_service/types.rs**
Modify existing code
**crates/router/src/types/api.rs**
Remove:
- mod: pub::unified_authentication_service
- mod: pub::unified_authentication_service_v2
**crates/router/src/types/api/authentication.rs**
Modify existing code
**crates/router/src/types/api/unified_authentication_service.rs**
Remove:
- struct: pub::PreAuthenticate
- struct: pub::PostAuthenticate
- trait: pub::UnifiedAuthenticationService
- trait: pub::UasPreAuthentication
- trait: pub::UasPostAuthentication
**crates/router/src/types/api/unified_authentication_service_v2.rs**
Remove:
- trait: pub::UnifiedAuthenticationServiceV2
- trait: pub::UasPreAuthenticationV2
- trait: pub::UasPostAuthenticationV2
**crates/router/src/types/transformers.rs**
Modify existing code
|
{"issue_number": 1, "pr_number": 6769, "commits_count": 1, "files_changed": 30, "response_length": 11983, "file_count": 42, "needs_breakdown": true}
|
docs: Adding Unified error codes to the API - Ref
Adding Unified error codes to the API - Ref
|
<think>
PR Context:
- Title: docs(error_codes): add unified error codes
- Merged: 2024-10-15T14:02:06Z
- Files changed: 1 files
- Commits: 2 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [X] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
Helps closing - #6318
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 6318, "pr_number": 6319, "commits_count": 0, "files_changed": 1, "response_length": 772, "file_count": 0, "needs_breakdown": false}
|
[FEATURE] add payments get-intent API for v2
# Feature Description
Add payments `get-intent` API for v2
|
<think>
PR Context:
- Title: feat(router): Add payments get-intent API for v2
- Merged: 2024-10-30T16:28:52Z
- Files changed: 18 files
- Commits: 8 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Added `get-intent` API for payments
### Additional Changes
- [x] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(router): Add payments get-intent API for v2 (#6396)
Co-authored-by: hyperswitch-bot[bot] <14852
Files to modify:
**crates/api_models/src/events/payment.rs**
Remove:
- impl: impl ApiEventMetric for PaymentsCreateIntentResponse
Add:
- function: private::get_api_event_type
- impl: impl ApiEventMetric for PaymentsGetIntentRequest
- impl: impl ApiEventMetric for PaymentsIntentResponse
**crates/api_models/src/payments.rs**
Remove:
- struct: pub::PaymentsCreateIntentResponse
Add:
- struct: pub::PaymentsGetIntentRequest
- struct: pub::PaymentsIntentResponse
**crates/hyperswitch_domain_models/src/router_flow_types/payments.rs**
Remove:
- struct: pub::CreateIntent
Add:
- struct: pub::PaymentCreateIntent
- struct: pub::PaymentGetIntent
**crates/openapi/src/openapi_v2.rs**
Modify existing code
**crates/openapi/src/routes/payments.rs**
Add:
- function: pub::payments_get_intent
**crates/router/src/core/payments.rs**
Modify existing code
**crates/router/src/core/payments/operations.rs**
Remove:
- mod: pub::payment_confirm_intent
Add:
- mod: pub::payment_confirm_intent
- mod: pub::payment_get_intent
**crates/router/src/core/payments/operations/payment_get_intent.rs**
Add:
- function: private::to_validate_request
- function: private::to_get_tracker
- function: private::to_domain
- function: private::to_update_tracker
- function: private::to_validate_request
- function: private::to_get_tracker
- function: private::to_domain
- function: private::to_update_tracker
- function: private::get_trackers
- function: private::update_trackers
- function: private::validate_request
- function: private::get_customer_details
- function: private::make_pm_data
- function: private::get_connector
- function: private::guard_payment_against_blocklist
- struct: pub::PaymentGetIntent
- impl: impl Operation<F, PaymentsGetIntentRequest> for &PaymentGetIntent
- impl: impl Operation<F, PaymentsGetIntentRequest> for PaymentGetIntent
- impl: impl GetTracker<F, payments::PaymentIntentData<F>, PaymentsGetIntentRequest> for PaymentGetIntent
- impl: impl UpdateTracker<F, payments::PaymentIntentData<F>, PaymentsGetIntentRequest> for PaymentGetIntent
- impl: impl ValidateRequest<F, PaymentsGetIntentRequest, payments::PaymentIntentData<F>> for PaymentGetIntent
- impl: impl Domain<F, PaymentsGetIntentRequest, payments::PaymentIntentData<F>> for PaymentGetIntent
**crates/router/src/core/payments/transformers.rs**
Remove:
- impl: impl ToResponse<F, D, Op> for api::PaymentsCreateIntentResponse
Add:
- impl: impl ToResponse<F, D, Op> for api::PaymentsIntentResponse
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/routes/lock_utils.rs**
Modify existing code
**crates/router/src/routes/payments.rs**
Add:
- function: pub::payments_get_intent
**crates/router/src/services/api.rs**
Remove:
- impl: impl Authenticate for api_models::payments::PaymentsCreateIntentRequest
**crates/router/src/types/api/payments.rs**
Modify existing code
**crates/router_env/src/logger/types.rs**
Modify existing code
|
{"issue_number": 6395, "pr_number": 6396, "commits_count": 1, "files_changed": 18, "response_length": 4012, "file_count": 17, "needs_breakdown": true}
|
fix(connector): [AUTHORIZEDOTNET] customer id population fixed in authorize flow
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
Fixed customer ID population in the Authorize flow.
- Previously, when passing customer details for normal payments, the createConnectorCustomer flow correctly created the customer.
- However, in the `Authorize` flow, we were passing the payment_id as the customer_id. If the length validation failed, a random string was being passed instead.
- This resulted in a random string always being sent as the customer_id, which caused a new customer to be created on Authorize.NET’s dashboard for every transaction.
- As a result, duplicate customers were being created.
Fix:
- Updated the flow to pass the correct customer_id in the customer details instead of payment_id.
- This prevents duplicate customer creation on Authorize.NET.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->
## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless it is an obvious bug or documentation fix
that will have little conversation).
-->
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_HcJT7607MkJ2yANWr7PUgr8djox0jNozuRQSSW40guBXj5RQnH0CPKvbtjZ4MKBA' \
--data-raw '
{
"amount": 1,
"currency": "USD",
"confirm": true,
// "customer_id": "cus_sweta2",
// "email": "johndoe@gmail.com",
"capture_method": "manual",
"description": "test payment",
"customer": {
"id": "sweta33",
"name": "Sweta Sharma",
"email": "sweta33@gmail.com",
"phone": "1234567890",
"phone_country_code": "+1"
},
"setup_future_usage": "off_session",
"payment_type": "normal",
"off_session": true,
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4242424242424242",
"card_exp_month": "07",
"card_exp_year": "26",
"card_holder_name": "Joseph Does",
"card_cvc": "123"
}
},
"customer_acceptance": {
"acceptance_type": "offline",
"accepted_at": "1963-05-03T04:07:52.723Z",
"online": {
"ip_address": "125.0.0.1",
"user_agent": "amet irure esse"
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "John",
"last_name": "Doe"
},
"email": "johndoe@gmail.com"
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "John",
"last_name": "Doe"
},
"email": "cus_sweta@gmail.com"
}
}
'
```
Response
```
{"payment_id":"pay_Itc4g0ujKGRW0tWhku2e","merchant_id":"merchant_1756373651","status":"requires_capture","amount":1,"net_amount":1,"shipping_cost":null,"amount_capturable":1,"amount_received":null,"connector":"authorizedotnet","client_secret":"pay_Itc4g0ujKGRW0tWhku2e_secret_7YHCDDZ805TWhxdirnfP","created":"2025-08-28T12:33:37.236Z","currency":"USD","customer_id":"sweta33","customer":{"id":"sweta33","name":"Sweta Sharma","email":"sweta33@gmail.com","phone":"1234567890","phone_country_code":"+1"},"description":"test payment","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":"off_session","off_session":true,"capture_on":null,"capture_method":"manual","payment_method":"card","payment_method_data":{"card":{"last4":"4242","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"424242","card_extended_bin":null,"card_exp_month":"07","card_exp_year":"26","card_holder_name":"Joseph Does","payment_checks":{"description":"The street address and postal code matched.","avs_result_code":"Y"},"authentication_data":null},"billing":null},"payment_token":null,"shipping":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"John","last_name":"Doe","origin_zip":null},"phone":null,"email":"cus_sweta@gmail.com"},"billing":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"John","last_name":"Doe","origin_zip":null},"phone":null,"email":"johndoe@gmail.com"},"order_details":null,"email":"sweta33@gmail.com","name":"Sweta Sharma","phone":"1234567890","return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"sweta33","created_at":1756384417,"expires":1756388017,"secret":"epk_5af34f19e9754bd79f97846e3ef3c2c9"},"manual_retry_allowed":false,"connector_transaction_id":"120069967875","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":{"redirect_response":null,"search_tags":null,"apple_pay_recurring_details":null,"gateway_system":"direct"},"reference_id":"120069967875","payment_link":null,"profile_id":"pro_uSL0fZR2ECJYAD8I2u1r","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_yyPYHyKpU13WHygZFtpl","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-08-28T12:48:37.235Z","fingerprint":null,"browser_info":null,"payment_channel":null,"payment_method_id":"pm_dcrhr0yU9aq5L3qwH90J","network_transaction_id":"HWAN991WJ003XPFWKEF1T5E","payment_method_status":"active","updated":"2025-08-28T12:33:40.138Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null,"enable_partial_authorization":null}
```
customer created only once for normal payments
<img width="597" height="525" alt="Screenshot 2025-08-28 at 6 09 09 PM" src="https://github.com/user-attachments/assets/6184684f-b99a-43d1-8b8f-f77b0d6bf16c" />
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [ ] I formatted the code `cargo +nightly fmt --all`
- [ ] I addressed lints thrown by `cargo clippy`
- [ ] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
|
<think>
PR Context:
- Title: fix(connector): Revert [AUTHORIZEDOTNET] customer id population fixed in authorize flow
- Merged: 2025-09-04T07:19:18Z
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
Reverts juspay/hyperswitch#9079
If a customer profile is not created during the Authorize call, the customer_profile_id and customer_payment_profile_id are not returned in the transaction response. As a result, the connector_mandate_id is populated as null, causing subsequent MIT transactions with "payment_type": "normal" to fail.
To avoid this issue, we are reverting this PR.
Impact of revert:
Reverting will ensure MIT transactions work as expected, but it will lead to two customer re
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(connector): Revert [AUTHORIZEDOTNET] customer id population fixed in authorize flow (#9253)
Files to modify:
**crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs**
Modify existing code
|
{"issue_number": 9079, "pr_number": 9253, "commits_count": 1, "files_changed": 1, "response_length": 1038, "file_count": 3, "needs_breakdown": false}
|
[BUG] mandate details are not persisted for Adyen connector
### Bug Description
This is specific to Adyen's connector integration.
In case mandate details were not present in the response of payment sync with Adyen, these details are sent through webhooks. However, these details are not being persisted in DB leading to MIT failures.
### Expected Behavior
Mandate details sent in the webhook's request should be persisted in payment_methods table for future MITs
### Actual Behavior
Mandate details sent in the webhook's request are not persisted in `payment_methods` table.
### Steps To Reproduce
Provide an unambiguous set of steps to reproduce this bug. Include code or configuration to reproduce, if relevant.
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
### Context For The Bug
_No response_
### Environment
Are you using hyperswitch hosted version? Yes/No
If yes, please provide the value of the `x-request-id` response header to help us debug your issue.
If not (or if building/running locally), please provide the following details:
1. Operating System or Linux distribution:
2. Rust version (output of `rustc --version`): ``
3. App version (output of `cargo r --features vergen -- --version`): ``
### Have you spent some time checking if this bug has been raised before?
- [X] I checked and didn't find a similar issue
### Have you read the Contributing Guidelines?
- [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### Are you willing to submit a PR?
Yes, I am willing to submit a PR!
|
<think>
PR Context:
- Title: fix(connector): adyen - propagate connector mandate details in incoming webhooks
- Merged: 2024-12-02T18:30:38Z
- Files changed: 2 files
- Commits: 2 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Described in the linked #6719
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Fo
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(connector): adyen - propagate connector mandate details in incoming webhooks (#6720)
Files to modify:
**crates/router/src/connector/adyen.rs**
Add:
- function: private::get_mandate_details
**crates/router/src/connector/adyen/transformers.rs**
Modify existing code
|
{"issue_number": 6719, "pr_number": 6720, "commits_count": 1, "files_changed": 2, "response_length": 1091, "file_count": 4, "needs_breakdown": false}
|
CI DB Migration consistency checks failing after diesel_cli 2.3.0 update
After the release of diesel_cli version `2.3.0`, the CI checks for DB migration consistency are failing due to a formatting difference in the output.
diesel_cli version 2.3.0 expects to call rustfmt to format its output. If rustfmt is not installed on the system it will give an error.
Need to add a step to install rustfmt to fix the workflow
|
<think>
PR Context:
- Title: ci(migration-check): install rustfmt to address migration run failures
- Merged: 2025-09-15T12:52:03Z
- Files changed: 1 files
- Commits: 3 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [x] CI/CD
## Description
<!-- Describe your changes in detail -->
- `diesel_cli` version `2.3.0` expects to call `rustfmt` to format its output. If `rustfmt` is not installed on the system it will give an error.
- Added a step to install `rustfmt` to fix the workflow
### Additional Changes
- [ ] This
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 9385, "pr_number": 9386, "commits_count": 0, "files_changed": 1, "response_length": 800, "file_count": 0, "needs_breakdown": false}
|
fix: merchant order ref id filter and refund_id filter
- Add merchant_order reference id filter for payments list
- Fix refunds list filter, search by refund id. (It is construction a totally new filter ignoring the merchant id when searching)
|
<think>
PR Context:
- Title: feat(payments): add merchant order ref id filter
- Merged: 2024-11-25T14:06:30Z
- Files changed: 5 files
- Commits: 2 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
The PR
- Add merchant order reference id filter for payments list
- Fix bug for search by refund id (or payment_id), using `or` instead of `or_filter`. Earlier we were searching in whole list, ignoring the filter previously applied in the query.
However this was the only case for w
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(payments): add merchant order ref id filter (#6630)
Files to modify:
**crates/api_models/src/payments.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/payments/payment_intent.rs**
Modify existing code
**crates/router/src/types/storage/dispute.rs**
Modify existing code
**crates/router/src/types/storage/refund.rs**
Modify existing code
**crates/storage_impl/src/payments/payment_intent.rs**
Modify existing code
|
{"issue_number": 6629, "pr_number": 6630, "commits_count": 1, "files_changed": 5, "response_length": 1229, "file_count": 7, "needs_breakdown": false}
|
refactor(tenant): use tenant id type
Refactor: Use tenant_id type instead of string for better type safety
|
<think>
PR Context:
- Title: refactor(tenant): use tenant id type
- Merged: 2024-11-26T09:12:05Z
- Files changed: 30 files
- Commits: 6 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Use tenant_id type for better type safety
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding c
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(tenant): use tenant id type (#6643)
Co-authored-by: hyperswitch-bot[bot] <148525504+hypersw
Files to modify:
**crates/common_utils/src/id_type.rs**
Add:
- mod: private::tenant
**crates/common_utils/src/id_type/organization.rs**
Modify existing code
**crates/common_utils/src/id_type/tenant.rs**
Add:
- function: pub::try_from_string
- impl: impl TenantId
**crates/common_utils/src/types/theme.rs**
Modify existing code
**crates/diesel_models/src/user/theme.rs**
Modify existing code
**crates/diesel_models/src/user_role.rs**
Modify existing code
**crates/drainer/src/handler.rs**
Modify existing code
**crates/drainer/src/health_check.rs**
Modify existing code
**crates/drainer/src/lib.rs**
Modify existing code
**crates/drainer/src/settings.rs**
Remove:
- struct: pub::TenantConfig
Add:
- struct: pub::TenantConfig
**crates/router/src/configs/settings.rs**
Remove:
- struct: pub::TenantConfig
Add:
- struct: pub::TenantConfig
**crates/router/src/core/payment_methods/transformers.rs**
Modify existing code
**crates/router/src/core/routing/helpers.rs**
Modify existing code
**crates/router/src/core/user.rs**
Modify existing code
**crates/router/src/db/events.rs**
Modify existing code
**crates/router/src/db/merchant_connector_account.rs**
Modify existing code
**crates/router/src/db/merchant_key_store.rs**
Modify existing code
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/services/api.rs**
Modify existing code
**crates/router/src/services/authentication.rs**
Modify existing code
**crates/router/src/services/authorization.rs**
Modify existing code
**crates/router/src/types/domain/user.rs**
Modify existing code
**crates/router/src/utils/user.rs**
Modify existing code
**crates/router/tests/cache.rs**
Modify existing code
**crates/router/tests/connectors/aci.rs**
Modify existing code
**crates/router/tests/connectors/utils.rs**
Modify existing code
**crates/router/tests/payments.rs**
Modify existing code
**crates/router/tests/payments2.rs**
Modify existing code
**crates/router/tests/services.rs**
Modify existing code
**crates/scheduler/src/consumer.rs**
Modify existing code
**crates/scheduler/src/producer.rs**
Modify existing code
**crates/scheduler/src/scheduler.rs**
Modify existing code
|
{"issue_number": 6642, "pr_number": 6643, "commits_count": 1, "files_changed": 30, "response_length": 3142, "file_count": 34, "needs_breakdown": true}
|
[FIX]: Make v2 endpoints follow standard API conventions
There are a lot of minor inconsistencies in v2 endpoints. Fix them in accordance with https://google.aip.dev/general
|
<think>
PR Context:
- Title: fix(router): Make v2 endpoints follow standard naming conventions
- Merged: 2025-07-21T15:41:20Z
- Files changed: 24 files
- Commits: 6 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
- Consistently use kebab case in endpoint URLs
- Use plural form of resources in URLs, i.e. instead of `/v2/organization`, use `/v2/organizations`
Renamed (current version removed) endpoints:
`/v2/organization` -> `/v2/organizations`
`/v
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(router): Make v2 endpoints follow standard naming conventions (#8630)
Co-authored-by: hyperswitc
Files to modify:
**crates/hyperswitch_connectors/src/connectors/hyperswitch_vault.rs**
Modify existing code
**crates/openapi/src/routes/organization.rs**
Modify existing code
**crates/openapi/src/routes/payment_method.rs**
Modify existing code
**crates/openapi/src/routes/refunds.rs**
Modify existing code
**crates/openapi/src/routes/revenue_recovery.rs**
Modify existing code
**crates/openapi/src/routes/routing.rs**
Modify existing code
**crates/router/src/lib.rs**
Modify existing code
**crates/router/src/routes.rs**
Modify existing code
**crates/router/src/routes/app.rs**
Remove:
- struct: pub::User
Add:
- function: pub::server
- function: pub::server
- struct: pub::User
- struct: pub::ProcessTrackerDeprecated
- impl: impl User
- impl: impl ProcessTrackerDeprecated
|
{"issue_number": 8629, "pr_number": 8630, "commits_count": 1, "files_changed": 24, "response_length": 1732, "file_count": 11, "needs_breakdown": false}
|
feat(config): update vector config
# Current Behaviour
- Sdk logs pushes `publishable_key` in the `merchant_id` field.
- open search logs have some irrelevant fields.
# Proposed Changes
- transform sdk logs and update the correct corresponding `merchant_id` of the pre-existing `publishable_key` value
- add some more except/ignore fields in open search sinks.
|
<think>
PR Context:
- Title: feat(config): update vector config
- Merged: 2024-11-05T07:38:03Z
- Files changed: 1 files
- Commits: 3 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Fixes #6364
## Description
<!-- Describe your changes in detail -->
- adding a transform for `sdk` logs that fetches a value from an enrichment table `sdk_map` populated by file `sdk_map.csv` and updates the fields using this value.
- adding some fields to ignore/except in `opensearch` lo
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 6364, "pr_number": 6365, "commits_count": 0, "files_changed": 1, "response_length": 764, "file_count": 0, "needs_breakdown": false}
|
Adding Contributors Guide to the Readme of the repository
Being an open source project, we look forward to contributors from across the world. For that we have outlined few changes which will make it easier for contributors to navigate through the project with more ease, and quickly develop a better understanding of the working of different components of Hyperswitch.
|
<think>
PR Context:
- Title: docs: upload new logos
- Merged: 2024-10-18T14:34:22Z
- Files changed: 5 files
- Commits: 9 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [x] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
Closes - #5175
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with c
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 5175, "pr_number": 6368, "commits_count": 0, "files_changed": 5, "response_length": 752, "file_count": 0, "needs_breakdown": false}
|
[FEATURE] Add delete merchant account endpoint in v2
### Feature Description
[FEATURE] Add delete merchant account endpoint in v2
### Possible Implementation
Add a new endpoint in routes for delete merchant account in v2
### Have you spent some time checking if this feature request has been raised before?
- [x] I checked and didn't find a similar issue
### Have you read the Contributing Guidelines?
- [x] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### Are you willing to submit a PR?
Yes, I am willing to submit a PR!
|
<think>
PR Context:
- Title: feat(merchant): Add delete endpoint for merchant accounts v2
- Merged: None
- Files changed: 4 files
- Commits: 2 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
- Add merchant account delete route in ```app.rs```
- Update openapi spec to include the newly added route
### Additional Changes
- [x] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modif
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 8717, "pr_number": 8718, "commits_count": 0, "files_changed": 4, "response_length": 774, "file_count": 0, "needs_breakdown": false}
|
fix(connector): [Cybersource] Add type_selection_indicator as 1 for all cards
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [X] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Added `type_selection_indicator` as 1 for all cards
Reason for this change - Without this field Mastercard card payments are currently failing for a france-based merchant acquirer CMCIC in prod for cybersource, it expects type_selection_indicator as 1.
Please note, this change is a fix on top of this [PR](https://github.com/juspay/hyperswitch/pull/7828)
This change not only makes type_selection_indicator as 1 for co-badged cards, but for all cards in general.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->
## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless it is an obvious bug or documentation fix
that will have little conversation).
-->
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
### call /payment for Mastercard via cybersource
`{
"amount": 700,
"currency": "EUR",
"confirm": true,
"payment_link": false,
"capture_on": "2029-09-10T10:11:12Z",
"amount_to_capture": 700,
"name": "John Doe",
"email": "dg@example.com",
"phone": "999999999",
"phone_country_code": "+1",
"description": "Its my first payment request",
"authentication_type": "no_three_ds",
"return_url": "https://google.com",
"payment_method_data": {
"card": {
"card_number": "5512459816707531",
"card_exp_month": "03",
"card_exp_year": "2030",
"card_holder_name": "joseph Doe",
"card_cvc": "737"
},
"billing": {
"address": {
"line1": "1467",
"line2": "CA",
"city": "Thise",
"state": "Alsace",
"zip": "94122",
"country": "FR",
"first_name": "Henry",
"last_name": "Henry"
}
}
},
"payment_method": "card",
"payment_method_type": "credit",
"browser_info": {
"color_depth": 24,
"java_enabled": true,
"java_script_enabled": true,
"language": "en-GB",
"screen_height": 720,
"screen_width": 1280,
"time_zone": -330,
"ip_address": "208.127.127.193",
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
},
"metadata": {
"disable_avs": true,
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
},
"order_details": [
{
"product_name": "Tea",
"quantity": 1,
"amount": 110,
"product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg"
},
{
"product_name": "Tea",
"quantity": 1,
"amount": 110,
"product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg"
},
{
"product_name": "Tea",
"quantity": 1,
"amount": 110,
"product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg"
}
]
}`
<img width="880" height="762" alt="Screenshot 2025-07-16 at 3 47 00 PM" src="https://github.com/user-attachments/assets/f1806a41-1ed6-4ea5-a84d-27b8ad9ca2f8" />
### call /payment for Cobadged card via cybersource
`{
"amount": 700,
"currency": "EUR",
"confirm": true,
"payment_link": false,
"capture_on": "2029-09-10T10:11:12Z",
"amount_to_capture": 700,
"name": "John Doe",
"email": "dg@example.com",
"phone": "999999999",
"phone_country_code": "+1",
"description": "Its my first payment request",
"authentication_type": "no_three_ds",
"return_url": "https://google.com",
"payment_method_data": {
"card": {
"card_number": "4010061700000021",
"card_exp_month": "03",
"card_exp_year": "2030",
"card_holder_name": "joseph Doe",
"card_cvc": "737"
},
"billing": {
"address": {
"line1": "1467",
"line2": "CA",
"city": "Thise",
"state": "Alsace",
"zip": "94122",
"country": "FR",
"first_name": "Henry",
"last_name": "Henry"
}
}
},
"payment_method": "card",
"payment_method_type": "credit",
"browser_info": {
"color_depth": 24,
"java_enabled": true,
"java_script_enabled": true,
"language": "en-GB",
"screen_height": 720,
"screen_width": 1280,
"time_zone": -330,
"ip_address": "208.127.127.193",
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
},
"metadata": {
"disable_avs": true,
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
},
"order_details": [
{
"product_name": "Tea",
"quantity": 1,
"amount": 110,
"product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg"
},
{
"product_name": "Tea",
"quantity": 1,
"amount": 110,
"product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg"
},
{
"product_name": "Tea",
"quantity": 1,
"amount": 110,
"product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg"
}
]
}`
<img width="880" height="762" alt="Screenshot 2025-07-16 at 3 46 05 PM" src="https://github.com/user-attachments/assets/c9471fdb-fbc0-431d-9dee-b8c3fb014c1f" />
### call /payment for Visa card via cybersource
`curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_wJkBplfvotDkAw5pv07JsMffdYFmnZTWKf0Rn6fWokE05NNZatQ4V2uEK0y1Re7e' \
--data-raw '{
"amount": 700,
"currency": "EUR",
"confirm": true,
"payment_link": false,
"capture_on": "2029-09-10T10:11:12Z",
"amount_to_capture": 700,
"name": "John Doe",
"email": "dg@example.com",
"phone": "999999999",
"phone_country_code": "+1",
"description": "Its my first payment request",
"authentication_type": "no_three_ds",
"return_url": "https://google.com",
"payment_method_data": {
"card": {
"card_number": "4111 1111 1111 1111",
"card_exp_month": "03",
"card_exp_year": "2030",
"card_holder_name": "joseph Doe",
"card_cvc": "737"
},
"billing": {
"address": {
"line1": "1467",
"line2": "CA",
"city": "Thise",
"state": "Alsace",
"zip": "94122",
"country": "FR",
"first_name": "Henry",
"last_name": "Henry"
}
}
},
"payment_method": "card",
"payment_method_type": "credit",
"browser_info": {
"color_depth": 24,
"java_enabled": true,
"java_script_enabled": true,
"language": "en-GB",
"screen_height": 720,
"screen_width": 1280,
"time_zone": -330,
"ip_address": "208.127.127.193",
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0"
},
"metadata": {
"disable_avs": true,
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
},
"order_details": [
{
"product_name": "Tea",
"quantity": 1,
"amount": 110,
"product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg"
},
{
"product_name": "Tea",
"quantity": 1,
"amount": 110,
"product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg"
},
{
"product_name": "Tea",
"quantity": 1,
"amount": 110,
"product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg"
}
]
}'`
<img width="841" height="752" alt="Screenshot 2025-07-21 at 5 49 40 PM" src="https://github.com/user-attachments/assets/1763b260-5e20-4e72-85ad-cc199b688011" />
### call /payment for Mastercard card via cybersource for 3ds external authentication
**Step 1:**
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_wJkBplfvotDkAw5pv07JsMffdYFmnZTWKf0Rn6fWokE05NNZatQ4V2uEK0y1Re7e' \
--data-raw '{
"amount": 10000,
"currency": "EUR",
"confirm": true,
"payment_link": false,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"amount_to_capture": 10000,
"customer_id": "StripeCustomer",
"email": "guest@example.com",
"name": "John Doe",
"phone": "999999999",
"phone_country_code": "+1",
"description": "Its my first payment request",
"request_external_three_ds_authentication": true,
"authentication_type": "three_ds",
"return_url": "https://google.com",
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "5512459816707531",
"card_exp_month": "12",
"card_exp_year": "2025",
"card_cvc": "000",
"card_network": "Mastercard"
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "CA",
"line3": "CA",
"city": "Musterhausen",
"state": "California",
"zip": "12345",
"country": "US",
"first_name": "Debarati",
"last_name": "Ghatak"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
}
},
"browser_info": {
"user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
"accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,\/;q=0.8",
"language": "nl-NL",
"color_depth": 24,
"ip_address": "103.77.139.95",
"screen_height": 723,
"screen_width": 1536,
"time_zone": 0,
"java_enabled": true,
"java_script_enabled": true
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"connector": ["cybersource"],
"metadata": {
"dg": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
}
}'
```
<img width="880" height="762" alt="Screenshot 2025-07-16 at 3 49 17 PM" src="https://github.com/user-attachments/assets/980ceb6b-a634-45e0-a0bc-40db4379bfbf" />
**Step 2:**
```
curl --location 'http://localhost:8080/payments/pay_TxOCC3qWDM0tsOzBuYgK/3ds/authentication' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: pk_dev_66166a663cb4429c88ab4f6d9990698d' \
--data '{
"client_secret": "pay_TxOCC3qWDM0tsOzBuYgK_secret_Zop3d4G9eQ2qUh47Z60N",
"device_channel": "BRW",
"threeds_method_comp_ind": "Y"
}
'
```
<img width="880" height="762" alt="Screenshot 2025-07-16 at 3 51 16 PM" src="https://github.com/user-attachments/assets/2b116033-351a-43ef-a76b-92aa4458d9cf" />
**Step 3:**
`curl --location --request POST 'http://localhost:8080/payments/pay_HJ3ZfWWCFSRgMLk3Q0iT/merchant_1752829376/authorize/cybersource'`
<img width="880" height="762" alt="Screenshot 2025-07-16 at 3 49 27 PM" src="https://github.com/user-attachments/assets/27b4af0b-4b51-4989-a6cd-9bfceaff4119" />
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [X] I formatted the code `cargo +nightly fmt --all`
- [X] I addressed lints thrown by `cargo clippy`
- [X] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
|
<think>
PR Context:
- Title: fix(connector): [Cybersource] Add type_selection_indicator as 1 for all cards
- Merged: None
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
…ll cards (#8663)
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Hotfix for https://github.com/juspay/hyperswitch/pull/8663
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide li
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 8663, "pr_number": 8761, "commits_count": 0, "files_changed": 1, "response_length": 791, "file_count": 0, "needs_breakdown": false}
|
[FIX] Add fallback connectors instead of active routing rule connectors if straight through connector is ineligible
Add the fallback connectors to the list of eligible connectors instead of adding connectors configured in the active routing rule in case straight through connector is ineligible
|
<think>
PR Context:
- Title: revert(routing): Add connectors from current active routing algorithm before adding fallback connectors
- Merged: None
- Files changed: 7 files
- Commits: 2 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
Add fallback connectors to the list of eligible connectors for routing instead of connectors configured in the active routing rules
this PR reverts https://github.com/juspay/hyperswitch/pull/7921
To address failing CI checks, a commit was ch
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 8210, "pr_number": 8211, "commits_count": 0, "files_changed": 7, "response_length": 817, "file_count": 0, "needs_breakdown": false}
|
chore(codeowners): add codeowners data for PR reviews
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
## Description
Adding a CODEOWNERS file for facilitating PR reviews for teams
### Additional Changes
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!-- Provide links to the files with corresponding changes -->
## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless its an obvious bug or documentation fix
that will have little conversation).
-->
This leads to better ownership boundaries & increased efficiency for reviewers
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
Doesn't need to be tested
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
|
<think>
PR Context:
- Title: feat(core): add bulk tokenization flows
- Merged: 2025-03-07T13:24:06Z
- Files changed: 26 files
- Commits: 30 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
This PR introduces below changes
- Exposes two endpoints for
- Single card tokenization
- Tokenizing raw card details with the network
- Tokenizing an existing payment method in HS with the network (card only)
- Bulk tokenization
- Tokenizing us
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(core): add bulk tokenization flows (#7066)
Co-authored-by: hyperswitch-bot[bot] <148525504+hype
Files to modify:
**crates/api_models/src/payment_methods.rs**
Add:
- function: private::from
- struct: pub::CardNetworkTokenizeRequest
- struct: pub::TokenizeCardRequest
- struct: pub::TokenizePaymentMethodRequest
- struct: pub::CardNetworkTokenizeResponse
- enum: pub::TokenizeDataRequest
- impl: impl common_utils::events::ApiEventMetric for CardNetworkTokenizeRequest
- impl: impl common_utils::events::ApiEventMetric for CardNetworkTokenizeResponse
- impl: impl From<&Card> for MigrateCardDetail
**crates/hyperswitch_domain_models/src/bulk_tokenization.rs**
Add:
- function: private::foreign_from
- function: private::foreign_from
- function: private::foreign_try_from
- function: private::foreign_from
- function: private::foreign_try_from
- function: private::foreign_from
- function: private::foreign_from
- function: private::foreign_from
- function: private::foreign_from
- function: private::foreign_from
- function: private::foreign_from
- struct: pub::CardNetworkTokenizeRequest
- struct: pub::TokenizeCardRequest
- struct: pub::TokenizePaymentMethodRequest
- struct: pub::CardNetworkTokenizeRecord
- enum: pub::TokenizeDataRequest
- impl: impl ForeignFrom<&CardNetworkTokenizeRecord> for payments_api::CustomerDetails
- impl: impl ForeignFrom<&CardNetworkTokenizeRecord> for payments_api::Address
- impl: impl ForeignTryFrom<CardNetworkTokenizeRecord> for payment_methods_api::CardNetworkTokenizeRequest
- impl: impl ForeignFrom<&TokenizeCardRequest> for payment_methods_api::MigrateCardDetail
- impl: impl ForeignTryFrom<CustomerDetails> for payments_api::CustomerDetails
- impl: impl ForeignFrom<payment_methods_api::CardNetworkTokenizeRequest> for CardNetworkTokenizeRequest
- impl: impl ForeignFrom<payment_methods_api::TokenizeDataRequest> for TokenizeDataRequest
- impl: impl ForeignFrom<payments_api::CustomerDetails> for CustomerDetails
- impl: impl ForeignFrom<payments_api::Address> for Address
- impl: impl ForeignFrom<payments_api::AddressDetails> for AddressDetails
- impl: impl ForeignFrom<payments_api::PhoneDetails> for PhoneDetails
**crates/hyperswitch_domain_models/src/lib.rs**
Add:
- mod: pub::bulk_tokenization
**crates/hyperswitch_domain_models/src/network_tokenization.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/payment_method_data.rs**
Add:
- function: private::from
- struct: pub::CardDetail
- impl: impl From<&Card> for CardDetail
**crates/openapi/src/openapi.rs**
Modify existing code
**crates/openapi/src/openapi_v2.rs**
Modify existing code
**crates/openapi/src/routes/payment_method.rs**
Add:
- function: pub::tokenize_card_api
- function: pub::tokenize_card_using_pm_api
**crates/router/src/core/errors.rs**
Add:
- enum: pub::BulkNetworkTokenizationError
**crates/router/src/core/payment_methods.rs**
Add:
- mod: pub::tokenize
**crates/router/src/core/payment_methods/cards.rs**
Add:
- function: pub::tokenize_card_flow
- function: pub::execute_card_tokenization
- function: pub::execute_payment_method_tokenization
**crates/router/src/core/payment_methods/network_tokenization.rs**
Modify existing code
**crates/router/src/core/payment_methods/tokenize.rs**
Add:
- function: pub::parse_csv
- function: pub::get_tokenize_card_form_records
- function: pub::tokenize_cards
- function: private::new
- function: private::encrypt_card
- function: private::encrypt_network_token
- function: private::fetch_bin_details_and_validate_card_network
- function: private::tokenize_card
- function: private::validate_card_network
- function: private::store_network_token_in_locker
- struct: pub::CardNetworkTokenizeForm
- struct: pub::StoreLockerResponse
- struct: pub::NetworkTokenizationBuilder
- struct: pub::CardNetworkTokenizeExecutor
- trait: pub::State
- trait: pub::TransitionTo
- trait: pub::NetworkTokenizationProcess
- impl: impl NetworkTokenizationProcess<'a, D> for CardNetworkTokenizeExecutor<'a, D>
- mod: pub::card_executor
- mod: pub::payment_method_executor
**crates/router/src/core/payment_methods/tokenize/card_executor.rs**
Add:
- function: private::default
- function: pub::new
- function: pub::set_validate_result
- function: pub::set_card_details
- function: pub::set_customer
- function: pub::get_optional_card_and_cvc
- function: pub::set_token_details
- function: pub::set_stored_card_response
- function: pub::set_stored_token_response
- function: pub::set_payment_method_response
- function: pub::build
- function: pub::validate_request_and_fetch_optional_customer
- function: pub::create_customer
- function: pub::store_card_and_token_in_locker
- function: pub::store_card_in_locker
- function: pub::create_payment_method
- struct: pub::TokenizeWithCard
- struct: pub::CardRequestValidated
- struct: pub::CardDetailsAssigned
- struct: pub::CustomerAssigned
- struct: pub::CardTokenized
- struct: pub::CardStored
- struct: pub::CardTokenStored
- struct: pub::PaymentMethodCreated
- impl: impl State for TokenizeWithCard
- impl: impl State for CustomerAssigned
- impl: impl State for CardRequestValidated
- impl: impl State for CardDetailsAssigned
- impl: impl State for CardTokenized
- impl: impl State for CardStored
- impl: impl State for CardTokenStored
- impl: impl State for PaymentMethodCreated
- impl: impl TransitionTo<CardRequestValidated> for TokenizeWithCard
- impl: impl TransitionTo<CardDetailsAssigned> for CardRequestValidated
- impl: impl TransitionTo<CustomerAssigned> for CardDetailsAssigned
- impl: impl TransitionTo<CardTokenized> for CustomerAssigned
- impl: impl TransitionTo<CardTokenStored> for CardTokenized
- impl: impl TransitionTo<PaymentMethodCreated> for CardTokenStored
- impl: impl Default for NetworkTokenizationBuilder<'_, TokenizeWithCard>
- impl: impl NetworkTokenizationBuilder<'a, TokenizeWithCard>
- impl: impl NetworkTokenizationBuilder<'a, CardRequestValidated>
- impl: impl NetworkTokenizationBuilder<'a, CardDetailsAssigned>
- impl: impl NetworkTokenizationBuilder<'a, CustomerAssigned>
- impl: impl NetworkTokenizationBuilder<'a, CardTokenized>
- impl: impl NetworkTokenizationBuilder<'a, CardStored>
- impl: impl NetworkTokenizationBuilder<'a, CardTokenStored>
- impl: impl NetworkTokenizationBuilder<'_, PaymentMethodCreated>
- impl: impl CardNetworkTokenizeExecutor<'_, domain::TokenizeCardRequest>
**crates/router/src/core/payment_methods/tokenize/payment_method_executor.rs**
Add:
- function: private::default
- function: pub::new
- function: pub::set_payment_method
- function: pub::set_validate_result
- function: pub::set_card_details
- function: pub::get_optional_card_and_cvc
- function: pub::set_token_details
- function: pub::set_stored_token_response
- function: pub::set_payment_method
- function: pub::build
- function: pub::fetch_payment_method
- function: pub::validate_request_and_locker_reference_and_customer
- function: pub::update_payment_method
- struct: pub::TokenizeWithPmId
- struct: pub::PmValidated
- struct: pub::PmFetched
- struct: pub::PmAssigned
- struct: pub::PmTokenized
- struct: pub::PmTokenStored
- struct: pub::PmTokenUpdated
- impl: impl State for TokenizeWithPmId
- impl: impl State for PmValidated
- impl: impl State for PmFetched
- impl: impl State for PmAssigned
- impl: impl State for PmTokenized
- impl: impl State for PmTokenStored
- impl: impl State for PmTokenUpdated
- impl: impl TransitionTo<PmFetched> for TokenizeWithPmId
- impl: impl TransitionTo<PmValidated> for PmFetched
- impl: impl TransitionTo<PmAssigned> for PmValidated
- impl: impl TransitionTo<PmTokenized> for PmAssigned
- impl: impl TransitionTo<PmTokenStored> for PmTokenized
- impl: impl TransitionTo<PmTokenUpdated> for PmTokenStored
- impl: impl Default for NetworkTokenizationBuilder<'_, TokenizeWithPmId>
- impl: impl NetworkTokenizationBuilder<'a, TokenizeWithPmId>
- impl: impl NetworkTokenizationBuilder<'a, PmFetched>
- impl: impl NetworkTokenizationBuilder<'a, PmValidated>
- impl: impl NetworkTokenizationBuilder<'a, PmAssigned>
- impl: impl NetworkTokenizationBuilder<'a, PmTokenized>
- impl: impl NetworkTokenizationBuilder<'a, PmTokenStored>
- impl: impl NetworkTokenizationBuilder<'_, PmTokenUpdated>
- impl: impl CardNetworkTokenizeExecutor<'_, domain::TokenizePaymentMethodRequest>
**crates/router/src/core/payments/tokenization.rs**
Modify existing code
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/routes/lock_utils.rs**
Modify existing code
**crates/router/src/routes/payment_methods.rs**
Add:
- function: pub::tokenize_card_api
- function: pub::tokenize_card_using_pm_api
- function: pub::tokenize_card_batch_api
**crates/router/src/types/api/payment_methods.rs**
Modify existing code
**crates/router/src/types/api/payments.rs**
Modify existing code
**crates/router/src/types/domain.rs**
Modify existing code
**crates/router/src/types/domain/payments.rs**
Modify existing code
**crates/router_env/src/logger/types.rs**
Modify existing code
|
{"issue_number": 1, "pr_number": 7066, "commits_count": 1, "files_changed": 26, "response_length": 10421, "file_count": 26, "needs_breakdown": true}
|
[BUG] Facilitapay env connector configs breaking WASM
It is `BodyKey` and not `Bodykey`.
Affected files:
`crates/connector_configs/toml/production.toml`
`crates/connector_configs/toml/sandbox.toml`
`crates/connector_configs/toml/integration_test.toml`
this isn't affecting the current wasm as Facilitapay is not yet on dashboard.
|
<think>
PR Context:
- Title: chore(env): fix Facilitapay connector config
- Merged: 2025-05-05T13:07:47Z
- Files changed: 3 files
- Commits: 1 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
This PR fixes Facilitapay payment method env that broke WASM.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment vari
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 7957, "pr_number": 7958, "commits_count": 0, "files_changed": 3, "response_length": 774, "file_count": 0, "needs_breakdown": false}
|
docs(openapi): Show API version selection dropdown in API Reference
Add a version selection dropdown in API reference to allow exploring v2 APIs
|
<think>
PR Context:
- Title: docs(openapi): Show API version selection dropdown in Mintlify
- Merged: 2025-06-13T09:03:06Z
- Files changed: 30 files
- Commits: 7 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [x] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
- Moved both `v1` and `v2` API docs under `api-reference` directory
- Renamed `openapi_spec.json` files for v1 and v2
- Updated OpenAPI spec file paths in `openapi` crate
- Modified OpenAPI spec path in CI pipeline
### Additional Changes
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** docs(openapi): Show API version selection dropdown in Mintlify (#8333)
Files to modify:
**crates/openapi/src/main.rs**
Modify existing code
|
{"issue_number": 8332, "pr_number": 8333, "commits_count": 1, "files_changed": 30, "response_length": 939, "file_count": 3, "needs_breakdown": false}
|
Use `MinorUnit` for Novalnet Amount
you can use `MinorUnit` here right?
_Originally posted by @Narayanbhat166 in https://github.com/juspay/hyperswitch/pull/6631#discussion_r1901088306_
|
<think>
PR Context:
- Title: refactor(config): update base URLs for connectors in production
- Merged: None
- Files changed: 11 files
- Commits: 3 commits
Implementation approach:
📌 Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [X ] Enhancement
- [ X] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
📝 Description
Updated config/deployments/production.toml by replacing demo/test/sandbox base_url with live/production URLs.
Ensured all affected connectors now use the correct live URLs.
Closes #7583 ✅
Fixes #7582
Closes #6981
🛠️ Additional Changes
- [ ] This PR modifies the API contra
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 6981, "pr_number": 7584, "commits_count": 0, "files_changed": 11, "response_length": 778, "file_count": 0, "needs_breakdown": false}
|
fix(authz): Proper descriptions for parents
Currently descriptions for parent groups in invite page of control center are not entity specific. That means, customers in description will be visible for profile level users when it shouldn't.
|
<think>
PR Context:
- Title: feat(authz): Make info APIs support `ParentGroup`
- Merged: 2024-10-30T10:42:37Z
- Files changed: 13 files
- Commits: 8 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
Make new APIs to replace
- `/user/role/{{role_id}}` -> `/user/role/{{role_id}}/v2`
- `/user/role` -> `/user/role/v2`
- `/user/module/list` -> `/user/parent/list`
The new APIs will have proper description and parent info which has entity
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(authz): Make info APIs support `ParentGroup` (#6440)
Co-authored-by: hyperswitch-bot[bot] <1485
Files to modify:
**crates/api_models/src/events/user_role.rs**
Modify existing code
**crates/api_models/src/user_role/role.rs**
Add:
- struct: pub::RoleInfoWithParents
- struct: pub::ParentGroupInfo
- struct: pub::GroupsAndResources
**crates/common_enums/src/enums.rs**
Modify existing code
**crates/router/src/core/user_role.rs**
Add:
- function: pub::get_parent_group_info
**crates/router/src/core/user_role/role.rs**
Add:
- function: pub::get_groups_and_resources_for_role_from_token
- function: pub::get_parent_info_for_role
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/routes/lock_utils.rs**
Modify existing code
**crates/router/src/routes/user_role.rs**
Add:
- function: pub::get_groups_and_resources_for_role_from_token
- function: pub::get_parent_info_for_role
- function: pub::get_parent_group_info
**crates/router/src/services/authorization/info.rs**
Remove:
- function: pub::get_parent_name
**crates/router/src/services/authorization/permission_groups.rs**
Add:
- function: private::get_descriptions_for_groups
**crates/router/src/services/authorization/permissions.rs**
Add:
- function: pub::get_resource_name
- function: pub::get_scope_name
**crates/router/src/services/authorization/roles/predefined_roles.rs**
Modify existing code
**crates/router_env/src/logger/types.rs**
Modify existing code
|
{"issue_number": 6439, "pr_number": 6440, "commits_count": 1, "files_changed": 13, "response_length": 2316, "file_count": 15, "needs_breakdown": false}
|
feat(analytics): add `smart_retries` only metrics
## Proposed changes
There should be fields in PaymentDistribution, for the case where we only want to extract metric for Subsequent smart retried attempts.
For example, we have `success_rate` and `success_rate_without_retries`
Now missing field is `success_rate_with_only_smart_retries`.
This change should be extended to all fields
|
<think>
PR Context:
- Title: feat(analytics): add `smart_retries` only metrics for analytics v2 dashboard
- Merged: 2024-11-19T19:21:45Z
- Files changed: 2 files
- Commits: 5 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
Added support for calculating new metrics based on smart retries for Analytics v2 dashboard.
The 2 metrics are:
- Payment Processed Amount and Count for smart retries
- Payments Success Rate and Failure Rate distribution for Smart Retries
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(analytics): add `smart_retries` only metrics for analytics v2 dashboard (#6575)
Files to modify:
**crates/analytics/src/payments/accumulator.rs**
Modify existing code
**crates/api_models/src/analytics/payments.rs**
Modify existing code
|
{"issue_number": 6574, "pr_number": 6575, "commits_count": 1, "files_changed": 2, "response_length": 1056, "file_count": 4, "needs_breakdown": false}
|
Use SignatureKey as auth_type for VGS connector
We need to collect a 3rd key (vault_id) apart from `username` and `password` in case of VGS for SDK use case
|
<think>
PR Context:
- Title: fix(connector): Use SignatureKey for VGS auth_type
- Merged: 2025-08-28T02:44:22Z
- Files changed: 1 files
- Commits: 3 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
- Change VGS auth type from BodyKey to SignatureKey
### Additional Changes
- [] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(connector): Use SignatureKey for VGS auth_type (#9068)
Files to modify:
**crates/hyperswitch_connectors/src/connectors/vgs/transformers.rs**
Modify existing code
|
{"issue_number": 9067, "pr_number": 9068, "commits_count": 1, "files_changed": 1, "response_length": 952, "file_count": 3, "needs_breakdown": false}
|
bug(users): Check lineage across entities in invite
Currently in invites we don't check if user exists across entities.
This will be a problem when inviting a user with higher entity from different lineage.
We should check if user exists across lineage before allowing invite in this case.
|
<think>
PR Context:
- Title: fix(users): Check lineage across entities in invite
- Merged: 2024-11-27T14:33:37Z
- Files changed: 1 files
- Commits: 2 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
Currently in invites we don't check if user exists across entities.
This will be a problem when inviting a user with higher entity from different lineage.
This PR fixes it.
### Additional Changes
- [ ] This PR modifies the API contract
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(users): Check lineage across entities in invite (#6677)
Files to modify:
**crates/router/src/core/user.rs**
Modify existing code
|
{"issue_number": 6679, "pr_number": 6677, "commits_count": 1, "files_changed": 1, "response_length": 920, "file_count": 3, "needs_breakdown": false}
|
feat: Add schema to store chat request response
- add schema for chat, to store request and response
- store chats to chat schema asynchronously
- encrypt the sensitive data
- have endpoint to list the chat data and decrypt it properly
|
<think>
PR Context:
- Title: feat: add hyperswitch ai chats table
- Merged: 2025-09-16T09:14:36Z
- Files changed: 30 files
- Commits: 27 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
- Store the user query and response from the ai service for the analysis.
- Allow the api only for internal user
### Additional Changes
This pull request introduces support for encrypted chat conversations and adds database models and A
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat: add hyperswitch ai chats table (#8831)
Co-authored-by: Apoorv Dixit <apoorv.dixit@juspay.in>
C
Files to modify:
**crates/api_models/src/chat.rs**
Add:
- struct: pub::ChatListRequest
- struct: pub::ChatConversation
- struct: pub::ChatListResponse
**crates/api_models/src/events/chat.rs**
Modify existing code
**crates/common_utils/src/consts.rs**
Modify existing code
**crates/diesel_models/src/hyperswitch_ai_interaction.rs**
Add:
- struct: pub::HyperswitchAiInteraction
- struct: pub::HyperswitchAiInteractionNew
**crates/diesel_models/src/lib.rs**
Add:
- mod: pub::hyperswitch_ai_interaction
**crates/diesel_models/src/query.rs**
Add:
- mod: pub::hyperswitch_ai_interaction
**crates/diesel_models/src/query/hyperswitch_ai_interaction.rs**
Add:
- function: pub::insert
- function: pub::filter_by_optional_merchant_id
- impl: impl HyperswitchAiInteractionNew
- impl: impl HyperswitchAiInteraction
**crates/diesel_models/src/query/utils.rs**
Add:
- function: private::get_local_unique_key
- impl: impl CompositeKey for <schema::hyperswitch_ai_interaction::table as diesel::Table>::PrimaryKey
**crates/diesel_models/src/schema.rs**
Modify existing code
**crates/diesel_models/src/schema_v2.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/chat.rs**
Modify existing code
**crates/router/src/configs/secrets_transformers.rs**
Add:
- function: private::convert_to_raw_secret
- impl: impl SecretsHandler for settings::ChatSettings
**crates/router/src/configs/settings.rs**
Modify existing code
**crates/router/src/core/chat.rs**
Modify existing code
**crates/router/src/core/errors/chat.rs**
Modify existing code
**crates/router/src/db.rs**
Add:
- mod: pub::hyperswitch_ai_interaction
**crates/router/src/db/hyperswitch_ai_interaction.rs**
Add:
- function: private::insert_hyperswitch_ai_interaction
- function: private::list_hyperswitch_ai_interactions
- function: private::insert_hyperswitch_ai_interaction
- function: private::list_hyperswitch_ai_interactions
- trait: pub::HyperswitchAiInteractionInterface
- impl: impl HyperswitchAiInteractionInterface for Store
- impl: impl HyperswitchAiInteractionInterface for MockDb
**crates/router/src/db/kafka_store.rs**
Add:
- function: private::insert_hyperswitch_ai_interaction
- function: private::list_hyperswitch_ai_interactions
- impl: impl HyperswitchAiInteractionInterface for KafkaStore
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/routes/chat.rs**
Add:
- function: pub::get_all_conversations
**crates/router/src/routes/lock_utils.rs**
Modify existing code
**crates/router/src/types/storage.rs**
Add:
- mod: pub::hyperswitch_ai_interaction
**crates/router/src/types/storage/hyperswitch_ai_interaction.rs**
Modify existing code
**crates/router/src/utils.rs**
Add:
- mod: pub::chat
**crates/router/src/utils/chat.rs**
Add:
- function: pub::construct_hyperswitch_ai_interaction
**crates/router_env/src/logger/types.rs**
Modify existing code
**crates/storage_impl/src/mock_db.rs**
Modify existing code
|
{"issue_number": 8847, "pr_number": 8831, "commits_count": 1, "files_changed": 30, "response_length": 3973, "file_count": 29, "needs_breakdown": true}
|
Add audit events for CompleteAuthorize update
Created from #4525
This covers adding events for Complete Authorize operation
This event should include the payment data similar to [PaymentCancel](https://github.com/juspay/hyperswitch/pull/4166)
It should also include any metadata for the event
e.g reason for payment rejection, error codes, rejection source etc
### Submission Process:
- Ask the maintainers for assignment of the issue, you can request for assignment by commenting on the issue itself.
- Once assigned, submit a pull request (PR).
- Maintainers will review and provide feedback, if any.
- Maintainers can unassign issues due to inactivity, [read more here](https://github.com/juspay/hyperswitch/wiki/Hacktoberfest-Contribution-Rules).
Refer [here](https://github.com/juspay/hyperswitch/blob/main/docs/TERMS_OF_CONTEST.md) for Terms and conditions for the contest.
|
<think>
PR Context:
- Title: feat(events): add audit event for CompleteAuthorize
- Merged: 2024-12-05T07:46:26Z
- Files changed: 2 files
- Commits: 4 commits
Implementation approach:
## Type of Change
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Created from #4674
This covers adding events for `CompleteAuthorize` operation
## How did you test it
Use `globalpay` as connector, `wallet` as payment_method and `paypal` as payment_method_type
```bash
"payment_method": "wallet",
"payment_method_types": [
{
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(events): add audit event for CompleteAuthorize (#6310)
Co-authored-by: Sandeep Kumar <83278309+
Files to modify:
**crates/router/src/core/payments/operations/payment_complete_authorize.rs**
Modify existing code
**crates/router/src/events/audit_events.rs**
Modify existing code
|
{"issue_number": 4674, "pr_number": 6310, "commits_count": 1, "files_changed": 2, "response_length": 1072, "file_count": 4, "needs_breakdown": false}
|
bug(users): Mark users as verified if user comes from SSO
- Currently we are not marking users as verified if they use SSO to login.
- But if there is only SSO to login, then they won't be able to verify their email unless they come from the accept invite email.
- Instead, we will mark users coming from SSO as verified.
|
<think>
PR Context:
- Title: fix(users): Mark user as verified if user logins from SSO
- Merged: 2024-11-29T10:52:38Z
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
Currently we are not marking users as verified if the user comes from SSO and there is no other way to verify if SSO is the only login method that is available.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This P
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(users): Mark user as verified if user logins from SSO (#6694)
Files to modify:
**crates/router/src/core/user.rs**
Modify existing code
|
{"issue_number": 6693, "pr_number": 6694, "commits_count": 1, "files_changed": 1, "response_length": 932, "file_count": 3, "needs_breakdown": false}
|
[FEATURE] Implement V2 UCS (Unified Connector Service) Integration for Authorization Flow
### Feature Description
# [Feature Request] Implement V2 UCS (Unified Connector Service) Integration for Authorization Flow
## Issue Type
- [x] Feature Request
- [ ] Bug Report
- [ ] Enhancement
- [ ] Documentation
## Priority
- [x] High
- [ ] Medium
- [ ] Low
## Labels
`A-core` `C-feature` `payment-flows` `ucs-integration` `v2-api`
## Summary
Implement V2 UCS (Unified Connector Service) integration for the authorization payment flow, upgrading from the existing V1 UCS integration to support the updated gRPC schema and enhanced V2 payment architecture.
## Background
Currently, Hyperswitch has V1 UCS integration that works with the legacy gRPC schema. However, the UCS service has evolved to V2 with improved:
- Enhanced gRPC schema with better type safety
- Improved field structures for card details, addresses, and identifiers
- Better error handling and response parsing
- Enhanced payment method data transformation
## Problem Statement
### Current State
- V1 UCS integration uses outdated `PaymentsAuthorizeRequest` schema
- Limited support for V2 payment flow architecture
- Outdated transformer implementations for V2 data structures
- Monolithic UCS function structure affecting maintainability
### Pain Points
1. **Schema Incompatibility**: V1 gRPC schema doesn't support V2 enhanced data models
2. **Limited Error Handling**: V1 response parsing lacks V2 identifier structure support
3. **Technical Debt**: Monolithic UCS functions make debugging and enhancement difficult
4. **Missing V2 Features**: Cannot leverage V2 payment flow improvements through UCS
### Possible Implementation
## Proposed Solution
### High-Level Approach
Implement V2 UCS integration that:
1. **Updates gRPC Schema**: Migrate to `PaymentServiceAuthorizeRequest` with V2 field structure
2. **Enhances Architecture**: Refactor payment flow with better separation of concerns
3. **Improves Transformers**: Update V2 transformers for new schema compatibility
4. **Maintains Backward Compatibility**: Preserve V1 integration with feature flag separation
### Technical Requirements
#### 1. gRPC Schema Migration
- [ ] Update `rust-grpc-client` dependency to latest version
- [ ] Migrate from `PaymentsAuthorizeRequest` to `PaymentServiceAuthorizeRequest`
- [ ] Update authentication headers and request metadata handling
- [ ] Implement new identifier structure for response parsing
#### 2. Payment Flow Architecture
- [ ] Refactor `call_connector_service()` into separate prerequisite and decision functions
- [ ] Implement `call_connector_service_prerequisites()` for V2 flow preparation
- [ ] Create `decide_unified_connector_service_call()` for UCS routing logic
- [ ] Maintain feature flag separation between V1 and V2 implementations
#### 3. V2 Transformer Enhancements
- [ ] Update card data transformation for new schema structure
- [ ] Enhance address handling with improved field mapping
- [ ] Implement customer ID support in V2 transformers
#### 4. Error Handling & Response Parsing
- [ ] Update response handlers for new identifier structure
- [ ] Enhance error context and fallback mechanisms
- [ ] Maintain automatic fallback to traditional connector flow
#### 5. Testing & Validation
- [ ] Create comprehensive test cases for V2 UCS flow
- [ ] Test schema compatibility and field mapping
- [ ] Validate fallback mechanisms and error handling
### Have you spent some time checking if this feature request has been raised before?
- [x] I checked and didn't find a similar issue
### Have you read the Contributing Guidelines?
- [x] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### Are you willing to submit a PR?
Yes, I am willing to submit a PR!
|
<think>
PR Context:
- Title: feat(core): Hyperswitch <|> UCS integration v2
- Merged: 2025-07-11T14:44:46Z
- Files changed: 13 files
- Commits: 30 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
### Fixes #8440
## Description
<!-- Describe your changes in detail -->
This PR implements **V2 UCS (Unified Connector Service) Integration** for authorization and synchronization flows, building upon the existing V1 UCS integration (PR#[8280](https://github.com/juspay/
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(core): Hyperswitch <|> UCS integration v2 (#8439)
Co-authored-by: debarshi.gupta <debarshi.gupt
Files to modify:
**crates/external_services/src/grpc_client/unified_connector_service.rs**
Add:
- function: pub::payment_get
**crates/hyperswitch_domain_models/src/merchant_connector_account.rs**
Modify existing code
**crates/router/src/core/payments.rs**
Modify existing code
**crates/router/src/core/payments/flows.rs**
Modify existing code
**crates/router/src/core/payments/flows/authorize_flow.rs**
Modify existing code
**crates/router/src/core/payments/flows/psync_flow.rs**
Add:
- function: private::call_unified_connector_service
**crates/router/src/core/payments/transformers.rs**
Modify existing code
**crates/router/src/core/unified_connector_service.rs**
Modify existing code
**crates/router/src/core/unified_connector_service/transformers.rs**
Add:
- function: private::foreign_try_from
- impl: impl ForeignTryFrom<&RouterData<PSync, PaymentsSyncData, PaymentsResponseData>> for payments_grpc::PaymentServiceGetRequest
**crates/router/src/types.rs**
Modify existing code
|
{"issue_number": 8440, "pr_number": 8439, "commits_count": 1, "files_changed": 13, "response_length": 1911, "file_count": 13, "needs_breakdown": false}
|
[REFACTOR]: [WISE] Add amount conversion framework to Wise
### :memo: Feature Description
Currently, amounts are represented as `i64` values throughout the application. We want to introduce a `Unit` struct that explicitly states the denomination. A new type, `MinorUnit`, has been added to standardize the flow of amounts across the application. This type will now be used by all the connector flows.
Rather than handling conversions in each connector, we will centralize the conversion logic in one place within the core of the application.
### :hammer: Possible Implementation
- For each connector, we need to create an amount conversion function. Connectors will specify the format they require, and the core framework will handle the conversion accordingly.
- Connectors should invoke the `convert` function to receive the amount in their required format.
- Refer to the [connector documentation](https://docs.wise.com/api-docs/api-reference/card) to determine the required amount format for each connector.
- You can refer [this PR](https://github.com/juspay/hyperswitch/pull/4825) for more context.
🔖 Note: All the changes needed should be contained within `hyperswitch/crates/router/src/connector/` , `crates/router/src/types/api.rs` , `crates/router/tests/connectors/`
### :package: Have you spent some time checking if this feature request has been raised before?
- [ ] I checked and didn't find a similar issue
### :package: Have you read the Contributing Guidelines?
- [ ] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### :package: Submission Process:
- Ask the maintainers for assignment of the issue, you can request for assignment by commenting on the issue itself.
- Once assigned, submit a pull request (PR).
- Maintainers will review and provide feedback, if any.
- Maintainers can unassign issues due to inactivity, [read more here](https://github.com/juspay/hyperswitch/wiki/Hacktoberfest-Contribution-Rules).
Refer [here](https://github.com/juspay/hyperswitch/blob/main/docs/TERMS_OF_CONTEST.md) for Terms and conditions for the contest.
### :sparkles: Are you willing to submit a PR?
|
<think>
PR Context:
- Title: refactor(connector): Added amount conversion framework to Wise.
- Merged: 2024-11-07T07:36:11Z
- Files changed: 4 files
- Commits: 1 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
This pull request introduces significant changes to the Wise connector in the `crates/router` module, focusing on the integration of a new amount conversion utility and refactoring to utilize a new `WiseRouterData` struct. The changes enhance
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(connector): Added amount conversion framework to Wise. (#6469)
Files to modify:
**crates/router/src/connector/wise.rs**
Remove:
- struct: pub::Wise
Add:
- function: pub::new
- struct: pub::Wise
- impl: impl Wise
**crates/router/src/connector/wise/transformers.rs**
Add:
- function: private::from
- struct: pub::WiseRouterData
- impl: impl From<(MinorUnit, T)> for WiseRouterData<T>
**crates/router/src/types/api.rs**
Modify existing code
**crates/router/tests/connectors/wise.rs**
Modify existing code
|
{"issue_number": 6121, "pr_number": 6469, "commits_count": 1, "files_changed": 4, "response_length": 1349, "file_count": 6, "needs_breakdown": false}
|
chore(masking): add peek_mut to PeekInterface
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Enhancement
## Description
<!-- Describe your changes in detail -->
Add `peek_mut` function to PeekInterface to get mutable reference for the inner data.
## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless it is an obvious bug or documentation fix
that will have little conversation).
-->
To get the mutable reference for inner data in StrongSecret.
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
** THIS CANNOT BE TESTED IN ENVIRONMENTS **
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
|
<think>
PR Context:
- Title: Feat(connector): [JP MORGAN] Added Template code for cards integration
- Merged: 2024-11-05T15:51:59Z
- Files changed: 25 files
- Commits: 2 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
Template code added for new connector JP Morgan
https://developer.payments.jpmorgan.com/docs/commerce/online-payments/capabilities/online-payments/payment-methods/cards
### Additional Changes
- [ ] This PR modifies the API contract
-
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** Feat(connector): [JP MORGAN] Added Template code for cards integration (#6467)
Co-authored-by: Sayak
Files to modify:
**crates/api_models/src/connector_enums.rs**
Modify existing code
**crates/common_enums/src/connector_enums.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors.rs**
Add:
- mod: pub::jpmorgan
**crates/hyperswitch_connectors/src/connectors/jpmorgan.rs**
Add:
- function: pub::new
- function: private::build_headers
- function: private::id
- function: private::get_currency_unit
- function: private::common_get_content_type
- function: private::base_url
- function: private::get_auth_header
- function: private::build_error_response
- function: private::get_headers
- function: private::get_content_type
- function: private::get_url
- function: private::get_request_body
- function: private::build_request
- function: private::handle_response
- function: private::get_error_response
- function: private::get_headers
- function: private::get_content_type
- function: private::get_url
- function: private::build_request
- function: private::handle_response
- function: private::get_error_response
- function: private::get_headers
- function: private::get_content_type
- function: private::get_url
- function: private::get_request_body
- function: private::build_request
- function: private::handle_response
- function: private::get_error_response
- function: private::get_headers
- function: private::get_content_type
- function: private::get_url
- function: private::get_request_body
- function: private::build_request
- function: private::handle_response
- function: private::get_error_response
- function: private::get_headers
- function: private::get_content_type
- function: private::get_url
- function: private::build_request
- function: private::handle_response
- function: private::get_error_response
- function: private::get_webhook_object_reference_id
- function: private::get_webhook_event_type
- function: private::get_webhook_resource_object
- struct: pub::Jpmorgan
- impl: impl Jpmorgan
- impl: impl api::Payment for Jpmorgan
- impl: impl api::PaymentSession for Jpmorgan
- impl: impl api::ConnectorAccessToken for Jpmorgan
- impl: impl api::MandateSetup for Jpmorgan
- impl: impl api::PaymentAuthorize for Jpmorgan
- impl: impl api::PaymentSync for Jpmorgan
- impl: impl api::PaymentCapture for Jpmorgan
- impl: impl api::PaymentVoid for Jpmorgan
- impl: impl api::Refund for Jpmorgan
- impl: impl api::RefundExecute for Jpmorgan
- impl: impl api::RefundSync for Jpmorgan
- impl: impl api::PaymentToken for Jpmorgan
- impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for Jpmorgan
- impl: impl ConnectorCommonExt<Flow, Request, Response> for Jpmorgan
- impl: impl ConnectorCommon for Jpmorgan
- impl: impl ConnectorValidation for Jpmorgan
- impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Jpmorgan
- impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Jpmorgan
- impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Jpmorgan
- impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Jpmorgan
- impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Jpmorgan
- impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Jpmorgan
- impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Jpmorgan
- impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Jpmorgan
- impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Jpmorgan
- impl: impl webhooks::IncomingWebhook for Jpmorgan
- mod: pub::transformers
**crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs**
Add:
- function: private::from
- function: private::try_from
- function: private::try_from
- function: private::from
- function: private::try_from
- function: private::try_from
- function: private::from
- function: private::try_from
- function: private::try_from
- struct: pub::JpmorganRouterData
- struct: pub::JpmorganPaymentsRequest
- struct: pub::JpmorganCard
- struct: pub::JpmorganAuthType
- struct: pub::JpmorganPaymentsResponse
- struct: pub::JpmorganRefundRequest
- struct: pub::RefundResponse
- struct: pub::JpmorganErrorResponse
- enum: pub::JpmorganPaymentStatus
- enum: pub::RefundStatus
- impl: impl From<(StringMinorUnit, T)> for JpmorganRouterData<T>
- impl: impl TryFrom<&JpmorganRouterData<&PaymentsAuthorizeRouterData>> for JpmorganPaymentsRequest
- impl: impl TryFrom<&ConnectorAuthType> for JpmorganAuthType
- impl: impl From<JpmorganPaymentStatus> for common_enums::AttemptStatus
- impl: impl TryFrom<ResponseRouterData<F, JpmorganPaymentsResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData>
- impl: impl TryFrom<&JpmorganRouterData<&RefundsRouterData<F>>> for JpmorganRefundRequest
- impl: impl From<RefundStatus> for enums::RefundStatus
- impl: impl TryFrom<RefundsResponseRouterData<Execute, RefundResponse>> for RefundsRouterData<Execute>
- impl: impl TryFrom<RefundsResponseRouterData<RSync, RefundResponse>> for RefundsRouterData<RSync>
**crates/hyperswitch_connectors/src/default_implementations.rs**
Modify existing code
**crates/hyperswitch_connectors/src/default_implementations_v2.rs**
Modify existing code
**crates/hyperswitch_interfaces/src/configs.rs**
Modify existing code
**crates/router/src/connector.rs**
Modify existing code
**crates/router/src/core/payments/connector_integration_v2_impls.rs**
Modify existing code
**crates/router/src/core/payments/flows.rs**
Modify existing code
**crates/router/src/types/api.rs**
Modify existing code
**crates/router/src/types/transformers.rs**
Modify existing code
**crates/router/tests/connectors/jpmorgan.rs**
Add:
- function: private::new
- function: private::get_data
- function: private::get_auth_token
- function: private::get_name
- function: private::get_default_payment_info
- function: private::payment_method_details
- function: private::should_only_authorize_payment
- function: private::should_capture_authorized_payment
- function: private::should_partially_capture_authorized_payment
- function: private::should_sync_authorized_payment
- function: private::should_void_authorized_payment
- function: private::should_refund_manually_captured_payment
- function: private::should_partially_refund_manually_captured_payment
- function: private::should_sync_manually_captured_refund
- function: private::should_make_payment
- function: private::should_sync_auto_captured_payment
- function: private::should_refund_auto_captured_payment
- function: private::should_partially_refund_succeeded_payment
- function: private::should_refund_succeeded_payment_multiple_times
- function: private::should_sync_refund
- function: private::should_fail_payment_for_incorrect_cvc
- function: private::should_fail_payment_for_invalid_exp_month
- function: private::should_fail_payment_for_incorrect_expiry_year
- function: private::should_fail_void_payment_for_auto_capture
- function: private::should_fail_capture_for_invalid_payment
- function: private::should_fail_for_refund_amount_higher_than_payment_amount
- struct: private::JpmorganTest
- impl: impl JpmorganTest
- impl: impl ConnectorActions for JpmorganTest
- impl: impl utils::Connector for JpmorganTest
**crates/router/tests/connectors/main.rs**
Add:
- mod: private::jpmorgan
**crates/test_utils/src/connector_auth.rs**
Modify existing code
|
{"issue_number": 7281, "pr_number": 6467, "commits_count": 1, "files_changed": 25, "response_length": 8958, "file_count": 18, "needs_breakdown": true}
|
[FEATURE] add permissions for operations in recon module
### Feature Description
Reconciliation module in HyperSwitch provides various operations. Every operation needs to permitted for the end user to use it.
As of today, recon has a single permission - which gives access to the entire recon module, this is not granular. Recon module's permission suite needs to be extended to be able to assign granular access for different operations.
### Possible Implementation
Add permissions for below operations
- Upload files - RW
- Run recon - RW
- View and update recon configs - RW
- View and add file processing - RW
- View Reports - R
- View Analytics - R
These are to be included in JWT in the response of `/recon/verify_token`
### Have you spent some time checking if this feature request has been raised before?
- [X] I checked and didn't find a similar issue
### Have you read the Contributing Guidelines?
- [X] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### Are you willing to submit a PR?
Yes, I am willing to submit a PR!
|
<think>
PR Context:
- Title: feat: add resources and granular permission groups for reconciliation
- Merged: 2024-12-04T09:55:05Z
- Files changed: 18 files
- Commits: 29 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Described in #6524
This PR includes below changes
- Extending resources enum (for specifying the resource being consumed from the dashboard)
- Extending granular permission groups for recon
- Populating `acl` field in the recon token
### Additional Changes
- [ ] This PR m
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat: add resources and granular permission groups for reconciliation (#6591)
Co-authored-by: hypers
Files to modify:
**crates/api_models/src/enums.rs**
Add:
- function: private::from
- enum: pub::ReconPermissionScope
- impl: impl From<PermissionScope> for ReconPermissionScope
**crates/api_models/src/events/recon.rs**
Add:
- function: private::get_api_event_type
- impl: impl ApiEventMetric for VerifyTokenResponse
**crates/api_models/src/events/user.rs**
Remove:
- function: private::get_api_event_type
- impl: impl ApiEventMetric for VerifyTokenResponse
**crates/api_models/src/recon.rs**
Add:
- struct: pub::VerifyTokenResponse
**crates/api_models/src/user.rs**
Remove:
- struct: pub::VerifyTokenResponse
**crates/common_enums/src/enums.rs**
Modify existing code
**crates/router/src/core/recon.rs**
Add:
- function: pub::verify_recon_token
**crates/router/src/core/user.rs**
Remove:
- function: pub::verify_token
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/routes/recon.rs**
Modify existing code
**crates/router/src/routes/user.rs**
Remove:
- function: pub::verify_recon_token
**crates/router/src/services/authentication.rs**
Add:
- function: private::authenticate_and_fetch
- function: pub::new_token
- struct: pub::UserFromTokenWithRoleInfo
- struct: pub::ReconToken
- impl: impl AuthenticateAndFetch<UserFromTokenWithRoleInfo, A> for JWTAuth
- impl: impl ReconToken
**crates/router/src/services/authorization/info.rs**
Modify existing code
**crates/router/src/services/authorization/permission_groups.rs**
Modify existing code
**crates/router/src/services/authorization/permissions.rs**
Modify existing code
**crates/router/src/services/authorization/roles.rs**
Add:
- function: pub::get_recon_acl
**crates/router/src/services/authorization/roles/predefined_roles.rs**
Modify existing code
**crates/router/src/services/email/types.rs**
Modify existing code
|
{"issue_number": 6524, "pr_number": 6591, "commits_count": 1, "files_changed": 18, "response_length": 2832, "file_count": 20, "needs_breakdown": true}
|
feat(connector): Add recovery support for stripebilling
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Context: In case of some billing connectors we dont get the enough data in the webhook itself to support creation of payment intent and payment attempt in our system. So previously we derived a flow named "AdditionalRevenuerecoveryDetails" in this PR:#7402 which name is now changed to "BillingConnectorPaymentSync". This flow is used to fetch payment details of the invoices from the billing connectors using an API call to that billing connector. In this pr we are calling the flow and getting the details which are needed to create payment intent and attempt in our system.
1. Creates a connector integration in stripe billing that supports the API call.
2. Call the flow in recovery_incoming.rs file and using that details further we are creating the payment intent and attempt and verifying them.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are the paths where you can find config files:
1. `config`
3. `crates/router/src/configs`
4. `loadtest/config`
-->
## Motivation and Context
## Testing
1. Go to stripe create a new webhook endpoint with a dummy url to get webhook secret key.
2. create a payment processor stripe
```
curl --location 'http://localhost:8080/v2/connector-accounts' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'x-merchant-id: cloth_seller_mQRYaJduFokPeZ54W6bN' \
--header 'x-profile-id: pro_me6dnNKlhwuq32xhfjCA' \
--header 'Authorization: admin-api-key=test_admin' \
--header 'api-key: test_admin' \
--data '{
"connector_type": "payment_processor",
"connector_name": "stripe",
"connector_account_details": {
"auth_type": "HeaderKey",
"api_key": "api-key
},
"payment_methods_enabled": [
{
"payment_method_type": "card_redirect",
"payment_method_subtypes": [
{
"payment_method_subtype": "card_redirect",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
},
{
"payment_method_type": "card",
"payment_method_subtypes": [
{
"payment_method_subtype": "credit",
"payment_experience": null,
"card_networks": [
"Visa",
"Mastercard"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_subtype": "debit",
"payment_experience": null,
"card_networks": [
"Visa",
"Mastercard"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
},
{
"payment_method_type": "wallet",
"payment_method_subtypes": [
{
"payment_method_subtype": "google_pay",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_subtype": "apple_pay",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_subtype": "we_chat_pay",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_subtype": "ali_pay",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_subtype": "paypal",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_subtype": "mb_way",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
},
{
"payment_method_type": "pay_later",
"payment_method_subtypes": [
{
"payment_method_subtype": "klarna",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_subtype": "affirm",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_subtype": "afterpay_clearpay",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_subtype": "walley",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
},
{
"payment_method_type": "bank_redirect",
"payment_method_subtypes": [
{
"payment_method_subtype": "giropay",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_subtype": "ideal",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_subtype": "eps",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_subtype": "bancontact_card",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_subtype": "przelewy24",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_subtype": "sofort",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_subtype": "blik",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_subtype": "trustly",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_subtype": "online_banking_finland",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_subtype": "online_banking_poland",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
},
{
"payment_method_type": "bank_transfer",
"payment_method_subtypes": [
{
"payment_method_subtype": "ach",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_subtype": "sepa",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_subtype": "bacs",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
},
{
"payment_method_type": "bank_debit",
"payment_method_subtypes": [
{
"payment_method_subtype": "ach",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_subtype": "sepa",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_subtype": "bacs",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_subtype": "becs",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
}
],
"metadata": {
"status_url": "https://2753-2401-4900-1cb8-2ff9-24dd-1ccf-ed12-b464.in.ngrok.io/webhooks/merchant_1678699058/globalpay",
"account_name": "transaction_processing",
"pricing_type": "fixed_price",
"acquirer_bin": "438309",
"acquirer_merchant_id": "00002000000"
},
"frm_configs": null,
"connector_webhook_details": {
"merchant_secret": ""
},
"profile_id": "pro_me6dnNKlhwuq32xhfjCA"
}'
```
change the profile id and other feilds while creating you own one
3. copy the mca id of stripe and paste it in the billing mca curl in feature metadata
```
curl --location 'http://localhost:8080/v2/connector-accounts' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'x-merchant-id: cloth_seller_mQRYaJduFokPeZ54W6bN' \
--header 'x-profile-id: pro_me6dnNKlhwuq32xhfjCA' \
--header 'Authorization: admin-api-key=test_admin' \
--header 'api-key: test_admin' \
--data '{
"connector_type": "billing_processor",
"connector_name": "stripebilling",
"connector_account_details": {
"auth_type": "HeaderKey",
"api_key": "{your api key}"
},
"payment_methods_enabled": [
{
"payment_method_type": "card",
"payment_method_subtypes": [
{
"payment_method_subtype": "credit",
"payment_experience": null,
"card_networks": [
"Visa",
"Mastercard"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_subtype": "debit",
"payment_experience": null,
"card_networks": [
"Visa",
"Mastercard"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": -1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
}
],
"metadata": {
"status_url": "https://2753-2401-4900-1cb8-2ff9-24dd-1ccf-ed12-b464.in.ngrok.io/webhooks/merchant_1678699058/globalpay",
"account_name": "transaction_processing",
"pricing_type": "fixed_price",
"acquirer_bin": "438309",
"acquirer_merchant_id": "00002000000"
},
"frm_configs": null,
"feature_metadata" : {
"revenue_recovery":{
"max_retry_count" : 16,
"billing_connector_retry_threshold": 2,
"billing_account_reference": {
"{your stripe mca id here}": "stripebilling"
}
}
},
"connector_webhook_details": {
"merchant_secret": "{webhook secret you have copied here}"
},
"profile_id": "pro_me6dnNKlhwuq32xhfjCA"
}'
```
4. copy the mca id, profile id and merchant id to construct the endpoint of the webhook.
5. install ngrok and run the service it will give you a https url for your local host port.
6. copy the https url of ngrok
7. construct the webhook endpoint : url/v2/webhooks/merchant_id/profile_id/billing_mca_id
8. paste this endpoint in the place of dummy url you have used to create endpoint in stripe dashboard
9. now create a test subscription use this card "4000 0000 0000 0341" while creating a test subscription and the billing day should start from the next day. If you are creating a test subscription today billing date should start from tommorow.
10. now move the clock past one month.
11. no observe the payment intent table and payment attempt table in db and verify those details with ones we are getting.
Images of the logs:
<img width="1728" alt="Screenshot 2025-03-11 at 5 52 53 PM" src="https://github.com/user-attachments/assets/0a97b656-2417-4812-b9cd-a808183411ea" />
<img width="1728" alt="Screenshot 2025-03-11 at 5 53 10 PM" src="https://github.com/user-attachments/assets/5a9872f1-45a3-4bf5-978c-6e477df36c9f" />
<img width="1728" alt="Screenshot 2025-03-11 at 5 53 21 PM" src="https://github.com/user-attachments/assets/5cbac559-09d8-4939-b2a6-04bc8f50a1bc" />
<img width="1728" alt="Screenshot 2025-03-11 at 5 54 32 PM" src="https://github.com/user-attachments/assets/3eb3fb41-afd4-4a05-8c8b-715310a79d7d" />
<img width="1710" alt="Screenshot 2025-03-10 at 4 52 08 PM" src="https://github.com/user-attachments/assets/05477fdc-656b-42cd-ba27-880d5748cc19" />
<img width="1190" alt="Screenshot 2025-03-10 at 4 52 20 PM" src="https://github.com/user-attachments/assets/d9900f24-2b8f-45c5-b6c5-bd5dcd62357d" />
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
|
<think>
PR Context:
- Title: feat(connector): [stripebilling] consume necessary fields in stripe billing from webhooks for transaction monitoring support
- Merged: 2025-05-06T07:36:19Z
- Files changed: 1 files
- Commits: 30 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Consuming the following fields in the webhook which will support the transaction monitoring feature further.
In stripebilling the subscribed webhook contains an object of that particular invoice. The details needed in the issue are available in the invoice object. Consume Billing add
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): [stripebilling] consume necessary fields in stripe billing from webhooks for transa
Files to modify:
**crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs**
Add:
- function: private::from
- function: private::from
- struct: pub::StripebillingWebhookLinesObject
- struct: pub::StripebillingWebhookLinesData
- struct: pub::StripebillingWebhookLineDataPeriod
- struct: pub::StripebillingInvoiceBillingAddress
- impl: impl From<StripebillingInvoiceBillingAddress> for api_models::payments::AddressDetails
|
{"issue_number": 7461, "pr_number": 7722, "commits_count": 1, "files_changed": 1, "response_length": 1430, "file_count": 3, "needs_breakdown": false}
|
feat(themes): Setup DB for themes
There should a separate table for themes for storing the `theme_id`s for a particular lineage. This should be the schema:
| org_id | merchant_id | profile_id | theme_id |
| ------ | ----------- | ---------- | -------- |
| o1 | m1 | p1 | t1 |
| o1 | m1 | p2 | t2 |
This will be used for changing theme automatically when user switches any entities.
|
<think>
PR Context:
- Title: feat(themes): Setup themes table
- Merged: 2024-11-14T09:16:40Z
- Files changed: 15 files
- Commits: 5 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
This PR creates a new table named `themes` in the DB. This will be used to store the `theme_id` for any lineage of `tenant_id`, `org_id`, `merchant_id` and `profile_id`.
### Additional Changes
- [ ] This PR modifies the API contract
- [
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(themes): Setup themes table (#6533)
Files to modify:
**crates/common_utils/src/types.rs**
Add:
- mod: pub::theme
**crates/common_utils/src/types/theme.rs**
Add:
- enum: pub::ThemeLineage
**crates/diesel_models/src/query/user.rs**
Add:
- mod: pub::theme
**crates/diesel_models/src/query/user/theme.rs**
Add:
- function: pub::insert
- function: private::lineage_filter
- function: pub::find_by_lineage
- function: pub::delete_by_theme_id_and_lineage
- impl: impl ThemeNew
- impl: impl Theme
**crates/diesel_models/src/schema.rs**
Modify existing code
**crates/diesel_models/src/schema_v2.rs**
Modify existing code
**crates/diesel_models/src/user.rs**
Add:
- mod: pub::theme
**crates/diesel_models/src/user/theme.rs**
Add:
- struct: pub::Theme
- struct: pub::ThemeNew
**crates/router/src/db.rs**
Modify existing code
**crates/router/src/db/kafka_store.rs**
Add:
- function: private::insert_theme
- function: private::find_theme_by_lineage
- function: private::delete_theme_by_lineage_and_theme_id
- impl: impl ThemeInterface for KafkaStore
**crates/router/src/db/user.rs**
Add:
- mod: pub::theme
**crates/router/src/db/user/theme.rs**
Add:
- function: private::insert_theme
- function: private::find_theme_by_lineage
- function: private::delete_theme_by_lineage_and_theme_id
- function: private::check_theme_with_lineage
- function: private::insert_theme
- function: private::find_theme_by_lineage
- function: private::delete_theme_by_lineage_and_theme_id
- trait: pub::ThemeInterface
- impl: impl ThemeInterface for Store
- impl: impl ThemeInterface for MockDb
**crates/storage_impl/src/mock_db.rs**
Modify existing code
|
{"issue_number": 6532, "pr_number": 6533, "commits_count": 1, "files_changed": 15, "response_length": 2537, "file_count": 15, "needs_breakdown": false}
|
Get Plan prices
**Request to Subscription Povider to get plans prices**
api/v2/item_prices?item_id[is]=cbdemo_enterprise-suite'
**Response from Subscription Provider**
```
{
"list": [
{
"item_price": {
"id": "cbdemo_enterprise-suite-INR-Daily",
"name": "Enterprise Suite INR Daily",
"item_family_id": "cbdemo_omnisupport-solutions",
"item_id": "cbdemo_enterprise-suite",
"status": "active",
"external_name": "Enterprise Suite",
"pricing_model": "flat_fee",
"price": 10000,
"period": 1,
"currency_code": "INR",
"period_unit": "day",
"free_quantity": 0,
"channel": "web",
"resource_version": 1755510951486,
"updated_at": 1755510951,
"created_at": 1755510951,
"is_taxable": true,
"item_type": "plan",
"show_description_in_invoices": false,
"show_description_in_quotes": false,
"deleted": false,
"object": "item_price"
}
},
{
"item_price": {
"id": "cbdemo_enterprise-suite-monthly",
"name": "Enterprise Suite Monthly",
"item_family_id": "cbdemo_omnisupport-solutions",
"item_id": "cbdemo_enterprise-suite",
"description": "Enterprise Suite billed monthly",
"status": "active",
"external_name": "Enterprise Suite Monthly",
"pricing_model": "flat_fee",
"price": 14100,
"period": 1,
"currency_code": "INR",
"period_unit": "month",
"free_quantity": 0,
"channel": "web",
"resource_version": 1754897341938,
"updated_at": 1754897341,
"created_at": 1754897341,
"is_taxable": true,
"item_type": "plan",
"show_description_in_invoices": false,
"show_description_in_quotes": false,
"deleted": false,
"object": "item_price"
}
},
{
"item_price": {
"id": "cbdemo_enterprise-suite-annual",
"name": "Enterprise Suite Annual",
"item_family_id": "cbdemo_omnisupport-solutions",
"item_id": "cbdemo_enterprise-suite",
"description": "Enterprise Suite billed annually",
"status": "active",
"external_name": "Enterprise Suite Annual",
"pricing_model": "flat_fee",
"price": 169000,
"period": 1,
"currency_code": "INR",
"period_unit": "year",
"free_quantity": 0,
"channel": "web",
"resource_version": 1754897341789,
"updated_at": 1754897341,
"created_at": 1754897341,
"is_taxable": true,
"item_type": "plan",
"show_description_in_invoices": false,
"show_description_in_quotes": false,
"deleted": false,
"object": "item_price"
}
}
]
}
```
|
<think>
PR Context:
- Title: feat(connector): Add support for get plan prices for Chargebee
- Merged: 2025-09-19T08:20:28Z
- Files changed: 16 files
- Commits: 25 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
This PR integrates the get plan prices endpoint for chargebee, required to be called in the respective API handler for the same (not yet implemented)
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): Add support for get plan prices for Chargebee (#9300)
Co-authored-by: hyperswitch-b
Files to modify:
**crates/hyperswitch_connectors/src/connectors/chargebee.rs**
Add:
- function: private::get_chargebee_plan_prices_query_params
- function: private::get_headers
- function: private::get_url
- function: private::build_request
- function: private::handle_response
- function: private::get_error_response
- impl: impl api::subscriptions::GetSubscriptionPlanPricesFlow for Chargebee
- impl: impl ConnectorIntegration<
GetSubscriptionPlanPrices,
GetSubscriptionPlanPricesRequest,
GetSubscriptionPlanPricesResponse,
> for Chargebee
- impl: impl GetSubscriptionPlanPricesV2 for Chargebee
- impl: impl ConnectorIntegrationV2<
GetSubscriptionPlanPrices,
hyperswitch_domain_models::router_data_v2::flow_common_types::GetSubscriptionPlanPricesData,
GetSubscriptionPlanPricesRequest,
GetSubscriptionPlanPricesResponse,
> for Chargebee
**crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs**
Add:
- function: private::try_from
**crates/hyperswitch_connectors/src/connectors/recurly.rs**
Add:
- impl: impl api::subscriptions_v2::GetSubscriptionPlanPricesV2 for Recurly
- impl: impl ConnectorIntegrationV2<
GetSubscriptionPlanPrices,
GetSubscriptionPlanPricesData,
GetSubscriptionPlanPricesRequest,
GetSubscriptionPlanPricesResponse,
> for Recurly
**crates/hyperswitch_connectors/src/default_implementations.rs**
Remove:
- impl: impl Subscriptions for connectors::DummyConnector<T>
Add:
- impl: impl GetSubscriptionPlanPricesFlow for $connector
- impl: impl ConnectorIntegration<
GetSubscriptionPlanPrices,
GetSubscriptionPlanPricesRequest,
GetSubscriptionPlanPricesResponse
> for $connector
- impl: impl Subscriptions for connectors::DummyConnector<T>
- impl: impl GetSubscriptionPlanPricesFlow for connectors::DummyConnector<T>
- impl: impl ConnectorIntegration<
GetSubscriptionPlanPrices,
GetSubscriptionPlanPricesRequest,
GetSubscriptionPlanPricesResponse,
> for connectors::DummyConnector<T>
**crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs**
Add:
- struct: pub::GetSubscriptionPlanPricesData
**crates/hyperswitch_domain_models/src/router_flow_types.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/router_flow_types/subscriptions.rs**
Add:
- struct: pub::GetSubscriptionPlanPrices
**crates/hyperswitch_domain_models/src/router_request_types/subscriptions.rs**
Add:
- struct: pub::GetSubscriptionPlanPricesRequest
**crates/hyperswitch_domain_models/src/router_response_types/subscriptions.rs**
Add:
- struct: pub::GetSubscriptionPlanPricesResponse
- struct: pub::SubscriptionPlanPrices
- enum: pub::PeriodUnit
**crates/hyperswitch_domain_models/src/types.rs**
Modify existing code
**crates/hyperswitch_interfaces/src/api.rs**
Modify existing code
**crates/hyperswitch_interfaces/src/api/subscriptions.rs**
Add:
- trait: pub::GetSubscriptionPlanPricesFlow
- trait: private::GetSubscriptionPlanPricesFlow
**crates/hyperswitch_interfaces/src/api/subscriptions_v2.rs**
Remove:
- trait: pub::SubscriptionsV2
Add:
- trait: pub::SubscriptionsV2
- trait: pub::GetSubscriptionPlanPricesV2
**crates/hyperswitch_interfaces/src/conversion_impls.rs**
Remove:
- function: private::from_old_router_data
- function: private::to_old_router_data
- impl: impl RouterDataConversion<T, Req, Resp> for GetSubscriptionPlansData
**crates/hyperswitch_interfaces/src/types.rs**
Modify existing code
**crates/router/src/services/api.rs**
Modify existing code
|
{"issue_number": 9054, "pr_number": 9300, "commits_count": 1, "files_changed": 16, "response_length": 4657, "file_count": 18, "needs_breakdown": true}
|
[FIX] Remove ToSchema from RefundAggregateResponse and exclude it from OpenAPI documentation
### Feature Description
The RefundAggregateResponse type used by the [/refunds/aggregate](https://github.com/juspay/hyperswitch/blob/37925626e6446900f1d16e0e5f184ee472d4be3e/crates/router/src/routes/app.rs#L1004) API is currently annotated with ToSchema, which generates OpenAPI schema documentation for it. However, since this API is internal and should not be exposed to external users, the schema should not be generated or included in the OpenAPI documentation.
Current Behavior:
- The `RefundAggregateResponse` struct is annotated with ToSchema, which automatically generates OpenAPI documentation.
- This results in the exposure of internal API details that should remain hidden from external consumers.
Expected Behavior:
- Remove the `ToSchema` derive macro from the RefundAggregateResponse struct.
- Ensure that this struct and its associated API are excluded from OpenAPI documentation generation.
### Possible Implementation
The Api [refunds/aggregate](https://github.com/juspay/hyperswitch/blob/37925626e6446900f1d16e0e5f184ee472d4be3e/crates/router/src/core/refunds.rs#L1098) returns `RefundAggregateResponse`
The following code should be modified to remove ToSchema and update the OpenAPI documentation accordingly:
```
#[derive(Clone, Debug, serde::Serialize, ToSchema)]
pub struct RefundAggregateResponse {
/// The list of refund status with their count
pub status_with_count: HashMap<enums::RefundStatus, i64>,
}
```
Tasks:
- Remove the ToSchema derive macro from the RefundAggregateResponse struct.
- Remove any references to RefundAggregateResponse from openapi.rs to ensure it is not documented.
- Test to verify that this type is no longer included in the OpenAPI schema.
Additional Context:
Since the `/refunds/aggregate` API is for internal use only, removing the OpenAPI schema ensures that this internal API remains undocumented for merchants.
### Have you spent some time checking if this feature request has been raised before?
- [X] I checked and didn't find a similar issue
### Submission Process:
- Ask the maintainers for assignment of the issue, you can request for assignment by commenting on the issue itself.
- Once assigned, submit a pull request (PR).
- Maintainers will review and provide feedback, if any.
- Maintainers can unassign issues due to inactivity, [read more here](https://github.com/juspay/hyperswitch/wiki/Hacktoberfest-Contribution-Rules).
Refer [here](https://github.com/juspay/hyperswitch/blob/main/docs/TERMS_OF_CONTEST.md) for Terms and conditions for the contest.
|
<think>
PR Context:
- Title: fix(refunds): remove to schema from refund aggregate response and exclude it from open api documentation
- Merged: 2024-11-05T09:26:13Z
- Files changed: 5 files
- Commits: 11 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
Removed all the openapi references to `RefundAggregateResponse`.
1. Removed `ToSchema` trait for `RefundAggregateResponse`.
2. Removed references from `openapi` and `openapi_v2` to `RefundAggregateResponse`.
3. Generated new `openapi_spec
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(refunds): remove to schema from refund aggregate response and exclude it from open api documenta
Files to modify:
**crates/api_models/src/refunds.rs**
Modify existing code
**crates/openapi/src/openapi.rs**
Modify existing code
**crates/openapi/src/openapi_v2.rs**
Modify existing code
|
{"issue_number": 5990, "pr_number": 6405, "commits_count": 1, "files_changed": 5, "response_length": 1136, "file_count": 5, "needs_breakdown": false}
|
[CI] cypress checks for wise failing
wise is returning status as `forbidden`. it is better to replace that with adyen payouts
|
<think>
PR Context:
- Title: ci(cypress-ci): remove wise payout from running in github ci
- Merged: 2025-04-08T08:31:18Z
- Files changed: 1 files
- Commits: 2 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [x] CI/CD
## Description
<!-- Describe your changes in detail -->
this pr updates the `adyen` payouts credentials and it also replaces wise from running in github ci
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies appl
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 7755, "pr_number": 7756, "commits_count": 0, "files_changed": 1, "response_length": 790, "file_count": 0, "needs_breakdown": false}
|
feat(single_use): add extra fields in `Mandate` table and `MandateData` [Blocked on #61]
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
## Description
This PR adds single use mandate support and a 2 new fields to the mandate table (i.e. singe_use_amount, single_use_currency)
<!-- Describe your changes in detail -->
### Additional Changes
- [x] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->
The change includes the following files.
- migrations/2022-12-05-090521_single_use_mandate_fields/up.sql
- migrations/2022-12-05-090521_single_use_mandate_fields/down.sql
## Motivation and Context
Here, the intension is adding a new Validation feature in PaymentsCore, for that reason following are the steps that the change is broken down to.
1. Create new types for the change #45
2. Introduce the Flow and Connector Integration #47
3. Add Stripe POC #50
4. Introduce the new operation and all the related components in the payments core #53 + #61
5. Changing the `MandateData` type
6. Move the mandate related behaviour to domain
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless its an obvious bug or documentation fix
that will have little conversation).
-->
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed submitted code
- [ ] I added unit tests for my changes where possible
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
|
<think>
PR Context:
- Title: feat(payouts): add payout currency in wasm crate
- Merged: 2025-09-30T14:41:56Z
- Files changed: 4 files
- Commits: 1 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
This PR adds two changes
1. Updates `Sepa` to `SepaBankTransfer` for dynamic required fields for payouts
2. Adds PayoutCurrency as a rule to be set while configuring payout routing on dashboard
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modif
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(payouts): add payout currency in wasm crate (#9626)
Files to modify:
**crates/euclid/src/frontend/dir.rs**
Modify existing code
**crates/euclid/src/types.rs**
Modify existing code
**crates/euclid_wasm/src/lib.rs**
Modify existing code
**crates/router/src/configs/defaults/payout_required_fields.rs**
Modify existing code
|
{"issue_number": 66, "pr_number": 9626, "commits_count": 1, "files_changed": 4, "response_length": 1119, "file_count": 6, "needs_breakdown": false}
|
Adding new logo in API ref and Readme
|
<think>
PR Context:
- Title: docs: add new logos for README and API reference
- Merged: 2024-12-10T11:57:39Z
- Files changed: 6 files
- Commits: 15 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [X] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding ch
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 6782, "pr_number": 6783, "commits_count": 0, "files_changed": 6, "response_length": 779, "file_count": 0, "needs_breakdown": false}
|
feat(connector): [Peach Payments] add network token support for connector
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
add network token support for peach payments connector
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->
## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless it is an obvious bug or documentation fix
that will have little conversation).
-->
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
- Create MCA for peach payments
- Enable network tokenization for profile
```
curl --location 'http://localhost:8080/account/merchant_id/business_profile/prof_id' \
--header 'Content-Type: application/json' \
--header 'api-key: api key' \
--data '{
"profile_name": "US_default",
"is_network_tokenization_enabled": true
}'
```
- Create payment
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_CNdykrXQ50vzfqwZtbakrK0awo6TkkdQHDXv0QnpB8tA05z3sVIKLAEUGqIEXWE8' \
--data-raw '
{
"amount": 200,
"currency": "EUR",
"confirm": true,
"capture_method": "manual",
"capture_on": "2022-09-10T10:11:12Z",
"customer_id": "<customer_id>",
"email": "guest@example.com",
"name": "John Doe",
"phone": "999999999",
"phone_country_code": "+65",
"description": "Its my first payment request",
"authentication_type": "no_three_ds",
"return_url": "https://google.com",
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "card_number",
"card_exp_month": "12",
"card_exp_year": "2026",
"card_holder_name": "joseph Doe",
"card_cvc": "123",
"card_network": "VISA"
}
},
"setup_future_usage": "on_session",
"customer_acceptance": {
"acceptance_type": "offline",
"accepted_at": "1963-05-03T04:07:52.723Z",
"online": {
"ip_address": "in sit",
"user_agent": "amet irure esse"
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "PiX",
"last_name": "ss"
}
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "John",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
}
},
"browser_info": {
"user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
"accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
"language": "nl-NL",
"color_depth": 24,
"screen_height": 723,
"screen_width": 1536,
"time_zone": 0,
"java_enabled": true,
"java_script_enabled": true,
"ip_address": "125.0.0.1"
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"metadata": {},
"order_details": [
{
"product_name": "Apple iphone 15",
"quantity": 1,
"amount": 0,
"account_name": "transaction_processing"
}
],
"profile_id": "<profile_id>"
}'
```
- Do repeat CIT [Saved Card flow]
using saved card,
payment method data sent to connector in logs should be network token data.
ps. please search for raw_connector_request
create payment-
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_CNdykrXQ50vzfqwZtbakrK0awo6TkkdQHDXv0QnpB8tA05z3sVIKLAEUGqIEXWE8' \
--data '{
"amount": 200,
"currency": "EUR",
"capture_method": "manual",
"authentication_type": "no_three_ds",
"confirm": false,
"setup_future_usage": "on_session",
"customer_id": "cu_1760091918",
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US"
}
},
"profile_id": "pro_55Ey3rupyS9BnqWKLkG3"
}'
```
confirm -
```
curl --location 'http://localhost:8080/payments/<payment_id>/confirm' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: api key' \
--data '
{
"payment_token": "payment_token",
"client_secret": "client_secret",
"browser_info": {
"user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
"accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
"language": "nl-NL",
"color_depth": 24,
"screen_height": 723,
"screen_width": 1536,
"time_zone": 0,
"java_enabled": true,
"java_script_enabled": true,
"ip_address": "125.0.0.1"
},
"payment_method": "card",
"payment_method_data":{
"card_token":{
"card_cvc": "737"
}
}
}'
```
<img width="1728" height="140" alt="Screenshot 2025-10-13 at 3 58 40 PM" src="https://github.com/user-attachments/assets/e75f7977-77cd-4022-b99f-e13ec478913a" />
<img width="952" height="576" alt="Screenshot 2025-10-13 at 4 42 39 PM" src="https://github.com/user-attachments/assets/64623865-5fbb-4152-8e48-68909809f439" />
<img width="876" height="739" alt="Screenshot 2025-10-13 at 4 42 58 PM" src="https://github.com/user-attachments/assets/69fb00b2-4183-4187-b5f5-b2b3d7b8f366" />
three test cases are failing due to incorrect assertion. this is currently on main.
How to replicate this -
in create call, confirm is set to falsem capture method to automatic, and payment method data is not sent. in create response, requires_payment_method status is given.
now in confirm api, send payment method data.
expected - Throw error saying automatic capture is not supported
current output - Trying to make a call to connector.
Can be taken up in seperate pr.
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [ ] I formatted the code `cargo +nightly fmt --all`
- [ ] I addressed lints thrown by `cargo clippy`
- [ ] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
|
<think>
PR Context:
- Title: feat(connector): [Peach Payments] add network token support for connector
- Merged: 2025-10-13T14:00:59Z
- Files changed: 8 files
- Commits: 1 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
add network token support for peach payments connector
hotfix for - #9754
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/envir
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): [Peach Payments] add network token support for connector (#9814)
Co-authored-by: hy
Files to modify:
**crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs**
Remove:
- struct: pub::PeachpaymentsPaymentsRequest
Add:
- function: private::from
- function: private::try_from
- function: private::try_from
- struct: pub::PeachpaymentsPaymentsCardRequest
- struct: pub::CardOnFileData
- struct: pub::EcommerceNetworkTokenPaymentOnlyTransactionData
- struct: pub::NetworkTokenDetails
- enum: pub::PeachpaymentsPaymentsRequest
- enum: pub::EcommercePaymentOnlyTransactionData
- enum: pub::CardNetworkLowercase
- impl: impl From<common_enums::CardNetwork> for CardNetworkLowercase
- impl: impl TryFrom<(
&PeachpaymentsRouterData<&PaymentsAuthorizeRouterData>,
NetworkTokenData,
)> for PeachpaymentsPaymentsRequest
- impl: impl TryFrom<(&PeachpaymentsRouterData<&PaymentsAuthorizeRouterData>, Card)> for PeachpaymentsPaymentsRequest
**crates/router/src/core/payment_methods/network_tokenization.rs**
Modify existing code
|
{"issue_number": 9754, "pr_number": 9814, "commits_count": 1, "files_changed": 8, "response_length": 1940, "file_count": 4, "needs_breakdown": false}
|
[FEATURE] add payment method filter in v2
### Feature Description
List all the available currencies and countries for the given connector and payment method type.
### Possible Implementation
Add the filter route to the V2 PaymentMethods implementation.
### Have you spent some time checking if this feature request has been raised before?
- [x] I checked and didn't find a similar issue
### Have you read the Contributing Guidelines?
- [x] I have read the [Contributing Guidelines](https://github.com/juspay/hyperswitch/blob/main/docs/CONTRIBUTING.md)
### Are you willing to submit a PR?
Yes, I am willing to submit a PR!
|
<think>
PR Context:
- Title: feat(payment_methods): add payment-methods/filter endpoint to list countries and currencies for connector payment method in v2
- Merged: 2025-08-22T13:26:14Z
- Files changed: 2 files
- Commits: 4 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [X] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
Add the payment method filter route to the V2 PaymentMethods implementation which list all available countries and currencies based on connector and payment method type.
### Additional Changes
- [X] This PR modifies the API contract
-
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(payment_methods): add payment-methods/filter endpoint to list countries and currencies for conn
Files to modify:
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/routes/payment_methods.rs**
Add:
- function: pub::list_countries_currencies_for_connector_payment_method
|
{"issue_number": 8977, "pr_number": 8978, "commits_count": 1, "files_changed": 2, "response_length": 1169, "file_count": 4, "needs_breakdown": false}
|
fix(connector): [Worldpay] add root CA certificate
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
This PR adds below changes for the Worldpay connector
1. Add a root CA certificate for Worldpay's request client
2. Add a new AuthType for Worldpay - MultiAuthType
3. Use `MultiAuthType` in wasm crate for Worldpay
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are the paths where you can find config files:
1. `config`
4. `crates/router/src/configs`
5. `loadtest/config`
-->
## Motivation and Context
This fixes the self signed certificate not trusted errors for Worldpay in production.
## How did you test it?
Cannot be tested in non prod env.
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
|
<think>
PR Context:
- Title: revert(connector): [Worldpay] add root CA certificate
- Merged: 2025-06-10T08:33:22Z
- Files changed: 5 files
- Commits: 1 commits
Implementation approach:
Reverts juspay/hyperswitch#8205
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** revert(connector): [Worldpay] add root CA certificate (#8224)
Files to modify:
**crates/hyperswitch_connectors/src/connectors/worldpay.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/worldpay/transformers.rs**
Modify existing code
|
{"issue_number": 8205, "pr_number": 8224, "commits_count": 1, "files_changed": 5, "response_length": 579, "file_count": 4, "needs_breakdown": false}
|
[BUG] [NOON] 3ds payment have `next_action` as `null`
3ds card payments in noon connector receive `next_action` as `null`.
this can be resolved by unifying both the responses (paypal and card) into one and use it else where.
|
<think>
PR Context:
- Title: fix(connector): [noon] address `next_action_url` being `null` for cards in 3ds payment
- Merged: 2025-04-21T08:20:04Z
- Files changed: 2 files
- Commits: 1 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
previously, when making a 3ds card transaction via noon connector, we would get `next_action` as `null` which is not intended. and that is because, paypal response would override the transaction data. this pr fixes this by unifying both of t
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(connector): [noon] address `next_action_url` being `null` for cards in 3ds payment (#7832)
Files to modify:
**crates/hyperswitch_connectors/src/connectors/noon.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/noon/transformers.rs**
Remove:
- function: private::try_from
- struct: pub::NoonPaypalResponse
- struct: pub::NoonPaypalResponseResult
- enum: pub::NoonAuthPaymentResponse
- impl: impl TryFrom<ResponseRouterData<F, NoonPaypalResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData>
|
{"issue_number": 7831, "pr_number": 7832, "commits_count": 1, "files_changed": 2, "response_length": 1386, "file_count": 4, "needs_breakdown": false}
|
End of preview. Expand
in Data Studio
Rust Commit Dataset - Hyperswitch
Dataset Description
This dataset contains Rust commit messages paired with their corresponding code patches from the Hyperswitch repository.
Dataset Summary
- Total Examples: 319
- Language: Rust
- Source: Hyperswitch GitHub repository
- Format: Prompt-response pairs for supervised fine-tuning (SFT)
Data Fields
prompt: The commit message describing the changeresponse: The git patch/diff showing the actual code changes
Example
{
"prompt": "fix: update payment status handling",
"response": "diff --git a/src/payment.rs b/src/payment.rs\n..."
}
Usage
from datasets import load_dataset
# Load dataset
dataset = load_dataset("archit11/hyperswitch-issue-to-code_v2")
# Access train/test splits
train_data = dataset['train']
test_data = dataset['test']
# Example
print(train_data[0]['prompt'])
print(train_data[0]['response'])
Training
This dataset is designed for fine-tuning code generation models on Rust commit-to-patch generation tasks.
Example training command:
python train_sft.py \
--dataset archit11/hyperswitch-issue-to-code_v2 \
--model Qwen/Qwen3-4B \
--output_dir ./qwen-rust-sft \
--use_4bit \
--use_lora
Data Collection
The data was collected using PyDriller and tree-sitter for parsing Rust identifiers:
- Only commits with 20+ lines changed are included
- Rust-specific identifier tracking (functions, structs, enums, traits, impls, modules)
Citation
If you use this dataset, please cite the Hyperswitch repository:
@misc{hyperswitch2024,
title={Hyperswitch},
author={Juspay},
year={2024},
url={https://github.com/juspay/hyperswitch}
}
License
This dataset follows the same license as the Hyperswitch project.
- Downloads last month
- 21