prompt
stringlengths 24
70.5k
| response
stringlengths 271
16.7k
| metadata
stringlengths 145
152
|
|---|---|---|
[CHORE] Update GlobalPay production endpoint
at present, production endpoint points to sandbox and we need to point to production url
|
<think>
PR Context:
- Title: chore: update production endpoint url for globalPay
- Merged: 2025-03-24T08:11:04Z
- Files changed: 4 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
<!-- Describe your changes in detail -->
This PR updates the production endpoint url environment value for GlobalPay while fixing minor inconsistencies
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR mo
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** chore: update production endpoint url for globalPay (#7588)
Co-authored-by: hyperswitch-bot[bot] <14
Files to modify:
**crates/hyperswitch_connectors/src/connectors/globalpay.rs**
Modify existing code
|
{"issue_number": 7587, "pr_number": 7588, "commits_count": 1, "files_changed": 4, "response_length": 988, "file_count": 3, "needs_breakdown": false}
|
[REFACTOR] use REQUEST_TIME_OUT for outgoing webhooks instead of hardcoded 5-second timeout
**Problem Statement**
The current outgoing webhook timeout is hardcoded to 5 seconds, which is too restrictive and causes delivery failures for legacy systems which might take over 5 seconds to respond back. We should use the existing `REQUEST_TIME_OUT` constant (30s) for consistency with other external API calls.
**Current Implementation**
`const OUTGOING_WEBHOOK_TIMEOUT_SECS: u64 = 5;`
**Proposed Solution**
Remove `OUTGOING_WEBHOOK_TIMEOUT_SECS` and use the existing `REQUEST_TIME_OUT` constant (30s) for outgoing webhook requests. This keeps the timeout behavior of any outgoing APIs consistent.
|
<think>
PR Context:
- Title: refactor(webhooks): use REQUEST_TIME_OUT constant for outgoing webhooks
- Merged: None
- Files changed: 3 files
- Commits: 1 commits
Implementation approach:
## Summary
- Replace hardcoded 5-second timeout with existing REQUEST_TIME_OUT constant (30s) for outgoing webhook requests
- Remove OUTGOING_WEBHOOK_TIMEOUT_SECS constant from webhook modules
- Update both v1 and v2 webhook implementations to use consistent timeout behavior
## Problem
The current outgoing webhook timeout is hardcoded to 5 seconds, which is too restrictive and causes delivery failures for legacy systems that might take over 5 seconds to respond back.
## Solution
This PR addr
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 8724, "pr_number": 8726, "commits_count": 0, "files_changed": 3, "response_length": 785, "file_count": 0, "needs_breakdown": false}
|
[FEATURE] Generate Random Disputes for sample data
### Feature Description
The issue is sub part of issue: #5991 (Please refer to this First)
The current implementation of the generate_sample_data_for_user function generates sample data for payments and refunds. However, there is no functionality to generate sample disputes. This issue is about extending the generate_sample_data_for_user function to generate random disputes based on the sample payments created.
Current Behavior
- The /sample_data API generates sample payments and refunds.
- No disputes are generated as part of the sample data generation process.
Expected Behavior
- The generate_sample_data_for_user function should also generate random disputes along with payments and refunds.
- The number of disputes generated should be based on the number of payments created:
2 disputes if the number of payments is between 50 and 100.
1 dispute if the number of payments is less than 50.
### Possible Implementation
Modify generate_sample_data_for_user Function:
Update the function in `utils::user::sample_data::generate_sample_data` to create sample disputes based on the number of generated payments.
The Data should be random and fields should be related to sample payments/refunds for which we are creating dispute.
Call the Db function inside `generate_sample_data_for_user` to Batch insert sample disputes
Call the Db function inside `delete_sample_data_for_user` to Delete sample disputes
Test
To generate Sample Data:
```
curl --location 'http://localhost:8080/user/sample_data' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer JWT' \
--data '{
}'
```
To Delete Sample Data:
```
curl --location --request DELETE 'http://localhost:8080/user/sample_data' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer JWT' \
--data '{
}'
```
### 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?
None
|
<think>
PR Context:
- Title: feat(sample_data): generate random disputes for sample data
- Merged: 2024-10-25T08:45:37Z
- Files changed: 2 files
- Commits: 22 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 -->
I added dispute generation to function `generate_sample_data` in `utils/user/sample_data.rs`.
The number of disputes generated is based on the number of payments created:
2 disputes if the number of payments is between 50 and 100.
1 disput
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(sample_data): generate random disputes for sample data (#6341)
Files to modify:
**crates/router/src/core/user/sample_data.rs**
Modify existing code
**crates/router/src/utils/user/sample_data.rs**
Modify existing code
|
{"issue_number": 6117, "pr_number": 6341, "commits_count": 1, "files_changed": 2, "response_length": 1021, "file_count": 4, "needs_breakdown": false}
|
fix(openapi): Fix broken pages in mintlify (v2)
v2 mintlify docs have several broken pages and some endpoints are missing.
|
<think>
PR Context:
- Title: fix(openapi): Fix broken mintlify pages (v2)
- Merged: 2025-06-20T13:54:03Z
- Files changed: 18 files
- Commits: 4 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [x] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
Fixed the following mintlify pages:
- `v2/customers/customers--update.mdx`
- `payment-method-session--confirm-a-payment-method-session.mdx`
- `payment-method-session--delete-a-saved-payment-method.mdx`
- `payment-method-session--list-pay
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(openapi): Fix broken mintlify pages (v2) (#8382)
Co-authored-by: hyperswitch-bot[bot] <148525504
Files to modify:
**crates/openapi/src/routes/payments.rs**
Modify existing code
**crates/openapi/src/routes/tokenization.rs**
Modify existing code
|
{"issue_number": 8381, "pr_number": 8382, "commits_count": 1, "files_changed": 18, "response_length": 1032, "file_count": 4, "needs_breakdown": false}
|
feat: add support for updating surcharge_applicable field intent
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] New feature
## Description
<!-- Describe your changes in detail -->
-> Enabled updating surcharge_applicable in payment_intent.
-> Implemented apply_and_ceil_result() function in Percentage struct
## 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 --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
|
<think>
PR Context:
- Title: feat(dashboard_metadata): Add `ReconStatus` in `dashboard_metadata`
- Merged: 2025-03-26T10:26:02Z
- Files changed: 7 files
- Commits: 7 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 -->
This PR will add a new variant in Dashboard Metadata for storing the recon state.
### Additional Changes
- [x] This PR modifies the API contract
- [x] This PR modifies the database schema
- [ ] This PR modifies application configuratio
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(dashboard_metadata): Add `ReconStatus` in `dashboard_metadata` (#7595)
Co-authored-by: hyperswi
Files to modify:
**crates/api_models/src/user/dashboard_metadata.rs**
Add:
- struct: pub::ReconStatus
**crates/diesel_models/src/enums.rs**
Modify existing code
**crates/router/src/core/user/dashboard_metadata.rs**
Modify existing code
**crates/router/src/types/domain/user/dashboard_metadata.rs**
Modify existing code
**crates/router/src/utils/user/dashboard_metadata.rs**
Modify existing code
|
{"issue_number": 2647, "pr_number": 7595, "commits_count": 1, "files_changed": 7, "response_length": 1315, "file_count": 7, "needs_breakdown": false}
|
Fix(CI): Update api-reference path in `pr_labeler`
PR #8333 modified the `api-reference` folder structure. Need to update it in `pr_labeler` job
|
<think>
PR Context:
- Title: fix(ci): Update api-reference path in pr_labeler job
- Merged: 2025-06-16T11:54:06Z
- 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
- [x] CI/CD
## Description
<!-- Describe your changes in detail -->
- Updated OpenAPI spec path in `pr_labeler` CI job
- Modified `CODEOWNERS` file to remove deleted folder
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 8343, "pr_number": 8344, "commits_count": 0, "files_changed": 2, "response_length": 782, "file_count": 0, "needs_breakdown": false}
|
feat(users): Add profile level custom role
Currently only merchant level custom role is allowed with role scope as Merchant and organization
The requirement is to add profile level custom role at Organization , Merchant and Profile scope
|
<think>
PR Context:
- Title: feat(users): custom role at profile read
- Merged: 2025-02-05T14:28:03Z
- Files changed: 19 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
<!-- Describe your changes in detail -->
This pr adds the functionality to read custom role at profile level
### Additional Changes
- [x] This PR modifies the API contract
- [x] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(users): custom role at profile read (#6875)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyp
Files to modify:
**crates/api_models/src/user_role/role.rs**
Modify existing code
**crates/common_enums/src/enums.rs**
Add:
- function: private::from
**crates/diesel_models/src/query/role.rs**
Remove:
- function: pub::list_roles
Add:
- function: pub::generic_list_roles_by_entity_type
**crates/diesel_models/src/role.rs**
Add:
- enum: pub::ListRolesByEntityPayload
**crates/diesel_models/src/schema.rs**
Modify existing code
**crates/diesel_models/src/schema_v2.rs**
Modify existing code
**crates/router/src/core/user.rs**
Modify existing code
**crates/router/src/core/user_role.rs**
Modify existing code
**crates/router/src/core/user_role/role.rs**
Modify existing code
**crates/router/src/db/kafka_store.rs**
Remove:
- function: private::list_all_roles
Add:
- function: private::generic_list_roles_by_entity_type
**crates/router/src/db/role.rs**
Modify existing code
**crates/router/src/services/authorization/roles.rs**
Modify existing code
**crates/router/src/utils/user_role.rs**
Modify existing code
**Commit 2:** feat(users): custom role at profile read (#6875)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyp
Files to modify:
**crates/api_models/src/user_role/role.rs**
Modify existing code
**crates/common_enums/src/enums.rs**
Add:
- function: private::from
**crates/diesel_models/src/query/role.rs**
Remove:
- function: pub::list_roles
Add:
- function: pub::generic_list_roles_by_entity_type
**crates/diesel_models/src/role.rs**
Add:
- enum: pub::ListRolesByEntityPayload
**crates/diesel_models/src/schema.rs**
Modify existing code
**crates/diesel_models/src/schema_v2.rs**
Modify existing code
**crates/router/src/core/user.rs**
Modify existing code
**crates/router/src/core/user_role.rs**
Modify existing code
**crates/router/src/core/user_role/role.rs**
Modify existing code
**crates/router/src/db/kafka_store.rs**
Remove:
- function: private::list_all_roles
Add:
- function: private::generic_list_roles_by_entity_type
**crates/router/src/db/role.rs**
Modify existing code
**crates/router/src/services/authorization/roles.rs**
Modify existing code
**crates/router/src/utils/user_role.rs**
Modify existing code
|
{"issue_number": 6488, "pr_number": 6875, "commits_count": 2, "files_changed": 19, "response_length": 3139, "file_count": 29, "needs_breakdown": true}
|
fix(connector): [noon] address `next_action_url` being `null` for cards in 3ds payment
## 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 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`
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).
-->
3ds transactions are expected to have an object in next action while at present, we are getting it as null for card payments and this is not intended.
closes #7831
## 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)?
-->
3ds card payment:
```curl
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_dSMvDZeLPCEUIv7ZV4JQxAQIoTuE0kdlKZEhxK7gn15IY7WkcKKAgbvSEG8FEuOY' \
--data-raw '{
"amount": 390,
"currency": "AED",
"confirm": true,
"capture_method": "automatic",
"customer_id": "sammantest2722",
"capture_on": "2022-09-10T10:11:12Z",
"authentication_type": "three_ds",
"return_url": "https://google.com",
"email": "[email protected]",
"name": "Joseph Doe",
"phone": "999999999",
"phone_country_code": "+65",
"description": "Its my first payment",
"statement_descriptor_name": "Juspay",
"statement_descriptor_suffix": "Router",
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4000000000002701",
"card_exp_month": "01",
"card_exp_year": "2035",
"card_holder_name": "joseph Doe",
"card_cvc": "100"
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "AE",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
}
},
"browser_info": {
"user_agent": "Mozilla\/5.0 (iPhone 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": "128.0.0.1"
},
"connector_metadata": {
"noon": {
"order_category": "pay"
}
},
"order_details": [
{
"product_name": "Apple iphone 15",
"quantity": 1,
"amount": 390,
"account_name": "transaction_processing"
}
]
}'
```
```json
{
"payment_id": "pay_kgxQFsLwpvRE5DN7pOjF",
"merchant_id": "postman_merchant_GHAction_7ec10174-0196-450e-a39a-4f9b61a32def",
"status": "requires_customer_action",
"amount": 390,
"net_amount": 390,
"shipping_cost": null,
"amount_capturable": 390,
"amount_received": null,
"connector": "noon",
"client_secret": "pay_kgxQFsLwpvRE5DN7pOjF_secret_JwwEA4oIyoD2w8lyNkuw",
"created": "2025-04-16T12:07:18.695Z",
"currency": "AED",
"customer_id": "sammantest2722",
"customer": {
"id": "sammantest2722",
"name": "Joseph Doe",
"email": "[email protected]",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Its my first payment",
"refunds": null,
"disputes": null,
"mandate_id": null,
"mandate_data": null,
"setup_future_usage": null,
"off_session": null,
"capture_on": null,
"capture_method": "automatic",
"payment_method": "card",
"payment_method_data": {
"card": {
"last4": "2701",
"card_type": "CREDIT",
"card_network": "Visa",
"card_issuer": "INTL HDQTRS-CENTER OWNED",
"card_issuing_country": "UNITEDSTATES",
"card_isin": "400000",
"card_extended_bin": null,
"card_exp_month": "01",
"card_exp_year": "2035",
"card_holder_name": "joseph Doe",
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": {
"address": {
"city": "San Fransico",
"country": "AE",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": null
},
"order_details": [
{
"brand": null,
"amount": 390,
"category": null,
"quantity": 1,
"tax_rate": null,
"product_id": null,
"product_name": "Apple iphone 15",
"product_type": null,
"sub_category": null,
"product_img_link": null,
"product_tax_code": null,
"total_tax_amount": null,
"requires_shipping": null
}
],
"email": "[email protected]",
"name": "Joseph Doe",
"phone": "999999999",
"return_url": "https://google.com/",
"authentication_type": "three_ds",
"statement_descriptor_name": "Juspay",
"statement_descriptor_suffix": "Router",
"next_action": {
"type": "redirect_to_url",
"redirect_to_url": "http://localhost:8080/payments/redirect/pay_kgxQFsLwpvRE5DN7pOjF/postman_merchant_GHAction_7ec10174-0196-450e-a39a-4f9b61a32def/pay_kgxQFsLwpvRE5DN7pOjF_1"
},
"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": "sammantest2722",
"created_at": 1744805238,
"expires": 1744808838,
"secret": "epk_77e21be22ea44e7cbc97ea1893092c71"
},
"manual_retry_allowed": null,
"connector_transaction_id": "783189382167",
"frm_message": null,
"metadata": null,
"connector_metadata": {
"apple_pay": null,
"airwallex": null,
"noon": {
"order_category": "pay"
},
"braintree": null
},
"feature_metadata": null,
"reference_id": "pay_kgxQFsLwpvRE5DN7pOjF_1",
"payment_link": null,
"profile_id": "pro_x1xo34goINdpBDkYDEhK",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_bPPkbMzjo94rCiHfRJyu",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-04-16T12:22:18.695Z",
"fingerprint": null,
"browser_info": {
"language": "nl-NL",
"time_zone": 0,
"ip_address": "128.0.0.1",
"user_agent": "Mozilla/5.0 (iPhone NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
"color_depth": 24,
"java_enabled": true,
"screen_width": 1536,
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"screen_height": 723,
"java_script_enabled": true
},
"payment_method_id": null,
"payment_method_status": null,
"updated": "2025-04-16T12:07:21.111Z",
"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
}
```
paypal payment:
```curl
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_dSMvDZeLPCEUIv7ZV4JQxAQIoTuE0kdlKZEhxK7gn15IY7WkcKKAgbvSEG8FEuOY' \
--data-raw '{
"amount": 1000,
"currency": "USD",
"confirm": true,
"capture_method": "automatic",
"customer_id": "sammantest2722",
"capture_on": "2022-09-10T10:11:12Z",
"authentication_type": "three_ds",
"return_url": "https://google.com",
"email": "[email protected]",
"name": "Joseph Doe",
"phone": "999999999",
"phone_country_code": "+65",
"description": "Its my first payment",
"statement_descriptor_name": "Juspay",
"statement_descriptor_suffix": "Router",
"payment_method": "wallet",
"payment_method_type": "paypal",
"payment_method_data": {
"wallet": {
"paypal_redirect": {}
}
},
"browser_info": {
"user_agent": "Mozilla\/5.0 (iPhone 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": "128.0.0.1"
},
"connector_metadata": {
"noon": {
"order_category": "pay"
}
},
"order_details": [
{
"product_name": "Apple iphone 15",
"quantity": 1,
"amount": 390,
"account_name": "transaction_processing"
}
]
}'
```
```json
{
"payment_id": "pay_ZMSscM4kmOOYEGrwuRoC",
"merchant_id": "postman_merchant_GHAction_7ec10174-0196-450e-a39a-4f9b61a32def",
"status": "requires_customer_action",
"amount": 1000,
"net_amount": 1000,
"shipping_cost": null,
"amount_capturable": 1000,
"amount_received": null,
"connector": "noon",
"client_secret": "pay_ZMSscM4kmOOYEGrwuRoC_secret_I9V3GqB1X1emQncgY8Bt",
"created": "2025-04-16T12:02:55.230Z",
"currency": "USD",
"customer_id": "sammantest2722",
"customer": {
"id": "sammantest2722",
"name": "Joseph Doe",
"email": "[email protected]",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Its my first payment",
"refunds": null,
"disputes": null,
"mandate_id": null,
"mandate_data": null,
"setup_future_usage": null,
"off_session": null,
"capture_on": null,
"capture_method": "automatic",
"payment_method": "wallet",
"payment_method_data": {
"wallet": {},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": null,
"order_details": [
{
"brand": null,
"amount": 390,
"category": null,
"quantity": 1,
"tax_rate": null,
"product_id": null,
"product_name": "Apple iphone 15",
"product_type": null,
"sub_category": null,
"product_img_link": null,
"product_tax_code": null,
"total_tax_amount": null,
"requires_shipping": null
}
],
"email": "[email protected]",
"name": "Joseph Doe",
"phone": "999999999",
"return_url": "https://google.com/",
"authentication_type": "three_ds",
"statement_descriptor_name": "Juspay",
"statement_descriptor_suffix": "Router",
"next_action": {
"type": "redirect_to_url",
"redirect_to_url": "http://localhost:8080/payments/redirect/pay_ZMSscM4kmOOYEGrwuRoC/postman_merchant_GHAction_7ec10174-0196-450e-a39a-4f9b61a32def/pay_ZMSscM4kmOOYEGrwuRoC_1"
},
"cancellation_reason": null,
"error_code": null,
"error_message": null,
"unified_code": null,
"unified_message": null,
"payment_experience": null,
"payment_method_type": "paypal",
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "sammantest2722",
"created_at": 1744804975,
"expires": 1744808575,
"secret": "epk_2483fa5baf0a4b91b294a5a8df1da3d6"
},
"manual_retry_allowed": null,
"connector_transaction_id": "493715212829",
"frm_message": null,
"metadata": null,
"connector_metadata": {
"apple_pay": null,
"airwallex": null,
"noon": {
"order_category": "pay"
},
"braintree": null
},
"feature_metadata": null,
"reference_id": "pay_ZMSscM4kmOOYEGrwuRoC_1",
"payment_link": null,
"profile_id": "pro_x1xo34goINdpBDkYDEhK",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_bPPkbMzjo94rCiHfRJyu",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-04-16T12:17:55.230Z",
"fingerprint": null,
"browser_info": {
"language": "nl-NL",
"time_zone": 0,
"ip_address": "128.0.0.1",
"user_agent": "Mozilla/5.0 (iPhone NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
"color_depth": 24,
"java_enabled": true,
"screen_width": 1536,
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"screen_height": 723,
"java_script_enabled": true
},
"payment_method_id": null,
"payment_method_status": null,
"updated": "2025-04-16T12:02:57.669Z",
"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": null,
"force_3ds_challenge": false,
"force_3ds_challenge_trigger": false,
"issuer_error_code": null,
"issuer_error_message": null
}
```
in 3ds card payment, we now get the next action url and it works as intended.
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `just clippy && just clippy_v2`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
|
<think>
PR Context:
- Title: revert: fix(connector): [noon] address `next_action_url` being `null` for cards in 3ds payment
- Merged: 2025-04-21T17:24:14Z
- Files changed: 2 files
- Commits: 1 commits
Implementation approach:
Reverts juspay/hyperswitch#7832
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** revert: fix(connector): [noon] address `next_action_url` being `null` for cards in 3ds payment (#785
Files to modify:
**crates/hyperswitch_connectors/src/connectors/noon.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/noon/transformers.rs**
Add:
- 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": 7832, "pr_number": 7859, "commits_count": 1, "files_changed": 2, "response_length": 928, "file_count": 4, "needs_breakdown": false}
|
disable stripe
disable stripe
|
<think>
PR Context:
- Title: ci: disable stripe in cypress
- Merged: 2025-02-04T10:41:55Z
- 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 -->
disable sprite.
closes #7184
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 7184, "pr_number": 7183, "commits_count": 0, "files_changed": 1, "response_length": 759, "file_count": 0, "needs_breakdown": false}
|
[FIX] Re-revert changes done in `pr#7866` by `pr#7882`
### Context
[PR#7882](https://github.com/juspay/hyperswitch/pull/7882) accidentally reverted changes made in [PR#7882](https://github.com/juspay/hyperswitch/pull/7866), which was a merchant critical PR.
### Proposed Fix
Re revert the changes.
|
<think>
PR Context:
- Title: fix(payment_methods): Re-revert changes done in `pr#7866` by `pr#7882`
- Merged: 2025-05-05T12:58:42Z
- 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 -->
Context
https://github.com/juspay/hyperswitch/pull/7882 accidentally reverted changes made in https://github.com/juspay/hyperswitch/pull/7866, which was a merchant critical PR.
Reason:
- This might have occured due to incorrect resolution
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(payment_methods): Re-revert changes done in `pr#7866` by `pr#7882` (#7954)
Files to modify:
**crates/router/src/core/payment_methods/cards.rs**
Modify existing code
|
{"issue_number": 7952, "pr_number": 7954, "commits_count": 1, "files_changed": 1, "response_length": 975, "file_count": 3, "needs_breakdown": false}
|
feat(themes): Support naming themes
Currently themes don't have names, and it's better to have a way to attach a name to a theme. So that we can know about theme without having to look at the theme data.
|
<think>
PR Context:
- Title: feat(themes): Add `theme_name` and `entity_type` in themes table
- Merged: 2024-11-21T21:06:12Z
- 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 -->
This PR adds `theme_name` and `entity_type` in the themes table.
This will help us in
1. Having a name for the theme.
2. EntityType identifier to help us identity the lineage type instead of guessing it.
### Additional Changes
- [ ]
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(themes): Add `theme_name` and `entity_type` in themes table (#6621)
Files to modify:
**crates/common_utils/src/types/theme.rs**
Modify existing code
**crates/diesel_models/src/query/user/theme.rs**
Modify existing code
**crates/diesel_models/src/schema.rs**
Modify existing code
**crates/diesel_models/src/schema_v2.rs**
Modify existing code
**crates/diesel_models/src/user/theme.rs**
Modify existing code
**crates/router/src/db/user/theme.rs**
Modify existing code
|
{"issue_number": 6620, "pr_number": 6621, "commits_count": 1, "files_changed": 8, "response_length": 1286, "file_count": 8, "needs_breakdown": false}
|
feat(core): implemented platform merchant account
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [X] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
#### About the feature
- This the first PR for the Platform Account feature.
- Feature is under development and behind the feature flag.
- Feature is supposed to be disabled for sandbox and production environments.
#### Enabling the platform account.
- New API has been created to enable platform account.
- API requires Admin API auth.
- Once enabled, there is no way of disabling platform account as of now.
#### How it works
- A new special header is to be sent by the platform called `x-connected-merchant-id`.
- Platform will use its own API key irrespective of the merchant id present in the above header.
- Value of this header is supposed to be the merchant id of the merchant account on behalf of which the platform is performing the operation.
- **If the platform has `is_platform` true and the merchant account on behalf of which operation is performed belongs to the same organisation as platform** then the operation is allowed.
#### Payment Intent
- Operation will be performed for merchant id present in the `x-connected-merchant-id` header.
- `platform_merchant_id` column for the payment intent will be populated with platforms merchant id.
#### Other operations
- Will add context of `platform_merchant_id` in other operations as well.
<!-- Describe your changes in detail -->
### Additional Changes
- [x] This PR modifies the API contract
- [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`
-->
## Motivation and Context
#6883
<!--
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?
1. Create a merchant account(m1).
2. Use below api to convert it into platform account.
```sh
curl --location --request POST '<BASE URL>/accounts/{merchant_id}/platform' \
--header 'api-key:<ADMIN API KEY>'
```
3. Create another merchant account in the same organisation(m2).
4. Do a payment using platform's(m1) API key for connected merchant account(m2) by passing header `x-connected-merchant-id` with value as connected merchant account's merchant id.
5. Check if payment is created for connected merchant account.
6. Check if `platform_merchant_id` is populated with platform's merchant id.
<!--
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 --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: refactor(payments): Add platform merchant account checks for payment intent
- Merged: 2025-02-14T10:05:46Z
- Files changed: 21 files
- Commits: 7 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 -->
Currently payment_intent stores platform_merchant_id. This can be used to identify if the payment was created by platform merchant.
If the payment was initialized by platform merchant, the merchant who is the owner of the payment should not
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(payments): Add platform merchant account checks for payment intent (#7204)
Files to modify:
**crates/router/src/core/payments/operations/payment_approve.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_cancel.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_capture.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_capture_v2.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_confirm_intent.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_get.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_get_intent.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_post_session_tokens.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_reject.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_session.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_session_intent.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_start.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_status.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_update.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_update_intent.rs**
Modify existing code
**crates/router/src/core/payments/operations/payments_incremental_authorization.rs**
Modify existing code
**crates/router/src/core/payments/operations/tax_calculation.rs**
Modify existing code
**crates/router/src/core/utils.rs**
Add:
- function: private::validate_platform_merchant
- function: private::get_platform_merchant_id
- trait: pub::ValidatePlatformMerchant
- impl: impl ValidatePlatformMerchant for storage::PaymentIntent
**crates/router/src/routes/payment_methods.rs**
Modify existing code
|
{"issue_number": 6882, "pr_number": 7204, "commits_count": 1, "files_changed": 21, "response_length": 3008, "file_count": 23, "needs_breakdown": true}
|
[FEATURE]: Add `Payment Method - Delete` endpoint to payment methods session for V2
Required for Payment Methods Service
|
<think>
PR Context:
- Title: feat(router): Add payment_methods_session_delete_payment_method endpoint [V2]
- Merged: 2025-03-27T12:05:05Z
- Files changed: 11 files
- Commits: 12 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 endpoint allows deleting saved payment methods for a customer
### Additional Changes
- [x] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(router): Add payment_methods_session_delete_payment_method endpoint [V2] (#7409)
Co-authored-by
Files to modify:
**crates/api_models/src/payment_methods.rs**
Add:
- struct: pub::PaymentMethodSessionDeleteSavedPaymentMethod
**crates/openapi/src/openapi_v2.rs**
Modify existing code
**crates/openapi/src/routes/payment_method.rs**
Add:
- function: pub::payment_method_session_delete_saved_payment_method
**crates/router/src/core/payment_methods.rs**
Add:
- function: pub::payment_methods_session_delete_payment_method
**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::payment_method_session_delete_saved_payment_method
**crates/router_env/src/logger/types.rs**
Modify existing code
|
{"issue_number": 7407, "pr_number": 7409, "commits_count": 1, "files_changed": 11, "response_length": 1678, "file_count": 10, "needs_breakdown": false}
|
[FEATURE] Payment void endpoint for v2
### Feature Description
Add support for Payment Cancel in V2.
### Possible Implementation
Add V2 payments_cancel flow by completing GetTracker, UpdateTracker, and Domain traits for payment cancel endpoint.
### 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(router): Add v2 payment cancellation flow
- Merged: 2025-09-22T18:39:33Z
- Files changed: 17 files
- Commits: 14 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 V2 payments_cancel flow by endpoint `{{baseUrl}}/v2/payments/:payment_id/cancel`.A payment can be cancelled when the status is RequiresCapture, PartiallyAuthorizedAndRequiresCapture, or PartiallyCapturedAndCapturable.
### Additional Cha
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(router): Add v2 payment cancellation flow (#9083)
Co-authored-by: hyperswitch-bot[bot] <1485255
Files to modify:
**crates/api_models/src/events/payment.rs**
Add:
- function: private::get_api_event_type
- function: private::get_api_event_type
- impl: impl ApiEventMetric for payments::PaymentsCancelRequest
- impl: impl ApiEventMetric for payments::PaymentsCancelResponse
**crates/api_models/src/payments.rs**
Add:
- struct: pub::PaymentsCancelRequest
- struct: pub::PaymentsCancelResponse
**crates/diesel_models/src/payment_attempt.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/payments.rs**
Add:
- struct: pub::PaymentCancelData
**crates/hyperswitch_domain_models/src/payments/payment_attempt.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/payments/payment_intent.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/router_data.rs**
Add:
- function: private::get_payment_intent_update
- function: private::get_payment_attempt_update
- function: private::get_amount_capturable
- function: private::get_captured_amount
- function: private::get_attempt_status_for_db_update
- impl: impl TrackerPostUpdateObjects<
router_flow_types::Void,
router_request_types::PaymentsCancelData,
payments::PaymentCancelData<router_flow_types::Void>,
> for RouterData<
router_flow_types::Void,
router_request_types::PaymentsCancelData,
router_response_types::PaymentsResponseData,
>
**crates/hyperswitch_interfaces/src/conversion_impls.rs**
Modify existing code
**crates/router/src/core/payments.rs**
Add:
- function: private::set_cancellation_reason
- function: private::set_cancellation_reason
- function: private::set_cancellation_reason
- function: private::set_cancellation_reason
- function: private::get_payment_attempt
- function: private::list_payments_attempts
- function: private::get_client_secret
- function: private::get_payment_intent
- function: private::get_merchant_connector_details
- function: private::get_payment_method_info
- function: private::get_payment_method_token
- function: private::get_mandate_id
- function: private::get_address
- function: private::get_creds_identifier
- function: private::get_token
- function: private::get_multiple_capture_data
- function: private::get_payment_link_data
- function: private::get_ephemeral_key
- function: private::get_setup_mandate
- function: private::get_poll_config
- function: private::get_authentication
- function: private::get_frm_message
- function: private::get_refunds
- function: private::get_disputes
- function: private::get_authorizations
- function: private::get_attempts
- function: private::get_recurring_details
- function: private::get_payment_intent_profile_id
- function: private::get_currency
- function: private::get_amount
- function: private::get_payment_attempt_connector
- function: private::get_merchant_connector_id_in_attempt
- function: private::get_connector_customer_id
- function: private::get_billing_address
- function: private::get_payment_method_data
- function: private::get_sessions_token
- function: private::get_token_data
- function: private::get_mandate_connector
- function: private::get_force_sync
- function: private::get_capture_method
- function: private::get_optional_payment_attempt
- function: private::get_pre_routing_result
- function: private::get_optional_external_vault_session_details
- function: private::set_payment_intent
- function: private::set_client_secret
- function: private::set_payment_attempt
- function: private::set_payment_method_data
- function: private::set_payment_method_token
- function: private::set_email_if_not_present
- function: private::set_payment_method_id_in_attempt
- function: private::set_pm_token
- function: private::set_connector_customer_id
- function: private::push_sessions_token
- function: private::set_surcharge_details
- function: private::set_merchant_connector_id_in_attempt
- function: private::set_card_network
- function: private::set_co_badged_card_data
- function: private::set_frm_message
- function: private::set_payment_intent_status
- function: private::set_authentication_type_in_attempt
- function: private::set_recurring_mandate_payment_data
- function: private::set_mandate_id
- function: private::set_setup_future_usage_in_payment_intent
- function: private::set_prerouting_algorithm_in_payment_intent
- function: private::set_connector_in_payment_attempt
- function: private::set_connector_request_reference_id
- function: private::set_connector_response_reference_id
- function: private::set_vault_session_details
- function: private::set_routing_approach_in_attempt
- function: private::set_connector_request_reference_id_in_payment_attempt
- function: private::set_cancellation_reason
- impl: impl OperationSessionGetters<F> for PaymentCancelData<F>
- impl: impl OperationSessionSetters<F> for PaymentCancelData<F>
**crates/router/src/core/payments/flows/cancel_flow.rs**
Remove:
- function: private::construct_router_data
Add:
- function: private::construct_router_data
- impl: impl ConstructFlowSpecificData<api::Void, types::PaymentsCancelData, types::PaymentsResponseData> for hyperswitch_domain_models::payments::PaymentCancelData<api::Void>
**crates/router/src/core/payments/operations.rs**
Add:
- mod: pub::payment_cancel_v2
**crates/router/src/core/payments/operations/payment_cancel_v2.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::validate_request
- function: private::get_trackers
- function: private::update_trackers
- function: private::get_customer_details
- function: private::make_pm_data
- function: private::perform_routing
- function: private::validate_status_for_operation
- struct: pub::PaymentsCancel
- impl: impl Operation<F, api::PaymentsCancelRequest> for &PaymentsCancel
- impl: impl Operation<F, api::PaymentsCancelRequest> for PaymentsCancel
- impl: impl ValidateRequest<
F,
api::PaymentsCancelRequest,
hyperswitch_domain_models::payments::PaymentCancelData<F>,
> for PaymentsCancel
- impl: impl GetTracker<
F,
hyperswitch_domain_models::payments::PaymentCancelData<F>,
api::PaymentsCancelRequest,
> for PaymentsCancel
- impl: impl UpdateTracker<
F,
hyperswitch_domain_models::payments::PaymentCancelData<F>,
api::PaymentsCancelRequest,
> for PaymentsCancel
- impl: impl Domain<F, api::PaymentsCancelRequest, hyperswitch_domain_models::payments::PaymentCancelData<F>> for PaymentsCancel
- impl: impl ValidateStatusForOperation for PaymentsCancel
**crates/router/src/core/payments/operations/payment_response.rs**
Add:
- function: private::to_post_update_tracker
- function: private::update_tracker
- impl: impl Operation<F, types::PaymentsCancelData> for PaymentResponse
- impl: impl PostUpdateTracker<
F,
hyperswitch_domain_models::payments::PaymentCancelData<F>,
types::PaymentsCancelData,
> for PaymentResponse
**crates/router/src/core/payments/transformers.rs**
Add:
- function: pub::construct_cancel_router_data_v2
- function: pub::construct_router_data_for_cancel
- function: private::generate_response
- impl: impl GenerateResponse<api_models::payments::PaymentsCancelResponse> for hyperswitch_domain_models::payments::PaymentCancelData<F>
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/routes/payments.rs**
Add:
- function: pub::payments_cancel
|
{"issue_number": 9082, "pr_number": 9083, "commits_count": 1, "files_changed": 17, "response_length": 9004, "file_count": 18, "needs_breakdown": true}
|
feat(analytics): Analytics Request Validator and config driven forex feature
## Current behaviour
- Forex api calls are occuring on every analytics api call
- There is no analytics request validator.
## Proposed Changes
- Enable/Disable forex functionality based on a config flag.
- `request_validator()` to validate requests on various grounds and throw contextual and comprehensive `4xx` errors.
- `request_validator()` should also be able to discern whether metrics passed in a request, require `forex_api` call.
|
<think>
PR Context:
- Title: feat(analytics): Analytics Request Validator and config driven forex feature
- Merged: 2024-12-17T10:50:36Z
- Files changed: 16 files
- Commits: 16 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
## Fixes #6731
## Description
<!-- Describe your changes in detail -->
### Config driven forex functionality
- Created a `forex_enabled` flag in config settings under analytics config.
- Instead of passing `ExchangeRates` data structure now we are passing `Option<ExchangeRates>`
- In amount
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(analytics): Analytics Request Validator and config driven forex feature (#6733)
Co-authored-by:
Files to modify:
**crates/analytics/src/lib.rs**
Modify existing code
**crates/analytics/src/payment_intents/core.rs**
Modify existing code
**crates/analytics/src/payments/core.rs**
Modify existing code
**crates/analytics/src/refunds/core.rs**
Modify existing code
**crates/api_models/src/analytics.rs**
Add:
- function: pub::requires_forex_functionality
- struct: pub::AnalyticsRequest
- trait: pub::ForexMetric
- impl: impl AnalyticsRequest
**crates/api_models/src/analytics/disputes.rs**
Add:
- function: private::is_forex_metric
- impl: impl ForexMetric for DisputeMetrics
**crates/api_models/src/analytics/payment_intents.rs**
Add:
- function: private::is_forex_metric
- impl: impl ForexMetric for PaymentIntentMetrics
**crates/api_models/src/analytics/payments.rs**
Add:
- function: private::is_forex_metric
- impl: impl ForexMetric for PaymentMetrics
**crates/api_models/src/analytics/refunds.rs**
Add:
- function: private::is_forex_metric
- impl: impl ForexMetric for RefundMetrics
**crates/router/src/analytics.rs**
Modify existing code
**crates/router/src/analytics_validator.rs**
Add:
- function: pub::request_validator
**crates/router/src/lib.rs**
Add:
- mod: pub::analytics_validator
|
{"issue_number": 6731, "pr_number": 6733, "commits_count": 1, "files_changed": 16, "response_length": 2201, "file_count": 14, "needs_breakdown": false}
|
[BUG] Various errors in `rust_locker_open_api_spec.yml`
### Bug Description
The two identical files [`api-reference/rust_locker_open_api_spec.yml`](https://github.com/juspay/hyperswitch/blob/d06d19fc96e1a74d20e2fe3613f86d541947e0ae/api-reference/rust_locker_open_api_spec.yml) and [`api-reference-v2/rust_locker_open_api_spec.yml`](https://github.com/juspay/hyperswitch/blob/d06d19fc96e1a74d20e2fe3613f86d541947e0ae/api-reference-v2/rust_locker_open_api_spec.yml) contain some mistakes and errors.
### Expected Behavior
The documentation should be clear.
### Actual Behavior
The documentation contains some errors.
### Steps To Reproduce
Not relevant.
### Context For The Bug
Some examples:
https://github.com/juspay/hyperswitch/blob/d06d19fc96e1a74d20e2fe3613f86d541947e0ae/api-reference/rust_locker_open_api_spec.yml#L5
https://github.com/juspay/hyperswitch/blob/d06d19fc96e1a74d20e2fe3613f86d541947e0ae/api-reference/rust_locker_open_api_spec.yml#L12
https://github.com/juspay/hyperswitch/blob/d06d19fc96e1a74d20e2fe3613f86d541947e0ae/api-reference/rust_locker_open_api_spec.yml#L14
https://github.com/juspay/hyperswitch/blob/d06d19fc96e1a74d20e2fe3613f86d541947e0ae/api-reference/rust_locker_open_api_spec.yml#L42
### Environment
Not relevant.
### 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: docs(openapi): improve `rust_locker_open_api_spec`
- Merged: 2024-10-24T13:31:41Z
- Files changed: 2 files
- Commits: 1 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 -->
Improved wording in the edit files.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide lin
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 6321, "pr_number": 6322, "commits_count": 0, "files_changed": 2, "response_length": 780, "file_count": 0, "needs_breakdown": false}
|
feat(router): Unify Auth in single layer (V2)
In-efficiency in design
* Currently we have many types of auth and auth is evaluated in multiple places, with multiple ways.
* This indeed required multiple approaches and solution needs to be maintained
* More cognitive load
* We can’t authenticate a request in one infra component/layer
Unify Auth in single layer
* Make Authentication header like,
* authorization: key=value, keyN=valueN
* Examples:
* authorization: api-key=<api-key>
* authorization: publishable-key=<publishable-key>, client-secret=<client-secret>
* authorization: publishable-key=<publishable-key>, ephemeral-key=<ephemeral-key>
* authorization: jwt=<jwt-token>
* Lineage also should be added in headers, when we can’t inferable from authorization
* `profile_id` should be added in headers not in body
* If `api-key` not passed or the passed `api-key` has different scope, then `merchant-id` also should be passed.
|
<think>
PR Context:
- Title: feat(router): [V2] Introduce V2Auth and use it for payment_methods_list_enabled
- Merged: 2025-01-31T08:37:18Z
- Files changed: 30 files
- Commits: 11 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 -->
Added an enum `V2Auth` (name subject to change) to encapsulate different authentication scenarios. Currently only works for Client Authentication using `publishable_key` and `ephemeral_key` in `Authorization` header
### Additional Changes
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(router): [V2] Introduce V2Auth and use it for payment_methods_list_enabled (#7038)
Co-authored-
Files to modify:
**crates/api_models/src/ephemeral_key.rs**
Remove:
- struct: pub::EphemeralKeyCreateRequest
Add:
- struct: pub::ClientSecretCreateRequest
- enum: pub::ResourceId
**crates/api_models/src/events/payment.rs**
Modify existing code
**crates/api_models/src/payment_methods.rs**
Modify existing code
**crates/api_models/src/payments.rs**
Modify existing code
**crates/api_models/src/webhooks.rs**
Modify existing code
**crates/common_utils/src/events.rs**
Modify existing code
**crates/common_utils/src/id_type.rs**
Remove:
- mod: private::ephemeral_key
Add:
- mod: private::client_secret
**crates/common_utils/src/id_type/client_secret.rs**
Add:
- function: private::get_api_event_type
- function: pub::generate_redis_key
- impl: impl crate::events::ApiEventMetric for ClientSecretId
- impl: impl ClientSecretId
**crates/common_utils/src/id_type/ephemeral_key.rs**
Remove:
- function: private::get_api_event_type
- function: pub::generate_redis_key
- impl: impl crate::events::ApiEventMetric for EphemeralKeyId
- impl: impl EphemeralKeyId
**crates/common_utils/src/id_type/global_id/payment_methods.rs**
Modify existing code
**crates/diesel_models/src/ephemeral_key.rs**
Remove:
- struct: pub::EphemeralKeyTypeNew
- enum: pub::ResourceType
Add:
- function: pub::to_str
- struct: pub::ClientSecretTypeNew
- enum: pub::ResourceId
- impl: impl ResourceId
**crates/openapi/src/openapi_v2.rs**
Modify existing code
**crates/router/src/core/payment_methods.rs**
Remove:
- function: pub::payment_method_intent_confirm
**crates/router/src/core/payment_methods/transformers.rs**
Add:
- impl: impl transformers::ForeignFrom<(
hyperswitch_domain_models::payment_methods::PaymentMethodsSession,
Secret<String>,
)> for (session, client_secret)
**crates/router/src/core/payments/helpers.rs**
Modify existing code
**crates/router/src/core/payments/transformers.rs**
Modify existing code
**crates/router/src/core/utils.rs**
Modify existing code
**crates/router/src/db.rs**
Modify existing code
**crates/router/src/db/ephemeral_key.rs**
Remove:
- function: private::get_ephemeral_key
- function: private::delete_ephemeral_key
- function: private::create_ephemeral_key
- function: private::get_ephemeral_key
Add:
- function: private::get_ephemeral_key
- function: private::delete_ephemeral_key
- function: private::delete_client_secret
- function: private::create_client_secret
- function: private::get_client_secret
- trait: pub::ClientSecretInterface
**crates/router/src/db/kafka_store.rs**
Remove:
- function: private::create_ephemeral_key
- function: private::get_ephemeral_key
Add:
- function: private::create_client_secret
- function: private::get_client_secret
**crates/router/src/lib.rs**
Modify existing code
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/routes/customers.rs**
Modify existing code
**crates/router/src/routes/ephemeral_key.rs**
Modify existing code
**crates/router/src/routes/payment_methods.rs**
Remove:
- function: pub::confirm_payment_method_intent_api
**crates/router/src/services/authentication.rs**
Remove:
- function: private::authenticate_and_fetch
- function: pub::is_ephemeral_or_publishible_auth
- impl: impl AuthenticateAndFetch<AuthenticationData, A> for EphemeralKeyAuth
Add:
- function: pub::get_auth_string_from_header
- function: private::authenticate_and_fetch
- function: private::authenticate_and_fetch
- enum: pub::V2Auth
- impl: impl AuthenticateAndFetch<AuthenticationData, A> for V2Auth
- impl: impl AuthenticateAndFetch<AuthenticationData, A> for Vec<V2Auth>
**crates/router/src/types.rs**
Modify existing code
**crates/router/src/types/api/payments.rs**
Modify existing code
**crates/router/src/types/storage/ephemeral_key.rs**
Modify existing code
|
{"issue_number": 7037, "pr_number": 7038, "commits_count": 1, "files_changed": 30, "response_length": 4938, "file_count": 31, "needs_breakdown": true}
|
confirm-intent API contract changes for split payments (v2)
In v2, we need to support receiving multiple payment methods in the confirm-intent request. Add a new field to support this use case
|
<think>
PR Context:
- Title: feat(router): Add Confirm-Intent API contract changes for split payments (v2)
- Merged: 2025-09-25T17:56:40Z
- Files changed: 3 files
- Commits: 3 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 -->
- Added `split_payment_method_data` field to `confirm-intent` call to accept a `Vec` of payment methods
<img width="502" height="763" alt="image" src="https://github.com/user-attachments/assets/69ae3cc4-3d06-4980-b2d9-52b489aa98ad" />
##
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(router): Add Confirm-Intent API contract changes for split payments (v2) (#9469)
Files to modify:
**crates/api_models/src/payments.rs**
Add:
- struct: pub::SplitPaymentMethodDataRequest
**crates/openapi/src/openapi_v2.rs**
Modify existing code
|
{"issue_number": 9467, "pr_number": 9469, "commits_count": 1, "files_changed": 3, "response_length": 1069, "file_count": 4, "needs_breakdown": false}
|
feat(core): implement `NameType` for name validation
## 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 -->
for card holder name in cards, validation is added before creation of request to flag invalid data in case it is present.
Reference is taken from Visa Documetation
<img width="889" alt="image" src="https://github.com/user-attachments/assets/02859794-8313-46fb-a2b2-33a009a03600">
### 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)?
-->
Tested through Postman:
- Create a MCA (Cybersource):
Case 1: Create a Payment with valid name:
```
{
"amount": 499,
"currency": "EUR",
"confirm": true,
"capture_method": "automatic",
"customer_id": "test_rec7",
"email": "[email protected]",
"customer_acceptance": {
"acceptance_type": "online"
},
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4242424242424242",
"card_exp_month": "03",
"card_exp_year": "2030",
"card_holder_name": "Sakil Mostak",
"card_cvc": "737",
"card_network": "Visa"
}
},
"billing": {
"address": {
"city": "test",
"country": "US",
"line1": "here is some \n there is some \n none is some? \n ",
"line2": "there",
"line3": "anywhere",
"zip": "560095",
"state": "Washington",
"first_name": "Sakil",
"last_name": "Mostak"
},
"phone": {
"number": "1234567890",
"country_code": "+1"
},
"email": "[email protected]"
},
"authentication_type": "no_three_ds"
}
```
- The payment should succeed, below is an example:
```
{
"payment_id": "pay_7YANCrkBMUVJngRBg36l",
"merchant_id": "merchant_1737373987",
"status": "succeeded",
"amount": 499,
"net_amount": 499,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": 499,
"connector": "cybersource",
"client_secret": "pay_7YANCrkBMUVJngRBg36l_secret_jp4t6pcoJTnMFrQsGd1R",
"created": "2025-01-20T17:52:24.651Z",
"currency": "EUR",
"customer_id": "test_rec7",
"customer": {
"id": "test_rec7",
"name": null,
"email": "[email protected]",
"phone": null,
"phone_country_code": null
},
"description": null,
"refunds": null,
"disputes": null,
"mandate_id": null,
"mandate_data": null,
"setup_future_usage": null,
"off_session": null,
"capture_on": null,
"capture_method": "automatic",
"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": "03",
"card_exp_year": "2030",
"card_holder_name": "Sakil Mostak",
"payment_checks": {
"avs_response": {
"code": "X",
"codeRaw": "I1"
},
"card_verification": null
},
"authentication_data": null
},
"billing": null
},
"payment_token": "token_7usZJrOsD3Qoy6kLGDnQ",
"shipping": null,
"billing": {
"address": {
"city": "test",
"country": "US",
"line1": "here is some \n there is some \n none is some? \n ",
"line2": "there",
"line3": "anywhere",
"zip": "560095",
"state": "Washington",
"first_name": "Sakil",
"last_name": "Mostak"
},
"phone": {
"number": "1234567890",
"country_code": "+1"
},
"email": "[email protected]"
},
"order_details": null,
"email": "[email protected]",
"name": null,
"phone": null,
"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": "test_rec7",
"created_at": 1737395544,
"expires": 1737399144,
"secret": "epk_b4c0b9ee60c844dd88e6cbc9daa9e7cb"
},
"manual_retry_allowed": false,
"connector_transaction_id": "7373955459786405604807",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": "pay_7YANCrkBMUVJngRBg36l_1",
"payment_link": null,
"profile_id": "pro_VcDn0jWTcCmofCpz2CAH",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_KXO79qkYuOXsSZCYByGz",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-01-20T18:07:24.651Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2025-01-20T17:52:26.511Z",
"charges": null,
"frm_metadata": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": null
}
```
Case 2: Create a Payment with invalid name:
```
{
"amount": 499,
"currency": "EUR",
"confirm": true,
"capture_method": "automatic",
"customer_id": "test_rec7",
"email": "[email protected]",
"customer_acceptance": {
"acceptance_type": "online"
},
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4242424242424242",
"card_exp_month": "03",
"card_exp_year": "2030",
"card_holder_name": "S@k*l M0st@k",
"card_cvc": "737",
"card_network": "Visa"
}
},
"billing": {
"address": {
"city": "test",
"country": "US",
"line1": "here is some \n there is some \n none is some? \n ",
"line2": "there",
"line3": "anywhere",
"zip": "560095",
"state": "Washington",
"first_name": "Sakil",
"last_name": "Mostak"
},
"phone": {
"number": "1234567890",
"country_code": "+1"
},
"email": "[email protected]"
},
"authentication_type": "no_three_ds"
}
```
Response should contain 400 error with below response:
```
{
"error": {
"error_type": "invalid_request",
"message": "Json deserialize error: invalid character found in card holder name: @ at line 23 column 5",
"code": "IR_06"
}
}
```
## 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
- [x] I added unit tests for my changes where possible
|
<think>
PR Context:
- Title: revert: implement `NameType` for name validation (#6734)
- Merged: 2025-04-03T16:24:25Z
- Files changed: 30 files
- Commits: 3 commits
Implementation approach:
This reverts commit 1100dcc6053990cf832c00cf29db700d77f78480.
## 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 -->
This PR revert #6734 in main
This is hotfix for https://github.com/juspay/hyperswitch/pull/7717
Reason: digit couldn't be added to nickname because nickname have the same valid
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 6734, "pr_number": 7718, "commits_count": 0, "files_changed": 30, "response_length": 787, "file_count": 0, "needs_breakdown": false}
|
feat(connector): [ACI, AUTHORIZEDOTNET, BRAINTREE, FIUU, FORTE, PLACETOPAY] Supported features for feature matrix
## 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 -->
Added Feature Matrix supported payment methods, countries and currencies for ACI, Authorizedotnet, Braintree, Fiuu, Forte and Placetopay.
### 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)?
-->
- Request
```
curl --location --request GET 'http://localhost:8080/feature_matrix' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_kl7vP0fysoyX8f1O7wZiJae7n1XS5zhEJbe2zK4rtuDNCg4JMSsWhSc0GNkNKWwC' \
--header 'X-Merchant-Id: merchant_1738299466' \
--data '{
}'
```
- Response
```
{
"connector_count": 48,
"connectors": [
{
"name": "ACI",
"display_name": "ACI",
"description": "ACI Payments delivers secure, real-time electronic payment solutions for businesses, banks, and governments, enabling seamless transactions across channels.",
"category": "payment_gateway",
"supported_payment_methods": [
{
"payment_method": "wallet",
"payment_method_type": "mb_way",
"payment_method_type_display_name": "MB WAY",
"mandates": "not_supported",
"refunds": "not_supported",
"supported_capture_methods": [
"automatic"
],
"supported_countries": [
"ESP",
"EST",
"PRT"
],
"supported_currencies": [
"EUR"
]
},
{
"payment_method": "wallet",
"payment_method_type": "ali_pay",
"payment_method_type_display_name": "Alipay",
"mandates": "not_supported",
"refunds": "not_supported",
"supported_capture_methods": [
"automatic"
],
"supported_countries": [
"CHN"
],
"supported_currencies": [
"CNY"
]
},
{
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_type_display_name": "Credit Card",
"mandates": "supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic"
],
"three_ds": "not_supported",
"no_three_ds": "supported",
"supported_card_networks": [
"AmericanExpress",
"DinersClub",
"Discover",
"JCB",
"Maestro",
"Mastercard",
"UnionPay",
"Visa"
],
"supported_countries": [
"EST",
"PRT",
"GRC",
"ZMB",
"POL",
"KHM",
"LUX",
"SVK",
"HKG",
"VNM",
"HND",
"SWE",
"LTU",
"IRL",
"NZL",
"SVN",
"ARE",
"OMN",
"BGR",
"CHN",
"LIE",
"EGY",
"AND",
"CHE",
"UKR",
"FRA",
"QAT",
"MEX",
"NGA",
"ETH",
"SLV",
"GBR",
"GIB",
"THA",
"DOM",
"SAU",
"IDN",
"MKD",
"JPN",
"CRI",
"USA",
"ISL",
"COL",
"DNK",
"MMR",
"SEN",
"ROU",
"LAO",
"URY",
"FIN",
"CYP",
"ITA",
"PAN",
"HUN",
"CZE",
"PER",
"BEL",
"GHA",
"AUT",
"HRV",
"DEU",
"GTM",
"ESP",
"LBY",
"MOZ",
"PAK",
"MYS"
],
"supported_currencies": [
"ALL",
"KPW",
"ISK",
"PLN",
"BGN",
"EGP",
"CHF",
"LKR",
"PKR",
"ILS",
"USD",
"CZK",
"DOP",
"NZD",
"SGD",
"NOK",
"VND",
"KHR",
"SEK",
"CNY",
"THB",
"COP",
"DKK",
"TRY",
"UYU",
"CRC",
"CLP",
"GBP",
"NGN",
"PEN",
"ZAR",
"HRK",
"IDR",
"MXN",
"HNL",
"UAH",
"RSD",
"PAB",
"HUF",
"SAR",
"TWD",
"JPY",
"MAD",
"MKD",
"PHP",
"MMK",
"EUR",
"QAR",
"LAK",
"RON",
"MYR",
"HKD",
"MZN",
"OMR",
"ZMW",
"ARS",
"AED",
"GHS"
]
},
{
"payment_method": "card",
"payment_method_type": "debit",
"payment_method_type_display_name": "Debit Card",
"mandates": "supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic"
],
"three_ds": "not_supported",
"no_three_ds": "supported",
"supported_card_networks": [
"AmericanExpress",
"DinersClub",
"Discover",
"JCB",
"Maestro",
"Mastercard",
"UnionPay",
"Visa"
],
"supported_countries": [
"SVK",
"SAU",
"NGA",
"ESP",
"QAT",
"HKG",
"SWE",
"ZMB",
"URY",
"CRI",
"GHA",
"OMN",
"VNM",
"PER",
"CHE",
"PAK",
"DNK",
"PAN",
"CHN",
"ETH",
"MYS",
"NZL",
"ITA",
"LBY",
"KHM",
"MEX",
"ROU",
"IDN",
"JPN",
"GBR",
"MKD",
"MMR",
"HND",
"USA",
"DEU",
"MOZ",
"POL",
"BEL",
"AUT",
"PRT",
"THA",
"GIB",
"GRC",
"CZE",
"SLV",
"HUN",
"SEN",
"GTM",
"CYP",
"FRA",
"LUX",
"LAO",
"FIN",
"EGY",
"LTU",
"SVN",
"HRV",
"ARE",
"COL",
"ISL",
"EST",
"BGR",
"LIE",
"UKR",
"IRL",
"DOM",
"AND"
],
"supported_currencies": [
"ALL",
"CRC",
"COP",
"RSD",
"AED",
"MMK",
"MXN",
"ARS",
"PLN",
"NZD",
"HRK",
"SAR",
"SGD",
"GHS",
"TWD",
"BGN",
"THB",
"PHP",
"CZK",
"OMR",
"HKD",
"VND",
"GBP",
"LKR",
"ISK",
"ILS",
"NGN",
"PEN",
"TRY",
"ZMW",
"CNY",
"KPW",
"LAK",
"PKR",
"IDR",
"NOK",
"CHF",
"KHR",
"SEK",
"JPY",
"UAH",
"DKK",
"MYR",
"EGP",
"ZAR",
"CLP",
"MKD",
"QAR",
"MAD",
"RON",
"UYU",
"HNL",
"EUR",
"MZN",
"PAB",
"HUF",
"DOP",
"USD"
]
},
{
"payment_method": "bank_redirect",
"payment_method_type": "interac",
"payment_method_type_display_name": "Interac",
"mandates": "not_supported",
"refunds": "not_supported",
"supported_capture_methods": [
"automatic"
],
"supported_countries": [
"CAN"
],
"supported_currencies": [
"CAD",
"USD"
]
},
{
"payment_method": "bank_redirect",
"payment_method_type": "sofort",
"payment_method_type_display_name": "Sofort",
"mandates": "not_supported",
"refunds": "not_supported",
"supported_capture_methods": [
"automatic"
],
"supported_countries": [
"ESP",
"GBR",
"POL",
"DEU",
"ITA",
"CHE",
"NLD",
"AUT",
"BEL"
],
"supported_currencies": [
"GBP",
"CHF",
"HUF",
"EUR",
"PLN"
]
},
{
"payment_method": "bank_redirect",
"payment_method_type": "giropay",
"payment_method_type_display_name": "Giropay",
"mandates": "not_supported",
"refunds": "not_supported",
"supported_capture_methods": [
"automatic"
],
"supported_countries": [
"DEU"
],
"supported_currencies": [
"EUR"
]
},
{
"payment_method": "bank_redirect",
"payment_method_type": "przelewy24",
"payment_method_type_display_name": "Przelewy24",
"mandates": "not_supported",
"refunds": "not_supported",
"supported_capture_methods": [
"automatic"
],
"supported_countries": [
"POL"
],
"supported_currencies": [
"EUR",
"GBP",
"CZK",
"PLN"
]
},
{
"payment_method": "bank_redirect",
"payment_method_type": "ideal",
"payment_method_type_display_name": "iDEAL",
"mandates": "not_supported",
"refunds": "not_supported",
"supported_capture_methods": [
"automatic"
],
"supported_countries": [
"NLD"
],
"supported_currencies": [
"EUR"
]
},
{
"payment_method": "bank_redirect",
"payment_method_type": "eft",
"payment_method_type_display_name": "EFT",
"mandates": "not_supported",
"refunds": "not_supported",
"supported_capture_methods": [
"automatic"
],
"supported_countries": null,
"supported_currencies": null
},
{
"payment_method": "bank_redirect",
"payment_method_type": "eps",
"payment_method_type_display_name": "EPS",
"mandates": "not_supported",
"refunds": "not_supported",
"supported_capture_methods": [
"automatic"
],
"supported_countries": [
"AUT"
],
"supported_currencies": [
"EUR"
]
},
{
"payment_method": "bank_redirect",
"payment_method_type": "trustly",
"payment_method_type_display_name": "Trustly",
"mandates": "not_supported",
"refunds": "not_supported",
"supported_capture_methods": [
"automatic"
],
"supported_countries": [
"SWE",
"LVA",
"NOR",
"EST",
"ESP",
"DNK",
"DEU",
"NLD",
"GBR",
"AUT",
"LTU",
"FIN"
],
"supported_currencies": [
"DKK",
"SEK",
"NOK",
"EUR",
"CZK",
"GBP"
]
},
{
"payment_method": "pay_later",
"payment_method_type": "klarna",
"payment_method_type_display_name": "Klarna",
"mandates": "not_supported",
"refunds": "not_supported",
"supported_capture_methods": [
"automatic"
],
"supported_countries": [
"NLD",
"NOR",
"POL",
"BEL",
"FIN",
"GRC",
"CZE",
"IRL",
"SWE",
"GBR",
"DNK",
"DEU",
"CAN",
"CHE",
"NZL",
"AUS",
"AUT",
"ITA",
"ESP",
"PRT",
"USA",
"FRA"
],
"supported_currencies": [
"CAD",
"CHF",
"DKK",
"NZD",
"NOK",
"USD",
"SEK",
"AUD",
"GBP",
"PLN",
"EUR"
]
}
],
"supported_webhook_flows": []
},
{
"name": "AUTHORIZEDOTNET",
"display_name": "Authorize.net",
"description": " Authorize.net supports payment processing by helping small businesses accept credit card and eCheck payments online, in person on the go.",
"category": "payment_gateway",
"supported_payment_methods": [
{
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_type_display_name": "Credit Card",
"mandates": "supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"manual",
"sequential_automatic"
],
"three_ds": "not_supported",
"no_three_ds": "supported",
"supported_card_networks": [
"AmericanExpress",
"Discover",
"JCB",
"Mastercard",
"Visa"
],
"supported_countries": [
"USA",
"CAN"
],
"supported_currencies": [
"CAD",
"USD"
]
},
{
"payment_method": "card",
"payment_method_type": "debit",
"payment_method_type_display_name": "Debit Card",
"mandates": "supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"manual",
"sequential_automatic"
],
"three_ds": "not_supported",
"no_three_ds": "supported",
"supported_card_networks": [
"AmericanExpress",
"Discover",
"JCB",
"Mastercard",
"Visa"
],
"supported_countries": [
"USA",
"CAN"
],
"supported_currencies": [
"CAD",
"USD"
]
},
{
"payment_method": "wallet",
"payment_method_type": "google_pay",
"payment_method_type_display_name": "Google Pay",
"mandates": "supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"manual",
"sequential_automatic"
],
"supported_countries": [
"DEU",
"TWN",
"OMN",
"TUR",
"ZAF",
"KAZ",
"BHR",
"PRT",
"CZE",
"NZL",
"URY",
"EST",
"JOR",
"SAU",
"SWE",
"FIN",
"HUN",
"IDN",
"THA",
"PAN",
"BEL",
"DZA",
"ISR",
"ESP",
"VNM",
"ARG",
"POL",
"BRA",
"IND",
"ITA",
"SGP",
"MYS",
"ASM",
"HRV",
"BLR",
"MEX",
"UKR",
"QAT",
"GBR",
"ROU",
"PAK",
"KEN",
"PHL",
"USA",
"ATG",
"LBN",
"BGR",
"EGY",
"LVA",
"AGO",
"AUS",
"RUS",
"COL",
"CHE",
"AUT",
"ARE",
"LKA",
"LTU",
"DNK",
"SVK",
"LUX",
"JPN",
"NLD",
"NOR",
"DOM",
"ALB",
"AZE",
"FRA",
"PER",
"IRL",
"CHL",
"CAN",
"GRC",
"KWT",
"HKG"
],
"supported_currencies": [
"NZD",
"NOK",
"DKK",
"SEK",
"CHF",
"GBP",
"EUR",
"USD",
"AUD",
"PLN",
"CAD"
]
},
{
"payment_method": "wallet",
"payment_method_type": "apple_pay",
"payment_method_type_display_name": "Apple Pay",
"mandates": "supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"manual",
"sequential_automatic"
],
"supported_countries": [
"ITA",
"CHE",
"ARG",
"LTU",
"ISR",
"VNM",
"EST",
"IRL",
"JPN",
"MLT",
"MNE",
"ECU",
"MAR",
"GBR",
"NZL",
"IMN",
"CHL",
"DNK",
"GTM",
"MAC",
"FRA",
"AUT",
"FRO",
"SRB",
"BGR",
"AZE",
"ARE",
"NOR",
"HND",
"SVK",
"ALB",
"COL",
"FIN",
"PRT",
"POL",
"UKR",
"URY",
"KWT",
"SGP",
"ARM",
"ROU",
"CYP",
"HRV",
"DOM",
"MEX",
"GGY",
"CZE",
"TWN",
"ISL",
"HUN",
"BRA",
"AUS",
"MCO",
"SLV",
"DEU",
"LVA",
"BHR",
"CRI",
"GEO",
"PER",
"QAT",
"ZAF",
"USA",
"GRC",
"NLD",
"PAN",
"SVN",
"CAN",
"SWE",
"MDA",
"LIE",
"MYS",
"LUX",
"BEL",
"PRY",
"KAZ",
"SAU",
"HKG",
"GRL",
"ESP"
],
"supported_currencies": [
"EGP",
"PYG",
"QAR",
"INR",
"AED",
"CLP",
"GTQ",
"UAH",
"COP",
"HNL",
"BRL",
"HKD",
"KWD",
"MAD",
"NOK",
"PEN",
"RON",
"VND",
"PLN",
"JPY",
"GHS",
"KZT",
"ZAR",
"ISK",
"CZK",
"KRW",
"EUR",
"CAD",
"AUD",
"HUF",
"SAR",
"SGD",
"CRC",
"DKK",
"USD",
"MYR",
"SEK",
"THB",
"TWD",
"GEL",
"ILS",
"NZD",
"GBP",
"MXN"
]
}
],
"supported_webhook_flows": [
"payments",
"refunds"
]
},
{
"name": "BRAINTREE",
"display_name": "Braintree",
"description": "Braintree, a PayPal service, offers a full-stack payment platform that simplifies accepting payments in your app or website, supporting various payment methods including credit cards and PayPal.",
"category": "payment_gateway",
"supported_payment_methods": [
{
"payment_method": "card",
"payment_method_type": "debit",
"payment_method_type_display_name": "Debit Card",
"mandates": "supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"manual",
"sequential_automatic"
],
"three_ds": "supported",
"no_three_ds": "supported",
"supported_card_networks": [
"AmericanExpress",
"Discover",
"JCB",
"UnionPay",
"Mastercard",
"Visa"
],
"supported_countries": [
"SVK",
"PRT",
"MYS",
"FIN",
"SGP",
"JEY",
"CAN",
"ESP",
"HKG",
"LUX",
"SMR",
"FRA",
"CZE",
"AUS",
"POL",
"CHE",
"LIE",
"MCO",
"AUT",
"DEU",
"IMN",
"HRV",
"GGY",
"NZL",
"IRL",
"ITA",
"GBR",
"LVA",
"GRC",
"BGR",
"NOR",
"BEL",
"LTU",
"HUN",
"MLT",
"DNK",
"USA",
"EST",
"NLD",
"CYP",
"ROU",
"SVN",
"AND",
"GIB",
"SWE"
],
"supported_currencies": [
"SRD",
"FJD",
"BMD",
"GTQ",
"TTD",
"DZD",
"MDL",
"ISK",
"ZWL",
"NGN",
"CRC",
"JPY",
"KZT",
"UAH",
"CAD",
"AED",
"QAR",
"PAB",
"GIP",
"SLL",
"BWP",
"NOK",
"ZAR",
"SZL",
"MWK",
"HUF",
"UZS",
"FKP",
"PHP",
"MUR",
"BRL",
"RWF",
"MYR",
"MVR",
"CNY",
"MNT",
"TRY",
"MKD",
"STD",
"SBD",
"CLP",
"SOS",
"TJS",
"AUD",
"BBD",
"BDT",
"BIF",
"CVE",
"AZN",
"AOA",
"IDR",
"KES",
"GEL",
"SYP",
"MOP",
"ETB",
"SEK",
"DOP",
"XOF",
"BZD",
"BSD",
"EGP",
"HKD",
"CHF",
"KYD",
"UGX",
"HNL",
"USD",
"BAM",
"THB",
"GHS",
"AWG",
"CZK",
"NAD",
"NIO",
"PYG",
"SVC",
"LKR",
"YER",
"RUB",
"KHR",
"BYN",
"VES",
"XCD",
"XAF",
"HTG",
"SAR",
"BOB",
"SHP",
"PKR",
"TZS",
"TOP",
"BND",
"GMD",
"EUR",
"UYU",
"KRW",
"DKK",
"GYD",
"COP",
"MAD",
"SCR",
"ILS",
"MXN",
"VND",
"LAK",
"WST",
"INR",
"LBP",
"BGN",
"VUV",
"PEN",
"DJF",
"JMD",
"ARS",
"GBP",
"NPR",
"KMF",
"KGS",
"PLN",
"MZN",
"LRD",
"ZMW",
"XPF",
"GNF",
"LSL",
"SGD",
"TWD",
"RSD",
"RON",
"NZD",
"PGK",
"AMD",
"HRK"
]
},
{
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_type_display_name": "Credit Card",
"mandates": "supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"manual",
"sequential_automatic"
],
"three_ds": "supported",
"no_three_ds": "supported",
"supported_card_networks": [
"AmericanExpress",
"Discover",
"JCB",
"UnionPay",
"Mastercard",
"Visa"
],
"supported_countries": [
"DEU",
"CHE",
"DNK",
"CZE",
"GBR",
"BEL",
"USA",
"GGY",
"POL",
"CAN",
"AUS",
"ROU",
"NOR",
"FIN",
"IRL",
"MCO",
"FRA",
"LIE",
"LTU",
"PRT",
"SGP",
"HKG",
"IMN",
"SWE",
"EST",
"ITA",
"MLT",
"SVK",
"NLD",
"NZL",
"AND",
"HRV",
"GRC",
"SVN",
"JEY",
"MYS",
"LVA",
"CYP",
"AUT",
"HUN",
"ESP",
"SMR",
"LUX",
"BGR",
"GIB"
],
"supported_currencies": [
"GIP",
"TTD",
"GYD",
"BND",
"GTQ",
"LAK",
"UYU",
"ISK",
"GMD",
"KHR",
"BYN",
"QAR",
"AWG",
"MXN",
"NPR",
"KGS",
"SRD",
"SCR",
"CVE",
"FKP",
"PHP",
"AZN",
"SGD",
"BWP",
"RSD",
"NGN",
"BBD",
"NAD",
"BOB",
"CRC",
"BSD",
"MUR",
"RWF",
"XCD",
"HRK",
"XPF",
"SEK",
"MDL",
"INR",
"SYP",
"XAF",
"ARS",
"KYD",
"MZN",
"AED",
"KRW",
"GEL",
"NOK",
"BMD",
"MWK",
"TJS",
"SOS",
"JMD",
"DJF",
"CLP",
"PEN",
"WST",
"BIF",
"MKD",
"GHS",
"MAD",
"VES",
"DKK",
"HUF",
"LKR",
"TRY",
"GBP",
"TOP",
"CZK",
"SAR",
"XOF",
"KMF",
"LRD",
"HTG",
"PYG",
"RON",
"BGN",
"FJD",
"VUV",
"MNT",
"PLN",
"SHP",
"UAH",
"BZD",
"CHF",
"SBD",
"BRL",
"TWD",
"RUB",
"CNY",
"GNF",
"JPY",
"ZAR",
"AMD",
"EGP",
"IDR",
"BDT",
"LBP",
"AOA",
"HKD",
"THB",
"MYR",
"ZMW",
"SLL",
"HNL",
"KES",
"UZS",
"MVR",
"PAB",
"DZD",
"CAD",
"NZD",
"NIO",
"LSL",
"STD",
"TZS",
"COP",
"YER",
"EUR",
"ZWL",
"ETB",
"PKR",
"KZT",
"PGK",
"BAM",
"UGX",
"SVC",
"MOP",
"SZL",
"VND",
"USD",
"DOP",
"ILS",
"AUD"
]
}
],
"supported_webhook_flows": [
"payments",
"refunds"
]
},
{
"name": "FIUU",
"display_name": "Fiuu",
"description": "Fiuu, formerly known as Razer Merchant Services, is a leading online payment gateway in Southeast Asia, offering secure and seamless payment solutions for businesses of all sizes, including credit and debit cards, e-wallets, and bank transfers.",
"category": "payment_gateway",
"supported_payment_methods": [
{
"payment_method": "bank_redirect",
"payment_method_type": "online_banking_fpx",
"payment_method_type_display_name": "Online Banking FPX",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"manual",
"sequential_automatic"
],
"supported_countries": [
"MYS"
],
"supported_currencies": [
"MYR"
]
},
{
"payment_method": "card",
"payment_method_type": "debit",
"payment_method_type_display_name": "Debit Card",
"mandates": "supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"manual",
"sequential_automatic"
],
"three_ds": "supported",
"no_three_ds": "supported",
"supported_card_networks": [
"Visa",
"JCB",
"DinersClub",
"UnionPay",
"Mastercard",
"Discover"
],
"supported_countries": [
"IDN",
"VNM",
"CHN",
"SGP",
"TWN",
"HKG",
"THA",
"MYS",
"PHL"
],
"supported_currencies": [
"IDR",
"PHP",
"MYR",
"CNY",
"SGD",
"VND",
"THB",
"TWD",
"HKD"
]
},
{
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_type_display_name": "Credit Card",
"mandates": "supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"manual",
"sequential_automatic"
],
"three_ds": "supported",
"no_three_ds": "supported",
"supported_card_networks": [
"Visa",
"JCB",
"DinersClub",
"UnionPay",
"Mastercard",
"Discover"
],
"supported_countries": [
"PHL",
"MYS",
"SGP",
"IDN",
"TWN",
"HKG",
"THA",
"VNM",
"CHN"
],
"supported_currencies": [
"HKD",
"IDR",
"MYR",
"CNY",
"SGD",
"THB",
"VND",
"TWD",
"PHP"
]
},
{
"payment_method": "real_time_payment",
"payment_method_type": "duit_now",
"payment_method_type_display_name": "DuitNow",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"manual",
"sequential_automatic"
],
"supported_countries": [
"MYS"
],
"supported_currencies": [
"MYR"
]
},
{
"payment_method": "wallet",
"payment_method_type": "apple_pay",
"payment_method_type_display_name": "Apple Pay",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"manual",
"sequential_automatic"
],
"supported_countries": [
"MYS"
],
"supported_currencies": [
"MYR"
]
},
{
"payment_method": "wallet",
"payment_method_type": "google_pay",
"payment_method_type_display_name": "Google Pay",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"manual",
"sequential_automatic"
],
"supported_countries": [
"MYS"
],
"supported_currencies": [
"MYR"
]
}
],
"supported_webhook_flows": [
"payments",
"refunds"
]
},
{
"name": "FORTE",
"display_name": "Forte",
"description": "CSG Forte offers a unified payments platform, enabling businesses to securely process credit cards, debit cards, ACH/eCheck transactions, and more, with advanced fraud prevention and seamless integration.",
"category": "payment_gateway",
"supported_payment_methods": [
{
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_type_display_name": "Credit Card",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"manual",
"sequential_automatic"
],
"three_ds": "not_supported",
"no_three_ds": "supported",
"supported_card_networks": [
"AmericanExpress",
"Discover",
"DinersClub",
"JCB",
"Mastercard",
"Visa"
],
"supported_countries": [
"USA",
"CAN"
],
"supported_currencies": [
"USD",
"CAD"
]
},
{
"payment_method": "card",
"payment_method_type": "debit",
"payment_method_type_display_name": "Debit Card",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"manual",
"sequential_automatic"
],
"three_ds": "not_supported",
"no_three_ds": "supported",
"supported_card_networks": [
"AmericanExpress",
"Discover",
"DinersClub",
"JCB",
"Mastercard",
"Visa"
],
"supported_countries": [
"CAN",
"USA"
],
"supported_currencies": [
"USD",
"CAD"
]
}
],
"supported_webhook_flows": []
},
{
"name": "PLACETOPAY",
"display_name": "PlacetoPay",
"description": "PlacetoPay is a Latin American financial technology company's online payment platform, offering various payment methods and integrations for businesses",
"category": "payment_gateway",
"supported_payment_methods": [
{
"payment_method": "card",
"payment_method_type": "debit",
"payment_method_type_display_name": "Debit Card",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"sequential_automatic"
],
"three_ds": "not_supported",
"no_three_ds": "supported",
"supported_card_networks": [
"AmericanExpress",
"DinersClub",
"Mastercard",
"Visa"
],
"supported_countries": [
"PRI",
"URY",
"CRI",
"CHE",
"ECU",
"BEL",
"COL",
"HND",
"MEX",
"PAN"
],
"supported_currencies": [
"USD",
"CLP",
"COP"
]
},
{
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_type_display_name": "Credit Card",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"sequential_automatic"
],
"three_ds": "not_supported",
"no_three_ds": "supported",
"supported_card_networks": [
"AmericanExpress",
"DinersClub",
"Mastercard",
"Visa"
],
"supported_countries": [
"PAN",
"ECU",
"CHE",
"MEX",
"HND",
"CRI",
"COL",
"URY",
"BEL",
"PRI"
],
"supported_currencies": [
"CLP",
"USD",
"COP"
]
}
],
"supported_webhook_flows": []
}
]
}
```
## 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`
- [ ] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
|
<think>
PR Context:
- Title: fix(connector): Added Paypal in feature matrix for authorizedotnet
- Merged: 2025-05-21T10:23:21Z
- Files changed: 1 files
- Commits: 7 commits
Implementation approach:
## Type of Change
Added paypal in feature matrix for authorizedotnet
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Added the missed feature matrix supported PM , paypal for authorizedotnet.
Changes we added to authorizedotnet.rs file only, .toml files already have the desired changes in original PR.
Original PR : #7854
### Additional Changes
- [ ] This PR modifies the API contra
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(connector): Added Paypal in feature matrix for authorizedotnet (#8072)
Co-authored-by: Chaitak G
Files to modify:
**crates/hyperswitch_connectors/src/connectors/authorizedotnet.rs**
Modify existing code
|
{"issue_number": 7854, "pr_number": 8072, "commits_count": 1, "files_changed": 1, "response_length": 1009, "file_count": 3, "needs_breakdown": false}
|
fix(api_models): `wasm` build problems caused by `actix-multipart`
`wasm` build is failing because of adding `actix-multipart` dependency in `api-models`.
As we cannot change any dependencies in `wasm`, we will have to make changes to `api_models` to fix this.
|
<think>
PR Context:
- Title: fix(api_models): Fix `wasm` build problems caused by `actix-multipart`
- Merged: 2024-12-05T11:09:38Z
- Files changed: 4 files
- Commits: 4 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 -->
Wasm build is failing because of adding `actix-multipart` dependency in `api-models`.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configur
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(api_models): Fix `wasm` build problems caused by `actix-multipart` (#6747)
Files to modify:
**crates/api_models/src/events/user.rs**
Modify existing code
**crates/api_models/src/user.rs**
Modify existing code
|
{"issue_number": 6748, "pr_number": 6747, "commits_count": 1, "files_changed": 4, "response_length": 1022, "file_count": 4, "needs_breakdown": false}
|
feat(core): add api for hypersense integration
# Hypersense
### Description:
#### An AI Ops tool build for Payments Cost Observability
- Monitor your overall transaction payment-related costs across multiple regions, PSPs, and businesses.
- Obtain actionable insights to optimise costs, track cost deviations, and effectively audit PSP invoices.
Learn more: [Hypersense site](https://www.hypersense.io/)
## Purpose of Change
To integrate hypersense with hyperswitch dashboard.
## Proposed Changes
- add endpoints for, get `token`, `verify_token` and `signout` for `hypersense` integration.
- limit the scope of the use of token by introducing a new type of token, `ExternalToken`
containing enum `ExternalServiceType`
## Additional Changes
#### `external_service_auth` module and `ExternalToken`
- `external_service_auth` is a generic service used to issue, verify and invalidate `ExternalToken`,
which can be associated with an external service using the enum field `external_service_type: ExternalServiceType` in the `ExternalToken`.
- Essentially a new service can be integrated by simply creating routes and handlers, and calling the same core functions
specified in `external_service_auth` modules.
|
<think>
PR Context:
- Title: feat(core): add hypersense integration api
- Merged: 2025-02-19T08:52:58Z
- Files changed: 14 files
- Commits: 18 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 -->
#### Endpoints
- GET `hypersense/token` (returns hypersense token).
- POST `hypersense/verify_token` (verifies the token passed as payload).
- POST `hypersense/signout` (invalidates the token).
### Additional Changes
- [x] This PR
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(core): add hypersense integration api (#7218)
Co-authored-by: hyperswitch-bot[bot] <148525504+
Files to modify:
**crates/api_models/src/events.rs**
Add:
- mod: pub::external_service_auth
**crates/api_models/src/events/external_service_auth.rs**
Add:
- function: private::get_api_event_type
- function: private::get_api_event_type
- function: private::get_api_event_type
- function: private::get_api_event_type
- impl: impl ApiEventMetric for ExternalTokenResponse
- impl: impl ApiEventMetric for ExternalVerifyTokenRequest
- impl: impl ApiEventMetric for ExternalVerifyTokenResponse
- impl: impl ApiEventMetric for ExternalSignoutTokenRequest
**crates/api_models/src/external_service_auth.rs**
Add:
- function: pub::get_user_id
- struct: pub::ExternalTokenResponse
- struct: pub::ExternalVerifyTokenRequest
- struct: pub::ExternalSignoutTokenRequest
- enum: pub::ExternalVerifyTokenResponse
- impl: impl ExternalVerifyTokenResponse
**crates/api_models/src/lib.rs**
Add:
- mod: pub::external_service_auth
**crates/common_utils/src/events.rs**
Modify existing code
**crates/router/src/core.rs**
Add:
- mod: pub::external_service_auth
**crates/router/src/core/external_service_auth.rs**
Add:
- function: pub::generate_external_token
- function: pub::signout_external_token
- function: pub::verify_external_token
**crates/router/src/lib.rs**
Modify existing code
**crates/router/src/routes.rs**
Add:
- mod: pub::hypersense
**crates/router/src/routes/app.rs**
Add:
- function: pub::server
- struct: pub::Hypersense
- impl: impl Hypersense
**crates/router/src/routes/hypersense.rs**
Add:
- function: pub::get_hypersense_token
- function: pub::signout_hypersense_token
- function: pub::verify_hypersense_token
**crates/router/src/routes/lock_utils.rs**
Modify existing code
**crates/router/src/services/authentication.rs**
Add:
- function: pub::new_token
- function: pub::check_service_type
- struct: pub::ExternalToken
- enum: pub::ExternalServiceType
- impl: impl ExternalToken
**crates/router_env/src/logger/types.rs**
Modify existing code
|
{"issue_number": 7217, "pr_number": 7218, "commits_count": 1, "files_changed": 14, "response_length": 2990, "file_count": 16, "needs_breakdown": true}
|
[FEATURE] scheme error code and messages in /payments API response
### Feature Description
If the payment is declined for a card transaction, the card scheme or issuer can send a raw response explaining why. These are the raw acquirer responses which helps in understanding why a card transaction was declined.
Some connectors like Adyen supports this - [reference](https://docs.adyen.com/development-resources/raw-acquirer-responses/#search-modal).
HyperSwitch today sends back `error_code` and `error_message` in the payments API response which are connector's error code and messages. Payments API response has to be extended to send back issuer specific error codes and messages.
### Possible Implementation
Issuer's error code and messages are received in payments API response or through webhooks. Considering this, below steps are to be followed
1. Ensure issuer's error code and messages are sent back from connector integration to core layer in `ErrorResponse`
2. Ensure this is handled in `IncomingWebhook` flows
3. Ensure this is stored in `payment_attempt` table
4. Ensure this is sent back in payments response
##### Changes required
1. Add below fields in `payment_attempt` table
- `issuer_error_code`
- `issuer_error_message`
2. Add below fields to payments API response
- `issuer_error_code`
- `issuer_error_message`
This maintains the existing naming convention. Today, HyperSwitch has -
- `error_code` and `unified_code`
- `error_message` and `unified_message`
### 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: scheme error code and messages in payments api response
- Merged: 2025-03-17T15:03:23Z
- Files changed: 30 files
- Commits: 13 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
This PR introduces -
- Core functionality to read and store raw acquirer responses for `payment` and `refund` operations.
- Read raw acquirer response from connector integration
- Store in `PaymentAttempt` and `Refund` tables
- Updates Adyen connector integration to read r
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat: scheme error code and messages in payments api response (#7528)
Co-authored-by: hyperswitch-bo
Files to modify:
**crates/api_models/src/payments.rs**
Modify existing code
**crates/api_models/src/refunds.rs**
Modify existing code
**crates/diesel_models/src/payment_attempt.rs**
Modify existing code
**crates/diesel_models/src/refund.rs**
Modify existing code
**crates/diesel_models/src/schema.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/aci.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/adyen.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/airwallex.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/amazonpay.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/authorizedotnet.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/bambora.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/bamboraapac.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/bamboraapac/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/bankofamerica.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/billwerk.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/billwerk/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/bitpay.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/bluesnap.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/boku.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/braintree.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/cashtocode.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/cashtocode/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/chargebee.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/checkout.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/coinbase.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/coingate.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/cryptopay.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/cryptopay/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/cybersource.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/datatrans.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/datatrans/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/deutschebank.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/deutschebank/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/digitalvirgo.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/dlocal.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/elavon/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/fiserv.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/fiservemea.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/fiuu.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/forte.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/getnet.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/globalpay.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/globalpay/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/globepay.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/globepay/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/gocardless.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/helcim.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/hipay.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/hipay/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/iatapay.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/iatapay/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/inespay.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/inespay/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/itaubank.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/jpmorgan.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/juspaythreedsserver.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/klarna.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/mifinity.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/mollie.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/moneris.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/nexinets.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/nexixpay.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/nomupay.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/noon.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/noon/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/novalnet.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/opayo.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/opennode.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/paybox.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/paybox/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/payeezy.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/payme.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/payme/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/paypal.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/paystack.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/paystack/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/payu.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/placetopay.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/powertranz.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/powertranz/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/prophetpay.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/prophetpay/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/rapyd.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/rapyd/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/razorpay.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/razorpay/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/recurly.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/redsys.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/shift4.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/square.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/stax.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/stripebilling.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/taxjar.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/thunes.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/trustpay.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/tsys/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/unified_authentication_service.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/volt.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/volt/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/wellsfargo.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/worldpay.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/worldpay/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/xendit.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/xendit/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/zen.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/zen/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/zsl.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/zsl/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/utils.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/errors/api_error_response.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/payments/payment_attempt.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/router_data.rs**
Modify existing code
**crates/hyperswitch_interfaces/src/api.rs**
Modify existing code
**crates/hyperswitch_interfaces/src/connector_integration_v2.rs**
Modify existing code
**crates/router/src/connector/adyenplatform.rs**
Modify existing code
**crates/router/src/connector/dummyconnector.rs**
Modify existing code
**crates/router/src/connector/ebanx.rs**
Modify existing code
**crates/router/src/connector/gpayments.rs**
Modify existing code
**crates/router/src/connector/netcetera.rs**
Modify existing code
**crates/router/src/connector/netcetera/transformers.rs**
Modify existing code
**crates/router/src/connector/nmi.rs**
Modify existing code
**crates/router/src/connector/nmi/transformers.rs**
Modify existing code
**crates/router/src/connector/payone.rs**
Modify existing code
**crates/router/src/connector/plaid.rs**
Modify existing code
**crates/router/src/connector/plaid/transformers.rs**
Modify existing code
**crates/router/src/connector/riskified.rs**
Modify existing code
**crates/router/src/connector/signifyd.rs**
Modify existing code
**crates/router/src/connector/stripe.rs**
Modify existing code
**crates/router/src/connector/stripe/transformers.rs**
Modify existing code
**crates/router/src/connector/threedsecureio.rs**
Modify existing code
**crates/router/src/connector/threedsecureio/transformers.rs**
Modify existing code
**crates/router/src/connector/utils.rs**
Modify existing code
**crates/router/src/connector/wellsfargopayout.rs**
Modify existing code
**crates/router/src/connector/wise.rs**
Modify existing code
**crates/router/src/core/payments/access_token.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_response.rs**
Modify existing code
**crates/router/src/core/payments/retry.rs**
Modify existing code
**crates/router/src/core/payments/transformers.rs**
Modify existing code
**crates/router/src/core/payouts/access_token.rs**
Modify existing code
**crates/router/src/core/refunds.rs**
Modify existing code
**crates/router/src/db/refund.rs**
Modify existing code
**crates/router/src/services/api.rs**
Modify existing code
**crates/router/src/utils.rs**
Modify existing code
**crates/router/src/workflows/payment_sync.rs**
Modify existing code
**crates/router/tests/payments.rs**
Modify existing code
**crates/router/tests/payments2.rs**
Modify existing code
**crates/storage_impl/src/mock_db/payment_attempt.rs**
Modify existing code
**crates/storage_impl/src/payments/payment_attempt.rs**
Modify existing code
|
{"issue_number": 7467, "pr_number": 7528, "commits_count": 1, "files_changed": 30, "response_length": 14386, "file_count": 162, "needs_breakdown": true}
|
[FEATURE] Add x-mcp extension to OpenAPI schema
Mintlify supports extracting API endpoints from openAPI json into MCP servers: https://mintlify.com/docs/mcp
We need to add:
```json
"x-mcp": {
"enabled": true
},
```
at the top level of our OpenAPI schema to enable this functionality
|
<think>
PR Context:
- Title: feat(openapi): Add x-mcp extension to v1 spec
- Merged: 2025-06-27T08:52:30Z
- Files changed: 4 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
- [x] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
Modified `openapi/src/main.rs` to append `x-mcp` extension to v1 OpenAPI schema
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(openapi): Add x-mcp extension to v1 spec (#8443)
Co-authored-by: GORAKHNATH YADAV <gorakhcodes@
Files to modify:
**crates/openapi/src/main.rs**
Modify existing code
|
{"issue_number": 8442, "pr_number": 8443, "commits_count": 1, "files_changed": 4, "response_length": 951, "file_count": 3, "needs_breakdown": false}
|
feat(core): setup platform merchant account
- Setup platform merchant account.
Platform merchant account is a special type of merchant account which can do operations on behalf of other merchant account present in the same organisation.
- Add APIs to create a platform merchant account / convert a merchant account into platform account.
- Feature should be disabled in sandbox and production.
|
<think>
PR Context:
- Title: feat(core): implemented platform merchant account
- Merged: 2024-12-23T13:21:14Z
- Files changed: 30 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
#### About the feature
- This the first PR for the Platform Account feature.
- Feature is under development and behind the feature flag.
- Feature is supposed to be disabled for sandbox and production environments.
#### Enabling the platform account.
- New API has been created t
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(core): implemented platform merchant account (#6882)
Co-authored-by: Narayanbhat166 <narayan.bh
Files to modify:
**crates/diesel_models/src/merchant_account.rs**
Modify existing code
**crates/diesel_models/src/payment_intent.rs**
Modify existing code
**crates/diesel_models/src/schema.rs**
Modify existing code
**crates/diesel_models/src/schema_v2.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/errors/api_error_response.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/merchant_account.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/payments.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/payments/payment_intent.rs**
Modify existing code
**crates/router/build.rs**
Modify existing code
**crates/router/src/compatibility/stripe/errors.rs**
Modify existing code
**crates/router/src/compatibility/stripe/payment_intents.rs**
Modify existing code
**crates/router/src/compatibility/stripe/setup_intents.rs**
Modify existing code
**crates/router/src/configs/secrets_transformers.rs**
Modify existing code
**crates/router/src/configs/settings.rs**
Add:
- struct: pub::Platform
**crates/router/src/core/admin.rs**
Add:
- function: pub::enable_platform_account
**crates/router/src/core/fraud_check.rs**
Modify existing code
**crates/router/src/core/fraud_check/operation.rs**
Modify existing code
**crates/router/src/core/fraud_check/operation/fraud_check_post.rs**
Modify existing code
**crates/router/src/core/payments.rs**
Modify existing code
**crates/router/src/core/payments/helpers.rs**
Modify existing code
**crates/router/src/core/payments/operations.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_approve.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_cancel.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_capture.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_capture_v2.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_confirm_intent.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_create.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_create_intent.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_get.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_get_intent.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_post_session_tokens.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_reject.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_session.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_session_intent.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_start.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_status.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_update.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_update_intent.rs**
Modify existing code
**crates/router/src/core/payments/operations/payments_incremental_authorization.rs**
Modify existing code
**crates/router/src/core/payments/operations/tax_calculation.rs**
Modify existing code
**crates/router/src/core/payments/session_operation.rs**
Modify existing code
**crates/router/src/core/webhooks/incoming.rs**
Modify existing code
**crates/router/src/lib.rs**
Modify existing code
**crates/router/src/routes/admin.rs**
Add:
- function: pub::merchant_account_enable_platform_account
**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**
Modify existing code
**crates/router/src/services/authentication.rs**
Add:
- function: pub::get_id_type_from_header_if_present
- function: private::get_connected_merchant_account
- function: private::get_platform_merchant_account
- function: private::get_and_validate_connected_merchant_id
- function: private::throw_error_if_platform_merchant_authentication_required
**crates/router/src/utils/user/sample_data.rs**
Modify existing code
**crates/router/src/workflows/outgoing_webhook_retry.rs**
Modify existing code
**crates/router/src/workflows/payment_sync.rs**
Modify existing code
**crates/router/tests/payments.rs**
Modify existing code
**crates/router/tests/payments2.rs**
Modify existing code
**crates/router_env/src/logger/types.rs**
Modify existing code
|
{"issue_number": 6883, "pr_number": 6882, "commits_count": 1, "files_changed": 30, "response_length": 5751, "file_count": 58, "needs_breakdown": true}
|
feat(core): Add kill switch for Unified Connector Service (UCS)
# feat(core): Add kill switch for Unified Connector Service (UCS)
## Feature Description
We need to implement a kill switch mechanism for the Unified Connector Service (UCS) integration that allows operators to disable UCS immediately without requiring code changes or deployments.
## Problem Statement
Currently, if UCS experiences issues or needs to be disabled for operational reasons, there's no quick way to fall back to traditional connector flows without modifying code and deploying. This poses operational risks during incidents.
## Proposed Solution
Implement a database-driven kill switch that:
- Can be toggled via a configuration entry in the database
- Takes effect immediately without requiring service restart
- Integrates seamlessly with the existing UCS decision flow
- Provides clear logging when the kill switch is active
## Technical Approach
1. Add a new configuration key `UCS_KILL_SWITCH_ACTIVE` that can be stored in the database
2. Implement a helper function to check the kill switch status
3. Integrate the kill switch check into the UCS decision flow before rollout percentage checks
4. Ensure proper error handling when UCS is disabled via kill switch
## Benefits
- **Operational Control**: Immediate ability to disable UCS during incidents
- **Risk Mitigation**: Quick fallback mechanism without deployment delays
- **Debugging**: Easier troubleshooting by toggling UCS on/off
- **Gradual Rollout**: Additional safety layer on top of percentage-based rollout
## Implementation Details
The kill switch will be checked in the `should_call_unified_connector_service` function before any other conditions, ensuring it has the highest priority in the decision flow.
## Acceptance Criteria
- [ ] Kill switch configuration can be set in the database
- [ ] When kill switch is active, UCS is bypassed completely
- [ ] Changes take effect immediately without service restart
- [ ] Proper logging indicates when kill switch is active
- [ ] Traditional connector flow continues to work when UCS is disabled
|
<think>
PR Context:
- Title: feat(core): Implement UCS kill switch for emergency fallback
- Merged: 2025-07-22T09:00:55Z
- Files changed: 4 files
- Commits: 8 commits
Implementation approach:
# feat(core): Implement UCS enable/disable configuration for operational control
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
### Fixes #8644
## Description
<!-- Describe your changes in detail -->
This PR implements a **database-driven enable/disable configuration** for the Unified Connector Service (UCS) int
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(core): Implement UCS kill switch for emergency fallback (#8651)
Files to modify:
**crates/router/src/consts.rs**
Modify existing code
**crates/router/src/core/payments.rs**
Modify existing code
**crates/router/src/core/payments/helpers.rs**
Add:
- function: pub::is_ucs_enabled
**crates/router/src/core/unified_connector_service.rs**
Modify existing code
|
{"issue_number": 8644, "pr_number": 8651, "commits_count": 1, "files_changed": 4, "response_length": 1169, "file_count": 7, "needs_breakdown": false}
|
[ENHANCE] Improve Error Reporting in change_password with Printable Context
This issue aims to improve the debuggability of the `change_password` function by adding a printable message to a potential database error. Currently, if the database update fails, a generic `InternalServerError` is returned. By attaching a specific, contextual message, we can make debugging and logging much more effective.
In the [change_password](https://github.com/juspay/hyperswitch/blob/cf30da2df05aac69fd82b676e639b2fbc85dcae5/crates/router/src/core/user.rs#L429) function located in `crates/router/src/core/user.rs`, we update the user's password in the database. The relevant code block is:
If the update_user_by_user_id operation fails (e.g., due to a database connection issue, a constraint violation, etc.), it's wrapped in a [UserErrors::InternalServerError](https://github.com/juspay/hyperswitch/blob/cf30da2df05aac69fd82b676e639b2fbc85dcae5/crates/router/src/core/user.rs#L461). While this correctly signals a server-side problem, the error itself lacks specific context. When debugging, an engineer seeing this error in the logs would have to trace back the execution flow to understand which operation and for which user it failed.
#### __Proposed Solution 💡__
We can enhance this by using the `.attach_printable()` method from the `error-stack` crate. This method allows us to attach a static or pre-formatted string message to the error context.
The goal is to modify the code to include the error message, making it immediately clear what failed during InternalServerError
#### __How to Test Your Changes 🧪__
1. __Make the code change__: Apply the suggested modification to the `change_password` function.
2. __Build the project__: Run `cargo build` or `cargo check` to ensure your changes compile correctly. __If it compiles, the `attach_printable` should work fine.__
3. __Simulate an error (Advanced)__:
- A good way to test this end-to-end is to:
1. Create a user via the signup flow.
2. Log in and get an authentication token.
3. Call the `change_password` endpoint.
- To reliably trigger the error for observation, you could temporarily modify the `update_user_by_user_id` method in its respective implementation to always return an error.
- A simpler way to verify the message is being constructed is to temporarily introduce a `panic!` or a different, guaranteed error inside the `attach_printable` argument to see if it gets hit (remember to remove this temporary change!).
4. __Observe the output__: If you can trigger the error, you should see your new, more descriptive message in the application logs or error response, making it clear that the failure happened during the password update for a specific user.
####
####
|
<think>
PR Context:
- Title: Update user.rs
- Merged: None
- Files changed: 1 files
- Commits: 1 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 -->
Improved error reporting in the `change_password` function by adding a descriptive context message to database errors. This enhancement addresses issue #9641 by making debugging and logging more effective when password update operations fail
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 9641, "pr_number": 9645, "commits_count": 0, "files_changed": 1, "response_length": 728, "file_count": 0, "needs_breakdown": false}
|
feat(analytics): implement currency conversion to power multi-currency aggregation
## Current Behaviour
The total amount calculated for all payment analytics buckets related to amounts is incorrect because currency conversion is not being applied before summing the values. As a result, amounts in different currencies are being added together, leading to an inaccurate total.
## Proposed Changes
- introduce `<AMOUNT_RELATED_FIELD>_in_usd` fields to convert and store value in `USD`
- introduce total_in_usd to store the total value in usd
- Generally provide currency_conversion facility to metrics function for other future use cases
|
<think>
PR Context:
- Title: feat(analytics): implement currency conversion to power multi-currency aggregation
- Merged: 2024-11-06T09:51:02Z
- Files changed: 18 files
- Commits: 12 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
- implemented currency_conversion for calculating values of amount related metrics from their currency (i.e `INR`) to
`USD` and store it in a separate field variant I created `<fieldname>_in_usd`
- Implemented a total_amount_in_usd variant for all the total fields related to amount
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(analytics): implement currency conversion to power multi-currency aggregation (#6418)
Co-author
Files to modify:
**crates/analytics/src/errors.rs**
Modify existing code
**crates/analytics/src/payment_intents/accumulator.rs**
Modify existing code
**crates/analytics/src/payment_intents/core.rs**
Modify existing code
**crates/analytics/src/payment_intents/metrics/sessionized_metrics/payment_processed_amount.rs**
Modify existing code
**crates/analytics/src/payment_intents/metrics/sessionized_metrics/smart_retried_amount.rs**
Modify existing code
**crates/analytics/src/payment_intents/metrics/smart_retried_amount.rs**
Modify existing code
**crates/analytics/src/payments/accumulator.rs**
Modify existing code
**crates/analytics/src/payments/core.rs**
Modify existing code
**crates/analytics/src/payments/metrics/payment_processed_amount.rs**
Modify existing code
**crates/analytics/src/payments/metrics/sessionized_metrics/payment_processed_amount.rs**
Modify existing code
**crates/api_models/src/analytics.rs**
Modify existing code
**crates/api_models/src/analytics/payment_intents.rs**
Modify existing code
**crates/api_models/src/analytics/payments.rs**
Modify existing code
**crates/router/src/analytics.rs**
Modify existing code
**crates/router/src/core/currency.rs**
Add:
- function: pub::get_forex_exchange_rates
**crates/router/src/utils/currency.rs**
Modify existing code
|
{"issue_number": 6416, "pr_number": 6418, "commits_count": 1, "files_changed": 18, "response_length": 2259, "file_count": 18, "needs_breakdown": true}
|
[FEATURE] integrate NTI flow for Worldpay and Novalnet
### Feature Description
Processing card payments using Network Transaction ID is required for below payment processors -
- Fiuu
- Novalnet
- Worldpay
This helps make card payments agnostic to the acquirer.
### Possible Implementation
Fiuu - closed source
Novalnet - https://developer.novalnet.com/encryption/directapi (include `transaction.scheme_tid`)
Worldpay - https://developer.worldpay.com/products/access/payments/openapi/other/payment#other/payment/request (Unscheduled payments)
### 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(connectors): fiuu,novalnet,worldpay - extend NTI flows
- Merged: 2025-01-21T08:42:05Z
- Files changed: 19 files
- Commits: 14 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
Described in #6941
This PR adds NTI flow integrations for below connectors
- Fiuu - store NTI ID in `payment_methods` from connector's PSync response
- Novalnet - use NTI ID for card payments
- Worldpay - store and use NTI ID for card payments
### Additional Changes
- [
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connectors): fiuu,novalnet,worldpay - extend NTI flows (#6946)
Co-authored-by: hyperswitch-bot[
Files to modify:
**crates/hyperswitch_connectors/src/connectors/fiuu.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs**
Add:
- struct: pub::NovalnetRawCardDetails
**crates/hyperswitch_connectors/src/connectors/worldpay.rs**
Add:
- function: private::get_mandate_details
- function: private::get_network_txn_id
**crates/hyperswitch_connectors/src/connectors/worldpay/requests.rs**
Add:
- struct: pub::RawCardDetails
**crates/hyperswitch_connectors/src/connectors/worldpay/response.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/worldpay/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/utils.rs**
Add:
- function: private::get_card_expiry_year_2_digit
- function: private::get_card_issuer
- function: private::get_card_expiry_month_year_2_digit_with_delimiter
- function: private::get_expiry_date_as_yyyymm
- function: private::get_expiry_date_as_mmyyyy
- function: private::get_expiry_year_4_digit
- function: private::get_expiry_date_as_yymm
- function: private::get_expiry_date_as_mmyy
- function: private::get_expiry_month_as_i8
- function: private::get_expiry_year_as_i32
- function: private::get_expiry_year_as_4_digit_i32
- function: private::get_cardholder_name
- impl: impl CardData for CardDetailsForNetworkTransactionId
**crates/router/src/configs/defaults/payment_connector_required_fields.rs**
Modify existing code
|
{"issue_number": 6941, "pr_number": 6946, "commits_count": 1, "files_changed": 19, "response_length": 2509, "file_count": 11, "needs_breakdown": false}
|
refactor(paymentMethods): move all pm migration related changes to payment methods crate
## 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 PR moves all payment method migration related code and functionality from the router crate to the payment_methods crate. This refactoring improves code organization and maintainability by keeping payment method related logic in a dedicated crate.
### 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).
-->
- Moved payment method migration handlers to the payment_methods crate
- Refactored migration-related data structures and types
- Updated feature flags and conditional compilation blocks
- Improved error handling and response types for migration operations
- Support for network token migration
- Enhanced payment method data validation during migration
- Added migration-specific types and structs in the payment_methods crate
- Implemented proper error handling and status tracking for migration operations
- Added support for migrating various payment method attributes:
- Card details
- Network tokens
- Connector mandate details
- Network transaction IDs
- Improved validation and error reporting during migration
## 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)?
-->
1. Create a Merchant, API Key, Business profile, Connector, and a customer
<details>
<summary>Create on-session payment with the created customer</summary>
Request
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_FnltW73uMOCcEBApQnrAFpC4E570KVRJWzevF3NMlZS15o13tdMU60eh1wtqz3rc' \
--data-raw '{
"amount": 1000,
"currency": "USD",
"confirm": false,
"capture_method": "automatic",
"authentication_type": "no_three_ds",
"customer_id": "cus_qmEvJXTwol5oGfYQL25C",
"profile_id": "pro_5VR03thJTJH5WVRNXDSp",
"email": "[email protected]",
"description": "Hello this is description",
"shipping": {
"address": {
"state": "zsaasdas",
"city": "Banglore",
"country": "US",
"line1": "sdsdfsdf",
"line2": "hsgdbhd",
"line3": "alsksoe",
"zip": "571201",
"first_name": "joseph",
"last_name": "doe"
},
"phone": {
"number": "123456789",
"country_code": "+1"
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "123456789",
"country_code": "+1"
}
},
"setup_future_usage": "on_session",
"order_details": null
}'
Response
{
"payment_id": "pay_qmwSjRRAsWceStL7ZlWP",
"merchant_id": "merchant_1744875358",
"status": "requires_payment_method",
"amount": 1000,
"net_amount": 1000,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": null,
"connector": null,
"client_secret": "pay_qmwSjRRAsWceStL7ZlWP_secret_qpwNxseYRkppM8dQLGJ2",
"created": "2025-04-17T08:26:19.988Z",
"currency": "USD",
"customer_id": "cus_qmEvJXTwol5oGfYQL25C",
"customer": {
"id": "cus_qmEvJXTwol5oGfYQL25C",
"name": "John Doe",
"email": "[email protected]",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Hello this is description",
"refunds": null,
"disputes": null,
"mandate_id": null,
"mandate_data": null,
"setup_future_usage": "on_session",
"off_session": null,
"capture_on": null,
"capture_method": "automatic",
"payment_method": null,
"payment_method_data": null,
"payment_token": null,
"shipping": {
"address": {
"city": "Banglore",
"country": "US",
"line1": "sdsdfsdf",
"line2": "hsgdbhd",
"line3": "alsksoe",
"zip": "571201",
"state": "zsaasdas",
"first_name": "joseph",
"last_name": "doe"
},
"phone": {
"number": "123456789",
"country_code": "+1"
},
"email": null
},
"billing": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "123456789",
"country_code": "+1"
},
"email": null
},
"order_details": null,
"email": "[email protected]",
"name": "John Doe",
"phone": "999999999",
"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": null,
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "cus_qmEvJXTwol5oGfYQL25C",
"created_at": 1744878379,
"expires": 1744881979,
"secret": "epk_73acc74e655e4163ba338a637b1248aa"
},
"manual_retry_allowed": null,
"connector_transaction_id": null,
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": null,
"payment_link": null,
"profile_id": "pro_5VR03thJTJH5WVRNXDSp",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": null,
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-04-17T08:41:19.988Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2025-04-17T08:26:20.045Z",
"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": null,
"force_3ds_challenge": false,
"force_3ds_challenge_trigger": false,
"issuer_error_code": null,
"issuer_error_message": null
}
</details>
<details>
<summary>Confirm the payment</summary>
Request
curl --location 'http://localhost:8080/payments/pay_qmwSjRRAsWceStL7ZlWP/confirm' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: pk_dev_83200543d7d045f89bd4aa0d9475a63a' \
--data '{
"payment_method": "card",
"payment_method_type": "credit",
"client_secret": "pay_qmwSjRRAsWceStL7ZlWP_secret_qpwNxseYRkppM8dQLGJ2",
"profile_id": "pro_5VR03thJTJH5WVRNXDSp",
"payment_method_data": {
"card": {
"card_number": "4111111111111111",
"card_exp_month": "03",
"card_exp_year": "2030",
"card_holder_name": "CLBRW dffdg",
"card_cvc": "737"
}
},
"payment_type": "new_mandate",
"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"
}
}
}'
Response
{
"payment_id": "pay_qmwSjRRAsWceStL7ZlWP",
"merchant_id": "merchant_1744875358",
"status": "succeeded",
"amount": 1000,
"net_amount": 1000,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": 1000,
"connector": "cybersource",
"client_secret": "pay_qmwSjRRAsWceStL7ZlWP_secret_qpwNxseYRkppM8dQLGJ2",
"created": "2025-04-17T08:26:19.988Z",
"currency": "USD",
"customer_id": "cus_qmEvJXTwol5oGfYQL25C",
"customer": {
"id": "cus_qmEvJXTwol5oGfYQL25C",
"name": "John Doe",
"email": "[email protected]",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Hello this is description",
"refunds": null,
"disputes": null,
"mandate_id": null,
"mandate_data": null,
"setup_future_usage": "on_session",
"off_session": null,
"capture_on": null,
"capture_method": "automatic",
"payment_method": "card",
"payment_method_data": {
"card": {
"last4": "1111",
"card_type": "CREDIT",
"card_network": "Visa",
"card_issuer": "JP Morgan",
"card_issuing_country": "INDIA",
"card_isin": "411111",
"card_extended_bin": null,
"card_exp_month": "03",
"card_exp_year": "2030",
"card_holder_name": "CLBRW dffdg",
"payment_checks": {
"avs_response": {
"code": "Y",
"codeRaw": "Y"
},
"card_verification": null
},
"authentication_data": null
},
"billing": null
},
"payment_token": "token_DirGLr4ZuG0YQLDjnthZ",
"shipping": {
"address": {
"city": "Banglore",
"country": "US",
"line1": "sdsdfsdf",
"line2": "hsgdbhd",
"line3": "alsksoe",
"zip": "571201",
"state": "zsaasdas",
"first_name": "joseph",
"last_name": "doe"
},
"phone": {
"number": "123456789",
"country_code": "+1"
},
"email": null
},
"billing": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "123456789",
"country_code": "+1"
},
"email": null
},
"order_details": null,
"email": "[email protected]",
"name": "John Doe",
"phone": "999999999",
"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": null,
"manual_retry_allowed": false,
"connector_transaction_id": "7448785550036549704805",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": "pay_qmwSjRRAsWceStL7ZlWP_1",
"payment_link": null,
"profile_id": "pro_5VR03thJTJH5WVRNXDSp",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_4cXM5Pc7p96fCmB2oZim",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-04-17T08:41:19.988Z",
"fingerprint": null,
"browser_info": {
"os_type": null,
"language": null,
"time_zone": null,
"ip_address": "::1",
"os_version": null,
"user_agent": null,
"color_depth": null,
"device_model": null,
"java_enabled": null,
"screen_width": null,
"accept_header": null,
"screen_height": null,
"accept_language": "en",
"java_script_enabled": null
},
"payment_method_id": null,
"payment_method_status": null,
"updated": "2025-04-17T08:29:15.447Z",
"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
}
</details>
<details>
<summary>List customer Payment Methods</summary>
Request
curl --location 'http://localhost:8080/customers/cus_qmEvJXTwol5oGfYQL25C/payment_methods' \
--header 'Accept: application/json' \
--header 'api-key: dev_FnltW73uMOCcEBApQnrAFpC4E570KVRJWzevF3NMlZS15o13tdMU60eh1wtqz3rc'
Response
{
"customer_payment_methods": [
{
"payment_token": "token_C0qM39EOKWuXXaZiqleE",
"payment_method_id": "pm_pLVoa3evTaZFbZzjLA8s",
"customer_id": "cus_qmEvJXTwol5oGfYQL25C",
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_issuer": "JP Morgan",
"payment_method_issuer_code": null,
"recurring_enabled": false,
"installment_payment_enabled": false,
"payment_experience": [
"redirect_to_url"
],
"card": {
"scheme": "Visa",
"issuer_country": "INDIA",
"last4_digits": "1111",
"expiry_month": "03",
"expiry_year": "2030",
"card_token": null,
"card_holder_name": "CLBRW dffdg",
"card_fingerprint": null,
"nick_name": null,
"card_network": "Visa",
"card_isin": "411111",
"card_issuer": "JP Morgan",
"card_type": "CREDIT",
"saved_to_locker": true
},
"metadata": null,
"created": "2025-04-17T08:29:15.455Z",
"bank": null,
"surcharge_details": null,
"requires_cvv": true,
"last_used_at": "2025-04-17T08:29:15.455Z",
"default_payment_method_set": true,
"billing": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "CLBRW",
"last_name": "dffdg"
},
"phone": {
"number": "123456789",
"country_code": "+1"
},
"email": null
}
}
],
"is_guest_customer": null
}
</details>
2. Create a new customer for offsession payment testing
<details>
<summary>Create a payment intent with setup_future_usage: offsession</summary>
Request
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_FnltW73uMOCcEBApQnrAFpC4E570KVRJWzevF3NMlZS15o13tdMU60eh1wtqz3rc' \
--data-raw '{
"amount": 1000,
"currency": "USD",
"confirm": false,
"capture_method": "automatic",
"authentication_type": "no_three_ds",
"customer_id": "cus_X4kaqOtEassKw3iiRM4v",
"profile_id": "pro_5VR03thJTJH5WVRNXDSp",
"email": "[email protected]",
"description": "Hello this is description",
"shipping": {
"address": {
"state": "zsaasdas",
"city": "Banglore",
"country": "US",
"line1": "sdsdfsdf",
"line2": "hsgdbhd",
"line3": "alsksoe",
"zip": "571201",
"first_name": "joseph",
"last_name": "doe"
},
"phone": {
"number": "123456789",
"country_code": "+1"
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "123456789",
"country_code": "+1"
}
},
"setup_future_usage": "off_session",
"order_details": null
}'
Response
{
"payment_id": "pay_mbPUbwCkHDFtfTWgRpun",
"merchant_id": "merchant_1744875358",
"status": "requires_payment_method",
"amount": 1000,
"net_amount": 1000,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": null,
"connector": null,
"client_secret": "pay_mbPUbwCkHDFtfTWgRpun_secret_gPLUinlRR0INPY21se4T",
"created": "2025-04-17T08:32:21.848Z",
"currency": "USD",
"customer_id": "cus_X4kaqOtEassKw3iiRM4v",
"customer": {
"id": "cus_X4kaqOtEassKw3iiRM4v",
"name": "John Doe",
"email": "[email protected]",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Hello this is description",
"refunds": null,
"disputes": null,
"mandate_id": null,
"mandate_data": null,
"setup_future_usage": "off_session",
"off_session": null,
"capture_on": null,
"capture_method": "automatic",
"payment_method": null,
"payment_method_data": null,
"payment_token": null,
"shipping": {
"address": {
"city": "Banglore",
"country": "US",
"line1": "sdsdfsdf",
"line2": "hsgdbhd",
"line3": "alsksoe",
"zip": "571201",
"state": "zsaasdas",
"first_name": "joseph",
"last_name": "doe"
},
"phone": {
"number": "123456789",
"country_code": "+1"
},
"email": null
},
"billing": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "123456789",
"country_code": "+1"
},
"email": null
},
"order_details": null,
"email": "[email protected]",
"name": "John Doe",
"phone": "999999999",
"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": null,
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "cus_X4kaqOtEassKw3iiRM4v",
"created_at": 1744878741,
"expires": 1744882341,
"secret": "epk_8cb5ff9074c2494c8449346ee3c44a12"
},
"manual_retry_allowed": null,
"connector_transaction_id": null,
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": null,
"payment_link": null,
"profile_id": "pro_5VR03thJTJH5WVRNXDSp",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": null,
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-04-17T08:47:21.848Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2025-04-17T08:32:21.876Z",
"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": null,
"force_3ds_challenge": false,
"force_3ds_challenge_trigger": false,
"issuer_error_code": null,
"issuer_error_message": null
}
</details>
<details>
<summary>Confirm the payment intent</summary>
Request
curl --location 'http://localhost:8080/payments/pay_mbPUbwCkHDFtfTWgRpun/confirm' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: pk_dev_83200543d7d045f89bd4aa0d9475a63a' \
--data '{
"payment_method": "card",
"payment_method_type": "credit",
"client_secret": "pay_mbPUbwCkHDFtfTWgRpun_secret_gPLUinlRR0INPY21se4T",
"profile_id": "pro_5VR03thJTJH5WVRNXDSp",
"payment_method_data": {
"card": {
"card_number": "4111111111111111",
"card_exp_month": "03",
"card_exp_year": "2030",
"card_holder_name": "CLBRW dffdg",
"card_cvc": "737"
}
},
"payment_type": "new_mandate",
"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"
}
}
}'
Response
{
"payment_id": "pay_mbPUbwCkHDFtfTWgRpun",
"merchant_id": "merchant_1744875358",
"status": "succeeded",
"amount": 1000,
"net_amount": 1000,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": 1000,
"connector": "cybersource",
"client_secret": "pay_mbPUbwCkHDFtfTWgRpun_secret_gPLUinlRR0INPY21se4T",
"created": "2025-04-17T08:32:21.848Z",
"currency": "USD",
"customer_id": "cus_X4kaqOtEassKw3iiRM4v",
"customer": {
"id": "cus_X4kaqOtEassKw3iiRM4v",
"name": "John Doe",
"email": "[email protected]",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Hello this is description",
"refunds": null,
"disputes": null,
"mandate_id": null,
"mandate_data": null,
"setup_future_usage": "off_session",
"off_session": null,
"capture_on": null,
"capture_method": "automatic",
"payment_method": "card",
"payment_method_data": {
"card": {
"last4": "1111",
"card_type": "CREDIT",
"card_network": "Visa",
"card_issuer": "JP Morgan",
"card_issuing_country": "INDIA",
"card_isin": "411111",
"card_extended_bin": null,
"card_exp_month": "03",
"card_exp_year": "2030",
"card_holder_name": "CLBRW dffdg",
"payment_checks": {
"avs_response": {
"code": "Y",
"codeRaw": "Y"
},
"card_verification": null
},
"authentication_data": null
},
"billing": null
},
"payment_token": "token_HXjTgyijlJIT12YmXCZT",
"shipping": {
"address": {
"city": "Banglore",
"country": "US",
"line1": "sdsdfsdf",
"line2": "hsgdbhd",
"line3": "alsksoe",
"zip": "571201",
"state": "zsaasdas",
"first_name": "joseph",
"last_name": "doe"
},
"phone": {
"number": "123456789",
"country_code": "+1"
},
"email": null
},
"billing": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "123456789",
"country_code": "+1"
},
"email": null
},
"order_details": null,
"email": "[email protected]",
"name": "John Doe",
"phone": "999999999",
"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": null,
"manual_retry_allowed": false,
"connector_transaction_id": "7448787948566158204806",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": "pay_mbPUbwCkHDFtfTWgRpun_1",
"payment_link": null,
"profile_id": "pro_5VR03thJTJH5WVRNXDSp",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_4cXM5Pc7p96fCmB2oZim",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-04-17T08:47:21.848Z",
"fingerprint": null,
"browser_info": {
"os_type": null,
"language": null,
"time_zone": null,
"ip_address": "::1",
"os_version": null,
"user_agent": null,
"color_depth": null,
"device_model": null,
"java_enabled": null,
"screen_width": null,
"accept_header": null,
"screen_height": null,
"accept_language": "en",
"java_script_enabled": null
},
"payment_method_id": "pm_eeUJfBIaOvdZZCB49l72",
"payment_method_status": "active",
"updated": "2025-04-17T08:33:16.039Z",
"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": "32F638788713F60BE063AF598E0AECE9",
"card_discovery": "manual",
"force_3ds_challenge": false,
"force_3ds_challenge_trigger": false,
"issuer_error_code": null,
"issuer_error_message": null
}
</details>
<details>
<summary>List the customer payment methods</summary>
Request
curl --location 'http://localhost:8080/customers/cus_X4kaqOtEassKw3iiRM4v/payment_methods' \
--header 'Accept: application/json' \
--header 'api-key: dev_FnltW73uMOCcEBApQnrAFpC4E570KVRJWzevF3NMlZS15o13tdMU60eh1wtqz3rc'
Response
{
"customer_payment_methods": [
{
"payment_token": "token_Xz7iFHHg2og0ixOa8CYr",
"payment_method_id": "pm_eeUJfBIaOvdZZCB49l72",
"customer_id": "cus_X4kaqOtEassKw3iiRM4v",
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_issuer": "JP Morgan",
"payment_method_issuer_code": null,
"recurring_enabled": false,
"installment_payment_enabled": false,
"payment_experience": [
"redirect_to_url"
],
"card": {
"scheme": "Visa",
"issuer_country": "INDIA",
"last4_digits": "1111",
"expiry_month": "03",
"expiry_year": "2030",
"card_token": null,
"card_holder_name": "CLBRW dffdg",
"card_fingerprint": null,
"nick_name": null,
"card_network": "Visa",
"card_isin": "411111",
"card_issuer": "JP Morgan",
"card_type": "CREDIT",
"saved_to_locker": true
},
"metadata": null,
"created": "2025-04-17T08:33:16.010Z",
"bank": null,
"surcharge_details": null,
"requires_cvv": true,
"last_used_at": "2025-04-17T08:33:16.010Z",
"default_payment_method_set": true,
"billing": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "CLBRW",
"last_name": "dffdg"
},
"phone": {
"number": "123456789",
"country_code": "+1"
},
"email": null
}
}
],
"is_guest_customer": null
}
</details>
3. Test payment method migrate for new customer. Create a new customer
<details>
<summary>List payment methods of the customer</summary>
Request
curl --location 'http://localhost:8080/customers/cus_KLhHM9R3f16CP2v1OuXt/payment_methods' \
--header 'Accept: application/json' \
--header 'x-feature: router-custom-be' \
--header 'api-key: dev_FnltW73uMOCcEBApQnrAFpC4E570KVRJWzevF3NMlZS15o13tdMU60eh1wtqz3rc'
Response
Expected empty list as the customer is new
{
"customer_payment_methods": [],
"is_guest_customer": null
}
</details>
<details>
<summary>Add a payment method for the new customer using /migrate API </summary>
Request
curl --location 'http://localhost:8080/payment_methods/migrate' \
--header 'api-key: test_admin' \
--header 'Content-Type: application/json' \
--data '{
"payment_method": "card",
"merchant_id": "merchant_1744875358",
"card": {
"card_number": "6011111111111117",
"card_exp_month": "10",
"card_exp_year": "33",
"nick_name": "Joh"
},
"customer_id": "cus_KLhHM9R3f16CP2v1OuXt",
"connector_mandate_details": {
"mca_4cXM5Pc7p96fCmB2oZim": {
"connector_mandate_id": "juaghfija"
}
}
}
'
Response
{
"payment_method_response": {
"merchant_id": "merchant_1744875358",
"customer_id": "cus_KLhHM9R3f16CP2v1OuXt",
"payment_method_id": "pm_x58uwwcP6pcqSMPPOsnx",
"payment_method": "card",
"payment_method_type": null,
"card": {
"scheme": "DinersClub",
"issuer_country": null,
"last4_digits": "1117",
"expiry_month": "10",
"expiry_year": "33",
"card_token": null,
"card_holder_name": null,
"card_fingerprint": null,
"nick_name": "Joh",
"card_network": "DinersClub",
"card_isin": "601111",
"card_issuer": null,
"card_type": "CREDIT",
"saved_to_locker": true
},
"recurring_enabled": false,
"installment_payment_enabled": false,
"payment_experience": [
"redirect_to_url"
],
"metadata": null,
"created": "2025-04-17T08:36:45.651Z",
"last_used_at": "2025-04-17T08:36:45.651Z",
"client_secret": "pm_x58uwwcP6pcqSMPPOsnx_secret_VbS8w4pFXCc60aLm0aD4"
},
"card_migrated": true,
"network_token_migrated": null,
"connector_mandate_details_migrated": true,
"network_transaction_id_migrated": null
}
</details>
<details>
<summary>List the Customer PMs again</summary>
Request
curl --location 'http://localhost:8080/customers/cus_KLhHM9R3f16CP2v1OuXt/payment_methods' \
--header 'Accept: application/json' \
--header 'x-feature: router-custom-be' \
--header 'api-key: dev_FnltW73uMOCcEBApQnrAFpC4E570KVRJWzevF3NMlZS15o13tdMU60eh1wtqz3rc'
Response
As expected the customer has new payment methods added via /migrate API
{
"customer_payment_methods": [
{
"payment_token": "token_I9VnnF5P5tBIiQ0xZnM2",
"payment_method_id": "pm_x58uwwcP6pcqSMPPOsnx",
"customer_id": "cus_KLhHM9R3f16CP2v1OuXt",
"payment_method": "card",
"payment_method_type": null,
"payment_method_issuer": null,
"payment_method_issuer_code": null,
"recurring_enabled": false,
"installment_payment_enabled": false,
"payment_experience": [
"redirect_to_url"
],
"card": {
"scheme": "DinersClub",
"issuer_country": null,
"last4_digits": "1117",
"expiry_month": "10",
"expiry_year": "33",
"card_token": null,
"card_holder_name": null,
"card_fingerprint": null,
"nick_name": "Joh",
"card_network": "DinersClub",
"card_isin": "601111",
"card_issuer": null,
"card_type": "CREDIT",
"saved_to_locker": true
},
"metadata": null,
"created": "2025-04-17T08:36:45.652Z",
"bank": null,
"surcharge_details": null,
"requires_cvv": true,
"last_used_at": "2025-04-17T08:36:45.652Z",
"default_payment_method_set": true,
"billing": null
}
],
"is_guest_customer": null
}
</details>
4. To check if the migrated payment method can be used in the payment, we create an onsession payment intent with this customer id
<details>
<summary>List the customer payment methods using the client secret</summary>
Request
curl --location 'http://localhost:8080/customers/payment_methods?client_secret=pay_TcXsFdXIIKsg0vMtsNcw_secret_vfeAOfTzSQfxUajzKe4K' \
--header 'Accept: application/json' \
--header 'api-key: pk_dev_83200543d7d045f89bd4aa0d9475a63a'
Response
{
"customer_payment_methods": [
{
"payment_token": "token_gHFHR6PsW8pk1YbLV994",
"payment_method_id": "pm_x58uwwcP6pcqSMPPOsnx",
"customer_id": "cus_KLhHM9R3f16CP2v1OuXt",
"payment_method": "card",
"payment_method_type": null,
"payment_method_issuer": null,
"payment_method_issuer_code": null,
"recurring_enabled": true,
"installment_payment_enabled": false,
"payment_experience": [
"redirect_to_url"
],
"card": {
"scheme": "DinersClub",
"issuer_country": null,
"last4_digits": "1117",
"expiry_month": "10",
"expiry_year": "33",
"card_token": null,
"card_holder_name": null,
"card_fingerprint": null,
"nick_name": "Joh",
"card_network": "DinersClub",
"card_isin": "601111",
"card_issuer": null,
"card_type": "CREDIT",
"saved_to_locker": true
},
"metadata": null,
"created": "2025-04-17T08:36:45.652Z",
"bank": null,
"surcharge_details": null,
"requires_cvv": true,
"last_used_at": "2025-04-17T08:36:45.652Z",
"default_payment_method_set": true,
"billing": null
}
],
"is_guest_customer": false
}
</details>
<details>
<summary>Confirm the payment with above payment token</summary>
Request
curl --location 'http://localhost:8080/payments/pay_TcXsFdXIIKsg0vMtsNcw/confirm' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: pk_dev_83200543d7d045f89bd4aa0d9475a63a' \
--data '{
"payment_method": "card",
"client_secret": "pay_TcXsFdXIIKsg0vMtsNcw_secret_vfeAOfTzSQfxUajzKe4K",
"payment_token": "token_gHFHR6PsW8pk1YbLV994"
}'
Response
{
"payment_id": "pay_TcXsFdXIIKsg0vMtsNcw",
"merchant_id": "merchant_1744875358",
"status": "succeeded",
"amount": 1000,
"net_amount": 1000,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": 1000,
"connector": "cybersource",
"client_secret": "pay_TcXsFdXIIKsg0vMtsNcw_secret_vfeAOfTzSQfxUajzKe4K",
"created": "2025-04-17T08:47:25.193Z",
"currency": "USD",
"customer_id": "cus_KLhHM9R3f16CP2v1OuXt",
"customer": {
"id": "cus_KLhHM9R3f16CP2v1OuXt",
"name": "John Doe",
"email": "[email protected]",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Hello this is description",
"refunds": null,
"disputes": null,
"mandate_id": null,
"mandate_data": null,
"setup_future_usage": "on_session",
"off_session": null,
"capture_on": null,
"capture_method": "automatic",
"payment_method": "card",
"payment_method_data": {
"card": {
"last4": "1117",
"card_type": "CREDIT",
"card_network": "DinersClub",
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "601111",
"card_extended_bin": null,
"card_exp_month": "10",
"card_exp_year": "33",
"card_holder_name": null,
"payment_checks": {
"avs_response": {
"code": "A",
"codeRaw": "Y"
},
"card_verification": null
},
"authentication_data": null
},
"billing": null
},
"payment_token": "token_gHFHR6PsW8pk1YbLV994",
"shipping": {
"address": {
"city": "Banglore",
"country": "US",
"line1": "sdsdfsdf",
"line2": "hsgdbhd",
"line3": "alsksoe",
"zip": "571201",
"state": "zsaasdas",
"first_name": "joseph",
"last_name": "doe"
},
"phone": {
"number": "123456789",
"country_code": "+1"
},
"email": null
},
"billing": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "123456789",
"country_code": "+1"
},
"email": null
},
"order_details": null,
"email": "[email protected]",
"name": "John Doe",
"phone": "999999999",
"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": null,
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": null,
"manual_retry_allowed": false,
"connector_transaction_id": "7448796541886364904807",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": "pay_TcXsFdXIIKsg0vMtsNcw_1",
"payment_link": null,
"profile_id": "pro_5VR03thJTJH5WVRNXDSp",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_4cXM5Pc7p96fCmB2oZim",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-04-17T09:02:25.193Z",
"fingerprint": null,
"browser_info": {
"os_type": null,
"language": null,
"time_zone": null,
"ip_address": "::1",
"os_version": null,
"user_agent": null,
"color_depth": null,
"device_model": null,
"java_enabled": null,
"screen_width": null,
"accept_header": null,
"screen_height": null,
"accept_language": "en",
"java_script_enabled": null
},
"payment_method_id": "pm_x58uwwcP6pcqSMPPOsnx",
"payment_method_status": "active",
"updated": "2025-04-17T08:47:34.548Z",
"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": "saved_card",
"force_3ds_challenge": false,
"force_3ds_challenge_trigger": false,
"issuer_error_code": null,
"issuer_error_message": null
}
</details>
5. Test payment method migration api with network_transaction_id
<details>
Create a new customer
<summary>Add customer payment method with NTID</summary>
Request
curl --location 'http://localhost:8080/payment_methods/migrate' \
--header 'api-key: test_admin' \
--header 'Content-Type: application/json' \
--data '{
"payment_method": "card",
"merchant_id": "merchant_1744875358",
"card": {
"card_number": "4242424242424242",
"card_exp_month": "10",
"card_exp_year": "26",
"nick_name": "Joh"
},
"customer_id": "cus_gIbOHWMUdVIJPXkOmEGw",
"network_transaction_id": "network_transaction_id",
"connector_mandate_details": {
"mca_4cXM5Pc7p96fCmB2oZim": {
"connector_mandate_id": "connector_mandate_id",
"original_payment_authorized_amount": 6560,
"original_payment_authorized_currency": "USD"
}
}
}
'
Response
{
"payment_method_response": {
"merchant_id": "merchant_1744875358",
"customer_id": "cus_gIbOHWMUdVIJPXkOmEGw",
"payment_method_id": "pm_33dm3RNHzkNRoYmkZkq8",
"payment_method": "card",
"payment_method_type": null,
"card": {
"scheme": "Visa",
"issuer_country": "UNITEDKINGDOM",
"last4_digits": "4242",
"expiry_month": "10",
"expiry_year": "26",
"card_token": null,
"card_holder_name": null,
"card_fingerprint": null,
"nick_name": "Joh",
"card_network": "Visa",
"card_isin": "424242",
"card_issuer": "STRIPE PAYMENTS UK LIMITED",
"card_type": "CREDIT",
"saved_to_locker": true
},
"recurring_enabled": false,
"installment_payment_enabled": false,
"payment_experience": [
"redirect_to_url"
],
"metadata": null,
"created": "2025-04-17T08:55:40.382Z",
"last_used_at": "2025-04-17T08:55:40.382Z",
"client_secret": "pm_33dm3RNHzkNRoYmkZkq8_secret_2xHRJBFxmybLzoB1x0hA"
},
"card_migrated": true,
"network_token_migrated": null,
"connector_mandate_details_migrated": true,
"network_transaction_id_migrated": true
}
</details>
<details>
Create an onsession payment and get the client secret from response
<summary>List all the payment methods of the customer using the client secret</summary>
Request
curl --location 'http://localhost:8080/customers/payment_methods?client_secret=pay_4slVZnQjT2Rgf6hsnH2f_secret_KQqTcwrHYsZmDWfDaqCr' \
--header 'Accept: application/json' \
--header 'api-key: pk_dev_83200543d7d045f89bd4aa0d9475a63a'
Response
{
"customer_payment_methods": [
{
"payment_token": "token_rADRActu2VQW7vsZWU51",
"payment_method_id": "pm_33dm3RNHzkNRoYmkZkq8",
"customer_id": "cus_gIbOHWMUdVIJPXkOmEGw",
"payment_method": "card",
"payment_method_type": null,
"payment_method_issuer": null,
"payment_method_issuer_code": null,
"recurring_enabled": true,
"installment_payment_enabled": false,
"payment_experience": [
"redirect_to_url"
],
"card": {
"scheme": "Visa",
"issuer_country": "UNITEDKINGDOM",
"last4_digits": "4242",
"expiry_month": "10",
"expiry_year": "26",
"card_token": null,
"card_holder_name": null,
"card_fingerprint": null,
"nick_name": "Joh",
"card_network": "Visa",
"card_isin": "424242",
"card_issuer": "STRIPE PAYMENTS UK LIMITED",
"card_type": "CREDIT",
"saved_to_locker": true
},
"metadata": null,
"created": "2025-04-17T08:55:40.385Z",
"bank": null,
"surcharge_details": null,
"requires_cvv": true,
"last_used_at": "2025-04-17T08:55:40.385Z",
"default_payment_method_set": true,
"billing": null
}
],
"is_guest_customer": false
}
</details>
<details>
<summary>Confirm the payment with payment token</summary>
Request
curl --location 'http://localhost:8080/payments/pay_4slVZnQjT2Rgf6hsnH2f/confirm' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: pk_dev_83200543d7d045f89bd4aa0d9475a63a' \
--data '{
"payment_method": "card",
"client_secret": "pay_4slVZnQjT2Rgf6hsnH2f_secret_KQqTcwrHYsZmDWfDaqCr",
"payment_token": "token_rADRActu2VQW7vsZWU51"
}'
Response
{
"payment_id": "pay_4slVZnQjT2Rgf6hsnH2f",
"merchant_id": "merchant_1744875358",
"status": "succeeded",
"amount": 1000,
"net_amount": 1000,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": 1000,
"connector": "cybersource",
"client_secret": "pay_4slVZnQjT2Rgf6hsnH2f_secret_KQqTcwrHYsZmDWfDaqCr",
"created": "2025-04-17T08:58:04.694Z",
"currency": "USD",
"customer_id": "cus_gIbOHWMUdVIJPXkOmEGw",
"customer": {
"id": "cus_gIbOHWMUdVIJPXkOmEGw",
"name": "John Doe",
"email": "[email protected]",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Hello this is description",
"refunds": null,
"disputes": null,
"mandate_id": null,
"mandate_data": null,
"setup_future_usage": "on_session",
"off_session": null,
"capture_on": null,
"capture_method": "automatic",
"payment_method": "card",
"payment_method_data": {
"card": {
"last4": "4242",
"card_type": "CREDIT",
"card_network": "Visa",
"card_issuer": "STRIPE PAYMENTS UK LIMITED",
"card_issuing_country": "UNITEDKINGDOM",
"card_isin": "424242",
"card_extended_bin": null,
"card_exp_month": "10",
"card_exp_year": "26",
"card_holder_name": null,
"payment_checks": {
"avs_response": {
"code": "Y",
"codeRaw": "Y"
},
"card_verification": null
},
"authentication_data": null
},
"billing": null
},
"payment_token": "token_rADRActu2VQW7vsZWU51",
"shipping": {
"address": {
"city": "Banglore",
"country": "US",
"line1": "sdsdfsdf",
"line2": "hsgdbhd",
"line3": "alsksoe",
"zip": "571201",
"state": "zsaasdas",
"first_name": "joseph",
"last_name": "doe"
},
"phone": {
"number": "123456789",
"country_code": "+1"
},
"email": null
},
"billing": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "123456789",
"country_code": "+1"
},
"email": null
},
"order_details": null,
"email": "[email protected]",
"name": "John Doe",
"phone": "999999999",
"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": null,
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": null,
"manual_retry_allowed": false,
"connector_transaction_id": "7448803299126792804805",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": "pay_4slVZnQjT2Rgf6hsnH2f_1",
"payment_link": null,
"profile_id": "pro_5VR03thJTJH5WVRNXDSp",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_4cXM5Pc7p96fCmB2oZim",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-04-17T09:13:04.694Z",
"fingerprint": null,
"browser_info": {
"os_type": null,
"language": null,
"time_zone": null,
"ip_address": "::1",
"os_version": null,
"user_agent": null,
"color_depth": null,
"device_model": null,
"java_enabled": null,
"screen_width": null,
"accept_header": null,
"screen_height": null,
"accept_language": "en",
"java_script_enabled": null
},
"payment_method_id": "pm_33dm3RNHzkNRoYmkZkq8",
"payment_method_status": "active",
"updated": "2025-04-17T08:58:50.272Z",
"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": "saved_card",
"force_3ds_challenge": false,
"force_3ds_challenge_trigger": false,
"issuer_error_code": null,
"issuer_error_message": null
}
</details>
<details>
<summary>Verify Discover cards validation in migrate API</summary>
Request
curl --location 'http://localhost:8080/payment_methods/migrate' \
--header 'api-key: test_admin' \
--header 'Content-Type: application/json' \
--data '{
"payment_method": "card",
"merchant_id": "merchant_1744875358",
"card": {
"card_number": "6043101111111117",
"card_exp_month": "10",
"card_exp_year": "33",
"nick_name": "Joh"
},
"customer_id": "cus_gHT9elNyHdZPJh7Rjv2y",
"connector_mandate_details": {
"mca_4cXM5Pc7p96fCmB2oZim": {
"connector_mandate_id": "juaghfija"
}
}
}
'
Response
{
"error": {
"type": "invalid_request",
"message": "Missing required params",
"code": "IR_21",
"data": [
"original_payment_authorized_currency",
"original_payment_authorized_amount"
]
}
}
</details>
<details>
<summary>Test payment method addition using migrate batch endpoint</summary>
Request
sample.csv
merchant_id,merchant_connector_id,name,email,phone,phone_country_code,customer_id,subscription_id,payment_method,payment_method_type,nick_name,payment_instrument_id,card_number_masked,card_expiry_month,card_expiry_year,card_scheme,original_transaction_id,billing_address_zip,billing_address_state,billing_address_first_name,billing_address_last_name,billing_address_city,billing_address_country,billing_address_line1,billing_address_line2,raw_card_number,original_transaction_amount,original_transaction_currency,network_token_number
merchant_1744875358,mca_4cXM5Pc7p96fCmB2oZim,noreal name,[email protected],523698741,33,23dsfw23234a,900036959,card,credit,,4CBB27C05DE063AF598E,4242424242424242,03,2027,1,16153570198,94043,CA,NOREAL,NAME,Mountain View,US,1295 Charleston Rd,,,1000,USD,4242424242424242
curl --location 'http://localhost:8080/payment_methods/migrate-batch' \
--header 'api-key: test_admin' \
--header 'Content-Type: application/json' \
--form 'file=@"/Users/jagan.elavarasan/Downloads/sample.csv"' \
--form 'merchant_id="merchant_1745224962"' \
--form 'merchant_connector_id="mca_HmNmIqOB3UlY2ccFnGXV"'
Response
[
{
"line_number": 1,
"payment_method_id": "pm_4KzRt3iagMk4O1I0DZwi",
"payment_method": "card",
"payment_method_type": "credit",
"customer_id": "23dsfw23234a",
"migration_status": "Success",
"card_number_masked": "4242424242424242",
"card_migrated": true,
"network_token_migrated": true,
"connector_mandate_details_migrated": true,
"network_transaction_id_migrated": true
}
]
</details>
<details>
<summary>Test payment using the saved payment method</summary>
Request
curl --location 'http://localhost:8080/payments/pay_3NFFos2v0BeZCqmi4h82/confirm' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: pk_dev_9b7204ae65c8401da71fcc17d0dee950' \
--data '{
"payment_method": "card",
"client_secret": "pay_3NFFos2v0BeZCqmi4h82_secret_bTwL7nF0BSm9eJXJuSpc",
"payment_token": "token_S6l6CTSbQTsAmIPxVyLP"
}'
Response
{
"payment_id": "pay_3NFFos2v0BeZCqmi4h82",
"merchant_id": "merchant_1745224962",
"status": "succeeded",
"amount": 1000,
"net_amount": 1000,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": 1000,
"connector": "cybersource",
"client_secret": "pay_3NFFos2v0BeZCqmi4h82_secret_bTwL7nF0BSm9eJXJuSpc",
"created": "2025-04-21T10:33:08.321Z",
"currency": "USD",
"customer_id": "23dsfw23234a",
"customer": {
"id": "23dsfw23234a",
"name": "noreal name",
"email": "[email protected]",
"phone": "523698741",
"phone_country_code": "33"
},
"description": "Hello this is description",
"refunds": null,
"disputes": null,
"mandate_id": null,
"mandate_data": null,
"setup_future_usage": "on_session",
"off_session": null,
"capture_on": null,
"capture_method": "automatic",
"payment_method": "card",
"payment_method_data": {
"card": {
"last4": "4242",
"card_type": "CREDIT",
"card_network": "Visa",
"card_issuer": "STRIPE PAYMENTS UK LIMITED",
"card_issuing_country": "UNITEDKINGDOM",
"card_isin": "424242",
"card_extended_bin": null,
"card_exp_month": "03",
"card_exp_year": "2027",
"card_holder_name": "noreal name",
"payment_checks": {
"avs_response": {
"code": "Y",
"codeRaw": "Y"
},
"card_verification": null
},
"authentication_data": null
},
"billing": null
},
"payment_token": "token_S6l6CTSbQTsAmIPxVyLP",
"shipping": {
"address": {
"city": "Banglore",
"country": "US",
"line1": "sdsdfsdf",
"line2": "hsgdbhd",
"line3": "alsksoe",
"zip": "571201",
"state": "zsaasdas",
"first_name": "joseph",
"last_name": "doe"
},
"phone": {
"number": "123456789",
"country_code": "+1"
},
"email": null
},
"billing": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "123456789",
"country_code": "+1"
},
"email": null
},
"order_details": null,
"email": "[email protected]",
"name": "noreal name",
"phone": "523698741",
"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": null,
"manual_retry_allowed": false,
"connector_transaction_id": "7452315950806121404805",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": "pay_3NFFos2v0BeZCqmi4h82_1",
"payment_link": null,
"profile_id": "pro_fg5JtKgrVIYUVB7x7zYh",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_HmNmIqOB3UlY2ccFnGXV",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-04-21T10:48:08.321Z",
"fingerprint": null,
"browser_info": {
"os_type": null,
"language": null,
"time_zone": null,
"ip_address": "::1",
"os_version": null,
"user_agent": null,
"color_depth": null,
"device_model": null,
"java_enabled": null,
"screen_width": null,
"accept_header": null,
"screen_height": null,
"accept_language": "en",
"java_script_enabled": null
},
"payment_method_id": "pm_4KzRt3iagMk4O1I0DZwi",
"payment_method_status": "active",
"updated": "2025-04-21T10:33:15.495Z",
"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": "saved_card",
"force_3ds_challenge": false,
"force_3ds_challenge_trigger": false,
"issuer_error_code": null,
"issuer_error_message": null
}
</details>
## 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(payment-methods): fetch payment method details in payouts flow
- Merged: 2025-07-24T15:48:58Z
- Files changed: 3 files
- Commits: 2 commits
Implementation approach:
## Type of Change
- [x] Bugfix
## Description
Fixed payout method data not being fetched from card vault when using `payout_method_id` in payouts flow.
**Changes:**
- Added `force_fetch_card_from_vault` parameter to `get_pm_list_context` to enable card vault lookup for payouts
- Added `get_card_details_from_locker` method to PaymentMethodsController trait
- Set `force_fetch_card_from_vault=true` in payouts validator to ensure card details are retrieved from vault
- Fixed typo in erro
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(payment-methods): fetch payment method details in payouts flow (#8729)
Files to modify:
**crates/payment_methods/src/controller.rs**
Modify existing code
**crates/router/src/core/payment_methods/cards.rs**
Add:
- function: private::get_card_details_from_locker
**crates/router/src/core/payouts/validator.rs**
Modify existing code
|
{"issue_number": 7786, "pr_number": 8729, "commits_count": 1, "files_changed": 3, "response_length": 1146, "file_count": 6, "needs_breakdown": false}
|
Nix Support
Nix support for orca:
- Dev shell to include all the required tools, setup
- Build with nix flakes
- CI/CD with nix flakes
|
<think>
PR Context:
- Title: feat(nix): add support for running external services through services-flake
- Merged: 2024-11-05T14:07:43Z
- Files changed: 4 files
- Commits: 7 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
Described in #57
### 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 t
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 57, "pr_number": 6377, "commits_count": 0, "files_changed": 4, "response_length": 805, "file_count": 0, "needs_breakdown": false}
|
feat(core): add additional revenue recovery call flow
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
For some billing connectors, we get limited data in the webhook that is not sufficient to use. So we need to make an additional api call for this extra data. This pr adds that flow.
### 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
No testing required since its just defining the flow not using it.
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [ ] 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): Add recovery support for stripebilling
- Merged: 2025-04-02T07:49:57Z
- Files changed: 30 files
- Commits: 30 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
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 t
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): Add recovery support for stripebilling (#7461)
Co-authored-by: Nishanth Challa <nis
Files to modify:
**crates/api_models/src/webhooks.rs**
Add:
- function: pub::get_connector_transaction_id_as_string
- impl: impl ObjectReferenceId
**crates/common_enums/src/connector_enums.rs**
Modify existing code
**crates/connector_configs/src/connector.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/stripebilling.rs**
Add:
- function: private::get_headers
- function: private::get_content_type
- function: private::get_revenue_recovery_attempt_details
- function: private::get_revenue_recovery_invoice_details
- impl: impl api::revenue_recovery::BillingConnectorPaymentsSyncIntegration for Stripebilling
**crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs**
Add:
- function: pub::get_webhook_object_from_body
- function: pub::get_invoice_webhook_data_from_body
- function: private::try_from
- function: private::from
- struct: pub::StripebillingRecoveryDetailsData
- impl: impl StripebillingWebhookBody
- impl: impl StripebillingInvoiceBody
- impl: impl TryFrom<StripebillingInvoiceBody> for revenue_recovery::RevenueRecoveryInvoiceData
- impl: impl From<StripebillingFundingTypes> for common_enums::PaymentMethodType
- mod: pub::auth_headers
**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/revenue_recovery.rs**
Add:
- function: private::from
- function: private::from
- impl: impl From<&BillingConnectorPaymentsSyncResponse> for RevenueRecoveryInvoiceData
- impl: impl From<&BillingConnectorPaymentsSyncResponse> for RevenueRecoveryAttemptData
**crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs**
Remove:
- struct: pub::GetAdditionalRevenueRecoveryFlowCommonData
Add:
- struct: pub::BillingConnectorPaymentsSyncFlowData
**crates/hyperswitch_domain_models/src/router_flow_types/revenue_recovery.rs**
Remove:
- struct: pub::GetAdditionalRevenueRecoveryDetails
Add:
- struct: pub::BillingConnectorPaymentsSync
**crates/hyperswitch_domain_models/src/router_request_types/revenue_recovery.rs**
Remove:
- struct: pub::GetAdditionalRevenueRecoveryRequestData
Add:
- struct: pub::BillingConnectorPaymentsSyncRequest
**crates/hyperswitch_domain_models/src/router_response_types/revenue_recovery.rs**
Remove:
- struct: pub::GetAdditionalRevenueRecoveryResponseData
Add:
- struct: pub::BillingConnectorPaymentsSyncResponse
**crates/hyperswitch_domain_models/src/types.rs**
Modify existing code
**crates/hyperswitch_interfaces/src/api.rs**
Modify existing code
**crates/hyperswitch_interfaces/src/api/revenue_recovery.rs**
Modify existing code
**crates/hyperswitch_interfaces/src/api/revenue_recovery_v2.rs**
Remove:
- trait: pub::RevenueRecoveryV2
Add:
- trait: pub::RevenueRecoveryV2
**crates/hyperswitch_interfaces/src/conversion_impls.rs**
Add:
- function: private::from_old_router_data
- function: private::to_old_router_data
- impl: impl RouterDataConversion<T, Req, Resp> for BillingConnectorPaymentsSyncFlowData
**crates/hyperswitch_interfaces/src/types.rs**
Modify existing code
**crates/router/src/configs/secrets_transformers.rs**
Modify existing code
**crates/router/src/configs/settings.rs**
Remove:
- struct: pub::GetAdditionalRevenueRecoveryDetailsCall
Add:
- struct: pub::BillingConnectorPaymentsSyncCall
**crates/router/src/core/admin.rs**
Modify existing code
**crates/router/src/core/errors.rs**
Modify existing code
**crates/router/src/core/payments/flows.rs**
Modify existing code
**crates/router/src/core/webhooks/incoming_v2.rs**
Modify existing code
**crates/router/src/core/webhooks/recovery_incoming.rs**
Add:
- function: private::get_recovery_invoice_details
- function: private::get_recovery_invoice_transaction_details
- function: private::get_recovery_payment_attempt
- function: private::handle_billing_connector_payment_sync_call
- function: private::get_billing_connector_payment_details
- function: private::inner
- function: private::construct_router_data_for_billing_connector_payment_sync_call
- function: private::inner
- struct: pub::BillingConnectorPaymentsSyncResponseData
- struct: pub::BillingConnectorPaymentsSyncFlowRouterData
- impl: impl BillingConnectorPaymentsSyncResponseData
- impl: impl BillingConnectorPaymentsSyncFlowRouterData
**crates/router/src/services/api.rs**
Modify existing code
**crates/router/src/types.rs**
Modify existing code
**crates/router/src/types/api.rs**
Modify existing code
**crates/router/src/types/transformers.rs**
Modify existing code
|
{"issue_number": 7402, "pr_number": 7461, "commits_count": 1, "files_changed": 30, "response_length": 5731, "file_count": 31, "needs_breakdown": true}
|
refactor(routing): update configs on updation of mca
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
https://github.com/juspay/hyperswitch/pull/9659
This pull request introduces a new helper function to update the default fallback connector configuration whenever a merchant connector account (MCA) is updated. This ensures that changes to connector status (such as disabling or enabling) are accurately reflected in both merchant and profile configurations. The changes also include necessary imports and function calls to integrate this logic into the connector update flow.
**Connector fallback configuration updates:**
* Added the `update_default_fallback_on_mca_update` function in `routing/helpers.rs` to update merchant and profile default connector configurations based on the status of the updated MCA. The function ensures that disabled or inactive connectors are removed from the defaults, and enabled connectors are added if not already present.
* Integrated the new helper into the `update_connector` flow in `admin.rs`, so it is triggered automatically after connector updates.
**Imports and code organization:**
* Added necessary imports for `update_default_fallback_on_mca_update` and related types in `admin.rs` and `helpers.rs` to support the new logic. [[1]](diffhunk://#diff-7e1b4a44fadc4de1af2a6abeb318b3ddf044177c44ba00731c33dbf4cdce92b7R25-R28) [[2]](diffhunk://#diff-ea48d33e52b2cb7edbbba1d236b55f946fdb2c178f8c76f4226818b3630c4658R6)
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
## 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)?
-->
1. Create two connectors namely adyen and wise
2. check configs table
```
SELECT key, config
FROM configs
WHERE key = 'routing_default_po_pro_RTMoW14AvhG5cjmcpcNb';
```
```
SELECT key, config
FROM configs
WHERE key = 'routing_default_po_merchant_id';
```
3. disable one of them
4. check configs table again for above query, this time the disabled shouldn't be present.
5. Re-enable the disabled connector, then query the table for the connector to be added back.
## 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: revert(routing): update configs on updation of mca
- Merged: 2025-10-08T08:46:29Z
- Files changed: 3 files
- Commits: 1 commits
Implementation approach:
Reverts juspay/hyperswitch#9689
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** revert(routing): update configs on updation of mca (#9740)
Files to modify:
**crates/router/src/core/admin.rs**
Modify existing code
**crates/router/src/core/routing.rs**
Modify existing code
**crates/router/src/core/routing/helpers.rs**
Remove:
- function: pub::redact_cgraph_cache
- function: pub::redact_routing_cache
- function: pub::update_default_fallback_on_mca_update
|
{"issue_number": 9689, "pr_number": 9740, "commits_count": 1, "files_changed": 3, "response_length": 711, "file_count": 5, "needs_breakdown": false}
|
refactor(NMI,PAYONE) , Move files from router to hyperswitch connectors
Move the connectors from routers to hyperswitch_connectors
|
<think>
PR Context:
- Title: refactor(connector): [NMI,PAYONE,RISKIFIED] moved to hyperswitch_connectors
- Merged: 2025-04-24T10:35:43Z
- Files changed: 20 files
- Commits: 27 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 -->
Moving connectors (NMI,Riskified,and payone) from `router` crate to `hyperswitch_connector` crate
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies applicat
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(connector): [NMI,PAYONE,RISKIFIED] moved to hyperswitch_connectors (#7666)
Files to modify:
**crates/hyperswitch_connectors/src/connectors.rs**
Add:
- mod: pub::nmi
- mod: pub::payone
- mod: pub::riskified
**crates/hyperswitch_connectors/src/connectors/riskified/transformers/auth.rs**
Add:
- function: private::try_from
- struct: pub::RiskifiedAuthType
- impl: impl TryFrom<&ConnectorAuthType> for RiskifiedAuthType
**crates/hyperswitch_connectors/src/default_implementations.rs**
Modify existing code
**crates/hyperswitch_connectors/src/default_implementations_v2.rs**
Modify existing code
**crates/hyperswitch_connectors/src/types.rs**
Modify existing code
**crates/hyperswitch_connectors/src/utils.rs**
Add:
- function: private::is_payment_successful
- function: private::get_order_details
- function: private::get_currency
- trait: pub::FrmTransactionRouterDataRequest
- trait: pub::FraudCheckCheckoutRequest
- trait: pub::FraudCheckTransactionRequest
- impl: impl FrmTransactionRouterDataRequest for FrmTransactionRouterData
- impl: impl FraudCheckCheckoutRequest for FraudCheckCheckoutData
- impl: impl FraudCheckTransactionRequest for FraudCheckTransactionData
**crates/router/src/connector.rs**
Remove:
- mod: pub::nmi
- mod: pub::payone
- mod: pub::riskified
**crates/router/src/connector/riskified/transformers/auth.rs**
Remove:
- function: private::try_from
- struct: pub::RiskifiedAuthType
- impl: impl TryFrom<&types::ConnectorAuthType> for RiskifiedAuthType
**crates/router/src/core/payments/flows.rs**
Modify existing code
**crates/router/src/macros.rs**
Modify existing code
|
{"issue_number": 7715, "pr_number": 7666, "commits_count": 1, "files_changed": 20, "response_length": 2525, "file_count": 12, "needs_breakdown": false}
|
[FEATURE] Cypress test for UCS through Hyperswitch
### Feature Description
there should be a cypress test supported for ucs through hyperswitch
### Possible Implementation
make code changes in cypress folder and call ucs related api's
### 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?
None
|
<think>
PR Context:
- Title: feat(cypress): Cypress test for ucs
- Merged: 2025-09-02T15:36:00Z
- Files changed: 5 files
- Commits: 30 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 cypress test for ucs by maintaing the flow
Closes #8968
### 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": 8968, "pr_number": 8967, "commits_count": 0, "files_changed": 5, "response_length": 766, "file_count": 0, "needs_breakdown": false}
|
Add support to call decision engine Dynamic Routing from hyperswitch after API key authentication
|
<think>
PR Context:
- Title: feat(routing): Add API key auth for decision engine endpoints
- Merged: 2025-07-21T13:38:52Z
- Files changed: 8 files
- Commits: 10 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 adds API key auth to the decision engine endpoints for the decide gateway call and the update gateway score call.
### Additional Changes
- [x] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] T
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(routing): Add API key auth for decision engine endpoints (#8640)
Co-authored-by: hyperswitch-bo
Files to modify:
**crates/api_models/src/events/routing.rs**
Add:
- function: private::get_api_event_type
- function: private::get_api_event_type
- function: private::get_api_event_type
- function: private::get_api_event_type
- impl: impl ApiEventMetric for crate::open_router::DecideGatewayResponse
- impl: impl ApiEventMetric for crate::open_router::OpenRouterDecideGatewayRequest
- impl: impl ApiEventMetric for crate::open_router::UpdateScorePayload
- impl: impl ApiEventMetric for crate::open_router::UpdateScoreResponse
**crates/api_models/src/open_router.rs**
Add:
- struct: pub::DecideGatewayResponse
- struct: pub::PriorityLogicOutput
- struct: pub::PriorityLogicData
**crates/router/src/core/payments/routing/utils.rs**
Modify existing code
**crates/router/src/core/routing.rs**
Add:
- function: pub::decide_gateway_open_router
- function: pub::update_gateway_score_open_router
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/routes/lock_utils.rs**
Modify existing code
**crates/router/src/routes/routing.rs**
Add:
- function: pub::call_decide_gateway_open_router
- function: pub::call_update_gateway_score_open_router
**crates/router_env/src/logger/types.rs**
Modify existing code
|
{"issue_number": 8613, "pr_number": 8640, "commits_count": 1, "files_changed": 8, "response_length": 2201, "file_count": 10, "needs_breakdown": false}
|
ci: add tests that make use of locker
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [x] CI/CD
## Description
<!-- Describe your changes in detail -->
This PR introduces necessary refactoring to add support for locker specific tests. This includes `addition of delete payment method` (which is restricted to work only on hosted environments and not local given `tartarus` is unavailable and is complicated to setup things) but not limited to:
- fixes:
- fix reports not being generated
- fix multiple credential not picking proper api keys
- refactoring:
- move configs that makes use of response custom under `getCustomExchange`
- misc:
- clarify ntid files to make them meaningful
- update dependencies
- update cypress credential to support stripe multiple api keys
- feat:
- add multiple credential support for stripe
- add ntid support for stripe with another api key
- add recurring mit payment endpoint to ntid connector agnostic flows
### 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)?
-->
delete payment method:
|local|hosted|
|-|-|
|<img width="457" alt="image" src="https://github.com/user-attachments/assets/8b65aa07-3ee6-46f7-83ac-8850e3530aa2">|<img width="462" alt="image" src="https://github.com/user-attachments/assets/2712463c-a458-483c-9daf-d17b3f9b573b">|
|`5xx` is expected since this requires locker to be set up locally which is not optimal|`2xx` is expected since locker is already setup|
ntid with mit based on payment token:
|cybersource|stripe|
|-|-|
|<img width="463" alt="image" src="https://github.com/user-attachments/assets/64686ac4-4b0f-4bbc-94c7-f60d0c5c4a7f" />|<img width="467" alt="image" src="https://github.com/user-attachments/assets/4059ac5c-2ad1-4bc0-b149-a2c867b465ed" />|
|adyen|bluesnap|cybersource|stripe|
|-|-|-|-|
|<img width="467" alt="image" src="https://github.com/user-attachments/assets/0716b0bb-f34b-47bf-a27f-32bfe322935f" />|<img width="462" alt="image" src="https://github.com/user-attachments/assets/ca98cc84-cb72-4dc8-91c3-7654c628f347" />|<img width="554" alt="image" src="https://github.com/user-attachments/assets/4e01f0fe-acb0-4ecf-8873-be35a16c052c" />|<img width="555" alt="image" src="https://github.com/user-attachments/assets/86a052c2-3a51-4952-abf8-8f93826959e9" />|
|adyen ntid failure has been addressed in #6851. #6735 has been soft cherry-picked and the tests have been run against local|||stripe with multiple credential support (ntid)|
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `prettier . --write`
- [ ] 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: cypress reports generation
- Merged: 2024-12-20T08:19:41Z
- Files changed: 3 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
- [x] CI/CD
## Description
<!-- Describe your changes in detail -->
closes https://github.com/juspay/hyperswitch/issues/6893
this pr also bumps cypress dependencies
### 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": 6735, "pr_number": 6894, "commits_count": 0, "files_changed": 3, "response_length": 761, "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: 2025-06-06T07:51:47Z
- 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 -->
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
Link for main branch revert PR - https://gith
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** revert(routing): Add connectors from current active routing algorithm before adding fallback connect
Files to modify:
**crates/router/src/core/payments.rs**
Modify existing code
|
{"issue_number": 8210, "pr_number": 8259, "commits_count": 1, "files_changed": 1, "response_length": 1017, "file_count": 3, "needs_breakdown": false}
|
feat(router): Add `psp_tokenization_enabled` field in Customer Saved Payment Methods List
Required to show whether `psp_tokenization` is enabled for a saved payment method
|
<think>
PR Context:
- Title: feat(router): Return psp_tokenization_enabled in Customer PML
- Merged: 2025-03-20T10:04:56Z
- Files changed: 8 files
- Commits: 7 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 `psp_tokenization_enabled` field to `CustomerPaymentMethod` that denotes whether `psp_tokenization` is enabled for a saved payment method
### Additional Changes
- [x] This PR modifies the API contract
- [ ] This PR modifies the da
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(router): Return psp_tokenization_enabled in Customer PML (#7519)
Files to modify:
**crates/api_models/src/admin.rs**
Modify existing code
**crates/api_models/src/payment_methods.rs**
Modify existing code
**crates/openapi/src/openapi.rs**
Modify existing code
**crates/openapi/src/openapi_v2.rs**
Modify existing code
**crates/openapi/src/routes/payment_method.rs**
Modify existing code
**crates/router/src/core/payment_methods/transformers.rs**
Modify existing code
|
{"issue_number": 7518, "pr_number": 7519, "commits_count": 1, "files_changed": 8, "response_length": 1283, "file_count": 8, "needs_breakdown": false}
|
[CHORE] Bump Cypress to v14
bump cypress version to `v14` from `v13.17.0`. there's a ton of under the hood changes and improvements.
check: [docs.cypress.io/app/references/changelog](https://docs.cypress.io/app/references/changelog)
cypress v14 has significant impact on the way we do the redirection flow. check pr description for detailed information.
|
<think>
PR Context:
- Title: chore: bump cypress to `v14.0.0`
- Merged: 2025-02-03T13:52:14Z
- Files changed: 10 files
- Commits: 30 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [x] Dependency updates
- [ ] Documentation
- [x] CI/CD
## Description
<!-- Describe your changes in detail -->
closes #7103
- video recording
- video recording gets around the race condition that resulted in parallel tests to fail when a payment failed at the same time
- connector specific recording
- store only failed payment recording
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 7103, "pr_number": 7102, "commits_count": 0, "files_changed": 10, "response_length": 764, "file_count": 0, "needs_breakdown": false}
|
Removing mailhog container from the docker setup
Removing mailhog container from the docker setup
|
<think>
PR Context:
- Title: fix: docker changes in setup script
- Merged: 2025-05-08T09:01:27Z
- Files changed: 7 files
- Commits: 7 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 -->
Repopulating the docker changes in the stable release
### 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:
(No detailed commit information available)
|
{"issue_number": 7962, "pr_number": 7979, "commits_count": 0, "files_changed": 7, "response_length": 765, "file_count": 0, "needs_breakdown": false}
|
feat(router): refactor PML response
Remove duplicate responses and return bank_names
|
<think>
PR Context:
- Title: feat(router): Deduplicate PML response and populate bank details (V2)
- Merged: 2025-07-14T12:45:04Z
- Files changed: 6 files
- Commits: 9 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 -->
- Merge `payment_experience` for a pm_type, subtype into an array
- Return `bank_names`
### Additional Changes
- [x] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application con
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(router): Deduplicate PML response and populate bank details (V2) (#8583)
Files to modify:
**crates/api_models/src/payment_methods.rs**
Modify existing code
**crates/api_models/src/payments.rs**
Modify existing code
**crates/common_enums/src/enums.rs**
Modify existing code
**crates/router/src/core/payment_methods/vault.rs**
Modify existing code
**crates/router/src/core/payments/payment_methods.rs**
Remove:
- function: private::perform_surcharge_calculation
- function: private::perform_filtering
- trait: private::PerformFilteringOnPaymentMethodsEnabled
- impl: impl RequiredFieldsForEnabledPaymentMethodTypes
- impl: impl PerformFilteringOnPaymentMethodsEnabled for hyperswitch_domain_models::merchant_connector_account::FlattenedPaymentMethodsEnabled
Add:
- function: private::perform_filtering
- function: private::merge_and_transform
- function: private::perform_surcharge_calculation
- function: private::get_pm_subtype_specific_data
- function: private::populate_pm_subtype_specific_data
- struct: private::FlattenedPaymentMethodsEnabled
- struct: private::MergedEnabledPaymentMethod
- struct: private::MergedEnabledPaymentMethodTypes
- struct: private::RequiredFieldsAndSurchargeWithExtraInfoForEnabledPaymentMethodType
- struct: private::RequiredFieldsAndSurchargeWithExtraInfoForEnabledPaymentMethodTypes
- impl: impl FlattenedPaymentMethodsEnabled
- impl: impl MergedEnabledPaymentMethodTypes
- impl: impl RequiredFieldsForEnabledPaymentMethodTypes
|
{"issue_number": 8582, "pr_number": 8583, "commits_count": 1, "files_changed": 6, "response_length": 2358, "file_count": 7, "needs_breakdown": false}
|
fix(connector): [noon] address next_action_url being null for cards in 3ds payment
## 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 -->
ORIGINAL PR: https://github.com/juspay/hyperswitch/pull/7862
Fix Noon redirection.
### 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).
-->
## Clippy
<img width="1153" alt="Screenshot 2025-04-21 at 9 35 14 PM" src="https://github.com/user-attachments/assets/379bf7b3-a53c-4063-a195-33388981a40a" />
## How did you test it?
1. create payments for cards
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: _' \
--data-raw '{
"amount": 390,
"currency": "AED",
"confirm": true,
"capture_method": "automatic",
"customer_id": "sammantest2722",
"capture_on": "2022-09-10T10:11:12Z",
"authentication_type": "three_ds",
"return_url": "https://google.com",
"email": "[email protected]",
"name": "Joseph Doe",
"phone": "999999999",
"phone_country_code": "+65",
"description": "Its my first payment",
"statement_descriptor_name": "Juspay",
"statement_descriptor_suffix": "Router",
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4000000000002701",
"card_exp_month": "01",
"card_exp_year": "2035",
"card_holder_name": "joseph Doe",
"card_cvc": "100"
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "AE",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
}
},
"browser_info": {
"user_agent": "Mozilla\/5.0 (iPhone 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": "128.0.0.1"
},
"connector_metadata": {
"noon": {
"order_category": "pay"
}
},
"order_details": [
{
"product_name": "Apple iphone 15",
"quantity": 1,
"amount": 390,
"account_name": "transaction_processing"
}
]
}'
```
Response
```
{
"payment_id": "pay_WEMpRS2dSPqvSDwcK7GI",
"merchant_id": "postman_merchant_GHAction_d454dc3a-a050-4353-81f2-4137042d2fa5",
"status": "requires_customer_action",
"amount": 390,
"net_amount": 390,
"shipping_cost": null,
"amount_capturable": 390,
"amount_received": null,
"connector": "noon",
"client_secret": "pay_WEMpRS2dSPqvSDwcK7GI_secret_tfiuX7BUmEEiD5cXnYSj",
"created": "2025-04-21T15:52:49.398Z",
"currency": "AED",
"customer_id": "sammantest2722",
"customer": {
"id": "sammantest2722",
"name": "Joseph Doe",
"email": "[email protected]",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Its my first payment",
"refunds": null,
"disputes": null,
"mandate_id": null,
"mandate_data": null,
"setup_future_usage": null,
"off_session": null,
"capture_on": null,
"capture_method": "automatic",
"payment_method": "card",
"payment_method_data": {
"card": {
"last4": "2701",
"card_type": "CREDIT",
"card_network": "Visa",
"card_issuer": "INTL HDQTRS-CENTER OWNED",
"card_issuing_country": "UNITEDSTATES",
"card_isin": "400000",
"card_extended_bin": null,
"card_exp_month": "01",
"card_exp_year": "2035",
"card_holder_name": "joseph Doe",
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": {
"address": {
"city": "San Fransico",
"country": "AE",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": null
},
"order_details": [
{
"brand": null,
"amount": 390,
"category": null,
"quantity": 1,
"tax_rate": null,
"product_id": null,
"product_name": "Apple iphone 15",
"product_type": null,
"sub_category": null,
"product_img_link": null,
"product_tax_code": null,
"total_tax_amount": null,
"requires_shipping": null
}
],
"email": "[email protected]",
"name": "Joseph Doe",
"phone": "999999999",
"return_url": "https://google.com/",
"authentication_type": "three_ds",
"statement_descriptor_name": "Juspay",
"statement_descriptor_suffix": "Router",
"next_action": {
"type": "redirect_to_url",
"redirect_to_url": "http://localhost:8080/payments/redirect/pay_WEMpRS2dSPqvSDwcK7GI/postman_merchant_GHAction_d454dc3a-a050-4353-81f2-4137042d2fa5/pay_WEMpRS2dSPqvSDwcK7GI_1"
},
"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": "sammantest2722",
"created_at": 1745250769,
"expires": 1745254369,
"secret": "epk_258b6242371e49de87b11ec760786ebd"
},
"manual_retry_allowed": null,
"connector_transaction_id": "201016052379",
"frm_message": null,
"metadata": null,
"connector_metadata": {
"apple_pay": null,
"airwallex": null,
"noon": {
"order_category": "pay"
},
"braintree": null
},
"feature_metadata": null,
"reference_id": "pay_WEMpRS2dSPqvSDwcK7GI_1",
"payment_link": null,
"profile_id": "pro_vFAhahe8vxYUCVFfWJkD",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_vxFAhPLux0GKTVLZA3TZ",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-04-21T16:07:49.398Z",
"fingerprint": null,
"browser_info": {
"language": "nl-NL",
"time_zone": 0,
"ip_address": "128.0.0.1",
"user_agent": "Mozilla/5.0 (iPhone NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
"color_depth": 24,
"java_enabled": true,
"screen_width": 1536,
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"screen_height": 723,
"java_script_enabled": true
},
"payment_method_id": null,
"payment_method_status": null,
"updated": "2025-04-21T15:52:51.296Z",
"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
}
```
2. do retrieve
```
curl --location 'http://localhost:8080/payments/pay_WEMpRS2dSPqvSDwcK7GI?force_sync=true' \
--header 'Accept: application/json' \
--header 'api-key: _'
```
Response
```
{
"payment_id": "pay_WEMpRS2dSPqvSDwcK7GI",
"merchant_id": "postman_merchant_GHAction_d454dc3a-a050-4353-81f2-4137042d2fa5",
"status": "succeeded",
"amount": 390,
"net_amount": 390,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": 390,
"connector": "noon",
"client_secret": "pay_WEMpRS2dSPqvSDwcK7GI_secret_tfiuX7BUmEEiD5cXnYSj",
"created": "2025-04-21T15:52:49.398Z",
"currency": "AED",
"customer_id": "sammantest2722",
"customer": {
"id": "sammantest2722",
"name": "Joseph Doe",
"email": "[email protected]",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Its my first payment",
"refunds": null,
"disputes": null,
"mandate_id": null,
"mandate_data": null,
"setup_future_usage": null,
"off_session": null,
"capture_on": null,
"capture_method": "automatic",
"payment_method": "card",
"payment_method_data": {
"card": {
"last4": "2701",
"card_type": "CREDIT",
"card_network": "Visa",
"card_issuer": "INTL HDQTRS-CENTER OWNED",
"card_issuing_country": "UNITEDSTATES",
"card_isin": "400000",
"card_extended_bin": null,
"card_exp_month": "01",
"card_exp_year": "2035",
"card_holder_name": "joseph Doe",
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": {
"address": {
"city": "San Fransico",
"country": "AE",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": null
},
"order_details": [
{
"brand": null,
"amount": 390,
"category": null,
"quantity": 1,
"tax_rate": null,
"product_id": null,
"product_name": "Apple iphone 15",
"product_type": null,
"sub_category": null,
"product_img_link": null,
"product_tax_code": null,
"total_tax_amount": null,
"requires_shipping": null
}
],
"email": "[email protected]",
"name": "Joseph Doe",
"phone": "999999999",
"return_url": "https://google.com/",
"authentication_type": "three_ds",
"statement_descriptor_name": "Juspay",
"statement_descriptor_suffix": "Router",
"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": null,
"manual_retry_allowed": false,
"connector_transaction_id": "201016052379",
"frm_message": null,
"metadata": null,
"connector_metadata": {
"apple_pay": null,
"airwallex": null,
"noon": {
"order_category": "pay"
},
"braintree": null
},
"feature_metadata": null,
"reference_id": "pay_WEMpRS2dSPqvSDwcK7GI_1",
"payment_link": null,
"profile_id": "pro_vFAhahe8vxYUCVFfWJkD",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_vxFAhPLux0GKTVLZA3TZ",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-04-21T16:07:49.398Z",
"fingerprint": null,
"browser_info": {
"language": "nl-NL",
"time_zone": 0,
"ip_address": "128.0.0.1",
"user_agent": "Mozilla/5.0 (iPhone NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
"color_depth": 24,
"java_enabled": true,
"screen_width": 1536,
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"screen_height": 723,
"java_script_enabled": true
},
"payment_method_id": null,
"payment_method_status": null,
"updated": "2025-04-21T15:52:59.993Z",
"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
}
```
## 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: fix(connector): [noon] address next_action_url being null for cards in 3ds payment
- Merged: 2025-04-22T08:23:14Z
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
Reverts juspay/hyperswitch#7861
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** revert: fix(connector): [noon] address next_action_url being null for cards in 3ds payment (#7863)
Files to modify:
**crates/hyperswitch_connectors/src/connectors/noon/transformers.rs**
Modify existing code
|
{"issue_number": 7861, "pr_number": 7863, "commits_count": 1, "files_changed": 1, "response_length": 564, "file_count": 3, "needs_breakdown": false}
|
fix(list): improve querying time for payments list
Quick Fix.
Currently payment list is giving intermittent 5xx. After analyzing logs we got to knwo that it is happening for the count query
That query need to be called always and we can skip this in most of the cases.
Also add the logs around count.
This can be a temporary help, till will move to more durable solution.
|
<think>
PR Context:
- Title: fix(payments_list): skip count query if no filters and add logging
- Merged: 2024-10-17T10:51:43Z
- Files changed: 9 files
- Commits: 7 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
- Skip count query if no filters are applied for attempts, in this we don't need to filter attempts as count of active attempt ids will be the total count.
- Profile id filter is already getting applied in intents, so removing it from last active attempts.
- Add logging around count
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(payments_list): skip count query if no filters and add logging (#6331)
Files to modify:
**crates/api_models/src/payments.rs**
Add:
- function: pub::has_no_attempt_filters
- impl: impl PaymentListFilterConstraints
**crates/diesel_models/src/query/payment_attempt.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/payments/payment_attempt.rs**
Modify existing code
**crates/router/src/core/payments.rs**
Modify existing code
**crates/router/src/db/kafka_store.rs**
Modify existing code
**crates/router/src/routes/metrics.rs**
Modify existing code
**crates/router/src/routes/payments.rs**
Modify existing code
**crates/storage_impl/src/mock_db/payment_attempt.rs**
Modify existing code
**crates/storage_impl/src/payments/payment_attempt.rs**
Modify existing code
|
{"issue_number": 6330, "pr_number": 6331, "commits_count": 1, "files_changed": 9, "response_length": 1613, "file_count": 11, "needs_breakdown": false}
|
docs:correction of content in the api-ref
|
<think>
PR Context:
- Title: docs(api-reference): fix the content of the tip
- Merged: 2025-02-27T13:47:08Z
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
Corrected the tip content.
## 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 -->
Corrected the content of the tip.
### 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": 7391, "pr_number": 7387, "commits_count": 0, "files_changed": 1, "response_length": 777, "file_count": 0, "needs_breakdown": false}
|
Adding Deep health check for Hyperswitch
Goal is to create a deep health check endpoint which will verify that the Hyperswitch application is up and running and the connections to all the necessary services are healthy
- [x] Failure of health check should emit logs providing evidential data regarding the failure
The deep health will verify the following services
- [x] #3267
- [x] #3268
- [x] #3269
- [x] #3270
- [x] [Deep health check for Hyperswitch Control Center](https://github.com/juspay/hyperswitch-control-center/issues/374)
|
<think>
PR Context:
- Title: fix(payment-link): decode details before using them in secure links
- Merged: 2025-09-03T13:37:05Z
- 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
This PR fixes the bug where the encoded payment link details were being read without decoding them first.
### 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": 3264, "pr_number": 9260, "commits_count": 0, "files_changed": 1, "response_length": 797, "file_count": 0, "needs_breakdown": false}
|
Adding Deep health check for Hyperswitch
Goal is to create a deep health check endpoint which will verify that the Hyperswitch application is up and running and the connections to all the necessary services are healthy
- [x] Failure of health check should emit logs providing evidential data regarding the failure
The deep health will verify the following services
- [x] #3267
- [x] #3268
- [x] #3269
- [x] #3270
- [x] [Deep health check for Hyperswitch Control Center](https://github.com/juspay/hyperswitch-control-center/issues/374)
|
<think>
PR Context:
- Title: feat(payment_link): expose payment link configs for SDK UI rules and payment button
- Merged: 2025-03-05T17:28:25Z
- Files changed: 16 files
- Commits: 5 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
This PR exposes customizations for payment links. Below configs are added -
- SDK UI rules - https://docs.hyperswitch.io/explore-hyperswitch/merchant-controls/integration-guide/web/customization#id-4.-rules
- Payment Link UI rules - similar to SDK UI rules, but for payment link temp
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(payment_link): expose payment link configs for SDK UI rules and payment button (#7427)
Files to modify:
**crates/api_models/src/admin.rs**
Modify existing code
**crates/api_models/src/payments.rs**
Modify existing code
**crates/diesel_models/src/business_profile.rs**
Modify existing code
**crates/diesel_models/src/payment_intent.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/lib.rs**
Modify existing code
**crates/router/src/core/payment_link.rs**
Modify existing code
**crates/router/src/core/payments/transformers.rs**
Modify existing code
**crates/router/src/routes/admin.rs**
Modify existing code
**crates/router/src/routes/ephemeral_key.rs**
Modify existing code
**crates/router/src/routes/verification.rs**
Modify existing code
**crates/router/src/types/transformers.rs**
Modify existing code
|
{"issue_number": 3264, "pr_number": 7427, "commits_count": 1, "files_changed": 16, "response_length": 1675, "file_count": 13, "needs_breakdown": false}
|
fix(user_roles): migrations for backfilling user_roles entity_id
Backfill entity_id with entity_type in user_roles table to avoid dashboard breaking
|
<think>
PR Context:
- Title: fix(user_roles): migrations for backfilling user_roles entity_id
- Merged: 2024-12-16T13:36:14Z
- Files changed: 4 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
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
This PR ensures that the entity_id is backfilled in the user_roles table, preventing issues for V1 users when switching organizations and logging in.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 6843, "pr_number": 6847, "commits_count": 0, "files_changed": 4, "response_length": 794, "file_count": 0, "needs_breakdown": false}
|
feat(core): Add V2 Authentication to all available endpoints
## Type of Change
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
This commit introduces V2 authentication mechanisms for various admin and client-side APIs :
- [x] Added V2AdminApiAuth and modified AdminApiAuthWithMerchantIdFromRoute for V2
- [x] Added V2ApiKeyAuth , V2AdminApiAuth and V2ClientAuth to the endpoints
- [x] Refactored functions to support V2 Auth as well as V1 Auth
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
## Motivation and Context
## How did you test it?
For `/v2/merchant-accounts`
Request
```
curl --location 'http://localhost:8080/v2/merchant-accounts' \
--header 'x-organization-id: org_d2lZPiRPOGbIMmFcb59A' \
--header 'Content-Type: application/json' \
--header 'Authorization: admin-api-key=test_admin' \
--data '{
"merchant_name": "cloth_seller"
}'
```
Response
```
{
"id": "cloth_seller_KdjFPBxrxWyX09jri2VB",
"merchant_name": "cloth_seller",
"merchant_details": null,
"publishable_key": "pk_dev_735cafe5f43446e88d22bedec15b0139",
"metadata": null,
"organization_id": "org_d2lZPiRPOGbIMmFcb59A",
"recon_status": "not_requested",
"product_type": "orchestration"
}
```
For `/v2/organization`
Request
```
curl --location 'http://localhost:8080/v2/organization' \
--header 'Authorization: admin-api-key=test_admin' \
--header 'Content-Type: application/json' \
--data '{
"organization_name": "random_org_1741776562"
}'
```
Response
```
{
"id": "org_m4fLYdEFb7PNHynIfmZO",
"organization_name": "random_org_1741776558",
"organization_details": null,
"metadata": null,
"modified_at": "2025-03-12 10:49:18.475431",
"created_at": "2025-03-12 10:49:18.475424"
}
```
This is how V2AdminApiAuth looks like
```
pub struct V2AdminApiAuth;
#[async_trait]
impl<A> AuthenticateAndFetch<(), A> for V2AdminApiAuth
where
A: SessionStateInfo + Sync,
{
async fn authenticate_and_fetch(
&self,
request_headers: &HeaderMap,
state: &A,
) -> RouterResult<((), AuthenticationType)> {
let header_map_struct = HeaderMapStruct::new(&request_headers);
let auth_string = header_map_struct.get_auth_string_from_header()?;
let request_admin_api_key = auth_string
.split(',')
.find_map(|part| part.trim().strip_prefix("admin-api-key="))
.ok_or_else(|| {
report!(errors::ApiErrorResponse::Unauthorized)
.attach_printable("Unable to parse admin_api_key")
})?;
if request_admin_api_key.is_empty() {
return Err(errors::ApiErrorResponse::Unauthorized)
.attach_printable("Admin Api key is empty");
}
let conf = state.conf();
let admin_api_key = &conf.secrets.get_inner().admin_api_key;
if request_admin_api_key != admin_api_key.peek() {
Err(report!(errors::ApiErrorResponse::Unauthorized)
.attach_printable("Admin Authentication Failure"))?;
}
Ok(((), AuthenticationType::AdminApiKey))
}
}
```
### What changes are done in authorization header
How it was earlier?
```
api-key = {{api-key}}
client-secret={{client_secret}}
api-key = {{admin_api_key}}
```
Changed version
```
Authorization = api-key={{api-key}}
Authorization = admin-api-key={{admin_api_key}}
Authorization = publishable-key={{publishable_key}},client-secret={{client_secret}}
```
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [ ] 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: remove client_secret from payment_intent and update related code
- Merged: 2025-04-10T13:34:30Z
- Files changed: 24 files
- Commits: 21 commits
Implementation approach:
Your PR Description## Type of Change
- [x] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
1. This commit changes how the client secret is generated
2. Change how client secret is made in Create Payment Intent
Old
`{Payment_id}_secret_{Secret}` `eg : pay_U42c409qyHwOkWo3vK60_secret_el9ksDkiB8hi6j9N78yo`
New
`cs_{Secret}` `eg: cs_0195d2be95ba7ef1a05066e163295562`
3. Cli
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat: remove client_secret from payment_intent and update related code (#7648)
Co-authored-by: hyper
Files to modify:
**crates/api_models/src/payments.rs**
Modify existing code
**crates/common_utils/src/id_type/global_id/payment.rs**
Remove:
- function: pub::generate_client_secret
**crates/common_utils/src/types.rs**
Remove:
- function: pub::get_string_repr
- function: pub::new
- function: private::from_str
- function: private::deserialize
- function: private::expecting
- function: private::visit_str
- function: private::serialize
- function: private::to_sql
- function: private::from_sql
- function: private::build
- function: private::test_serialize_client_secret
- function: private::test_deserialize_client_secret
- struct: pub::ClientSecret
- struct: private::ClientSecretVisitor
- impl: impl ClientSecret
- impl: impl FromStr for ClientSecret
- impl: impl Deserialize<'de> for ClientSecret
- impl: impl Visitor<'_> for ClientSecretVisitor
- impl: impl Serialize for ClientSecret
- impl: impl ToSql<sql_types::Text, diesel::pg::Pg> for ClientSecret
- impl: impl FromSql<sql_types::Text, DB> for ClientSecret
- impl: impl Queryable<sql_types::Text, DB> for ClientSecret
- mod: private::client_secret_type
- mod: private::client_secret_tests
**crates/diesel_models/src/payment_intent.rs**
Modify existing code
**crates/diesel_models/src/schema_v2.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/payments.rs**
Remove:
- function: pub::validate_client_secret
**crates/hyperswitch_domain_models/src/payments/payment_intent.rs**
Modify existing code
**crates/router/src/core/payments.rs**
Add:
- function: private::get_client_secret
- function: private::set_client_secret
- function: private::get_client_secret
- function: private::set_client_secret
- function: private::get_client_secret
- function: private::set_client_secret
- function: private::get_client_secret
- function: private::set_client_secret
**crates/router/src/core/payments/helpers.rs**
Remove:
- function: pub::authenticate_client_secret
**crates/router/src/core/payments/operations/payment_confirm_intent.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_create_intent.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_get_intent.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_post_session_tokens.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_session_intent.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_start.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_update.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_update_intent.rs**
Modify existing code
**crates/router/src/core/payments/payment_methods.rs**
Modify existing code
**crates/router/src/core/payments/transformers.rs**
Modify existing code
**crates/router/src/services/authentication.rs**
Modify existing code
**crates/router/src/types/transformers.rs**
Modify existing code
|
{"issue_number": 7487, "pr_number": 7648, "commits_count": 1, "files_changed": 24, "response_length": 4053, "file_count": 23, "needs_breakdown": true}
|
[FEATURE] align the JSON deserialization errors into expected ErrorResponse format
### Feature Description
HyperSwitch uses an error format for responding back with the errors in the API. This error structure is uniform across different stages of the flow. For any deserialization errors in the API, error response with a different structure is returned.
Expected
```
{
"error": {
"error_type": "invalid_request",
"message": "Json deserialize error: unknown variant `automatiac`, expected one of `automatic`, `manual`, `manual_multiple`, `scheduled` at line 5 column 34",
"code": "IR_06"
}
}
```
Actual
```
{
"error": "Json deserialize error: unknown variant `automatiac`, expected one of `automatic`, `manual`, `manual_multiple`, `scheduled` at line 5 column 34"
}
```
### Possible Implementation
Update the `Display` implementation of `CustomJsonError`
### 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: refactor: update API response for JSON deserialization errors
- Merged: 2024-11-21T22:26:21Z
- Files changed: 6 files
- Commits: 7 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
Described in #6609
### 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.
Following are
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor: update API response for JSON deserialization errors (#6610)
Files to modify:
**crates/router/src/utils.rs**
Modify existing code
|
{"issue_number": 6609, "pr_number": 6610, "commits_count": 1, "files_changed": 6, "response_length": 936, "file_count": 3, "needs_breakdown": false}
|
fix(openapi): Standardise API naming scheme for V2
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [x] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
Use kebab-case for all API endpoints in V2
### 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.
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)?
-->
This is mostly a documentation PR, doesn't require any additional test cases.
Verified that existing cypress tests are passing
## 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(openapi): Revert Standardise API naming scheme for V2 Dashboard Changes
- Merged: 2024-12-02T09:29:35Z
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
Reverts part of juspay/hyperswitch#6510
This PR also changed the dashboard related APIs, which doesn't come under the V2 changes that team is doing. As this is not a backwards compatible change, dashboard is breaking. Revert the dashboard API related changes.
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(openapi): Revert Standardise API naming scheme for V2 Dashboard Changes (#6712)
Files to modify:
**crates/router/src/routes/app.rs**
Modify existing code
|
{"issue_number": 6510, "pr_number": 6712, "commits_count": 1, "files_changed": 1, "response_length": 731, "file_count": 3, "needs_breakdown": false}
|
refactor(routers,connectors) : Remove unused functions in `crates/router/src/connector/utils.rs`
## Analyze and Remove Unused Functions from `crates/router/src/connector/utils.rs`
### Description:
There are functions in the crates/router/src/connector/utils.rs file that appear to be unused across the router crate. For
example:
• validate_currency is defined in utils.rs but is not used anywhere in the codebase. This function can be safely removed.
### Task:
• Perform a comprehensive analysis of all the functions present in crates/router/src/connector/utils.rs.
• Identify any functions that are not referenced anywhere in the router crate which are in utils.
• Remove such unused functions to reduce dead code and improve maintainability.
|
<think>
PR Context:
- Title: refactor: remove unused functions
- Merged: 2025-05-14T10:29:02Z
- Files changed: 1 files
- Commits: 2 commits
Implementation approach:
crates/router/src/connector/utils.rs
## 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 -->
Removed functions that are not used in other files and removed imports that are only referenced by the unused functions.
[crates/router/src/connector/utils.rs](https://github.com/juspay/hyperswitch/blob
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor: remove unused functions (#7994)
Files to modify:
**crates/router/src/connector/utils.rs**
Remove:
- function: pub::get_http_header
- function: pub::to_boolean
- function: pub::get_connector_meta
- function: pub::base64_decode
- function: pub::to_currency_base_unit_from_optional_amount
- function: pub::get_amount_as_string
- function: pub::get_amount_as_f64
- function: pub::to_currency_base_unit
- function: pub::to_currency_lower_unit
- function: pub::construct_not_implemented_error_report
- function: pub::to_currency_base_unit_with_zero_decimal_check
- function: pub::to_currency_base_unit_asf64
- function: pub::str_to_f32
- function: pub::collect_values_by_removing_signature
- function: pub::collect_and_sort_values_by_removing_signature
- function: pub::get_webhook_merchant_secret_key
- function: pub::construct_captures_response_hashmap
- function: pub::is_manual_capture
- function: pub::generate_random_bytes
- function: pub::validate_currency
- function: pub::get_timestamp_in_milliseconds
- function: pub::get_mandate_details
**Commit 2:** refactor: remove unused functions (#7994)
Files to modify:
**crates/router/src/connector/utils.rs**
Remove:
- function: pub::get_http_header
- function: pub::to_boolean
- function: pub::get_connector_meta
- function: pub::base64_decode
- function: pub::to_currency_base_unit_from_optional_amount
- function: pub::get_amount_as_string
- function: pub::get_amount_as_f64
- function: pub::to_currency_base_unit
- function: pub::to_currency_lower_unit
- function: pub::construct_not_implemented_error_report
- function: pub::to_currency_base_unit_with_zero_decimal_check
- function: pub::to_currency_base_unit_asf64
- function: pub::str_to_f32
- function: pub::collect_values_by_removing_signature
- function: pub::collect_and_sort_values_by_removing_signature
- function: pub::get_webhook_merchant_secret_key
- function: pub::construct_captures_response_hashmap
- function: pub::is_manual_capture
- function: pub::generate_random_bytes
- function: pub::validate_currency
- function: pub::get_timestamp_in_milliseconds
- function: pub::get_mandate_details
|
{"issue_number": 7928, "pr_number": 7994, "commits_count": 2, "files_changed": 1, "response_length": 3068, "file_count": 5, "needs_breakdown": false}
|
[REFACTOR]: [OPAYO] Add amount conversion framework to Opayo
### :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.recurly.com/docs/opayo) 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)
### :sparkles: Are you willing to submit a PR?
### 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: refactor(connector): add amount conversion framework to opayo
- Merged: 2024-10-18T13:46:21Z
- Files changed: 3 files
- Commits: 2 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 PR adds amount conversion framework to Opayo.
Opayo accepts amount in MinorUnit
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configur
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(connector): add amount conversion framework to opayo (#6342)
Co-authored-by: DEEPANSHU BANS
Files to modify:
**crates/router/src/connector/opayo.rs**
Remove:
- struct: pub::Opayo
Add:
- function: pub::new
- struct: pub::Opayo
- impl: impl Opayo
**crates/router/src/connector/opayo/transformers.rs**
Add:
- function: private::from
- struct: pub::OpayoRouterData
- impl: impl From<(MinorUnit, T)> for OpayoRouterData<T>
**crates/router/tests/connectors/opayo.rs**
Modify existing code
|
{"issue_number": 6135, "pr_number": 6342, "commits_count": 1, "files_changed": 3, "response_length": 1325, "file_count": 5, "needs_breakdown": false}
|
Refactor(routing): Fallback to current active routing algorithm
Add connectors from the current active routing algorithm before fallback connectors
|
<think>
PR Context:
- Title: refactor(routing): Add connectors from current active routing algorithm before adding fallback connectors
- Merged: 2025-05-14T18:35:38Z
- Files changed: 1 files
- Commits: 11 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 PR modifies critical paths , specifically the `decide_connector` function and the `route_connector_v1_for_payments` function in the payments confirm flow.
These changes are made corresponding to a use case for Narvar. In case the connect
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(routing): Add connectors from current active routing algorithm before adding fallback conne
Files to modify:
**crates/router/src/core/payments.rs**
Modify existing code
|
{"issue_number": 7920, "pr_number": 7921, "commits_count": 1, "files_changed": 1, "response_length": 1020, "file_count": 3, "needs_breakdown": false}
|
fix(connector): [CASHTOCODE] Added supported countries and currencies
## 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 -->
Added supported countries and currencies for Cashtocode.
### 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)?
-->
## 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): [CASHTOCODE] Added supported countries and currencies
- Merged: 2025-05-21T13:11:19Z
- Files changed: 5 files
- Commits: 1 commits
Implementation approach:
… (#8060)
## 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 -->
Added supported countries and currencies for Cashtocode.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environm
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 8060, "pr_number": 8101, "commits_count": 0, "files_changed": 5, "response_length": 799, "file_count": 0, "needs_breakdown": false}
|
[REFACTOR] Worldpay payments integration
### Feature Description
WorldPay payments integration currently makes use of modular APIs which gives more control over the integration. This approach is not best compatible with HyperSwitch due to WP's 3DS flows - which requires sending PAN (card numbers) in multiple places. For `on_session` transactions, this would contribute to the added complexity since data is not stored in such transactions (or stored for ~15mins in redis cache).
Migrating to WP's standard payments API follows payment resource creation in an uniform way.
### Possible Implementation
Migrate from modular APIs [[ref](https://developer.worldpay.com/products/access/card-payments)] to standard payment APIs [[ref](https://developer.worldpay.com/products/access/payments/openapi)].
### 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(connector): worldpay - add dynamic fields and update terminal status mapping
- Merged: 2024-11-28T14:50:09Z
- Files changed: 17 files
- Commits: 14 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
This PR contains changes to
- update status mapping for Worldpay - payments and refunds
- add required fields for Worldpay
- fix refund retrieve bug for Worldpay
Described in detail - #6316 point # 5
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] Thi
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): worldpay - add dynamic fields and update terminal status mapping (#6468)
Files to modify:
**crates/diesel_models/src/query/payment_attempt.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/worldpay.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/worldpay/transformers.rs**
Add:
- function: private::from
- impl: impl From<PaymentOutcome> for enums::RefundStatus
**crates/hyperswitch_domain_models/src/payments/payment_attempt.rs**
Modify existing code
**crates/router/src/configs/defaults/payment_connector_required_fields.rs**
Add:
- function: pub::get_worldpay_billing_required_fields
**crates/router/src/core/refunds.rs**
Modify existing code
**crates/router/src/db/kafka_store.rs**
Modify existing code
**crates/storage_impl/src/mock_db/payment_attempt.rs**
Modify existing code
**crates/storage_impl/src/payments/payment_attempt.rs**
Modify existing code
|
{"issue_number": 6316, "pr_number": 6468, "commits_count": 1, "files_changed": 17, "response_length": 1780, "file_count": 11, "needs_breakdown": false}
|
[FEAT] Implement Refund for JPMorgan
this connector lacks basic feature i.e., refunds.
relevant docs:
- https://developer.payments.jpmorgan.com/api/commerce/online-payments/overview
- https://developer.payments.jpmorgan.com/api/commerce/online-payments/online-payments/online-payments#/operations/V2RefundPost
|
<think>
PR Context:
- Title: feat(connector): [jpmorgan] implement refund flow
- Merged: 2025-06-25T07:01:17Z
- Files changed: 3 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
- [x] CI/CD
## Description
<!-- Describe your changes in detail -->
This PR implements refund flow for JPMorgan connector. Connector returns `Authorized` state (`Pending`). Post RSync call, the status gets updated to `Success`.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): [jpmorgan] implement refund flow (#8436)
Files to modify:
**crates/hyperswitch_connectors/src/connectors/jpmorgan.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs**
Remove:
- struct: pub::MerchantSoftware
- struct: pub::RefundResponse
|
{"issue_number": 8435, "pr_number": 8436, "commits_count": 1, "files_changed": 3, "response_length": 1097, "file_count": 4, "needs_breakdown": false}
|
feat: Add config to force 2FA for users
Currently 2FA is skippable in all the environments.
We need to force 2FA in prod later at some point, so there should be config to which forces 2FA is enabled.
|
<think>
PR Context:
- Title: feat(users): Add `force_two_factor_auth` environment variable
- Merged: 2024-11-05T14:59:29Z
- Files changed: 10 files
- Commits: 5 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 -->
This PR will add force 2fa environment variable. When enabled it will force users to complete 2FA to access the control center.
### Additional Changes
- [x] This PR modifies the API contract
- [ ] This PR modifies the database schema
-
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(users): Add `force_two_factor_auth` environment variable (#6466)
Files to modify:
**crates/api_models/src/user.rs**
Modify existing code
**crates/router/src/configs/settings.rs**
Modify existing code
**crates/router/src/core/user.rs**
Modify existing code
|
{"issue_number": 4774, "pr_number": 6466, "commits_count": 1, "files_changed": 10, "response_length": 1065, "file_count": 5, "needs_breakdown": false}
|
fix(connector): add expiry year conversion for adyen mit transactions
## 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 MIT payments failing especially during NTID flow.
We previously used to get below error message during MIT Confirm call:
```log
"The provided Expiry Date is not valid.: Expiry year should be a 4 digit number greater than 2000: 30"
```
closes https://github.com/juspay/hyperswitch/issues/6850
### 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)?
-->
xecuted below commands:
```sh
# cherry picked commits from my cypress branch which is where the existence of this issue came into light
git cherry-pick -n ..cypress-delete-pm
# ran necessary migrations on the latest branch
just migrate
# started the server
cargo r
```
ran the cypress NTID tests for Adyen:
<img width="1425" alt="image" src="https://github.com/user-attachments/assets/6fea7809-854f-428b-be45-c2632a71f5a8" />
full test (based on #6735) -- no regressions found with adyen:

## 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: ci: add tests that make use of locker
- Merged: 2024-12-26T12:15:14Z
- Files changed: 13 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
- [x] CI/CD
## Description
<!-- Describe your changes in detail -->
This PR introduces necessary refactoring to add support for locker specific tests. This includes `addition of delete payment method` (which is restricted to work only on hosted environments and not local given `tartarus` is unavailable and i
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 6851, "pr_number": 6735, "commits_count": 0, "files_changed": 13, "response_length": 769, "file_count": 0, "needs_breakdown": false}
|
[BUG] handle refused responses when only one of `refusalCode` or `refusalDescription` is present for Worldpay
`refusalCode` and `refusalDescription` are mandatory fields whenever Worldpay refuses the transactions. There is a case where only `refusalDescription` is present. Handle these cases accordingly for `refused` scenarios.
Use `NO_ERROR_CODE` and `NO_ERROR_MESSAGE` in connector integration when either one or both of them are missing in the response.
|
<think>
PR Context:
- Title: [BUG] handle refused responses when only one of refusalCode or refusa…
- Merged: None
- Files changed: 1 files
- Commits: 4 commits
Implementation approach:
fix(worldpay): handle refused responses when only refusalCode or refusalDescription is present
### Type of Change
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
---
### Description
Some refused payment responses from Worldpay contain only `refusalCode` or only `refusalDescription`, but not both.
Previously, the code assumed both fields would always be present, which led to `None` errors or blank erro
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 8749, "pr_number": 8763, "commits_count": 0, "files_changed": 1, "response_length": 784, "file_count": 0, "needs_breakdown": false}
|
refactor(config): redact config urls for hyperswitch vault
## 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 -->
URLs are removed from config for Hyperswitch vault
### 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)?
-->
## 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): [JPMORGAN, PAYU, DIGITALVIRGO, PAYBOX, BITPAY, HELCIM] added in feature matrix api
- Merged: 2025-02-25T19:48:48Z
- Files changed: 12 files
- Commits: 3 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 juspay/hyperswitch-cloud#8276
## Description
Added details feature api details for Jpmorgan, Payu, Digital Virgo.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment va
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): [JPMORGAN, PAYU, DIGITALVIRGO, PAYBOX, BITPAY, HELCIM] added in feature matrix api
Files to modify:
**crates/hyperswitch_connectors/src/connectors/bitpay.rs**
Remove:
- impl: impl ConnectorSpecifications for Bitpay
Add:
- function: private::get_connector_about
- function: private::get_supported_payment_methods
- function: private::get_supported_webhook_flows
- impl: impl ConnectorSpecifications for Bitpay
**crates/hyperswitch_connectors/src/connectors/digitalvirgo.rs**
Remove:
- function: private::validate_connector_against_payment_request
- impl: impl ConnectorSpecifications for Digitalvirgo
Add:
- function: private::get_connector_about
- function: private::get_supported_payment_methods
- function: private::get_supported_webhook_flows
- impl: impl ConnectorSpecifications for Digitalvirgo
**crates/hyperswitch_connectors/src/connectors/helcim.rs**
Remove:
- impl: impl ConnectorSpecifications for Helcim
Add:
- function: private::get_connector_about
- function: private::get_supported_payment_methods
- function: private::get_supported_webhook_flows
- impl: impl ConnectorSpecifications for Helcim
**crates/hyperswitch_connectors/src/connectors/jpmorgan.rs**
Remove:
- function: private::validate_connector_against_payment_request
- impl: impl ConnectorSpecifications for Jpmorgan
Add:
- function: private::get_connector_about
- function: private::get_supported_payment_methods
- function: private::get_supported_webhook_flows
- impl: impl ConnectorSpecifications for Jpmorgan
**crates/hyperswitch_connectors/src/connectors/paybox.rs**
Remove:
- function: private::validate_connector_against_payment_request
- impl: impl ConnectorSpecifications for Paybox
Add:
- function: private::get_connector_about
- function: private::get_supported_payment_methods
- function: private::get_supported_webhook_flows
- impl: impl ConnectorSpecifications for Paybox
**crates/hyperswitch_connectors/src/connectors/payu.rs**
Remove:
- function: private::validate_connector_against_payment_request
- impl: impl ConnectorValidation for Payu
- impl: impl ConnectorSpecifications for Payu
Add:
- function: private::get_connector_about
- function: private::get_supported_payment_methods
- function: private::get_supported_webhook_flows
- impl: impl ConnectorValidation for Payu
- impl: impl ConnectorSpecifications for Payu
|
{"issue_number": 8276, "pr_number": 7148, "commits_count": 1, "files_changed": 12, "response_length": 3337, "file_count": 8, "needs_breakdown": false}
|
[FEATURE]: Add support for Webhooks through UCS
### Feature Description
the Webhooks should go to Unified connector service and should be handled there
### Possible Implementation
add webhook integration in hyperswitch
### 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): Adding integration for webhooks through UCS
- Merged: 2025-08-08T14:35:40Z
- Files changed: 5 files
- Commits: 20 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
Added webhooks integration support in hyperswitch so that for webhooks hyperswitch can call UCS and get the response.
Closes #8880
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies applicatio
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(core): Adding integration for webhooks through UCS (#8814)
Files to modify:
**crates/external_services/src/grpc_client/unified_connector_service.rs**
Modify existing code
**crates/router/src/core/payments/helpers.rs**
Add:
- function: pub::get_webhook_details
**crates/router/src/core/unified_connector_service.rs**
Remove:
- mod: private::transformers
Add:
- function: pub::should_call_unified_connector_service_for_webhooks
- function: pub::build_webhook_secrets_from_merchant_connector_account
- function: pub::call_unified_connector_service_for_webhook
- function: pub::extract_webhook_content_from_ucs_response
- mod: pub::transformers
**crates/router/src/core/unified_connector_service/transformers.rs**
Add:
- function: private::foreign_try_from
- function: pub::transform_ucs_webhook_response
- function: pub::build_webhook_transform_request
- struct: pub::WebhookTransformData
- impl: impl ForeignTryFrom<&hyperswitch_interfaces::webhooks::IncomingWebhookRequestDetails<'_>> for payments_grpc::RequestDetails
**crates/router/src/core/webhooks/incoming.rs**
Add:
- function: private::process_ucs_webhook_transform
- function: private::extract_webhook_event_object
- struct: pub::WebhookProcessingResult
**Commit 2:** feat(core): Adding integration for webhooks through UCS (#8814)
Files to modify:
**crates/external_services/src/grpc_client/unified_connector_service.rs**
Modify existing code
**crates/router/src/core/payments/helpers.rs**
Add:
- function: pub::get_webhook_details
**crates/router/src/core/unified_connector_service.rs**
Remove:
- mod: private::transformers
Add:
- function: pub::should_call_unified_connector_service_for_webhooks
- function: pub::build_webhook_secrets_from_merchant_connector_account
- function: pub::call_unified_connector_service_for_webhook
- function: pub::extract_webhook_content_from_ucs_response
- mod: pub::transformers
**crates/router/src/core/unified_connector_service/transformers.rs**
Add:
- function: private::foreign_try_from
- function: pub::transform_ucs_webhook_response
- function: pub::build_webhook_transform_request
- struct: pub::WebhookTransformData
- impl: impl ForeignTryFrom<&hyperswitch_interfaces::webhooks::IncomingWebhookRequestDetails<'_>> for payments_grpc::RequestDetails
**crates/router/src/core/webhooks/incoming.rs**
Add:
- function: private::process_ucs_webhook_transform
- function: private::extract_webhook_event_object
- struct: pub::WebhookProcessingResult
|
{"issue_number": 8880, "pr_number": 8814, "commits_count": 2, "files_changed": 5, "response_length": 3391, "file_count": 13, "needs_breakdown": false}
|
[FEAT] Multiple credential support for a connector in Cypress
## Requirement
Execute cypress tests for a connector having **multiple credentials** which can be used for different scenarios (one api key for `cards`, another for `bank redirects` and etc.,).
## Implementation
### Introduce new format for `creds.json`
`creds.json` should include both the formats. if a connector requires us passing **multiple credentials**, then that connector api key object **should** include multiple `connector_account_details` object all named under a generic name `connector_<number>` where `number` is an `integer`.
Refer example given below for more clarity:
```json
// connector having multiple credentials
<connector_name_1>: {
"connector_1": {
"connector_account_details": {
"auth_type": "KeyType",
"api_key": "",
"api_secret": "",
"key1": "",
"key2": ""
},
"metadata": {}
},
"connector_2": {
"connector_account_details": {
"auth_type": "KeyType",
"api_key": "",
"api_secret": "",
"key1": "",
"key2": ""
},
"metadata": {}
},
},
// connector with a single credential
<connector_name_2>: {
"connector_account_details": {
"auth_type": "KeyType",
"api_key": "",
"api_secret": "",
"key1": "",
"key2": ""
}
}
```
### Introduce new `object` (`Configs`) for `connector.js`
Within `connector.js`, introduce new object called as `Configs` alongside to `Request` and `Response` where user can define `flags` to achieve granular control over what test is being run.
An example implementation given below for reference:
```js
getCustomExchange({
Configs: {
TRIGGER_SKIP: true, // skips redirection flow from running. takes in a boolean
DELAY: {
STATUS: true, // flag to turn delay feature on or off. takes in a boolean
TIMEOUT: 5000, // timeout in milliseconds
},
CONNECTOR_CREDENTIAL: connector_1 / connector_2 // flag to route tests to a specific profile
// etc.,
},
Requst: {},
Response: {}
}),
```
### Modify `getValueByKey` function in `Utils.js`
Validate if `connector_account_details` dot exist within `<connector>` object in creds.
If it does not, start a loop and see if `connector_account_details` exist within every object. If true, return the `connector_account_details` while setting an object as a Cypress environment flag (`MULTIPLE_CONNECTORS`) with status `true` and length. If any validation fails, directly return the object (`data[key]`).
An example implementation given below for reference:
```js
if (data && typeof data === "object" && key in data) {
// Connector object has multiple keys
if (typeof data[key].connector_account_details === "undefined") {
const keys = Object.keys(data[key]);
for (let i = 0; i < keys.length; i++) {
const currentItem = data[key][keys[i]];
if (currentItem.hasOwnProperty("connector_account_details")) {
Cypress.env("MULTIPLE_CONNECTORS", {
status: true,
count: keys.length,
});
return currentItem;
}
}
}
return data[key];
} else {
return null;
}
```
### Add a new test to MCA create call
If `MULTIPLE_CONNECTORS.status` is `TRUE`. Check `MULTIPLE_CONNECTORS.count` and create `profile` and `mca` beneath that `profile` based on the number of `count`.
An example of possible implementation given below for reference:
```js
if (Cypress.env("MULTIPLE_CONNECTORS")?.status) {
for (let i = 0; i < Cypress.env("MULTIPLE_CONNECTORS").count; i++) {
cy.createBusinessProfileTest(
createBusinessProfileBody,
globalState,
"profile" + i // new optional fields
);
cy.createConnectorCallTest(
"payment_processor",
createConnectorBody,
payment_methods_enabled,
globalState,
"profile" + i, // new optional fields
"merchantConnector" + i // new optional fields
);
}
}
```
Store these created `profile_id`s and `mca`s in `globalState` for future usage.
Pass `CONNECTOR_CREDENTIAL` value as `connector_1` or `connector_2` in `<connector>.js`
In `commands.js`, `execute` these configs before a `request` has been made.
`execute` here means to make these configs work.
Preferably, make this execution of configs a function and pass the values accordingly along with trace to find from where the function has been called.
## Limitations
- Cypress cannot call itself unless a wrapper around Cypress is written (`Rustpress`?)
- This stops us from running the entire test suite against every credentials
- One possible work around for this is to have multiple keys (`cybersource_1`, `cybersource_2`) but this will result in a lot of confusion
- Current implementation **requires** the user to mandatorily pass a `CONNECTOR_CREDENTIAL` config to pass a different `profileId`
- Hence, the tests will only run once but, specific tests like `incremental auth` will be forced to run against different credential
- `00025-IncrementalAuth.cy.js` can be stopped from execution based on `MULTIPLE_CONNECTORS` environment variable as it is set during run time and the file is read asynchronously when the execution starts (to address this, we will have to make a function call to see if it is set during run time and it is, then skip)
|
<think>
PR Context:
- Title: feat(cypress): add multiple creds and flags support
- Merged: 2024-12-03T11:39:21Z
- Files changed: 30 files
- Commits: 30 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [x] CI/CD
## Description
<!-- Describe your changes in detail -->
This PR introduces 2 new features:
- Multiple credentials for a connector
- Configuration flags
closes #6645 (check this issue for detailed documentation / flow / explanation)
### Additional Changes
- [ ] This PR modifies the AP
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 6645, "pr_number": 6588, "commits_count": 0, "files_changed": 30, "response_length": 783, "file_count": 0, "needs_breakdown": false}
|
[FEATURE] Alter refund schema to support VSAAS cases
### Feature Description
Make changes to support the integration of the (VSAAS) into the refund flow. The new columns, `processor_merchant_id` and `created_by`, are essential for storing specific information related to VSAAS transactions within the refund record.
This will allow for better tracking and management of refunds, which is a key requirement for Vertical SaaS implementations.
### Possible Implementation
Add new columns to refunds schema
### 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(refunds): add new columns in refund table for vsaas
- Merged: None
- Files changed: 9 files
- Commits: 1 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
This PR adds new columns to the `refund` table to support VSAAS functionality.
This PR introduces changes to add new columns (`processor_merchant_id`, `created_by`) to the `refund` table and integrate them into the application logic to support Vertical SaaS (VSAAS).
## Changes
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 8366, "pr_number": 8367, "commits_count": 0, "files_changed": 9, "response_length": 770, "file_count": 0, "needs_breakdown": false}
|
[FEATURE] : [TRUSTPAY] Add Integrity Check Support for Authorize, PSync, Refund and RSync Flows
### Feature Description/Summary
Integrity check is a scenario where there is a discrepancy between the amount sent in the request and the amount received from the connector, which is checked during response handling.
### Context
Integrity checks in a payments flow are critical for ensuring data consistency, correctness, and security when dealing with amounts between Hyperswitch and connectors like Adyen, Stripe, Razorpay, etc.
### Starter Tasks
- In the `handle_response` function of Authorize/PSync/Refund/RSync, you will have to call the respective functions - `get_authorise_integrity_object` for Authorize, `get_sync_integrity_object` for Payments Sync, `get_refund_integrity_object` for Refund and RSync and `get_capture_integrity_object` for Capture.
- You would have to call these functions from `crates/hyperswitch_connectors/src/utils.rs`.
- These functions expect `amount_convertor`, `amount` and `currency`.
- You can take a look at this [PR](https://github.com/juspay/hyperswitch/pull/8075) for reference.
### Implementation Hints
- You can go to `crates/hyperswitch_connectors/src/connectors/trustpay.rs` and call the respective integrity check function as stated above in the `handle_response` function
### Acceptance Criteria
- [ ] Request and Response body added for each of the flows where integrity check is applied.
- [ ] All the required GitHub checks passing
- [ ] Formatted the code using `cargo +nightly fmt --all`
### How to Test it
- Hardcode the amount or currency field that is being passed to the connector different from the one you are passing in the request body
- This way you would be able to reproduce the integrity checks error message while testing.
### Mentor Contact
- Tag @bsayak03 [Sayak Bhattacharya] in the comments if you have any doubts/queries
### Resources
Here are a few sample PRs :
- https://github.com/juspay/hyperswitch/pull/8075
- https://github.com/juspay/hyperswitch/pull/8049
### Pre-Flight
#### 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)
### 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(connector): [TRUSTPAY] Add Integrity Check Support for Authorize, PSync, Refund and RSync Flows
- Merged: None
- Files changed: 1 files
- Commits: 1 commits
Implementation approach:
# PR: Add Integrity Check Support for Trustpay (Authorize, PSync, Refund, RSync)
## Type of Change
- [ ] Bugfix
- [x] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Added integrity check support for Trustpay connector across the following flows:
- Authorize (automatic and manual)
- Payment Sync (PSync)
- Refund Execute
- Refund Sync (RSync)
The connector now constructs response integrity objects from am
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 9228, "pr_number": 9301, "commits_count": 0, "files_changed": 1, "response_length": 814, "file_count": 0, "needs_breakdown": false}
|
feat(connector): [ZSL] add connector template code
## 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 -->
Zsl only supports automatic payment create and payment status gets updated through webhooks
## 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
- [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
|
<think>
PR Context:
- Title: refactor(core): add cache redaction for cgraph
- Merged: 2025-10-01T08:33:13Z
- Files changed: 3 files
- Commits: 9 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 enhances cache management for connector creation by introducing a new mechanism to invalidate related cache entries whenever a new connector is added. The main change is the addition of the `redact_cgraph_cache` function, whi
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(core): add cache redaction for cgraph (#9629)
Files to modify:
**crates/router/src/core/admin.rs**
Modify existing code
**crates/router/src/core/routing/helpers.rs**
Add:
- function: pub::redact_cgraph_cache
**crates/router/src/core/subscription.rs**
Remove:
- impl: impl SubscriptionWithHandler<'a>
Add:
- impl: impl SubscriptionWithHandler<'_>
|
{"issue_number": 4285, "pr_number": 9629, "commits_count": 1, "files_changed": 3, "response_length": 1157, "file_count": 5, "needs_breakdown": false}
|
[FEATURE]: Enable client_secret auth for payments - Get Intent [v2]
Required for SDK
|
<think>
PR Context:
- Title: feat(router): Enable client_secret auth for payments_get_intent [v2]
- Merged: 2025-05-27T10:56:27Z
- Files changed: 1 files
- Commits: 1 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 -->
Added support for `client_secret` authentication in `Payments - Get Intent`
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/envi
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(router): Enable client_secret auth for payments_get_intent [v2] (#8119)
Files to modify:
**crates/router/src/routes/payments.rs**
Modify existing code
|
{"issue_number": 8118, "pr_number": 8119, "commits_count": 1, "files_changed": 1, "response_length": 960, "file_count": 3, "needs_breakdown": false}
|
fix: trustpay eps redirection in cypress
fix: trustpay eps redirection in cypress
they changed it again
|
<think>
PR Context:
- Title: fix: trustpay `eps` redirection in cypress
- Merged: 2024-11-12T07:17:51Z
- 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
- [x] CI/CD
## Description
<!-- Describe your changes in detail -->
Fix EPS Bank Redirect redirection in Cypress.
Closes #6528
### 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": 6528, "pr_number": 6529, "commits_count": 0, "files_changed": 1, "response_length": 772, "file_count": 0, "needs_breakdown": false}
|
[BUG] Docker compose failing because of the web module not having healthcheck
### Bug Description
When `docker compose up -d` is ran, it returns the following error message:
`dependency failed to start: container hyperswitch-hyperswitch-web-1 has no healthcheck configured`
### Expected Behavior
The Web module should be started
### Actual Behavior
The Web module doesn't start due to this
### Steps To Reproduce
1. Clone repo from scratch
2. Run `docker compose up -d`
### Context For The Bug
This can be resolved with either adding a healthcheck part to the web module or changing the demo part to not require healthcheck from the web part. Additionally, we could only check if it has started rather than if it is healthy, as that is something which works.
### Environment
I am running this locally.
1. Operating System or Linux distribution: Mac OS X 15.4 M3 Pro
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?
No, but I'm happy to collaborate on a PR with someone else
|
<think>
PR Context:
- Title: fix: fixes the docker setup to clean up the scarf data
- Merged: 2025-05-12T08:26:50Z
- Files changed: 2 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 -->
The hyperswitch server would run even without the completion of migration runner polluting the data in the scarf dashboard.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ]
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 7945, "pr_number": 7999, "commits_count": 0, "files_changed": 2, "response_length": 784, "file_count": 0, "needs_breakdown": false}
|
feat(core): Add V2 Authentication to all available endpoints
## Type of Change
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
This commit introduces V2 authentication mechanisms for various admin and client-side APIs :
- [x] Added V2AdminApiAuth and modified AdminApiAuthWithMerchantIdFromRoute for V2
- [x] Added V2ApiKeyAuth , V2AdminApiAuth and V2ClientAuth to the endpoints
- [x] Refactored functions to support V2 Auth as well as V1 Auth
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
## Motivation and Context
## How did you test it?
For `/v2/merchant-accounts`
Request
```
curl --location 'http://localhost:8080/v2/merchant-accounts' \
--header 'x-organization-id: org_d2lZPiRPOGbIMmFcb59A' \
--header 'Content-Type: application/json' \
--header 'Authorization: admin-api-key=test_admin' \
--data '{
"merchant_name": "cloth_seller"
}'
```
Response
```
{
"id": "cloth_seller_KdjFPBxrxWyX09jri2VB",
"merchant_name": "cloth_seller",
"merchant_details": null,
"publishable_key": "pk_dev_735cafe5f43446e88d22bedec15b0139",
"metadata": null,
"organization_id": "org_d2lZPiRPOGbIMmFcb59A",
"recon_status": "not_requested",
"product_type": "orchestration"
}
```
For `/v2/organization`
Request
```
curl --location 'http://localhost:8080/v2/organization' \
--header 'Authorization: admin-api-key=test_admin' \
--header 'Content-Type: application/json' \
--data '{
"organization_name": "random_org_1741776562"
}'
```
Response
```
{
"id": "org_m4fLYdEFb7PNHynIfmZO",
"organization_name": "random_org_1741776558",
"organization_details": null,
"metadata": null,
"modified_at": "2025-03-12 10:49:18.475431",
"created_at": "2025-03-12 10:49:18.475424"
}
```
This is how V2AdminApiAuth looks like
```
pub struct V2AdminApiAuth;
#[async_trait]
impl<A> AuthenticateAndFetch<(), A> for V2AdminApiAuth
where
A: SessionStateInfo + Sync,
{
async fn authenticate_and_fetch(
&self,
request_headers: &HeaderMap,
state: &A,
) -> RouterResult<((), AuthenticationType)> {
let header_map_struct = HeaderMapStruct::new(&request_headers);
let auth_string = header_map_struct.get_auth_string_from_header()?;
let request_admin_api_key = auth_string
.split(',')
.find_map(|part| part.trim().strip_prefix("admin-api-key="))
.ok_or_else(|| {
report!(errors::ApiErrorResponse::Unauthorized)
.attach_printable("Unable to parse admin_api_key")
})?;
if request_admin_api_key.is_empty() {
return Err(errors::ApiErrorResponse::Unauthorized)
.attach_printable("Admin Api key is empty");
}
let conf = state.conf();
let admin_api_key = &conf.secrets.get_inner().admin_api_key;
if request_admin_api_key != admin_api_key.peek() {
Err(report!(errors::ApiErrorResponse::Unauthorized)
.attach_printable("Admin Authentication Failure"))?;
}
Ok(((), AuthenticationType::AdminApiKey))
}
}
```
### What changes are done in authorization header
How it was earlier?
```
api-key = {{api-key}}
client-secret={{client_secret}}
api-key = {{admin_api_key}}
```
Changed version
```
Authorization = api-key={{api-key}}
Authorization = admin-api-key={{admin_api_key}}
Authorization = publishable-key={{publishable_key}},client-secret={{client_secret}}
```
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [ ] 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: refactor(cypress-v2): change `Authorization` and `payment_methods_enabled` for v2 cypress tests
- Merged: 2025-04-17T13:17:01Z
- Files changed: 2 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
- [x] CI/CD
## Description
<!-- Describe your changes in detail -->
<details>
<summary>Changes</summary>
- Changed the Authorization in the `commands.js` because Authorization changes had been made recently.
- Changed field names in `payment_methods_enabled` accordingly as accepted by v2 endpoints.
</det
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 7487, "pr_number": 7805, "commits_count": 0, "files_changed": 2, "response_length": 825, "file_count": 0, "needs_breakdown": false}
|
[REFACTOR]: [CYBERSOURCE] Add amount conversion framework to Cybersource
### :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://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/so/api-fields/original-transaction-amount.html) 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?
- [X] I checked and didn't find a similar issue
### :package: Have you read the Contributing Guidelines?
- [X] 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): add amount conversion framework to cybersource
- Merged: 2024-12-04T11:00:45Z
- Files changed: 5 files
- Commits: 7 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 -->
added StringMajorUnit for amount conversion
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provi
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(connector): add amount conversion framework to cybersource (#6335)
Co-authored-by: DEEPANSH
Files to modify:
**crates/common_utils/src/types.rs**
Modify existing code
**crates/router/src/connector/cybersource.rs**
Remove:
- struct: pub::Cybersource
Add:
- function: pub::new
- struct: pub::Cybersource
- impl: impl Cybersource
**crates/router/src/connector/cybersource/transformers.rs**
Modify existing code
**crates/router/src/types/api.rs**
Modify existing code
**crates/router/tests/connectors/cybersource.rs**
Modify existing code
|
{"issue_number": 5942, "pr_number": 6335, "commits_count": 1, "files_changed": 5, "response_length": 1377, "file_count": 7, "needs_breakdown": false}
|
bug(authn): Throw 401 if cookies are not found
Currently BE is throwing 400 if cookies are not found and this is breaking FE if token is present in local storage but not in cookies.
If 401 is thrown, FE will remove the token from the local storage automatically.
|
<think>
PR Context:
- Title: refactor(users): Use domain email type in user DB functions
- Merged: 2024-11-29T13:37:38Z
- Files changed: 12 files
- Commits: 5 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
This PR does 3 things.
1. Throw 401 if cookies are not found in request or if JWT is not found in cookies.
2. Cache role info only if the ttl is greater than or equal to 0.
3. Use `UserEmail` type in DB functions.
### Additional Changes
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(users): Use domain email type in user DB functions (#6699)
Files to modify:
**crates/hyperswitch_domain_models/src/errors/api_error_response.rs**
Modify existing code
**crates/router/src/compatibility/stripe/errors.rs**
Modify existing code
**crates/router/src/core/user.rs**
Modify existing code
**crates/router/src/core/user_role.rs**
Modify existing code
**crates/router/src/db/kafka_store.rs**
Modify existing code
**crates/router/src/db/user.rs**
Modify existing code
**crates/router/src/services/authentication.rs**
Modify existing code
**crates/router/src/services/authentication/cookies.rs**
Modify existing code
**crates/router/src/services/authorization.rs**
Modify existing code
**crates/router/src/services/email/types.rs**
Modify existing code
**crates/router/src/types/domain/user.rs**
Add:
- function: pub::get_inner
**crates/router/src/utils/user.rs**
Modify existing code
|
{"issue_number": 6696, "pr_number": 6699, "commits_count": 1, "files_changed": 12, "response_length": 1731, "file_count": 14, "needs_breakdown": false}
|
Vault connector changes
Need to implement Vault Retrieve for VGS
|
<think>
PR Context:
- Title: feat(connector): Add VGS connector impls
- Merged: 2025-08-25T09:52:19Z
- Files changed: 14 files
- Commits: 13 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 -->
- Added Connector changes for VGS
- Implemented `ExternalVaultInsertFlow` and `ExternalVaultRetrieveFlow` for VGS
- This allows Payment methods to be vaulted in VGS when `is_external_vault_enabled` is set to true in profile
- Updated VGS UR
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): Add VGS connector impls (#7942)
Files to modify:
**crates/hyperswitch_connectors/src/connectors/vgs.rs**
Remove:
- function: pub::new
- 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::build_request
- function: private::handle_response
- function: private::get_error_response
- function: private::get_content_type
- function: private::get_url
- function: private::get_headers
- function: private::get_content_type
- function: private::get_request_body
- function: private::build_request
- function: private::handle_response
- function: private::get_error_response
- function: private::get_content_type
- struct: pub::Vgs
- impl: impl Vgs
- impl: impl ConnectorValidation for Vgs
- impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Vgs
- impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Vgs
- impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Vgs
- impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Vgs
- impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Vgs
Add:
- struct: pub::Vgs
- impl: impl api::ExternalVaultInsert for Vgs
- impl: impl api::ExternalVault for Vgs
- impl: impl api::ExternalVaultRetrieve for Vgs
- impl: impl ConnectorValidation for Vgs
- impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Vgs
- impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Vgs
- impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Vgs
- impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Vgs
- impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Vgs
- impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Vgs
- impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Vgs
- impl: impl ConnectorIntegration<ExternalVaultInsertFlow, VaultRequestData, VaultResponseData> for vgs::VgsInsertRequest::try_from(req)
**crates/hyperswitch_connectors/src/connectors/vgs/transformers.rs**
Remove:
- function: private::try_from
- struct: pub::VgsPaymentsRequest
Add:
- struct: pub::VgsTokenRequestItem
**crates/hyperswitch_connectors/src/default_implementations.rs**
Modify existing code
**crates/router/src/core/payment_methods.rs**
Modify existing code
**crates/router/src/types/api/connector_mapping.rs**
Modify existing code
**crates/router/src/types/api/feature_matrix.rs**
Modify existing code
**crates/router/tests/connectors/vgs.rs**
Modify existing code
|
{"issue_number": 9023, "pr_number": 7942, "commits_count": 1, "files_changed": 14, "response_length": 3938, "file_count": 9, "needs_breakdown": false}
|
feat(users): Force users to reset password on first login for non-email flow
Currently in non-email flow, users who are invited are not forced to change their password.
This is being forced in email flow, this should also be present in non-email flow as well.
|
<think>
PR Context:
- Title: fix(users): Add force rotate password on first login for non-email flow
- Merged: 2024-11-07T10:37:29Z
- 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 -->
Currently in non-email flow, users who are invited are not forced to change their password. This PR will add that.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(users): Add force rotate password on first login for non-email flow (#6483)
Files to modify:
**crates/router/src/types/domain/user.rs**
Add:
- function: private::deref
- struct: pub::NewUserPassword
- impl: impl Deref for NewUserPassword
|
{"issue_number": 6482, "pr_number": 6483, "commits_count": 1, "files_changed": 1, "response_length": 1061, "file_count": 3, "needs_breakdown": false}
|
[BUG] FATAL: role "root" does not exist
### Bug Description
Whenever hyperswitch-pg-1 sever running in docker-compose, it though an error " role "root" does not exist"
### Expected Behavior
Error should not come.
### Actual Behavior

### Steps To Reproduce
Provide an unambiguous set of steps to reproduce this bug. Include code or configuration to reproduce, if relevant.
1. Open Docker Desktop
2. Run hyperswitch-pg-1 server
3. After some time, you will see the error
### Context For The Bug
While setting hyperswitch on my local machine, I came across this error.
### 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: Ubuntu 24.04
2. Rust version (output of `rustc --version`): ``: rustc 1.82.0 (f6e511eec 2024-10-15)
3. App version (output of `cargo r --features vergen -- --version`): `` NA
### 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(docker-compose): address "role root does not exist" errors arising from postgres health check
- Merged: 2024-11-19T19:04:27Z
- Files changed: 2 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
- [ ] 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": 6577, "pr_number": 6582, "commits_count": 0, "files_changed": 2, "response_length": 827, "file_count": 0, "needs_breakdown": false}
|
[REFCTOR]: Move CustomerAcceptance type to `common_types`
`CustomerAcceptance` is currently defined separately in `api_models` and `hyperswitch_domain_models`. These types are exactly the same, so they can be moved to `common_types`.
Additionally, in V2, we can use this strict type in `diesel_models` as well, instead of having a `SecretSerdeValue`
|
<think>
PR Context:
- Title: refactor: Move CustomerAcceptance to common_types
- Merged: 2025-06-25T06:30:07Z
- Files changed: 30 files
- Commits: 11 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 -->
- Moved `CustomerAcceptance`, `AcceptanceType`, `OnlineMandate` to `common_types`
- Removed unnecessary conversions from the code
- Changed `payment_attempt` domain model and diesel model in v2 to use strict type
### Additional Changes
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor: Move CustomerAcceptance to common_types (#8299)
Co-authored-by: hyperswitch-bot[bot] <1485
Files to modify:
**crates/api_models/src/mandates.rs**
Modify existing code
**crates/api_models/src/payments.rs**
Remove:
- struct: pub::CustomerAcceptance
- struct: pub::OnlineMandate
- enum: pub::AcceptanceType
**crates/common_types/src/payments.rs**
Add:
- function: pub::get_ip_address
- function: pub::get_user_agent
- function: pub::get_accepted_at
- struct: pub::CustomerAcceptance
- struct: pub::OnlineMandate
- enum: pub::AcceptanceType
- impl: impl CustomerAcceptance
- impl: impl masking::SerializableSecret for CustomerAcceptance
**crates/diesel_models/src/payment_attempt.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/mandates.rs**
Remove:
- function: private::from
- function: private::from
- function: private::from
- function: private::from
- function: private::from
- function: private::from
- function: pub::get_ip_address
- function: pub::get_user_agent
- function: pub::get_accepted_at
- struct: pub::CustomerAcceptance
- struct: pub::OnlineMandate
- enum: pub::AcceptanceType
- impl: impl From<ApiCustomerAcceptance> for CustomerAcceptance
- impl: impl From<CustomerAcceptance> for ApiCustomerAcceptance
- impl: impl From<ApiAcceptanceType> for AcceptanceType
- impl: impl From<AcceptanceType> for ApiAcceptanceType
- impl: impl From<ApiOnlineMandate> for OnlineMandate
- impl: impl From<OnlineMandate> for ApiOnlineMandate
- impl: impl CustomerAcceptance
**crates/hyperswitch_domain_models/src/payments/payment_attempt.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/router_request_types.rs**
Modify existing code
**crates/openapi/src/openapi.rs**
Modify existing code
**crates/openapi/src/openapi_v2.rs**
Modify existing code
**crates/router/src/compatibility/stripe/payment_intents/types.rs**
Modify existing code
**crates/router/src/core/mandate.rs**
Modify existing code
**crates/router/src/core/mandate/helpers.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/setup_mandate_flow.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/routing.rs**
Modify existing code
**crates/router/src/core/payments/routing/transformers.rs**
Modify existing code
**crates/router/src/core/payments/session_operation.rs**
Modify existing code
**crates/router/src/core/payments/tokenization.rs**
Modify existing code
**crates/router/src/core/payments/transformers.rs**
Modify existing code
**crates/router/src/core/payments/vault_session.rs**
Modify existing code
**crates/router/src/services/kafka/payment_attempt.rs**
Modify existing code
**crates/router/src/services/kafka/payment_attempt_event.rs**
Modify existing code
**crates/router/src/types/api/payments.rs**
Modify existing code
**crates/router/src/types/transformers.rs**
Modify existing code
|
{"issue_number": 8298, "pr_number": 8299, "commits_count": 1, "files_changed": 30, "response_length": 4477, "file_count": 33, "needs_breakdown": true}
|
[DOC] update cypress docs
current docs are pretty much outdated
|
<think>
PR Context:
- Title: docs(cypress): update file structure
- Merged: 2025-01-13T07:50:55Z
- Files changed: 2 files
- Commits: 4 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [x] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
This PR updates Cypress documentation to deal with recent file structure change.
- `cypress-tests` folder structure to reduce confusion and chaos in within `e2e` directory
- previous:
```sh
.
└── cypress
├── e2e
│
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 6955, "pr_number": 7016, "commits_count": 0, "files_changed": 2, "response_length": 766, "file_count": 0, "needs_breakdown": false}
|
[BUG] Description for refunds - list is not apt
### Bug Description
https://api-reference.hyperswitch.io/api-reference/refunds/refunds--list
This should be - `Lists all the refunds associated with the merchant, or for a specific payment if payment_id is provided`
Current one implies that it'll return refunds of a payment_id if it is not provided.
### Expected Behavior
It should reflect that refunds accociated with a merchant will be returned if payment_id is missing, otherwise only for that payment_id.
### Actual Behavior
Incorrect message being shown.
### Steps To Reproduce
Visit - https://api-reference.hyperswitch.io/api-reference/refunds/refunds--list
### Context For The Bug
_No response_
### Environment
Are you using hyperswitch hosted version? Yes
### 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(docs): incorrect description for refund api
- Merged: 2024-12-10T11:02:10Z
- Files changed: 2 files
- Commits: 4 commits
Implementation approach:
## Type of Change
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [x] Documentation
- [ ] CI/CD
## Description
The current description for refund - list is incorrect. Newer one looks more apt.
### 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 change
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(docs): incorrect description for refund api (#6443)
Signed-off-by: Shashank Kumar <shashankkumar
Files to modify:
**crates/openapi/src/routes/refunds.rs**
Modify existing code
|
{"issue_number": 6751, "pr_number": 6443, "commits_count": 1, "files_changed": 2, "response_length": 963, "file_count": 3, "needs_breakdown": false}
|
fix: remove force cookie for docker local setup
Local setup for users is failing due to cookie bug.
We need to disable cookie from backend so local setup works as expected until we raise a proper fix.
|
<think>
PR Context:
- Title: fix(users): remove force cookie for docker setup
- Merged: 2024-12-24T12:07:34Z
- 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
Users not able to login using local setup.
This PR removes force cookie option for docker setup.
### 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:
(No detailed commit information available)
|
{"issue_number": 6931, "pr_number": 6932, "commits_count": 0, "files_changed": 1, "response_length": 778, "file_count": 0, "needs_breakdown": false}
|
feat(core): Add record attempt operation for revenue recovery webhooks
## 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 -->
**Revenue record operation**
In revenue recovery webhook flow, we mainly consume 3 types of events
1) PaymentFailure
2) PaymentSuccess
3) InvoiceCancel
For PaymentFailure or PaymentSuccess scenario we need to record the attempt and update the payment intent fields. This PR adds support for this operations.
**Why do we need to record the payment attempts ?**
To predict the next schedule time of mit transaction we need previous attempts information like error message, code and billing info, mandate details etc. So we store this info in payment_attempt against intent(invoice).
**Why do we need to update payment intent ?**
Intent Status should be altered based on attempt status. Apart from this info like no of retries, payment method token details needs to be update in update trackers of record attempt operation.
### 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.
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)?
-->
Testcase 1:
create payment connector mca :
```
curl --location 'http://localhost:8080/v2/connector-accounts' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'x-merchant-id: cloth_seller_FFzEuYGiJhp3SfL7AXoZ' \
--header 'x-profile-id: pro_gj36mgkfbJuFw2ZVvzX8' \
--header 'api-key: test_admin' \
--data '{
"connector_type": "payment_processor",
"connector_name": "stripe",
"connector_account_details": {
"auth_type": "HeaderKey",
"api_key": "stripe apikey"
},
"connector_webhook_details": {
"merchant_secret": ""
},
"profile_id": "pro_gj36mgkfbJuFw2ZVvzX8"
}'
```
response :
```
{
"connector_type": "payment_processor",
"connector_name": "stripe",
"connector_label": "stripe_business",
"id": "mca_oAXqVf3BZs7bOS0iNhV7",
"profile_id": "pro_gj36mgkfbJuFw2ZVvzX8",
"connector_account_details": {
"auth_type": "HeaderKey",
"api_key": "sk*******************************************************************************************************5b"
},
"payment_methods_enabled": null,
"connector_webhook_details": {
"merchant_secret": "",
"additional_secret": null
},
"metadata": null,
"disabled": false,
"frm_configs": null,
"applepay_verified_domains": null,
"pm_auth_config": null,
"status": "active",
"additional_merchant_data": null,
"connector_wallets_details": null,
"feature_metadata": null
}
```
get the payment connector mca and create billing connector mca
Create billing connector mca
```
curl --location 'http://localhost:8080/v2/connector-accounts' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'x-merchant-id: cloth_seller_FFzEuYGiJhp3SfL7AXoZ' \
--header 'x-profile-id: pro_gj36mgkfbJuFw2ZVvzX8' \
--header 'api-key: test_admin' \
--data '{
"connector_type": "billing_processor",
"connector_name": "chargebee",
"connector_account_details": {
"auth_type": "HeaderKey",
"api_key": "chargebee apikey"
},
"connector_webhook_details": {
"merchant_secret": "chargebee",
"additional_secret" : "password"
},
"feature_metadata" : {
"revenue_recovery" : {
"max_retry_count" : 27,
"billing_connector_retry_threshold" : 16,
"billing_account_reference" :{
"mca_oAXqVf3BZs7bOS0iNhV7" : "gw_16BlyOUaPA0eq12MZ"
}
}
},
"profile_id": "pro_gj36mgkfbJuFw2ZVvzX8"
}'
```
response :
```
{
"connector_type": "payment_processor",
"connector_name": "chargebee",
"connector_label": "chargebee_business",
"id": "mca_1WvloGjsk5KcxOZ6fBPd",
"profile_id": "pro_gj36mgkfbJuFw2ZVvzX8",
"connector_account_details": {
"auth_type": "HeaderKey",
"api_key": "sk*******************************************************************************************************5b"
},
"payment_methods_enabled": null,
"connector_webhook_details": {
"merchant_secret": "chargebee",
"additional_secret": "password"
},
"metadata": null,
"disabled": false,
"frm_configs": null,
"applepay_verified_domains": null,
"pm_auth_config": null,
"status": "active",
"additional_merchant_data": null,
"connector_wallets_details": null,
"feature_metadata": {
"revenue_recovery": {
"max_retry_count": 27,
"billing_connector_retry_threshold": 16,
"billing_account_reference": {
"mca_oAXqVf3BZs7bOS0iNhV7": "gw_16BlyOUaPA0eq12MZ"
}
}
}
}
```
Send chargebee simulated webhook either from dashboard or postman
request :
```
curl --location 'http://localhost:8080/v2/webhooks/cloth_seller_FFzEuYGiJhp3SfL7AXoZ/pro_gj36mgkfbJuFw2ZVvzX8/mca_1WvloGjsk5KcxOZ6fBPd' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••' \
--data-raw '{
"id": "ev_169vy3UaPFn4L4mf",
"occurred_at": 1737361021,
"source": "admin_console",
"user": "[email protected]",
"object": "event",
"api_version": "v2",
"content": {
"transaction": {
"id": "txn_169vy3UaPFmC44me",
"customer_id": "Azq8o5UaLqWWvyGd",
"subscription_id": "Azq8o5UaLr2WnyHG",
"gateway_account_id": "gw_16BlyOUaPA0eq12MZ",
"payment_source_id": "pm_169vy3UaPDo0t4hL",
"payment_method": "card",
"gateway": "stripe",
"type": "payment",
"date": 1737361019,
"exchange_rate": 1,
"amount": 5,
"id_at_gateway": "ch_3QjGAJSHworDX2hs0B120C0A",
"status": "failure",
"updated_at": 1737361021,
"fraud_reason": "Payment complete.",
"resource_version": 1737361021397,
"deleted": false,
"object": "transaction",
"masked_card_number": "************4242",
"currency_code": "INR",
"base_currency_code": "INR",
"amount_unused": 0,
"linked_invoices": [
{
"invoice_id": "9",
"applied_amount": 500000,
"applied_at": 1737361021,
"invoice_date": 1737361018,
"invoice_total": 500000,
"invoice_status": "paid"
}
],
"linked_refunds": [],
"initiator_type": "merchant",
"three_d_secure": false,
"payment_method_details": "{\"card\":{\"first_name\":\"test2\",\"last_name\":\"name2\",\"iin\":\"424242\",\"last4\":\"4242\",\"funding_type\":\"credit\",\"expiry_month\":12,\"expiry_year\":2026,\"billing_addr1\":\"asdf\",\"billing_addr2\":\"asd\",\"billing_city\":\"asdf\",\"billing_state\":\"asdfaf\",\"billing_country\":\"AF\",\"billing_zip\":\"12345\",\"masked_number\":\"************4242\",\"object\":\"card\",\"brand\":\"visa\"}}"
},
"invoice": {
"id": "invoice_1234",
"customer_id": "Azq8o5UaLqWWvyGd",
"subscription_id": "Azq8o5UaLr2WnyHG",
"recurring": false,
"status": "paid",
"price_type": "tax_exclusive",
"date": 1737361018,
"due_date": 1737361018,
"net_term_days": 0,
"exchange_rate": 1,
"total": 5,
"amount_paid": 0,
"amount_adjusted": 0,
"write_off_amount": 0,
"credits_applied": 0,
"amount_due": 0,
"paid_at": 1737361019,
"updated_at": 1737361021,
"resource_version": 1737361021401,
"deleted": false,
"object": "invoice",
"first_invoice": false,
"amount_to_collect": 0,
"round_off_amount": 0,
"has_advance_charges": false,
"currency_code": "INR",
"base_currency_code": "INR",
"generated_at": 1737361018,
"is_gifted": false,
"term_finalized": true,
"channel": "web",
"tax": 0,
"line_items": [
{
"id": "li_169vy3UaPFmBR4md",
"date_from": 1737361004,
"date_to": 1737361004,
"unit_amount": 500000,
"quantity": 1,
"amount": 500000,
"pricing_model": "flat_fee",
"is_taxed": false,
"tax_amount": 0,
"object": "line_item",
"subscription_id": "Azq8o5UaLr2WnyHG",
"customer_id": "Azq8o5UaLqWWvyGd",
"description": "Implementation Charge",
"entity_type": "charge_item_price",
"entity_id": "cbdemo_implementation-charge-INR",
"tax_exempt_reason": "tax_not_configured",
"discount_amount": 0,
"item_level_discount_amount": 0
}
],
"sub_total": 500000,
"linked_payments": [
{
"txn_id": "txn_169vy3UaPFmC44me",
"applied_amount": 500000,
"applied_at": 1737361021,
"txn_status": "success",
"txn_date": 1737361019,
"txn_amount": 500000
}
],
"applied_credits": [],
"adjustment_credit_notes": [],
"issued_credit_notes": [],
"linked_orders": [],
"dunning_attempts": [],
"billing_address": {
"first_name": "test1",
"last_name": "name",
"email": "[email protected]",
"company": "johndoe",
"phone": "+91 83 17 575848",
"line1": "asdf",
"line2": "asd",
"line3": "ahjkd",
"city": "asdf",
"state_code": "TG",
"state": "Telangana",
"country": "IN",
"zip": "561432",
"validation_status": "not_validated",
"object": "billing_address"
},
"site_details_at_creation": {
"timezone": "Asia/Calcutta"
}
},
"customer": {
"id": "Azq8o5UaLqWWvyGd",
"first_name": "john",
"last_name": "doe",
"email": "[email protected]",
"phone": "831 757 5848",
"company": "johndoe",
"auto_collection": "on",
"net_term_days": 0,
"allow_direct_debit": false,
"created_at": 1737310670,
"created_from_ip": "205.254.163.189",
"taxability": "taxable",
"updated_at": 1737360899,
"pii_cleared": "active",
"channel": "web",
"resource_version": 1737360899990,
"deleted": false,
"object": "customer",
"billing_address": {
"first_name": "test1",
"last_name": "name",
"email": "[email protected]",
"company": "johndoe",
"phone": "+91 83 17 575848",
"line1": "asdf",
"line2": "asd",
"line3": "ahjkd",
"city": "asdf",
"state_code": "TG",
"state": "Telangana",
"country": "IN",
"zip": "561432",
"validation_status": "not_validated",
"object": "billing_address"
},
"card_status": "valid",
"promotional_credits": 0,
"refundable_credits": 0,
"excess_payments": 0,
"unbilled_charges": 0,
"preferred_currency_code": "INR",
"mrr": 0,
"primary_payment_source_id": "pm_169vy3UaPDo0t4hL",
"payment_method": {
"object": "payment_method",
"type": "card",
"reference_id": "cus_RcUo8xTwe0sHP7/card_1QjG2dSHworDX2hs6YIjKdML",
"gateway": "stripe",
"gateway_account_id": "gw_16BlyOUaPA0eq12MZ",
"status": "valid"
}
},
"subscription": {
"id": "Azq8o5UaLr2WnyHG",
"billing_period": 1,
"billing_period_unit": "month",
"customer_id": "Azq8o5UaLqWWvyGd",
"status": "active",
"current_term_start": 1737310793,
"current_term_end": 1739989193,
"next_billing_at": 1739989193,
"created_at": 1737310793,
"started_at": 1737310793,
"activated_at": 1737310793,
"created_from_ip": "205.254.163.189",
"updated_at": 1737310799,
"has_scheduled_changes": false,
"channel": "web",
"resource_version": 1737310799688,
"deleted": false,
"object": "subscription",
"currency_code": "INR",
"subscription_items": [
{
"item_price_id": "cbdemo_premium-INR-monthly",
"item_type": "plan",
"quantity": 1,
"unit_price": 100000,
"amount": 0,
"free_quantity": 3,
"object": "subscription_item"
}
],
"shipping_address": {
"first_name": "test1",
"last_name": "name",
"email": "[email protected]",
"company": "johndoe",
"phone": "+91 83 17 575848",
"line1": "asdf",
"line2": "asd",
"line3": "ahjkd",
"city": "asdf",
"state_code": "TG",
"state": "Telangana",
"country": "IN",
"zip": "561432",
"validation_status": "not_validated",
"object": "shipping_address"
},
"due_invoices_count": 0,
"mrr": 0,
"exchange_rate": 1,
"base_currency_code": "INR",
"has_scheduled_advance_invoices": false
}
},
"event_type": "payment_failed",
"webhook_status": "scheduled",
"webhooks": [
{
"id": "whv2_6oZfZUaLmtchA5Bl",
"webhook_status": "scheduled",
"object": "webhook"
}
]
}'
```
This should create Payment intent, payment attempt in our system with right values in DB
Payment intent details in DB

Payment attempt details in DB

Test case 2 :
change the transaction id in above simulated webhooks and hit the request again, it should create new payment attempt but update the payment intent feature metadata.

Test case 3 :
After passing succeded transaction, we should not allow to record further transactions

Note: This above webhook will still not recieve api response it will only create objects in our system .
## 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): Add support for passive churn recovery webhooks
- Merged: 2025-02-22T21:44:08Z
- Files changed: 30 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
<!-- Describe your changes in detail -->
**Recovery Incoming Webhooks service :**
Consume incoming webhooks of billing platforms to schedule revenue recovery retries in hs.
**Endpoint :**
v2/webhooks/revenue_recovery/{{profile_id}}/{{merchant_connector_account_id}}
**Authe
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(connector): Add support for passive churn recovery webhooks (#7109)
Co-authored-by: Chikke Sruj
Files to modify:
**crates/api_models/src/payments.rs**
Add:
- struct: pub::PaymentAttemptFeatureMetadata
- struct: pub::PaymentAttemptRevenueRecoveryData
**crates/api_models/src/webhooks.rs**
Add:
- enum: pub::InvoiceIdType
**crates/common_enums/src/enums.rs**
Add:
- enum: pub::TriggeredBy
**crates/common_utils/src/ext_traits.rs**
Add:
- function: private::async_unwrap_or_else
- function: private::async_unwrap_or_else
**crates/diesel_models/src/payment_attempt.rs**
Add:
- struct: pub::PaymentAttemptFeatureMetadata
- struct: pub::PaymentAttemptRecoveryData
**crates/diesel_models/src/schema_v2.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/lib.rs**
Add:
- mod: pub::revenue_recovery
**crates/hyperswitch_domain_models/src/payments/payment_attempt.rs**
Add:
- function: private::from
- function: private::from
- struct: pub::PaymentAttemptFeatureMetadata
- struct: pub::PaymentAttemptRevenueRecoveryData
- impl: impl From<&PaymentAttemptFeatureMetadata> for DieselPaymentAttemptFeatureMetadata
- impl: impl From<DieselPaymentAttemptFeatureMetadata> for PaymentAttemptFeatureMetadata
**crates/hyperswitch_domain_models/src/revenue_recovery.rs**
Add:
- function: pub::get_attempt_triggered_by
- function: pub::get_action
- function: private::from
- function: private::from
- struct: pub::RevenueRecoveryAttemptData
- struct: pub::RevenueRecoveryInvoiceData
- struct: pub::RecoveryPaymentIntent
- struct: pub::RecoveryPaymentAttempt
- enum: pub::RecoveryAction
- impl: impl RecoveryPaymentAttempt
- impl: impl RecoveryAction
- impl: impl From<&RevenueRecoveryInvoiceData> for api_models::payments::AmountDetails
- impl: impl From<&RevenueRecoveryInvoiceData> for api_models::payments::PaymentsCreateIntentRequest
**crates/hyperswitch_interfaces/src/webhooks.rs**
Add:
- function: private::get_revenue_recovery_attempt_details
- function: private::get_revenue_recovery_invoice_details
**crates/openapi/src/openapi.rs**
Modify existing code
**crates/openapi/src/openapi_v2.rs**
Modify existing code
**crates/router/src/core/errors.rs**
Add:
- enum: pub::RevenueRecoveryError
**crates/router/src/core/payments.rs**
Modify existing code
**crates/router/src/core/payments/transformers.rs**
Modify existing code
**crates/router/src/core/webhooks.rs**
Add:
- mod: private::recovery_incoming
**crates/router/src/core/webhooks/incoming_v2.rs**
Modify existing code
**crates/router/src/core/webhooks/recovery_incoming.rs**
Add:
- function: pub::recovery_incoming_webhook_flow
- function: private::get_payment_intent
- function: private::create_payment_intent
- function: private::get_payment_attempt
- function: private::record_payment_attempt
- struct: pub::RevenueRecoveryInvoice
- struct: pub::RevenueRecoveryAttempt
- impl: impl RevenueRecoveryInvoice
- impl: impl RevenueRecoveryAttempt
**crates/router/src/routes.rs**
Add:
- mod: pub::recovery_webhooks
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/routes/lock_utils.rs**
Modify existing code
**crates/router/src/routes/recovery_webhooks.rs**
Add:
- function: pub::recovery_receive_incoming_webhook
**crates/router/src/services/connector_integration_interface.rs**
Add:
- function: private::get_revenue_recovery_attempt_details
- function: private::get_revenue_recovery_invoice_details
**crates/router_env/src/logger/types.rs**
Modify existing code
|
{"issue_number": 7236, "pr_number": 7109, "commits_count": 1, "files_changed": 30, "response_length": 4498, "file_count": 28, "needs_breakdown": true}
|
[FEATURE] Add payment type to Get Intent Response (v2)
### Feature Description
We need to return `payment_type` in `Get Intent`. Required by SDK
### Possible Implementation
Add a field `payment_type` to Get Intent Response
### 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(router): Add payment_type to Get Intent response (v2)
- Merged: 2025-08-28T06:22:39Z
- Files changed: 3 files
- Commits: 3 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 `payment_type` to Payments Get Intent response
### Additional Changes
- [x] 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:** feat(router): Add payment_type to Get Intent response (v2) (#9066)
Co-authored-by: Hrithikesh <61539
Files to modify:
**crates/api_models/src/payments.rs**
Modify existing code
**crates/router/src/core/payments/transformers.rs**
Modify existing code
|
{"issue_number": 9065, "pr_number": 9066, "commits_count": 1, "files_changed": 3, "response_length": 1047, "file_count": 4, "needs_breakdown": false}
|
fix(users): Check lineage across entities in invite
## 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
- [ ] 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).
-->
Closes #6679.
## 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)?
-->
1. Invite a user in a specific (org, merchant, profile) combination.
2. Create a new profile in the same merchant account and switch to it.
3. Invite the same user as merchant level user. This should be stopped by API.
## 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(users): Check lineage across entities in invite
- Merged: 2024-11-27T14:40:31Z
- 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 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.
Main PR: #6677
### Additional Changes
- [ ] This PR modifies
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(users): Check lineage across entities in invite (#6680)
Files to modify:
**crates/router/src/core/user.rs**
Modify existing code
|
{"issue_number": 6677, "pr_number": 6680, "commits_count": 1, "files_changed": 1, "response_length": 920, "file_count": 3, "needs_breakdown": false}
|
feat(payment_methods_v2): add support for network tokenization
## 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 support for network tokenization for v2/payment-methods
- added network tokenization support for create+confirm payment methods api v2
- introduced new type for network token
### 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)?
-->
test cases -
enable network tokenization for profile
payment-method create api -
```
curl --location 'http://localhost:8080/v2/payment-methods' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'X-Profile-Id: pro_1Z1F459LoQzRTieDsLW2' \
--header 'api-key: dev_sewkgvR4aMq0tWNzDD6Y7IsNr9kPTS9ee19eQOGUaNLXWsqfxusLWu0ZGy2XU3pK' \
--data '{
"customer_id": "12345_cus_0194f66341a27da1af6dc6b7b86cfaeb",
"payment_method_type": "card",
"payment_method_subtype": "credit",
"payment_method_data": {
"card": {
"card_number": "4242424242424242",
"card_exp_month": "03",
"card_exp_year": "2025",
"card_holder_name": "joseph Doe"
}
},
"network_tokenization":{
"enable":"Enable"
}
}'
```
verify in payment methods table.
<img width="1726" alt="Screenshot 2025-02-14 at 1 08 29 PM" src="https://github.com/user-attachments/assets/2721dce4-c1ad-4a6f-b548-73939211f9a5" />
## 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`
- [ ] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
|
<think>
PR Context:
- Title: feat(payment_methods_v2): add network-token-locker-fingerprint-id field in PaymentMethod
- Merged: None
- Files changed: 6 files
- Commits: 4 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 -->
add network-token-locker-fingerprint-id field in PaymentMethod diesel and domain model.
a dependency pr for #7145
### Additional Changes
- [ ] This PR modifies the API contract
- [x] This PR modifies the database schema
- [ ] This PR m
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 7145, "pr_number": 7146, "commits_count": 0, "files_changed": 6, "response_length": 802, "file_count": 0, "needs_breakdown": false}
|
[Cypress] Add more connectors to GitHub CI
- Bluesnap
- PayPal
- Iatapay
|
<think>
PR Context:
- Title: ci(cypress): fix nmi and paypal
- Merged: 2025-02-06T10:39:20Z
- Files changed: 5 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
- [x] CI/CD
## Description
<!-- Describe your changes in detail -->
This PR fixes NTID for PayPal by disabling it from running.
closes #7172
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/e
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 7172, "pr_number": 7173, "commits_count": 0, "files_changed": 5, "response_length": 762, "file_count": 0, "needs_breakdown": false}
|
Adding Deep health check for Hyperswitch
Goal is to create a deep health check endpoint which will verify that the Hyperswitch application is up and running and the connections to all the necessary services are healthy
- [x] Failure of health check should emit logs providing evidential data regarding the failure
The deep health will verify the following services
- [x] #3267
- [x] #3268
- [x] #3269
- [x] #3270
- [x] [Deep health check for Hyperswitch Control Center](https://github.com/juspay/hyperswitch-control-center/issues/374)
|
<think>
PR Context:
- Title: fix(payment_link): sanitize embedded payment link data
- Merged: 2025-05-29T08:22:03Z
- Files changed: 10 files
- Commits: 7 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
This PR addresses below issues specifically for payment links
- improper use of innerHTML for API inputs - for rendering transaction details
- improper use of receiving event (isFormReadyForSubmission) from HS SDK
Overall, this PR sanitizes API text based inputs which are rendere
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(payment_link): sanitize embedded payment link data (#7736)
Files to modify:
**crates/hyperswitch_domain_models/src/api.rs**
Modify existing code
**crates/router/src/configs/settings.rs**
Add:
- function: private::default
- impl: impl Default for PaymentLink
**crates/router/src/core/payment_link.rs**
Modify existing code
**crates/router/src/core/payment_methods.rs**
Modify existing code
**crates/router/src/core/payout_link.rs**
Modify existing code
**crates/router/src/services/api.rs**
Modify existing code
|
{"issue_number": 3264, "pr_number": 7736, "commits_count": 1, "files_changed": 10, "response_length": 1329, "file_count": 8, "needs_breakdown": false}
|
[BUG] connector_request_reference_id not updated in payment_tokenization confirm_intent flow
### Bug Description
In the payment tokenization confirm intent flow, the field `connector_request_reference_id` is not being updated in payment_attempt. Because of this missing update, flows such as PaymentsCancel and PaymentsCapture break, resulting in a 500 Internal Server Error with the message "connector_request_reference_id not found in payment_attempt".
### Expected Behavior
The expected behavior is that during confirm intent `connector_request_reference_id` field should be updated in payment attepmt, so that subsequent cancel and capture operations can function correctly without failing.
### Actual Behavior
Because of this missing update, flows such as PaymentsCancel and PaymentsCapture break, resulting in a 500 Internal Server Error with the message "connector_request_reference_id not found in payment_attempt".
<img width="1721" height="428" alt="Image" src="https://github.com/user-attachments/assets/f2eea707-d3bc-4213-9f78-495cb0249f6f" />
### Steps To Reproduce
Provide an unambiguous set of steps to reproduce this bug. Include code or configuration to reproduce, if relevant.
1. Create a Payment Intent
```
{
"amount_details": {
"order_amount": 10000,
"currency": "USD"
},
"capture_method":"manual",
"authentication_type": "no_three_ds",
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "joseph",
"last_name": "Doe"
},
"email": "[email protected]"
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "joseph",
"last_name": "Doe"
},
"email": "[email protected]"
}
}
```
2. Confirm the Payment Intent with customer_acceptance
```
{
"payment_method_data": {
"card": {
"card_cvc": "123",
"card_exp_month": "10",
"card_exp_year": "25",
"card_number": "4111111111111111",
"card_holder_name": "joseph Doe"
}
},
"payment_method_type": "card",
"payment_method_subtype": "credit",
"browser_info": {
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36",
"accept_header": "text\\/html,application\\/xhtml+xml,application\\/xml;q=0.9,image\\/webp,image\\/apng,*\\/*;q=0.8",
"language": "en-GB",
"color_depth": 24,
"screen_height": 1440,
"screen_width": 2560,
"time_zone": -330,
"java_enabled": true,
"java_script_enabled": true,
"ip_address": "0.0.0.0"
},
"customer_acceptance": {
"acceptance_type": "online",
"accepted_at": "2022-09-10T10:11:12Z",
"online": {
"ip_address": "123.32.25.123",
"user_agent": "Mozilla/5.0 (Linux; Android 12; SM-S906N Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/80.0.3987.119 Mobile Safari/537.36"
}
}
}
```
3. Attempt to Void
After the confirm step, call /v2/payments/{payment_id}/cancel.
<img width="1728" height="431" alt="Image" src="https://github.com/user-attachments/assets/723db89c-2f25-4e29-8e40-bac011d23500" />
Observed Behavior:
The void request fails with a 500 Internal Server Error because the field connector_request_reference_id is not updated in payment_attempt during the confirm intent step.
### 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(payment): add connector_request_reference_id to PaymentAttemptUpdate in ConfirmIntentTokenized flow
- Merged: 2025-10-01T13:42:36Z
- 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 -->
In the payment tokenization confirm intent flow, the field `connector_request_reference_id` was not being updated in payment_attempt.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(payment): add connector_request_reference_id to PaymentAttemptUpdate in ConfirmIntentTokenized f
Files to modify:
**crates/hyperswitch_domain_models/src/payments/payment_attempt.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_confirm_intent.rs**
Modify existing code
|
{"issue_number": 9596, "pr_number": 9597, "commits_count": 1, "files_changed": 2, "response_length": 1144, "file_count": 4, "needs_breakdown": false}
|
[FEATURE] Extend storage of additional payment method details to wallets
### Feature Description
Wallet integrations like ApplePay and GooglePay makes use of a tokenized network token which is collected on client's device and sent to underlying PSPs for completing the txns. The intermediary parties do not have any access to the raw payment method data details. However, these wallets also has some metadata for identification and display purposes. These details are to be stored and propagated in payments response.
### Possible Implementation
HyperSwitch supports loads of wallet integrations today. As a first cut, add additional payment method details to below wallets
- ApplePay
- GooglePay
### 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): propagate additional payment method data for apple pay during MIT
- Merged: 2025-07-11T15:18:48Z
- Files changed: 5 files
- Commits: 7 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
Described in #5868 point # 3
This PR enables sending out `payment_method_data` for AP MIT
### 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:** feat(payments): propagate additional payment method data for apple pay during MIT (#7170)
Files to modify:
**crates/api_models/src/payment_methods.rs**
Add:
- function: private::from
- function: private::try_from
- impl: impl From<payments::ApplepayPaymentMethod> for PaymentMethodDataWalletInfo
- impl: impl TryFrom<PaymentMethodDataWalletInfo> for payments::ApplepayPaymentMethod
**crates/hyperswitch_domain_models/src/payment_method_data.rs**
Add:
- function: private::from
- impl: impl From<ApplePayWalletData> for payment_methods::PaymentMethodDataWalletInfo
**crates/router/src/core/payments/operations/payment_create.rs**
Modify existing code
**crates/router/src/core/payments/tokenization.rs**
Modify existing code
**crates/router/src/types/api/payments.rs**
Modify existing code
|
{"issue_number": 5868, "pr_number": 7170, "commits_count": 1, "files_changed": 5, "response_length": 1641, "file_count": 7, "needs_breakdown": false}
|
fix(payment_methods): card_network and card_scheme should be consistent
## 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 -->
In customer payment method list api, card scheme and card network are showing different value for co-branded card it they are saved with both the network, to fix this issue, both these fields are now fetching the data from the card locker
### 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)?
-->
Tested through Postam:
- Create a MCA(Checkout):
- Create a payment with co-branded card with network at Visa:
```
{
"amount": 1043,
"currency": "USD",
"confirm": true,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"customer_id": "{{customer_id}}",
"email": "[email protected]",
"name": "John Doe",
"phone": "999999999",
"phone_country_code": "+1",
"description": "Its my first payment request",
"authentication_type": "no_three_ds",
"return_url": "https://google.com",
"payment_method": "card",
"payment_method_data": {
"card": {
"card_number": "4010061700000021",
"card_exp_month": "01",
"card_exp_year": "99",
"card_holder_name": "joseph Doe",
"card_cvc": "123",
"card_network": "Visa",
"nick_name": "Sakil"
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "PiX"
}
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "PiX"
}
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
},
"setup_future_usage": "on_session",
"customer_acceptance": {
"acceptance_type": "online",
"accepted_at": "1963-05-03T04:07:52.723Z",
"online": {
"ip_address": "125.0.0.1",
"user_agent": "amet irure esse"
}
}
}
```
- Do a customer payment method list, the response should be following:
```
{
"customer_payment_methods": [
{
"payment_token": "token_I8i8KGuFhF4KSxQHFePi",
"payment_method_id": "pm_3D4MneEjvgweeRyfyiBv",
"customer_id": "cus_4hPhaiDFxK9W0qUpOGkq",
"payment_method": "card",
"payment_method_type": null,
"payment_method_issuer": null,
"payment_method_issuer_code": null,
"recurring_enabled": false,
"installment_payment_enabled": false,
"payment_experience": [
"redirect_to_url"
],
"card": {
"scheme": "Visa",
"issuer_country": null,
"last4_digits": "0021",
"expiry_month": "01",
"expiry_year": "99",
"card_token": null,
"card_holder_name": "joseph Doe",
"card_fingerprint": null,
"nick_name": "Sakil",
"card_network": "Visa",
"card_isin": "401006",
"card_issuer": null,
"card_type": null,
"saved_to_locker": true
},
"metadata": null,
"created": "2024-12-16T10:20:59.201Z",
"bank": null,
"surcharge_details": null,
"requires_cvv": true,
"last_used_at": "2024-12-16T10:20:59.201Z",
"default_payment_method_set": true,
"billing": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": null,
"email": null
}
}
],
"is_guest_customer": false
}
```
- Create a payment again with co-branded card but with network as `CartesBancaires`:
```
{
"amount": 1043,
"currency": "USD",
"confirm": true,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"customer_id": "{{customer_id}}",
"email": "[email protected]",
"name": "John Doe",
"phone": "999999999",
"phone_country_code": "+1",
"description": "Its my first payment request",
"authentication_type": "no_three_ds",
"return_url": "https://google.com",
"payment_method": "card",
"payment_method_data": {
"card": {
"card_number": "4010061700000021",
"card_exp_month": "01",
"card_exp_year": "99",
"card_holder_name": "joseph Doe",
"card_cvc": "123",
"card_network": "CartesBancaires",
"nick_name": "Sakil"
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "PiX"
}
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "PiX"
}
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
},
"setup_future_usage": "on_session",
"customer_acceptance": {
"acceptance_type": "online",
"accepted_at": "1963-05-03T04:07:52.723Z",
"online": {
"ip_address": "125.0.0.1",
"user_agent": "amet irure esse"
}
}
}
```
- Do a customer payment method list call, the response should be:
```
{
"customer_payment_methods": [
{
"payment_token": "token_I8i8KGuFhF4KSxQHFePi",
"payment_method_id": "pm_3D4MneEjvgweeRyfyiBv",
"customer_id": "cus_4hPhaiDFxK9W0qUpOGkq",
"payment_method": "card",
"payment_method_type": null,
"payment_method_issuer": null,
"payment_method_issuer_code": null,
"recurring_enabled": false,
"installment_payment_enabled": false,
"payment_experience": [
"redirect_to_url"
],
"card": {
"scheme": "CartesBancaires",
"issuer_country": null,
"last4_digits": "0021",
"expiry_month": "01",
"expiry_year": "99",
"card_token": null,
"card_holder_name": "joseph Doe",
"card_fingerprint": null,
"nick_name": "Sakil",
"card_network": "CartesBancaires",
"card_isin": "401006",
"card_issuer": null,
"card_type": null,
"saved_to_locker": true
},
"metadata": null,
"created": "2024-12-16T10:20:59.201Z",
"bank": null,
"surcharge_details": null,
"requires_cvv": true,
"last_used_at": "2024-12-16T10:20:59.201Z",
"default_payment_method_set": true,
"billing": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": null,
"email": null
}
}
],
"is_guest_customer": false
}
```
## 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(payment_methods): card_network and card_scheme should be consistent
- Merged: 2024-12-18T07:42:26Z
- 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 -->
In customer payment method list api, card scheme and card network are showing different value for co-branded card it they are saved with both the network, to fix this issue, both these fields are now fetching the data from the card locker
N
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(payment_methods): card_network and card_scheme should be consistent (#6867)
Files to modify:
**crates/diesel_models/src/payment_method.rs**
Modify existing code
**crates/router/src/core/payment_methods/cards.rs**
Modify existing code
**crates/router/src/core/payments/tokenization.rs**
Modify existing code
|
{"issue_number": 6849, "pr_number": 6867, "commits_count": 1, "files_changed": 3, "response_length": 1124, "file_count": 5, "needs_breakdown": false}
|
fix(mandate): add mandate_id column in payment_attempt table
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
## Description
This change includes
- Adding a new column `mandate_id` in the table `payment_attempt`
- Similarly, adding `mandate_id` field in `PaymentAttempt` structs (which include `New`, `Update` variants)
- Storing `mandate_id`, if generated during payment creation, to the `PaymentAttempt` table (in `PostUpdateTracker`)
<!-- 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 -->
## Motivation and Context
Originally, we didn't have any way to link a payment that is made to a specific mandate. Which makes it impossible to get the related mandate_id while performing a payment sync operation. This change will allow, the payments core to have access to the mandate that is related to the specific payment attempt while performing payment sync and further mandate related functionalities.
<!--
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(core): add is_click_to_pay_enabled in business profile
- Merged: 2024-12-05T13:04:29Z
- Files changed: 11 files
- Commits: 9 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] New feature
## Description
<!-- Describe your changes in detail -->
add is_click_to_pay_enabled in business profile
## 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 Business Profile
Request:
```shell
curl --location 'http://localhost:8080/account/merchant_1733299712/business
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(core): add is_click_to_pay_enabled in business profile (#6736)
Co-authored-by: hyperswitch-bot[
Files to modify:
**crates/api_models/src/admin.rs**
Modify existing code
**crates/diesel_models/src/business_profile.rs**
Modify existing code
**crates/diesel_models/src/schema.rs**
Modify existing code
**crates/diesel_models/src/schema_v2.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/business_profile.rs**
Modify existing code
**crates/router/src/core/admin.rs**
Modify existing code
**crates/router/src/types/api/admin.rs**
Modify existing code
|
{"issue_number": 3, "pr_number": 6736, "commits_count": 1, "files_changed": 11, "response_length": 1382, "file_count": 9, "needs_breakdown": false}
|
[ENHANCE] Improve Error Reporting in change_password with Printable Context
This issue aims to improve the debuggability of the `change_password` function by adding a printable message to a potential database error. Currently, if the database update fails, a generic `InternalServerError` is returned. By attaching a specific, contextual message, we can make debugging and logging much more effective.
In the [change_password](https://github.com/juspay/hyperswitch/blob/cf30da2df05aac69fd82b676e639b2fbc85dcae5/crates/router/src/core/user.rs#L429) function located in `crates/router/src/core/user.rs`, we update the user's password in the database. The relevant code block is:
If the update_user_by_user_id operation fails (e.g., due to a database connection issue, a constraint violation, etc.), it's wrapped in a [UserErrors::InternalServerError](https://github.com/juspay/hyperswitch/blob/cf30da2df05aac69fd82b676e639b2fbc85dcae5/crates/router/src/core/user.rs#L461). While this correctly signals a server-side problem, the error itself lacks specific context. When debugging, an engineer seeing this error in the logs would have to trace back the execution flow to understand which operation and for which user it failed.
#### __Proposed Solution 💡__
We can enhance this by using the `.attach_printable()` method from the `error-stack` crate. This method allows us to attach a static or pre-formatted string message to the error context.
The goal is to modify the code to include the error message, making it immediately clear what failed during InternalServerError
#### __How to Test Your Changes 🧪__
1. __Make the code change__: Apply the suggested modification to the `change_password` function.
2. __Build the project__: Run `cargo build` or `cargo check` to ensure your changes compile correctly. __If it compiles, the `attach_printable` should work fine.__
3. __Simulate an error (Advanced)__:
- A good way to test this end-to-end is to:
1. Create a user via the signup flow.
2. Log in and get an authentication token.
3. Call the `change_password` endpoint.
- To reliably trigger the error for observation, you could temporarily modify the `update_user_by_user_id` method in its respective implementation to always return an error.
- A simpler way to verify the message is being constructed is to temporarily introduce a `panic!` or a different, guaranteed error inside the `attach_printable` argument to see if it gets hit (remember to remove this temporary change!).
4. __Observe the output__: If you can trigger the error, you should see your new, more descriptive message in the application logs or error response, making it clear that the failure happened during the password update for a specific user.
####
####
|
<think>
PR Context:
- Title: feat: Add attach_printable() for better error logging
- Merged: 2025-10-15T16:19:48Z
- Files changed: 1 files
- Commits: 25 commits
Implementation approach:
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [✔️ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Just modified the error logging on change of password for getting better error details and description. This helps in knowing about error in more detail.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat: Add attach_printable() for better error logging (#9667)
Files to modify:
**crates/router/src/core/user.rs**
Modify existing code
|
{"issue_number": 9641, "pr_number": 9667, "commits_count": 1, "files_changed": 1, "response_length": 925, "file_count": 3, "needs_breakdown": false}
|
feat(router): Add `eligible_connector` to PML response (v2)
We need to return `eligible_connector` in PML response, required by SDK
|
<think>
PR Context:
- Title: feat(router): Return eligible_connector in PML for payment (v2)
- Merged: None
- Files changed: 3 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 `eligible_connector` in PML response
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 8375, "pr_number": 8376, "commits_count": 0, "files_changed": 3, "response_length": 777, "file_count": 0, "needs_breakdown": false}
|
feat(user_roles): support tenant_id reads
For tenancy support tenant_id in user roles queries
- Adding tenant id to reads, deletes and updates queries.
|
<think>
PR Context:
- Title: feat(users): add tenant id reads in user roles
- Merged: 2024-11-29T10:54:00Z
- Files changed: 9 files
- Commits: 8 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
Support tenant id in user roles queries.
### 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 cha
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(users): add tenant id reads in user roles (#6661)
Co-authored-by: hyperswitch-bot[bot] <1485255
Files to modify:
**crates/diesel_models/src/query/user_role.rs**
Remove:
- function: pub::find_by_user_id
- function: pub::find_by_user_id_merchant_id
- function: pub::list_by_user_id
**crates/router/src/analytics.rs**
Modify existing code
**crates/router/src/core/user.rs**
Modify existing code
**crates/router/src/core/user_role.rs**
Modify existing code
**crates/router/src/db/kafka_store.rs**
Modify existing code
**crates/router/src/db/user_role.rs**
Modify existing code
**crates/router/src/services/authentication.rs**
Modify existing code
**crates/router/src/types/domain/user/decision_manager.rs**
Modify existing code
**crates/router/src/utils/user_role.rs**
Modify existing code
|
{"issue_number": 6660, "pr_number": 6661, "commits_count": 1, "files_changed": 9, "response_length": 1609, "file_count": 11, "needs_breakdown": false}
|
feat(payments_v2): implement create and confirm intent flow
## 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 introduces a new endpoint that handles payments create intent v2 and confirm intent v2 steps. Note that the API contract is not finalized and is possibly subject to change.
Additionally, the endpoint can also call the setup intent flow, if the order amount is zero. This is done so as to allow the payment methods v2 endpoints to create multiple-use tokens for a specified customer's payment method.
### 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.
Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->
This PR introduces a new endpoint for payments v2, that can handle create intent and confirm intent steps.
## 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).
-->
The endpoint introduced in this PR would allow the creation of multiple-use tokens by the payments methods v2 endpoints.
## 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)?
-->
1. Using the v2 endpoints, create an organization, merchant account, profile, API key and merchant connector account.
2. Call the setup intent endpoint:
- Since the request body is a union of the payment create intent v2 and payment confirm intent v2 request bodies, the required fields for this endpoint are `amount_details`, `payment_method_data`, `payment_method_type` and `payment_method_subtype`.
The request and response are included below:
```shell
$ curl --location 'http://localhost:8080/v2/payments' \
--header 'x-profile-id: pro_9UhMqBMEOooRIvJFFdeW' \
--header 'Content-Type: application/json' \
--header 'api-key: <API key>' \
--data '{
"amount_details": {
"order_amount": 0,
"currency": "USD"
},
"payment_method_data": {
"card": {
"card_number": "4242424242424242",
"card_exp_month": "01",
"card_exp_year": "25",
"card_holder_name": "John Doe",
"card_cvc": "100"
}
},
"payment_method_type": "card",
"payment_method_subtype": "credit"
}'
{
"id": "12345_pay_0194aedd2b087ec1a960242f3ad8f2c1",
"status": "succeeded",
"amount": {
"order_amount": 0,
"currency": "USD",
"shipping_cost": null,
"order_tax_amount": null,
"external_tax_calculation": "skip",
"surcharge_calculation": "skip",
"surcharge_amount": null,
"tax_on_surcharge": null,
"net_amount": 0,
"amount_to_capture": null,
"amount_capturable": 0,
"amount_captured": 0
},
"customer_id": null,
"connector": "stripe",
"client_secret": "12345_pay_0194aedd2b087ec1a960242f3ad8f2c1_secret_0194aedd2b127f6190e5090a1527ad3e",
"created": "2025-01-28T21:41:57.650Z",
"payment_method_data": {
"billing": null
},
"payment_method_type": "card",
"payment_method_subtype": "credit",
"next_action": null,
"connector_transaction_id": "seti_1QmMXiD5R7gDAGffKPUlM0HT",
"connector_reference_id": null,
"connector_token_details": {
"token": "pm_1QmMXiD5R7gDAGffCf03AULQ"
},
"merchant_connector_id": "mca_oC8RE28uRRcVKDjgwfzG",
"browser_info": null,
"error": null
}
```
- Note that the `order_amount` is zero in the above request. Also, note that the `connector_token_details.token` field is populated in the response, and the `connector_transaction_id` being `seti_*` indicates that Stripe's setup intent flow was called.
- Additional fields may be passed in the request, such as `customer_id`, etc. which would be reflected in the response and database entries.
- Passing in a non-zero value for the `order_amount` causes it to follow the regular create intent + confirm intent flow:
```shell
$ curl --location 'http://localhost:8080/v2/payments' \
--header 'x-profile-id: pro_9UhMqBMEOooRIvJFFdeW' \
--header 'Content-Type: application/json' \
--header 'api-key: <API key>' \
--data '{
"amount_details": {
"order_amount": 6540,
"currency": "USD"
},
"payment_method_data": {
"card": {
"card_number": "4242424242424242",
"card_exp_month": "01",
"card_exp_year": "25",
"card_holder_name": "John Doe",
"card_cvc": "100"
}
},
"payment_method_type": "card",
"payment_method_subtype": "credit"
}'
{
"id": "12345_pay_0194aedff4c57e008edc28cbd3881dee",
"status": "succeeded",
"amount": {
"order_amount": 6540,
"currency": "USD",
"shipping_cost": null,
"order_tax_amount": null,
"external_tax_calculation": "skip",
"surcharge_calculation": "skip",
"surcharge_amount": null,
"tax_on_surcharge": null,
"net_amount": 6540,
"amount_to_capture": null,
"amount_capturable": 0,
"amount_captured": 6540
},
"customer_id": null,
"connector": "stripe",
"client_secret": "12345_pay_0194aedff4c57e008edc28cbd3881dee_secret_0194aedff4cc719381629d4aacf19adb",
"created": "2025-01-28T21:45:00.364Z",
"payment_method_data": {
"billing": null
},
"payment_method_type": "card",
"payment_method_subtype": "credit",
"next_action": null,
"connector_transaction_id": "pi_3QmMaeD5R7gDAGff0GRZPicn",
"connector_reference_id": null,
"connector_token_details": {
"token": "pm_1QmMaeD5R7gDAGffZenIs1fg"
},
"merchant_connector_id": "mca_oC8RE28uRRcVKDjgwfzG",
"browser_info": null,
"error": null
}
```
In this case, the `connector_transaction_id` is `pi_*`, indicating that Stripe's authorize flow was called.
## 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(router): [V2] Return connector customer reference IDs in `CustomerResponse`
- Merged: 2025-03-21T13:58:53Z
- Files changed: 8 files
- Commits: 8 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 a field `connector_customer` to `CustomerResponse` that contains a map between `MerchantConnectorAccountId` and connector customer id
### Additional Changes
- [x] This PR modifies the API contract
- [ ] This PR modifies the database
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(router): [V2] Return connector customer reference IDs in `CustomerResponse` (#7319)
Co-authored
Files to modify:
**crates/api_models/src/customers.rs**
Modify existing code
**crates/common_types/src/customers.rs**
Add:
- function: private::deref
- function: private::deref_mut
- struct: pub::ConnectorCustomerMap
- impl: impl std::ops::Deref for ConnectorCustomerMap
- impl: impl std::ops::DerefMut for ConnectorCustomerMap
**crates/common_types/src/lib.rs**
Add:
- mod: pub::customers
**crates/diesel_models/src/customers.rs**
Remove:
- function: private::deref
- function: private::deref_mut
- struct: pub::ConnectorCustomerMap
- impl: impl std::ops::Deref for ConnectorCustomerMap
- impl: impl std::ops::DerefMut for ConnectorCustomerMap
**crates/hyperswitch_domain_models/src/customer.rs**
Modify existing code
**crates/router/src/types/api/customers.rs**
Modify existing code
|
{"issue_number": 7106, "pr_number": 7319, "commits_count": 1, "files_changed": 8, "response_length": 1761, "file_count": 8, "needs_breakdown": false}
|
use swatinem cache in cypress instead of sccache
use swatinem cache in cypress instead of sccache
|
<think>
PR Context:
- Title: ci: use swatinem-cache instead of sccache in cypress
- Merged: None
- 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 -->
See if this helps reduce build times and help reduce the number of queueueues
closes #7180
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies applica
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 7180, "pr_number": 7179, "commits_count": 0, "files_changed": 1, "response_length": 766, "file_count": 0, "needs_breakdown": false}
|
Add audit events for PaymentApprove update
Created from #4525
This covers adding events for PaymentApprove 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(payments): Add audit events for PaymentApprove update
- Merged: 2024-11-08T10:20:37Z
- Files changed: 2 files
- Commits: 4 commits
Implementation approach:
## Type of Change
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
This PR adds an Audit event for the PaymentApprove operation.
### Additional Changes
- [x] This PR modifies the files below
- `crates/router/src/core/payments/operations/payment_approve.rs`
- `crates/router/src/events/audit_events.rs`
## Motivation and Context
This PR fixes #4680
## How did you test it
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(payments): Add audit events for PaymentApprove update (#6432)
Files to modify:
**crates/router/src/core/payments/operations/payment_approve.rs**
Modify existing code
**crates/router/src/events/audit_events.rs**
Modify existing code
|
{"issue_number": 4680, "pr_number": 6432, "commits_count": 1, "files_changed": 2, "response_length": 1034, "file_count": 4, "needs_breakdown": false}
|
refactor(core): add error handling wrapper to wehbook
## 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 -->
In webhook, for specific connectors, we want to consume every webhook that arrives even if a error occurs while processing. This is done to keep the webhook channel open with the connector.
In this pr, a error wrapper is introduced to handle this logic where based on connector, we choose whether to send error or not.
### 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)?
-->
Tested through Postman:
- Create a MCA (Adyenplatform):
- Setup webhook endpoint in dashboard (Adyenplatform):
- Create a payout:
```
{
"amount": 100,
"currency": "EUR",
"customer_id": "sakilcust",
"email": "[email protected]",
"phone": "999999999",
"phone_country_code": "+65",
"description": "Its my first payout request",
"payout_type": "bank",
"priority": "instant",
"payout_method_data": {
"bank": {
"iban": "DE89370400440532013000"
}
},
"billing": {
"address": {
"line1": "Raadhuisplein",
"line2": "92",
"city": "Hoogeveen",
"state": "FL",
"zip": "7901 BW",
"country": "NL",
"first_name": "John",
"last_name": "Doe"
},
"phone": {
"number": "0650242319",
"country_code": "+31"
}
},
"entity_type": "Individual",
"recurring": true,
"confirm": true,
"auto_fulfill": true
}
```
- You should receive webhook for the following payout to the endpoint mentioned during merchant creation
Case 2:
- Setup `ngrok` to intercept webhook
- Create a payout (same body as above)
- delete the `payout_attempt` from the payout_attempt table against the generated `payout_id`
- See the log in ngrok for response sent to the adyenplatform
- The status should be 200 with `x-http-code` present in headers
## 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: refactor(core): add error handling wrapper to wehbook
- Merged: 2024-11-27T18:14:17Z
- Files changed: 12 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 -->
In webhook, for specific connectors, we want to consume every webhook that arrives even if a error occurs while processing. This is done to keep the webhook channel open with the connector.
In this pr, a error wrapper is introduced to handle
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** refactor(core): add error handling wrapper to wehbook (#6686)
Files to modify:
**crates/api_models/src/connector_enums.rs**
Add:
- function: pub::should_acknowledge_webhook_for_resource_not_found_errors
**crates/hyperswitch_connectors/src/connectors/cashtocode.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/worldline.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/zen.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/zsl.rs**
Modify existing code
**crates/hyperswitch_interfaces/src/webhooks.rs**
Add:
- function: private::from
- enum: pub::IncomingWebhookFlowError
- impl: impl From<&ApiErrorResponse> for IncomingWebhookFlowError
**crates/router/src/connector/adyen.rs**
Modify existing code
**crates/router/src/connector/adyenplatform.rs**
Add:
- function: private::get_webhook_api_response
**crates/router/src/connector/braintree.rs**
Modify existing code
**crates/router/src/core/webhooks/incoming.rs**
Modify existing code
**crates/router/src/core/webhooks/incoming_v2.rs**
Modify existing code
**crates/router/src/services/connector_integration_interface.rs**
Modify existing code
|
{"issue_number": 6636, "pr_number": 6686, "commits_count": 1, "files_changed": 12, "response_length": 2008, "file_count": 14, "needs_breakdown": false}
|
[FEATURE] Add support for SMTP email server
### Feature Description
Add support for sending emails with a custom SMTP server. (Currently only AWS SES is supported)
### Possible Implementation
Could be implemented using `lettre` crate.
Steps to implement:
- Create the email building and sending logic
- Impl the EmailClient trait
- Add a new arm to the match statement in `create_email_client()` function
### 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(email): Add SMTP support to allow mails through self hosted/custom SMTP server
- Merged: 2024-11-20T14:48:30Z
- Files changed: 11 files
- Commits: 8 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 SMTP support to allow mails through self-hosted/custom SMTP server
#5156
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(email): Add SMTP support to allow mails through self hosted/custom SMTP server (#6617)
Co-autho
Files to modify:
**crates/external_services/src/email.rs**
Remove:
- enum: pub::AvailableEmailClients
Add:
- enum: pub::EmailClientConfigs
- mod: pub::smtp
- mod: pub::no_email
**crates/external_services/src/email/no_email.rs**
Add:
- function: pub::create
- function: private::convert_to_rich_text
- function: private::send_email
- struct: pub::NoEmailClient
- impl: impl NoEmailClient
- impl: impl EmailClient for NoEmailClient
**crates/external_services/src/email/ses.rs**
Add:
- function: pub::validate
- impl: impl SESConfig
**crates/external_services/src/email/smtp.rs**
Add:
- function: pub::create_client
- function: pub::create
- function: private::to_mail_box
- function: pub::validate
- function: private::convert_to_rich_text
- function: private::send_email
- struct: pub::SmtpServer
- struct: pub::SmtpServerConfig
- enum: pub::SmtpConnection
- enum: pub::SmtpError
- impl: impl SmtpServer
- impl: impl SmtpServerConfig
- impl: impl EmailClient for SmtpServer
**crates/router/src/configs/settings.rs**
Modify existing code
**crates/router/src/routes/app.rs**
Modify existing code
|
{"issue_number": 5156, "pr_number": 6617, "commits_count": 1, "files_changed": 11, "response_length": 2131, "file_count": 8, "needs_breakdown": false}
|
refactor: Add OLAP feature for replica database
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
## Description
<!-- Describe your changes in detail -->
### Additional Changes
- [ ] This PR modifies the database schema
- [x] This PR modifies application configuration/environment variables
<!-- Provide links to the files with corresponding changes -->
## Motivation and Context
Added a feature called OLAP which enables us to add read replica database in the application and use it wherever we want
## How did you test it?
Run `cargo r --features olap` and check if it can create a connection to read replica database
## 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 payments update-intent API for v2
- Merged: 2024-12-09T07:45:58Z
- Files changed: 23 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
<!-- Describe your changes in detail -->
Added `update-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
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** feat(core): Add payments update-intent API for v2 (#6490)
Co-authored-by: hyperswitch-bot[bot] <1485
Files to modify:
**crates/api_models/src/payments.rs**
Add:
- function: pub::order_amount
- function: pub::currency
- function: pub::shipping_cost
- function: pub::order_tax_amount
- function: pub::skip_external_tax_calculation
- function: pub::skip_surcharge_calculation
- function: pub::surcharge_amount
- function: pub::tax_on_surcharge
- struct: pub::PaymentsUpdateIntentRequest
- struct: pub::AmountDetailsUpdate
- impl: impl AmountDetailsUpdate
**crates/common_enums/src/enums.rs**
Add:
- function: private::from
- function: pub::as_bool
- function: private::from
- function: pub::as_bool
- impl: impl From<Option<bool>> for TaxCalculationOverride
- impl: impl TaxCalculationOverride
- impl: impl From<Option<bool>> for SurchargeCalculationOverride
- impl: impl SurchargeCalculationOverride
**crates/diesel_models/src/kv.rs**
Add:
- struct: pub::PaymentIntentUpdateMems
**crates/diesel_models/src/payment_intent.rs**
Remove:
- function: pub::apply_changeset
- function: private::from
- enum: pub::PaymentIntentUpdate
- impl: impl PaymentIntentUpdate
- impl: impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal
**crates/hyperswitch_domain_models/src/lib.rs**
Remove:
- function: private::from
- function: private::from
- impl: impl From<common_enums::SurchargeCalculationOverride> for payments::SurchargeCalculationOverride
- impl: impl From<common_enums::TaxCalculationOverride> for payments::TaxCalculationOverride
**crates/hyperswitch_domain_models/src/payments.rs**
Remove:
- function: private::from
- function: private::from
- enum: pub::TaxCalculationOverride
- enum: pub::SurchargeCalculationOverride
- impl: impl From<Option<bool>> for TaxCalculationOverride
- impl: impl From<Option<bool>> for SurchargeCalculationOverride
**crates/hyperswitch_domain_models/src/payments/payment_intent.rs**
Remove:
- struct: pub::PaymentIntentUpdateInternal
**crates/hyperswitch_domain_models/src/router_flow_types/payments.rs**
Add:
- struct: pub::PaymentUpdateIntent
**crates/openapi/src/openapi_v2.rs**
Modify existing code
**crates/openapi/src/routes/payments.rs**
Add:
- function: pub::payments_update_intent
**crates/router/src/core/payments.rs**
Modify existing code
**crates/router/src/core/payments/operations.rs**
Add:
- mod: pub::payment_update_intent
**crates/router/src/core/payments/operations/payment_update_intent.rs**
Add:
- function: private::validate_status_for_operation
- 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::perform_routing
- function: private::guard_payment_against_blocklist
- struct: pub::PaymentUpdateIntent
- impl: impl ValidateStatusForOperation for PaymentUpdateIntent
- impl: impl Operation<F, PaymentsUpdateIntentRequest> for &PaymentUpdateIntent
- impl: impl Operation<F, PaymentsUpdateIntentRequest> for PaymentUpdateIntent
- impl: impl GetTracker<F, payments::PaymentIntentData<F>, PaymentsUpdateIntentRequest> for PaymentUpdateIntent
- impl: impl UpdateTracker<F, payments::PaymentIntentData<F>, PaymentsUpdateIntentRequest> for PaymentUpdateIntent
- impl: impl ValidateRequest<F, PaymentsUpdateIntentRequest, payments::PaymentIntentData<F>> for PaymentUpdateIntent
- impl: impl Domain<F, PaymentsUpdateIntentRequest, payments::PaymentIntentData<F>> for PaymentUpdateIntent
**crates/router/src/core/payments/transformers.rs**
Remove:
- function: private::foreign_from
- function: private::foreign_from
- function: private::foreign_from
- function: private::foreign_from
- impl: impl ForeignFrom<common_enums::TaxCalculationOverride> for hyperswitch_domain_models::payments::TaxCalculationOverride
- impl: impl ForeignFrom<hyperswitch_domain_models::payments::TaxCalculationOverride> for common_enums::TaxCalculationOverride
- impl: impl ForeignFrom<common_enums::SurchargeCalculationOverride> for hyperswitch_domain_models::payments::SurchargeCalculationOverride
- impl: impl ForeignFrom<hyperswitch_domain_models::payments::SurchargeCalculationOverride> for common_enums::SurchargeCalculationOverride
**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**
Modify existing code
**crates/router/src/types/api/payments.rs**
Modify existing code
**crates/router_env/src/logger/types.rs**
Modify existing code
**crates/storage_impl/src/payments/payment_intent.rs**
Modify existing code
|
{"issue_number": 4, "pr_number": 6490, "commits_count": 1, "files_changed": 23, "response_length": 6023, "file_count": 22, "needs_breakdown": true}
|
[BUG] payment_method_type for cards is null
### Bug Description
payment_method_type is a sub category of payment_method for defining the the payment_method's type. This is useful for PMs like banks and wallets to differentiate between SEPA / BACS / ACH banks or APay / GPay wallets, and helpful in similar way for other PMs.
This field is sent in the request when the consumer is requesting for initiating a payment.
However, the consumer might not be aware of what's the type of the card (credit vs debit), that's why this field is optional for cards.
This field is expected to be populated for cards for known card BINs.
### Expected Behavior
This field should be populated for known card BINs.
### Actual Behavior
This field is empty for cards if payment_method_type was not specified in the request.
### Steps To Reproduce
Make a card payment without passing `payment_method_type`
### 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(payments): populate payment_method_type in payment_attempt for cards
- Merged: 2024-11-13T10:04:00Z
- Files changed: 3 files
- Commits: 7 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 #6512
### 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
</think>
To implement this, you'll need to modify:
**Detailed Implementation:**
**Commit 1:** fix(payments): populate payment_method_type in payment_attempt for cards (#6519)
Files to modify:
**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/transformers.rs**
Add:
- function: private::foreign_from
- impl: impl ForeignFrom<(Self, Option<&api_models::payments::AdditionalPaymentData>)> for Option<enums::PaymentMethodType>
|
{"issue_number": 6512, "pr_number": 6519, "commits_count": 1, "files_changed": 3, "response_length": 1308, "file_count": 5, "needs_breakdown": false}
|
refactor(users): Force 2FA in prod env
Currently 2FA is not forced on prod, users have ability to skip it.
For the PCI compliance, we have to force users to setup and use 2FA.
|
<think>
PR Context:
- Title: refactor(users): Force 2FA in production environment
- Merged: 2024-11-19T13:18:51Z
- Files changed: 1 files
- Commits: 2 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 PR forces users to use 2FA in production.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [x] This PR modifies application configuration/environment variables
<!--
Pr
</think>
To implement this, you'll need to modify:
(No detailed commit information available)
|
{"issue_number": 6592, "pr_number": 6596, "commits_count": 0, "files_changed": 1, "response_length": 782, "file_count": 0, "needs_breakdown": false}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.