prompt
stringlengths 83
247k
| response
stringlengths 121
36.1k
| metadata
stringlengths 314
42.3k
|
|---|---|---|
fix: consider status of payment method before filtering wallets in list pm
## 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 -->
Main pr - https://github.com/juspay/hyperswitch/pull/7004
### 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. API Request/Response Models**
- `crates/api_models/src/admin.rs`
- `crates/api_models/src/analytics.rs`
- `crates/api_models/src/api_keys.rs`
- ... and 3 more files
**2. Database Layer (Queries & Schema)**
- `crates/diesel_models/src/configs.rs`
- `crates/diesel_models/src/lib.rs`
- `crates/diesel_models/src/organization.rs`
**3. Domain Models (Business Logic Types)**
- `crates/hyperswitch_domain_models/src/merchant_account.rs`
**4. Core Business Logic**
- `crates/router/src/core/admin.rs`
- `crates/router/src/core/payment_methods/cards.rs`
- `crates/router/src/core/payments.rs`
- ... and 3 more files
**5. External Connector Integration**
- `crates/hyperswitch_connectors/src/connectors/nexinets/transformers.rs`
- `crates/hyperswitch_connectors/src/connectors/razorpay/transformers.rs`
- `crates/hyperswitch_connectors/src/connectors/tsys/transformers.rs`
- ... and 5 more files
**6. Type Definitions**
- `crates/common_utils/src/types.rs`
- `crates/common_utils/src/types/keymanager.rs`
- `crates/euclid/src/dssa/types.rs`
- ... and 1 more files
**7. Utils**
- `crates/common_utils/src/custom_serde.rs`
**8. Other**
- `crates/common_enums/src/transformers.rs`
- `crates/euclid/src/frontend/ast/lowering.rs`
- `crates/euclid/src/frontend/ast/parser.rs`
- ... and 23 more files
**Code Patterns Applied:**
- Implement new functions (1 changes)
- Extend existing types with new fields (1 changes)
**Detailed Identifier Changes:**
Commit 57c6caad:
Files to modify:
**crates/api_models/src/admin.rs**
Modify existing code
**crates/api_models/src/analytics.rs**
Modify existing code
**crates/api_models/src/api_keys.rs**
Remove:
- impl: impl serde::de::Visitor<'de> for NeverVisitor
Add:
- impl: impl serde::de::Visitor<'_> for NeverVisitor
**crates/api_models/src/enums.rs**
Modify existing code
**crates/api_models/src/payments.rs**
Modify existing code
**crates/api_models/src/pm_auth.rs**
Modify existing code
**crates/common_enums/src/transformers.rs**
Modify existing code
**crates/common_utils/src/custom_serde.rs**
Modify existing code
**crates/common_utils/src/types.rs**
Remove:
- impl: impl Visitor<'de> for ClientSecretVisitor
Add:
- impl: impl Visitor<'_> for ClientSecretVisitor
**crates/common_utils/src/types/keymanager.rs**
Modify existing code
**crates/diesel_models/src/configs.rs**
Modify existing code
**crates/diesel_models/src/lib.rs**
Modify existing code
**crates/diesel_models/src/organization.rs**
Modify existing code
**crates/euclid/src/dssa/types.rs**
Remove:
- impl: impl CtxValueKind<'a>
Add:
- impl: impl CtxValueKind<'_>
**crates/euclid/src/frontend/ast/lowering.rs**
Modify existing code
**crates/euclid/src/frontend/ast/parser.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/nexinets/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/razorpay/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/tsys/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/utils.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/merchant_account.rs**
Modify existing code
**crates/hyperswitch_interfaces/src/secrets_interface.rs**
Modify existing code
**crates/masking/src/diesel.rs**
Remove:
- impl: impl AsExpression<T> for &'expr Secret<S, I>
Add:
- impl: impl AsExpression<T> for &Secret<S, I>
**crates/masking/src/maskable.rs**
Modify existing code
**crates/masking/src/serde.rs**
Modify existing code
**crates/router/src/connector/adyen/transformers.rs**
Remove:
- impl: impl TryFrom<(&domain::BankDebitData, &types::PaymentsAuthorizeRouterData)> for AdyenPaymentMethod<'a>
- impl: impl TryFrom<(&domain::VoucherData, &types::PaymentsAuthorizeRouterData)> for AdyenPaymentMethod<'a>
- impl: impl TryFrom<(&domain::WalletData, &types::PaymentsAuthorizeRouterData)> for AdyenPaymentMethod<'a>
Add:
- impl: impl TryFrom<(&domain::BankDebitData, &types::PaymentsAuthorizeRouterData)> for AdyenPaymentMethod<'_>
- impl: impl TryFrom<(&domain::VoucherData, &types::PaymentsAuthorizeRouterData)> for AdyenPaymentMethod<'_>
**crates/router/src/connector/braintree/transformers.rs**
Modify existing code
**crates/router/src/connector/signifyd/transformers/api.rs**
Modify existing code
**crates/router/src/connector/utils.rs**
Modify existing code
**crates/router/src/core/admin.rs**
Modify existing code
**crates/router/src/core/payment_methods/cards.rs**
Modify existing code
**crates/router/src/core/payments.rs**
Modify existing code
**crates/router/src/core/routing.rs**
Modify existing code
**crates/router/src/core/routing/helpers.rs**
Remove:
- impl: impl RoutingAlgorithmHelpers<'h>
Add:
- impl: impl RoutingAlgorithmHelpers<'_>
**crates/router/src/core/user.rs**
Modify existing code
**crates/router/src/routes/payments.rs**
Modify existing code
**crates/router/src/services/kafka.rs**
Modify existing code
**crates/router/src/services/kafka/authentication.rs**
Remove:
- impl: impl super::KafkaMessage for KafkaAuthentication<'a>
Add:
- impl: impl super::KafkaMessage for KafkaAuthentication<'_>
**crates/router/src/services/kafka/authentication_event.rs**
Remove:
- impl: impl super::KafkaMessage for KafkaAuthenticationEvent<'a>
Add:
- impl: impl super::KafkaMessage for KafkaAuthenticationEvent<'_>
**crates/router/src/services/kafka/dispute.rs**
Remove:
- impl: impl super::KafkaMessage for KafkaDispute<'a>
Add:
- impl: impl super::KafkaMessage for KafkaDispute<'_>
**crates/router/src/services/kafka/dispute_event.rs**
Remove:
- impl: impl super::KafkaMessage for KafkaDisputeEvent<'a>
Add:
- impl: impl super::KafkaMessage for KafkaDisputeEvent<'_>
**crates/router/src/services/kafka/fraud_check.rs**
Remove:
- impl: impl super::KafkaMessage for KafkaFraudCheck<'a>
Add:
- impl: impl super::KafkaMessage for KafkaFraudCheck<'_>
**crates/router/src/services/kafka/fraud_check_event.rs**
Remove:
- impl: impl super::KafkaMessage for KafkaFraudCheckEvent<'a>
Add:
- impl: impl super::KafkaMessage for KafkaFraudCheckEvent<'_>
**crates/router/src/services/kafka/payment_attempt.rs**
Remove:
- impl: impl super::KafkaMessage for KafkaPaymentAttempt<'a>
Add:
- impl: impl super::KafkaMessage for KafkaPaymentAttempt<'_>
**crates/router/src/services/kafka/payment_attempt_event.rs**
Remove:
- impl: impl super::KafkaMessage for KafkaPaymentAttemptEvent<'a>
Add:
- impl: impl super::KafkaMessage for KafkaPaymentAttemptEvent<'_>
**crates/router/src/services/kafka/payment_intent.rs**
Remove:
- impl: impl super::KafkaMessage for KafkaPaymentIntent<'a>
Add:
- impl: impl super::KafkaMessage for KafkaPaymentIntent<'_>
**crates/router/src/services/kafka/payment_intent_event.rs**
Remove:
- impl: impl super::KafkaMessage for KafkaPaymentIntentEvent<'a>
Add:
- impl: impl super::KafkaMessage for KafkaPaymentIntentEvent<'_>
**crates/router/src/services/kafka/payout.rs**
Remove:
- impl: impl super::KafkaMessage for KafkaPayout<'a>
Add:
- impl: impl super::KafkaMessage for KafkaPayout<'_>
**crates/router/src/services/kafka/refund.rs**
Remove:
- impl: impl super::KafkaMessage for KafkaRefund<'a>
Add:
- impl: impl super::KafkaMessage for KafkaRefund<'_>
**crates/router/src/services/kafka/refund_event.rs**
Remove:
- impl: impl super::KafkaMessage for KafkaRefundEvent<'a>
Add:
- impl: impl super::KafkaMessage for KafkaRefundEvent<'_>
**crates/router/src/types/transformers.rs**
Modify existing code
**crates/router_derive/src/lib.rs**
Modify existing code
**crates/router_env/src/logger/formatter.rs**
Modify existing code
**crates/storage_impl/src/redis/cache.rs**
Remove:
- impl: impl TryFrom<RedisValue> for CacheRedact<'a>
Add:
- impl: impl TryFrom<RedisValue> for CacheRedact<'_>
**crates/storage_impl/src/redis/kv_store.rs**
Modify existing code
|
{"pr_number": 7007, "pr_title": "fix: consider status of payment method before filtering wallets in list pm", "merged_at": "2025-01-09T10:40:44Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"api_models": ["crates/api_models/src/admin.rs", "crates/api_models/src/analytics.rs", "crates/api_models/src/api_keys.rs", "crates/api_models/src/enums.rs", "crates/api_models/src/payments.rs", "crates/api_models/src/pm_auth.rs"], "database": ["crates/diesel_models/src/configs.rs", "crates/diesel_models/src/lib.rs", "crates/diesel_models/src/organization.rs"], "domain": ["crates/hyperswitch_domain_models/src/merchant_account.rs"], "core_business": ["crates/router/src/core/admin.rs", "crates/router/src/core/payment_methods/cards.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/routing.rs", "crates/router/src/core/routing/helpers.rs", "crates/router/src/core/user.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/nexinets/transformers.rs", "crates/hyperswitch_connectors/src/connectors/razorpay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/tsys/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/router/src/connector/adyen/transformers.rs", "crates/router/src/connector/braintree/transformers.rs", "crates/router/src/connector/signifyd/transformers/api.rs", "crates/router/src/connector/utils.rs"], "types": ["crates/common_utils/src/types.rs", "crates/common_utils/src/types/keymanager.rs", "crates/euclid/src/dssa/types.rs", "crates/router/src/types/transformers.rs"], "utils": ["crates/common_utils/src/custom_serde.rs"], "other": ["crates/common_enums/src/transformers.rs", "crates/euclid/src/frontend/ast/lowering.rs", "crates/euclid/src/frontend/ast/parser.rs", "crates/hyperswitch_interfaces/src/secrets_interface.rs", "crates/masking/src/diesel.rs", "crates/masking/src/maskable.rs", "crates/masking/src/serde.rs", "crates/router/src/routes/payments.rs", "crates/router/src/services/kafka.rs", "crates/router/src/services/kafka/authentication.rs", "crates/router/src/services/kafka/authentication_event.rs", "crates/router/src/services/kafka/dispute.rs", "crates/router/src/services/kafka/dispute_event.rs", "crates/router/src/services/kafka/fraud_check.rs", "crates/router/src/services/kafka/fraud_check_event.rs", "crates/router/src/services/kafka/payment_attempt.rs", "crates/router/src/services/kafka/payment_attempt_event.rs", "crates/router/src/services/kafka/payment_intent.rs", "crates/router/src/services/kafka/payment_intent_event.rs", "crates/router/src/services/kafka/payout.rs", "crates/router/src/services/kafka/refund.rs", "crates/router/src/services/kafka/refund_event.rs", "crates/router_derive/src/lib.rs", "crates/router_env/src/logger/formatter.rs", "crates/storage_impl/src/redis/cache.rs", "crates/storage_impl/src/redis/kv_store.rs"]}, "change_types": {"functions_added": 1, "fields_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(connector): [Peach Payments] add network token support for connector
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
add network token support for peach payments connector
hotfix for - #9754
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->
## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless it is an obvious bug or documentation fix
that will have little conversation).
-->
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
- Create MCA for peach payments
- Enable network tokenization for profile
```
curl --location 'http://localhost:8080/account/merchant_id/business_profile/prof_id' \
--header 'Content-Type: application/json' \
--header 'api-key: api key' \
--data '{
"profile_name": "US_default",
"is_network_tokenization_enabled": true
}'
```
- Create payment
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_CNdykrXQ50vzfqwZtbakrK0awo6TkkdQHDXv0QnpB8tA05z3sVIKLAEUGqIEXWE8' \
--data-raw '
{
"amount": 200,
"currency": "EUR",
"confirm": true,
"capture_method": "manual",
"capture_on": "2022-09-10T10:11:12Z",
"customer_id": "<customer_id>",
"email": "guest@example.com",
"name": "John Doe",
"phone": "999999999",
"phone_country_code": "+65",
"description": "Its my first payment request",
"authentication_type": "no_three_ds",
"return_url": "https://google.com",
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "card_number",
"card_exp_month": "12",
"card_exp_year": "2026",
"card_holder_name": "joseph Doe",
"card_cvc": "123",
"card_network": "VISA"
}
},
"setup_future_usage": "on_session",
"customer_acceptance": {
"acceptance_type": "offline",
"accepted_at": "1963-05-03T04:07:52.723Z",
"online": {
"ip_address": "in sit",
"user_agent": "amet irure esse"
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "PiX",
"last_name": "ss"
}
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "John",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
}
},
"browser_info": {
"user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
"accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
"language": "nl-NL",
"color_depth": 24,
"screen_height": 723,
"screen_width": 1536,
"time_zone": 0,
"java_enabled": true,
"java_script_enabled": true,
"ip_address": "125.0.0.1"
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"metadata": {},
"order_details": [
{
"product_name": "Apple iphone 15",
"quantity": 1,
"amount": 0,
"account_name": "transaction_processing"
}
],
"profile_id": "<profile_id>"
}'
```
- Do repeat CIT [Saved Card flow]
using saved card,
payment method data sent to connector in logs should be network token data.
ps. please search for raw_connector_request
create payment-
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_CNdykrXQ50vzfqwZtbakrK0awo6TkkdQHDXv0QnpB8tA05z3sVIKLAEUGqIEXWE8' \
--data '{
"amount": 200,
"currency": "EUR",
"capture_method": "manual",
"authentication_type": "no_three_ds",
"confirm": false,
"setup_future_usage": "on_session",
"customer_id": "cu_1760091918",
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US"
}
},
"profile_id": "pro_55Ey3rupyS9BnqWKLkG3"
}'
```
confirm -
```
curl --location 'http://localhost:8080/payments/<payment_id>/confirm' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: api key' \
--data '
{
"payment_token": "payment_token",
"client_secret": "client_secret",
"browser_info": {
"user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
"accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
"language": "nl-NL",
"color_depth": 24,
"screen_height": 723,
"screen_width": 1536,
"time_zone": 0,
"java_enabled": true,
"java_script_enabled": true,
"ip_address": "125.0.0.1"
},
"payment_method": "card",
"payment_method_data":{
"card_token":{
"card_cvc": "737"
}
}
}'
```
<img width="1728" height="140" alt="Screenshot 2025-10-13 at 3 58 40 PM" src="https://github.com/user-attachments/assets/e75f7977-77cd-4022-b99f-e13ec478913a" />
<img width="952" height="576" alt="Screenshot 2025-10-13 at 4 42 39 PM" src="https://github.com/user-attachments/assets/64623865-5fbb-4152-8e48-68909809f439" />
<img width="876" height="739" alt="Screenshot 2025-10-13 at 4 42 58 PM" src="https://github.com/user-attachments/assets/69fb00b2-4183-4187-b5f5-b2b3d7b8f366" />
three test cases are failing due to incorrect assertion. this is currently on main.
How to replicate this -
in create call, confirm is set to falsem capture method to automatic, and payment method data is not sent. in create response, requires_payment_method status is given.
now in confirm api, send payment method data.
expected - Throw error saying automatic capture is not supported
current output - Trying to make a call to connector.
Can be taken up in seperate pr.
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [ ] I formatted the code `cargo +nightly fmt --all`
- [ ] I addressed lints thrown by `cargo clippy`
- [ ] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Core Business Logic**
- `crates/router/src/core/payment_methods/network_tokenization.rs`
**2. External Connector Integration**
- `crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs`
**3. Tests**
- `config/deployments/integration_test.toml`
**4. Configuration Files**
- `config/config.example.toml`
- `config/deployments/production.toml`
- `config/deployments/sandbox.toml`
- ... and 2 more files
**Code Patterns Applied:**
- Define new data structures (5 changes)
- Implement new functions (3 changes)
- Extend existing types with new fields (88 changes)
**Detailed Identifier Changes:**
Commit bc156374:
Files to modify:
**crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs**
Remove:
- struct: pub::PeachpaymentsPaymentsRequest
Add:
- function: private::from
- function: private::try_from
- function: private::try_from
- struct: pub::PeachpaymentsPaymentsCardRequest
- struct: pub::CardOnFileData
- struct: pub::EcommerceNetworkTokenPaymentOnlyTransactionData
- struct: pub::NetworkTokenDetails
- enum: pub::PeachpaymentsPaymentsRequest
- enum: pub::EcommercePaymentOnlyTransactionData
- enum: pub::CardNetworkLowercase
- impl: impl From<common_enums::CardNetwork> for CardNetworkLowercase
- impl: impl TryFrom<(
&PeachpaymentsRouterData<&PaymentsAuthorizeRouterData>,
NetworkTokenData,
)> for PeachpaymentsPaymentsRequest
- impl: impl TryFrom<(&PeachpaymentsRouterData<&PaymentsAuthorizeRouterData>, Card)> for PeachpaymentsPaymentsRequest
**crates/router/src/core/payment_methods/network_tokenization.rs**
Modify existing code
|
{"pr_number": 9814, "pr_title": "feat(connector): [Peach Payments] add network token support for connector", "merged_at": "2025-10-13T14:00:59Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payment_methods/network_tokenization.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs"], "tests": ["config/deployments/integration_test.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"]}, "change_types": {"structs_added": 5, "functions_added": 3, "enums_added": 3, "fields_added": 88}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(connector): revert [paypal, trustpay] add in feature matrix
Reverts juspay/hyperswitch#7911
|
To implement this **unknown** feature, you'll need to modify these architectural layers:
**1. External Connector Integration**
- `crates/hyperswitch_connectors/src/connectors/paypal.rs`
- `crates/hyperswitch_connectors/src/connectors/trustpay.rs`
**2. Tests**
- `config/deployments/integration_test.toml`
- `loadtest/config/development.toml`
**3. Configuration Files**
- `config/config.example.toml`
- `config/deployments/production.toml`
- `config/deployments/sandbox.toml`
- ... and 2 more files
**Code Patterns Applied:**
- Implement new functions (1 changes)
- Extend existing types with new fields (3 changes)
**Detailed Identifier Changes:**
Commit 5fd6df73:
Files to modify:
**crates/hyperswitch_connectors/src/connectors/paypal.rs**
Remove:
- function: private::get_connector_about
- function: private::get_supported_payment_methods
- function: private::get_supported_webhook_flows
- impl: impl ConnectorSpecifications for Paypal
Add:
- function: private::validate_connector_against_payment_request
- impl: impl ConnectorSpecifications for Paypal
**crates/hyperswitch_connectors/src/connectors/trustpay.rs**
Remove:
- function: private::get_connector_about
- function: private::get_supported_payment_methods
- function: private::get_supported_webhook_flows
- impl: impl ConnectorSpecifications for Trustpay
Add:
- impl: impl ConnectorSpecifications for Trustpay
|
{"pr_number": 8042, "pr_title": "feat(connector): revert [paypal, trustpay] add in feature matrix", "merged_at": "2025-05-15T13:19:51Z", "intent": {"feature_type": "unknown", "action": "unknown", "entities": []}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/paypal.rs", "crates/hyperswitch_connectors/src/connectors/trustpay.rs"], "tests": ["config/deployments/integration_test.toml", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"]}, "change_types": {"functions_added": 1, "fields_added": 3, "imports_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
fix(payments_list): skip count query if no filters and add logging
## 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 query.
### 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
Closes [#6330](https://github.com/juspay/hyperswitch/issues/6330)
## How did you test it?
For Tests Lists working is same, same request and response:
```
curl --location 'http://localhost:8080/payments/list' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'x-api-key: dev_VWtyXkyK1Ath1vBNRMM4dqm18J0PVW8SiML4IsKtuzpsR5ojI0FCDBIY0ZRggpFf' \
--header 'Authorization: Bearer JWT' \
--data '{
}'
```
Response will be something like
```
{
"count": 0,
"total_count": 0,
"data": []
}
```
Log is getting printed sucessfully
`Completed count query in 292.71075m
`
Results.
After hitting some 100 concurrent request for a very large dataset, we can clearly see without count query api is taking less time, and there is significant diff.
WIth count query
<img width="464" alt="Screenshot 2024-10-16 at 3 59 08 AM" src="https://github.com/user-attachments/assets/7e689588-672d-4148-978d-262ef71e6f94">
Without count query
<img width="433" alt="Screenshot 2024-10-16 at 3 59 21 AM" src="https://github.com/user-attachments/assets/fb261141-b857-4a81-b4c0-3abe6fdd6a58">
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. API Request/Response Models**
- `crates/api_models/src/payments.rs`
**2. Database Layer (Queries & Schema)**
- `crates/diesel_models/src/query/payment_attempt.rs`
**3. Domain Models (Business Logic Types)**
- `crates/hyperswitch_domain_models/src/payments/payment_attempt.rs`
**4. Core Business Logic**
- `crates/router/src/core/payments.rs`
**5. Other**
- `crates/router/src/db/kafka_store.rs`
- `crates/router/src/routes/metrics.rs`
- `crates/router/src/routes/payments.rs`
- ... and 2 more files
**Code Patterns Applied:**
- Implement new functions (1 changes)
- Extend existing types with new fields (1 changes)
- Modify database queries (2 changes)
**Detailed Identifier Changes:**
Commit df2501ce:
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
|
{"pr_number": 6331, "pr_title": "fix(payments_list): skip count query if no filters and add logging", "merged_at": "2024-10-17T10:51:43Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs"], "database": ["crates/diesel_models/src/query/payment_attempt.rs"], "domain": ["crates/hyperswitch_domain_models/src/payments/payment_attempt.rs"], "core_business": ["crates/router/src/core/payments.rs"], "other": ["crates/router/src/db/kafka_store.rs", "crates/router/src/routes/metrics.rs", "crates/router/src/routes/payments.rs", "crates/storage_impl/src/mock_db/payment_attempt.rs", "crates/storage_impl/src/payments/payment_attempt.rs"]}, "change_types": {"functions_added": 1, "fields_added": 1, "database_queries": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(connector): [DATATRANS] Add Support for External 3DS
## 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 External 3DS
### 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
## 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)?
-->
Not able to test it on Local. Testing will be on integ.
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. External Connector Integration**
- `crates/common_enums/src/connector_enums.rs`
- `crates/hyperswitch_connectors/src/connectors/datatrans.rs`
- `crates/hyperswitch_connectors/src/connectors/datatrans/transformers.rs`
**Code Patterns Applied:**
- Define new data structures (1 changes)
- Extend existing types with new fields (14 changes)
- Add conditional logic for feature flags or filtering (2 changes)
**Detailed Identifier Changes:**
Commit 45882bdb:
Files to modify:
**crates/common_enums/src/connector_enums.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/datatrans.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/datatrans/transformers.rs**
Add:
- struct: pub::ThreeDSData
- enum: pub::ThreeDSecureData
|
{"pr_number": 7226, "pr_title": "feat(connector): [DATATRANS] Add Support for External 3DS ", "merged_at": "2025-02-09T22:18:48Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"connectors": ["crates/common_enums/src/connector_enums.rs", "crates/hyperswitch_connectors/src/connectors/datatrans.rs", "crates/hyperswitch_connectors/src/connectors/datatrans/transformers.rs"]}, "change_types": {"structs_added": 1, "enums_added": 1, "fields_added": 14, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(connector): [barclaycard] Implement 3DS flow for cards
## 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 3DS flow for cards.
### 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)?
-->
Payments Create
<details>
<summary> Request</summary>
```
{
"amount": 6540,
"currency": "USD",
"confirm": true,
"capture_method": "automatic",
"connector":["barclaycard"],
"customer_id": "customer_123",
"email": "guest@example.com",
"description": "Its my first payment request",
"authentication_type": "three_ds",
"return_url": "https://duck.com",
"payment_method": "card",
"payment_method_data": {
"card": {
"card_number": "4000000000001091",
"card_exp_month": "01",
"card_exp_year": "2027",
"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": "US",
"first_name": "John",
"last_name": "Doe"
}
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "John"
}
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"browser_info": {
"user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
"accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
"language": "nl-NL",
"color_depth": 24,
"screen_height": 723,
"screen_width": 1536,
"time_zone": 0,
"java_enabled": true,
"java_script_enabled": true,
"ip_address": "128.0.0.1"
}
}
```
</details>
<details>
<summary> Response </summary>
```
{
"payment_id": "pay_5hNPtnaAhcQtSJRJPu2f",
"merchant_id": "merchant_1755068373",
"status": "requires_customer_action",
"amount": 6540,
"net_amount": 6540,
"shipping_cost": null,
"amount_capturable": 6540,
"amount_received": null,
"connector": "barclaycard",
"client_secret": "pay_5hNPtnaAhcQtSJRJPu2f_secret_ZHbfJrVKRWAVtOaindOz",
"created": "2025-08-13T07:00:03.840Z",
"currency": "USD",
"customer_id": "customer_123",
"customer": {
"id": "customer_123",
"name": null,
"email": "guest@example.com",
"phone": null,
"phone_country_code": null
},
"description": "Its my first payment request",
"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": "1091",
"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": "2027",
"card_holder_name": "joseph Doe",
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": "token_qY543nleGWdZmdwjqp5J",
"shipping": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "PiX",
"last_name": null,
"origin_zip": null
},
"phone": null,
"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",
"origin_zip": null
},
"phone": null,
"email": null
},
"order_details": null,
"email": "guest@example.com",
"name": null,
"phone": null,
"return_url": "https://duck.com/",
"authentication_type": "three_ds",
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"next_action": {
"type": "redirect_to_url",
"redirect_to_url": "http://localhost:8080/payments/redirect/pay_5hNPtnaAhcQtSJRJPu2f/merchant_1755068373/pay_5hNPtnaAhcQtSJRJPu2f_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": "customer_123",
"created_at": 1755068403,
"expires": 1755072003,
"secret": "epk_6e9902b6971c475c9e2ce103d8eb21f9"
},
"manual_retry_allowed": null,
"connector_transaction_id": null,
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": "pay_5hNPtnaAhcQtSJRJPu2f_1",
"payment_link": null,
"profile_id": "pro_GGDcCtQm3esdj2E8IQtN",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_nCQxbxIhRsZJkWHCReZx",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-08-13T07:15:03.839Z",
"fingerprint": null,
"browser_info": {
"language": "nl-NL",
"time_zone": 0,
"ip_address": "128.0.0.1",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
"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_channel": null,
"payment_method_id": null,
"network_transaction_id": null,
"payment_method_status": null,
"updated": "2025-08-13T07:00:08.368Z",
"split_payments": null,
"frm_metadata": null,
"extended_authorization_applied": null,
"capture_before": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": null,
"card_discovery": "manual",
"force_3ds_challenge": false,
"force_3ds_challenge_trigger": false,
"issuer_error_code": null,
"issuer_error_message": null,
"is_iframe_redirection_enabled": null,
"enable_partial_authorization": null
}
```
<img width="1499" height="1041" alt="Screenshot 2025-08-13 at 12 30 57 PM" src="https://github.com/user-attachments/assets/3573e2fd-1246-4736-8115-8faae9e6c31f" />
<img width="1728" height="1041" alt="Screenshot 2025-08-13 at 12 31 12 PM" src="https://github.com/user-attachments/assets/16a22afc-a705-415e-b5ce-132d3454f07e" />
</details>
Psync call
<details>
<summary> Response </summary>
<img width="1080" height="944" alt="Screenshot 2025-08-13 at 12 42 07 PM" src="https://github.com/user-attachments/assets/f1f5b191-b5a3-41c2-a1ad-e1c2f95d8209" />
</details>
Manual Capture
<details>
<summary> Request </summary>
<img width="1258" height="920" alt="Screenshot 2025-08-14 at 3 22 49 PM" src="https://github.com/user-attachments/assets/8d9f27b0-7cfc-4b42-a3bd-2d5296d93dda" />
</details>
<details>
<summary> Response </summary>
<img width="1722" height="944" alt="Screenshot 2025-08-14 at 3 22 19 PM" src="https://github.com/user-attachments/assets/e554e550-23b4-48d1-8093-2a6b48103fcb" />
<img width="1258" height="948" alt="Screenshot 2025-08-14 at 3 24 05 PM" src="https://github.com/user-attachments/assets/dc4a1e17-7456-43f9-8add-d2c0a18729c1" />
</details>
Void
<details>
<summary> Response </summary>
```
{
"payment_id": "pay_ZRt7ZPKq81NKO3OBSPSN",
"merchant_id": "merchant_1755164596",
"status": "cancelled",
"amount": 6544,
"net_amount": 6544,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": null,
"connector": "barclaycard",
"client_secret": "pay_ZRt7ZPKq81NKO3OBSPSN_secret_5VRKkOWWHuv1NkFvZ7yy",
"created": "2025-08-14T09:43:40.392Z",
"currency": "USD",
"customer_id": "customer_123",
"customer": {
"id": "customer_123",
"name": null,
"email": "guest@example.com",
"phone": null,
"phone_country_code": null
},
"description": "Its my first payment request",
"refunds": null,
"disputes": null,
"mandate_id": null,
"mandate_data": null,
"setup_future_usage": null,
"off_session": null,
"capture_on": null,
"capture_method": "manual",
"payment_method": "card",
"payment_method_data": {
"card": {
"last4": "1091",
"card_type": null,
"card_network": null,
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "400000",
"card_extended_bin": null,
"card_exp_month": "01",
"card_exp_year": "2027",
"card_holder_name": "joseph Doe",
"payment_checks": {
"avs_response": {
"code": "Y",
"codeRaw": "Y"
},
"card_verification": {
"resultCode": "M",
"resultCodeRaw": "M"
}
},
"authentication_data": null
},
"billing": null
},
"payment_token": "token_IF0cVtMJuLBwgtZ2NxC9",
"shipping": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "PiX",
"last_name": null,
"origin_zip": null
},
"phone": null,
"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",
"origin_zip": null
},
"phone": null,
"email": null
},
"order_details": null,
"email": "guest@example.com",
"name": null,
"phone": null,
"return_url": "https://duck.com/",
"authentication_type": "three_ds",
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"next_action": null,
"cancellation_reason": "mistake",
"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": "7551647749496875004805",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": "pay_ZRt7ZPKq81NKO3OBSPSN_1",
"payment_link": null,
"profile_id": "pro_ZrxucPy12jJRn5yqlneZ",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_ULnoz4qQLpwBwBozYvIr",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-08-14T09:58:40.390Z",
"fingerprint": null,
"browser_info": {
"language": "nl-NL",
"time_zone": 0,
"ip_address": "128.0.0.1",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
"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_channel": null,
"payment_method_id": null,
"network_transaction_id": null,
"payment_method_status": null,
"updated": "2025-08-14T09:46:15.320Z",
"split_payments": null,
"frm_metadata": null,
"extended_authorization_applied": null,
"capture_before": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": null,
"card_discovery": "manual",
"force_3ds_challenge": false,
"force_3ds_challenge_trigger": false,
"issuer_error_code": null,
"issuer_error_message": null,
"is_iframe_redirection_enabled": null,
"whole_connector_response": null,
"enable_partial_authorization": null
}
```
</details>
---
<details>
<summary>Refund </summary>
<img width="1258" height="948" alt="Screenshot 2025-08-14 at 3 38 09 PM" src="https://github.com/user-attachments/assets/3183c7c9-ee8b-4aeb-984e-8afb08ecaadb" />
</details>
<details>
<summary> RSync </summary>
<img width="1258" height="948" alt="Screenshot 2025-08-14 at 3 39 51 PM" src="https://github.com/user-attachments/assets/ca40eb52-a429-4407-bfcc-bb27536c7e3f" />
</details>
---
<details>
<summary> Cypress test </summary>
<img width="752" height="948" alt="Screenshot 2025-08-20 at 6 33 35 PM" src="https://github.com/user-attachments/assets/5769ae8e-0170-46a7-a5c1-b968b844d33a" />
Some tests are failing because of redirection timeout:
<img width="1003" height="135" alt="Screenshot 2025-08-20 at 6 34 11 PM" src="https://github.com/user-attachments/assets/d7881cd5-43c9-4f70-bb65-719b8e9cdd76" />
</details>
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Database Layer (Queries & Schema)**
- `crates/diesel_models/src/payment_attempt.rs`
**2. Domain Models (Business Logic Types)**
- `crates/hyperswitch_domain_models/src/router_response_types.rs`
**3. Core Business Logic**
- `crates/router/src/core/payments.rs`
**4. External Connector Integration**
- `crates/hyperswitch_connectors/src/connectors/barclaycard.rs`
- `crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs`
- `crates/hyperswitch_connectors/src/default_implementations.rs`
- ... and 3 more files
**5. Tests**
- `config/deployments/integration_test.toml`
- `cypress-tests/cypress/e2e/configs/Payment/Barclaycard.js`
- `cypress-tests/cypress/e2e/configs/Payment/Utils.js`
- ... and 1 more files
**6. Configuration Files**
- `config/config.example.toml`
- `config/deployments/production.toml`
- `config/deployments/sandbox.toml`
- ... and 2 more files
**7. Other**
- `crates/router/src/services/api.rs`
**Code Patterns Applied:**
- Define new data structures (13 changes)
- Implement new functions (32 changes)
- Extend existing types with new fields (737 changes)
- Add conditional logic for feature flags or filtering (7 changes)
**Detailed Identifier Changes:**
Commit 19db2b5c:
Files to modify:
**crates/diesel_models/src/payment_attempt.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/barclaycard.rs**
Remove:
- struct: pub::Barclaycard
Add:
- function: pub::new
- struct: pub::Barclaycard
- impl: impl Barclaycard
- impl: impl api::PaymentsPreProcessing for Barclaycard
- impl: impl api::PaymentsCompleteAuthorize for Barclaycard
**crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs**
Add:
- function: private::try_from
- function: private::try_from
- function: private::from
- function: private::from
- function: private::from
- function: private::from
- function: private::try_from
- function: private::try_from
- function: private::extract_score_id
- function: private::try_from
- function: private::try_from
- function: private::try_from
- function: private::try_from
- function: private::from
- struct: pub::BarclaycardConsumerAuthValidateResponse
- struct: pub::BarclaycardThreeDSMetadata
- struct: pub::BarclaycardConsumerAuthInformationEnrollmentResponse
- struct: pub::ClientAuthCheckInfoResponse
- struct: pub::BarclaycardConsumerAuthInformationValidateRequest
- struct: pub::BarclaycardAuthSetupRequest
- struct: pub::BarclaycardAuthValidateRequest
- struct: pub::BarclaycardAuthEnrollmentRequest
- struct: pub::BarclaycardRedirectionAuthResponse
- struct: pub::BarclaycardConsumerAuthInformationRequest
- struct: pub::BarclaycardConsumerAuthInformationResponse
- struct: pub::ClientAuthSetupInfoResponse
- enum: pub::BarclaycardParesStatus
- enum: pub::EffectiveAuthenticationType
- enum: pub::BarclaycardAuthEnrollmentStatus
- enum: pub::BarclaycardPreProcessingResponse
- enum: pub::BarclaycardPreProcessingRequest
- enum: pub::BarclaycardAuthSetupResponse
- impl: impl TryFrom<(StringMajorUnit, T)> for BarclaycardRouterData<T>
- impl: impl TryFrom<(
&BarclaycardRouterData<&PaymentsCompleteAuthorizeRouterData>,
Option<PaymentSolution>,
Option<String>,
)> for ProcessingInformation
- impl: impl From<&BarclaycardRouterData<&PaymentsCompleteAuthorizeRouterData>> for ClientReferenceInformation
- impl: impl From<(
&BarclaycardRouterData<&PaymentsCompleteAuthorizeRouterData>,
BillTo,
)> for OrderInformationWithBill
- impl: impl From<BarclaycardAuthEnrollmentStatus> for enums::AttemptStatus
- impl: impl From<common_enums::DecoupledAuthenticationType> for EffectiveAuthenticationType
- impl: impl TryFrom<&BarclaycardRouterData<&PaymentsPreProcessingRouterData>> for BarclaycardPreProcessingRequest
- impl: impl TryFrom<
ResponseRouterData<
F,
BarclaycardPreProcessingResponse,
PaymentsPreProcessingData,
PaymentsResponseData,
>,
> for RouterData<F, PaymentsPreProcessingData, PaymentsResponseData>
- impl: impl TryFrom<&BarclaycardRouterData<&PaymentsAuthorizeRouterData>> for BarclaycardAuthSetupRequest
- impl: impl TryFrom<
ResponseRouterData<
F,
BarclaycardAuthSetupResponse,
PaymentsAuthorizeData,
PaymentsResponseData,
>,
> for RouterData<F, PaymentsAuthorizeData, PaymentsResponseData>
- impl: impl TryFrom<&BarclaycardRouterData<&PaymentsCompleteAuthorizeRouterData>> for BarclaycardPaymentsRequest
- impl: impl TryFrom<
ResponseRouterData<
F,
BarclaycardPaymentsResponse,
CompleteAuthorizeData,
PaymentsResponseData,
>,
> for RouterData<F, CompleteAuthorizeData, PaymentsResponseData>
- impl: impl From<&ClientProcessorInformation> for AdditionalPaymentMethodConnectorResponse
**crates/hyperswitch_connectors/src/default_implementations.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/router_response_types.rs**
Modify existing code
**crates/payment_methods/src/configs/payment_connector_required_fields.rs**
Modify existing code
**crates/router/src/core/payments.rs**
Modify existing code
**crates/router/src/services/api.rs**
Modify existing code
**crates/router/src/types/api/connector_mapping.rs**
Modify existing code
**crates/router/tests/connectors/barclaycard.rs**
Modify existing code
|
{"pr_number": 8936, "pr_title": "feat(connector): [barclaycard] Implement 3DS flow for cards", "merged_at": "2025-08-21T10:39:20Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"database": ["crates/diesel_models/src/payment_attempt.rs"], "domain": ["crates/hyperswitch_domain_models/src/router_response_types.rs"], "core_business": ["crates/router/src/core/payments.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/barclaycard.rs", "crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/payment_methods/src/configs/payment_connector_required_fields.rs", "crates/router/src/types/api/connector_mapping.rs", "crates/router/tests/connectors/barclaycard.rs"], "tests": ["config/deployments/integration_test.toml", "cypress-tests/cypress/e2e/configs/Payment/Barclaycard.js", "cypress-tests/cypress/e2e/configs/Payment/Utils.js", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"], "other": ["crates/router/src/services/api.rs"]}, "change_types": {"structs_added": 13, "functions_added": 32, "enums_added": 6, "fields_added": 737, "imports_added": 3, "conditionals_added": 7}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(core): Juspay 3DS Server via Payments API
## 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 -->
Added Support for External Auth( Juspay 3ds Server ) via Payments API
### 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)?
-->
Testing Video :
https://github.com/user-attachments/assets/ebd28e20-714e-466e-bc8d-d967dccb7e3a
MCA Create
```
curl --location 'http://localhost:8080/accounts' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: test_admin' \
--data-raw '{"merchant_id":"postman_merchant_GHAction_885820bf-1cb9-4d9b-8b21-c852aa85b6a4","locker_id":"m0010","merchant_name":"NewAge Retailer","merchant_details":{"primary_contact_person":"John Test","primary_email":"JohnTest@test.com","primary_phone":"sunt laborum","secondary_contact_person":"John Test2","secondary_email":"JohnTest2@test.com","secondary_phone":"cillum do dolor id","website":"www.example.com","about_business":"Online Retail with a wide selection of organic products for North America","address":{"line1":"1467","line2":"Harrison Street","line3":"Harrison Street","city":"San Fransico","state":"California","zip":"94122","country":"US"}},"return_url":"https://duck.com/success","webhook_details":{"webhook_version":"1.0.1","webhook_username":"ekart_retail","webhook_password":"password_ekart@123","payment_created_enabled":true,"payment_succeeded_enabled":true,"payment_failed_enabled":true},"sub_merchants_enabled":false,"metadata":{"city":"NY","unit":"245"},"primary_business_details":[{"country":"US","business":"default"}]}'
```
Response
```
{
"merchant_id": "postman_merchant_GHAction_951ff582-2dff-4d8f-9290-13ed9baafd21",
"merchant_name": "NewAge Retailer",
"return_url": "https://duck.com/success",
"enable_payment_response_hash": true,
"payment_response_hash_key": "XLZG7RyEJ8YdhVxEHwcjUzzY2ZtNqY5yfnYooGcqwpzPuXxnxMWVsVrHraIUsHmu",
"redirect_to_merchant_with_http_post": false,
"merchant_details": {
"primary_contact_person": "John Test",
"primary_phone": "sunt laborum",
"primary_email": "JohnTest@test.com",
"secondary_contact_person": "John Test2",
"secondary_phone": "cillum do dolor id",
"secondary_email": "JohnTest2@test.com",
"website": "www.example.com",
"about_business": "Online Retail with a wide selection of organic products for North America",
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": null,
"last_name": null,
"origin_zip": null
},
"merchant_tax_registration_id": null
},
"webhook_details": {
"webhook_version": "1.0.1",
"webhook_username": "ekart_retail",
"webhook_password": "password_ekart@123",
"webhook_url": null,
"payment_created_enabled": true,
"payment_succeeded_enabled": true,
"payment_failed_enabled": true,
"payment_statuses_enabled": null,
"refund_statuses_enabled": null,
"payout_statuses_enabled": null
},
"payout_routing_algorithm": null,
"sub_merchants_enabled": false,
"parent_merchant_id": null,
"publishable_key": "pk_dev_b4e1e1d94cb342519cd24bb733dd37d4",
"metadata": {
"city": "NY",
"unit": "245",
"compatible_connector": null
},
"locker_id": "m0010",
"primary_business_details": [
{
"country": "US",
"business": "default"
}
],
"frm_routing_algorithm": null,
"organization_id": "org_g4by1NNhhkA8dEyuYjnc",
"is_recon_enabled": false,
"default_profile": "pro_wN2DDFFq3xrWz1xU7efg",
"recon_status": "not_requested",
"pm_collect_link_config": null,
"product_type": "orchestration",
"merchant_account_type": "standard"
}
```
MCA - Cybersource
```
curl --location 'http://localhost:8080/account/postman_merchant_GHAction_951ff582-2dff-4d8f-9290-13ed9baafd21/connectors' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_g7rE9SY1JQkqi1uMGDZtsGgkN63HNZYH3PwHpe4mkQYsOIRjxPvl9dHgY5NL2nlw' \
--data '{
"connector_type": "payment_processor",
"connector_name": "cybersource",
"connector_label": "cybersourc",
"connector_account_details": {
"auth_type": "SignatureKey",
"api_secret": "=",
"api_key": "",
"key1": ""
},
"metadata": {
"acquirer_bin": "",
"acquirer_merchant_id": "",
"acquirer_country_code":""
},
"test_mode": true,
"disabled": false,
"payment_methods_enabled": [
{
"payment_method": "real_time_payment",
"payment_method_types": [
{
"payment_method_type": "duit_now",
"payment_experience": "display_qr_code",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
}
]
},
{
"payment_method": "wallet",
"payment_method_types": [
{
"payment_method_type": "google_pay",
"payment_experience": "invoke_sdk_client",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "apple_pay",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "we_chat_pay",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
}
]
},
{
"payment_method": "bank_redirect",
"payment_method_types": [
{
"payment_method_type": "online_banking_fpx",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "giropay",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "sofort",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
}
]
},
{
"payment_method": "bank_debit",
"payment_method_types": [
{
"payment_method_type": "sepa",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
}
]
},
{
"payment_method": "pay_later",
"payment_method_types": [
{
"payment_method_type": "afterpay_clearpay",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "klarna",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
}
]
},
{
"payment_method": "card",
"payment_method_types": [
{
"payment_method_type": "debit",
"payment_experience": null,
"card_networks": [
"Mastercard"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "debit",
"payment_experience": null,
"card_networks": [
"Visa"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "debit",
"payment_experience": null,
"card_networks": [
"Interac"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "debit",
"payment_experience": null,
"card_networks": [
"AmericanExpress"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "debit",
"payment_experience": null,
"card_networks": [
"JCB"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "debit",
"payment_experience": null,
"card_networks": [
"DinersClub"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "debit",
"payment_experience": null,
"card_networks": [
"Discover"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "debit",
"payment_experience": null,
"card_networks": [
"CartesBancaires"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "debit",
"payment_experience": null,
"card_networks": [
"UnionPay"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "credit",
"payment_experience": null,
"card_networks": [
"Mastercard"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "credit",
"payment_experience": null,
"card_networks": [
"Visa"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "credit",
"payment_experience": null,
"card_networks": [
"Interac"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "credit",
"payment_experience": null,
"card_networks": [
"AmericanExpress"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "credit",
"payment_experience": null,
"card_networks": [
"JCB"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "credit",
"payment_experience": null,
"card_networks": [
"DinersClub"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "credit",
"payment_experience": null,
"card_networks": [
"Discover"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "credit",
"payment_experience": null,
"card_networks": [
"CartesBancaires"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "credit",
"payment_experience": null,
"card_networks": [
"UnionPay"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
}
]
}
],
"connector_wallets_details": {
"google_pay": {
"provider_details": {
"merchant_info": {
"merchant_id": "valueTBDForProd",
"merchant_name": "Test",
"tokenization_specification": {
"type": "PAYMENT_GATEWAY",
"parameters": {
"gateway": "cybersource",
"public_key": "+",
"private_key": "+",
"recipient_id": "someRecipient"
}
}
}
},
"cards": {
"allowed_auth_methods": [
"PAN_ONLY",
"CRYPTOGRAM_3DS"
],
"allowed_card_networks": [
"AMEX",
"DISCOVER",
"INTERAC",
"JCB",
"MASTERCARD",
"VISA"
]
}
}
},
"connector_webhook_details": {
"merchant_secret": "",
"additional_secret": null
}
}'
```
Response
```
{
"connector_type": "payment_processor",
"connector_name": "cybersource",
"connector_label": "cybersource_AU_defa",
"merchant_connector_id": "mca_rdmYF3bG2r0wu8zvOxHM",
"profile_id": "pro_wN2DDFFq3xrWz1xU7efg",
"connector_account_details": {
"auth_type": "SignatureKey",
"api_key": "d0********************************4c",
"key1": "ju*************ox",
"api_secret": "rK****************************************k="
},
"payment_methods_enabled": [
{
"payment_method": "real_time_payment",
"payment_method_types": [
{
"payment_method_type": "duit_now",
"payment_experience": "display_qr_code",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
}
]
},
{
"payment_method": "wallet",
"payment_method_types": [
{
"payment_method_type": "google_pay",
"payment_experience": "invoke_sdk_client",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "apple_pay",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "we_chat_pay",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
}
]
},
{
"payment_method": "bank_redirect",
"payment_method_types": [
{
"payment_method_type": "online_banking_fpx",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "giropay",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "sofort",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
}
]
},
{
"payment_method": "bank_debit",
"payment_method_types": [
{
"payment_method_type": "sepa",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
}
]
},
{
"payment_method": "pay_later",
"payment_method_types": [
{
"payment_method_type": "afterpay_clearpay",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "klarna",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
}
]
},
{
"payment_method": "card",
"payment_method_types": [
{
"payment_method_type": "debit",
"payment_experience": null,
"card_networks": [
"Mastercard"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "debit",
"payment_experience": null,
"card_networks": [
"Visa"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "debit",
"payment_experience": null,
"card_networks": [
"Interac"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "debit",
"payment_experience": null,
"card_networks": [
"AmericanExpress"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "debit",
"payment_experience": null,
"card_networks": [
"JCB"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "debit",
"payment_experience": null,
"card_networks": [
"DinersClub"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "debit",
"payment_experience": null,
"card_networks": [
"Discover"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "debit",
"payment_experience": null,
"card_networks": [
"CartesBancaires"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "debit",
"payment_experience": null,
"card_networks": [
"UnionPay"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "credit",
"payment_experience": null,
"card_networks": [
"Mastercard"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "credit",
"payment_experience": null,
"card_networks": [
"Visa"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "credit",
"payment_experience": null,
"card_networks": [
"Interac"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "credit",
"payment_experience": null,
"card_networks": [
"AmericanExpress"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "credit",
"payment_experience": null,
"card_networks": [
"JCB"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "credit",
"payment_experience": null,
"card_networks": [
"DinersClub"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "credit",
"payment_experience": null,
"card_networks": [
"Discover"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "credit",
"payment_experience": null,
"card_networks": [
"CartesBancaires"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "credit",
"payment_experience": null,
"card_networks": [
"UnionPay"
],
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
}
]
}
],
"connector_webhook_details": {
"merchant_secret": "ee148db14b97d503ab5958e7abb5c374",
"additional_secret": null
},
"metadata": {
"acquirer_bin": "438309",
"acquirer_merchant_id": "00002000000",
"acquirer_country_code": "840"
},
"test_mode": true,
"disabled": false,
"frm_configs": null,
"business_country": null,
"business_label": null,
"business_sub_label": null,
"applepay_verified_domains": null,
"pm_auth_config": null,
"status": "active",
"additional_merchant_data": null,
"connector_wallets_details": {
"google_pay": {
"provider_details": {
"merchant_info": {
"merchant_id": "",
"merchant_name": "",
"tokenization_specification": {
"type": "PAYMENT_GATEWAY",
"parameters": {
"gateway": "cybersource",
"public_key": "+/=",
"private_key": "+",
"recipient_id": "someRecipient"
}
}
}
},
"cards": {
"allowed_auth_methods": [
"PAN_ONLY",
"CRYPTOGRAM_3DS"
],
"allowed_card_networks": [
"AMEX",
"DISCOVER",
"INTERAC",
"JCB",
"MASTERCARD",
"VISA"
]
}
}
}
}
```
MCA - Juspay 3ds Server
```
curl --location 'http://localhost:8080/account/postman_merchant_GHAction_951ff582-2dff-4d8f-9290-13ed9baafd21/connectors' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key:' \
--data '{
"connector_type": "authentication_processor",
"connector_name": "juspaythreedsserver",
"connector_account_details": {
"auth_type": "NoKey"
},
"test_mode": true,
"disabled": false,
"metadata": {
"merchant_category_code": "5411",
"merchant_country_code": "840",
"merchant_name": "Dummy Merchant",
"endpoint_prefix": "weew",
"three_ds_requestor_name": "juspay-prev",
"three_ds_requestor_id": "juspay-prev",
"pull_mechanism_for_external_3ds_enabled": true,
"acquirer_bin": "",
"acquirer_merchant_id": "",
"acquirer_country_code": "356"
}
}'
```
Response
```
{
"connector_type": "authentication_processor",
"connector_name": "juspaythreedsserver",
"connector_label": "juspaythreedsserver_US_default",
"merchant_connector_id": "mca_VwUEB4zwQCl3YiFw2r2W",
"profile_id": "pro_wN2DDFFq3xrWz1xU7efg",
"connector_account_details": {
"auth_type": "NoKey"
},
"payment_methods_enabled": null,
"connector_webhook_details": null,
"metadata": {
"acquirer_bin": "400000",
"merchant_name": "Dummy Merchant",
"endpoint_prefix": "",
"acquirer_merchant_id": "00002000000",
"acquirer_country_code": "356",
"merchant_country_code": "840",
"three_ds_requestor_id": "-prev",
"merchant_category_code": "5411",
"three_ds_requestor_name": "juspay-",
"pull_mechanism_for_external_3ds_enabled": true
},
"test_mode": true,
"disabled": false,
"frm_configs": null,
"business_country": null,
"business_label": null,
"business_sub_label": null,
"applepay_verified_domains": null,
"pm_auth_config": null,
"status": "active",
"additional_merchant_data": null,
"connector_wallets_details": null
}
```
Enable Config:
```
curl --location 'http://localhost:8080/configs/' \
--header 'Content-Type: application/json' \
--header 'api-key: test_admin' \
--data '{
"key": "merchants_eligible_for_authentication_service",
"value": "[\"postman_merchant_GHAction_951ff582-2dff-4d8f-9290-13ed9baafd21\", \"sahkal11\"]"
}'
```
Response
```
{
"key": "merchants_eligible_for_authentication_service",
"value": "[\"postman_merchant_GHAction_951ff582-2dff-4d8f-9290-13ed9baafd21\", \"sahkal11\"]"
}
```
Add Juspay 3ds as External 3DS Authenticator
```
curl --location --globoff 'localhost:8080/account/postman_merchant_GHAction_951ff582-2dff-4d8f-9290-13ed9baafd21/business_profile/{{profile_id}}' \
--header 'Content-Type: application/json' \
--header 'api-key: dev_g7rE9SY1JQkqi1uMGDZtsGgkN63HNZYH3PwHpe4mkQYsOIRjxPvl9dHgY5NL2nlw' \
--data '{
"is_click_to_pay_enabled": true,
"authentication_product_ids": {"click_to_pay": "mca_OqBRdcToAauJFZ08i9iI"},
"authentication_connector_details": {
"authentication_connectors": ["juspaythreedsserver"],
"three_ds_requestor_url": "https://google.com"
},
"merchant_country_code": "004",
"merchant_category_code": "5411"
}
'
```
Response
```
{
"merchant_id": "postman_merchant_GHAction_951ff582-2dff-4d8f-9290-13ed9baafd21",
"profile_id": "pro_wN2DDFFq3xrWz1xU7efg",
"profile_name": "US_default",
"return_url": "https://duck.com/success",
"enable_payment_response_hash": true,
"payment_response_hash_key": "XLZG7RyEJ8YdhVxEHwcjUzzY2ZtNqY5yfnYooGcqwpzPuXxnxMWVsVrHraIUsHmu",
"redirect_to_merchant_with_http_post": false,
"webhook_details": {
"webhook_version": "1.0.1",
"webhook_username": "ekart_retail",
"webhook_password": "password_ekart@123",
"webhook_url": null,
"payment_created_enabled": true,
"payment_succeeded_enabled": true,
"payment_failed_enabled": true,
"payment_statuses_enabled": null,
"refund_statuses_enabled": null,
"payout_statuses_enabled": null
},
"metadata": null,
"routing_algorithm": null,
"intent_fulfillment_time": 900,
"frm_routing_algorithm": null,
"payout_routing_algorithm": null,
"applepay_verified_domains": null,
"session_expiry": 900,
"payment_link_config": null,
"authentication_connector_details": {
"authentication_connectors": [
"juspaythreedsserver"
],
"three_ds_requestor_url": "https://google.com",
"three_ds_requestor_app_url": null
},
"use_billing_as_payment_method_billing": true,
"extended_card_info_config": null,
"collect_shipping_details_from_wallet_connector": false,
"collect_billing_details_from_wallet_connector": false,
"always_collect_shipping_details_from_wallet_connector": false,
"always_collect_billing_details_from_wallet_connector": false,
"is_connector_agnostic_mit_enabled": false,
"payout_link_config": null,
"outgoing_webhook_custom_http_headers": null,
"tax_connector_id": null,
"is_tax_connector_enabled": false,
"is_network_tokenization_enabled": false,
"is_auto_retries_enabled": false,
"max_auto_retries_enabled": null,
"always_request_extended_authorization": null,
"is_click_to_pay_enabled": true,
"authentication_product_ids": {
"click_to_pay": "mca_OqBRdcToAauJFZ08i9iI"
},
"card_testing_guard_config": {
"card_ip_blocking_status": "disabled",
"card_ip_blocking_threshold": 3,
"guest_user_card_blocking_status": "disabled",
"guest_user_card_blocking_threshold": 10,
"customer_id_blocking_status": "disabled",
"customer_id_blocking_threshold": 5,
"card_testing_guard_expiry": 3600
},
"is_clear_pan_retries_enabled": false,
"force_3ds_challenge": false,
"is_debit_routing_enabled": false,
"merchant_business_country": null,
"is_pre_network_tokenization_enabled": false,
"acquirer_configs": null,
"is_iframe_redirection_enabled": null,
"merchant_category_code": "5411",
"merchant_country_code": "004",
"dispute_polling_interval": null,
"is_manual_retry_enabled": null,
"always_enable_overcapture": null
}
```
Payments Create:
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_g7rE9SY1JQkqi1uMGDZtsGgkN63HNZYH3PwHpe4mkQYsOIRjxPvl9dHgY5NL2nlw' \
--data-raw '{
"amount": 6540,
"currency": "USD",
"confirm": true,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"amount_to_capture": 6540,
"customer_id": "BamboraCustomer",
"email": "guest@example.com",
"name": "John Doe",
"phone": "999999999",
"phone_country_code": "+1",
"description": "Its my first payment request",
"authentication_type": "three_ds",
"return_url": "https://google.com",
"request_external_three_ds_authentication":true,
"payment_method": "card",
"payment_method_type": "debit",
"browser_info": {
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"ip_address": "192.168.1.1",
"java_enabled": false,
"java_script_enabled": true,
"language": "en-US",
"color_depth": 24,
"screen_height": 1080,
"screen_width": 1920,
"time_zone": 330,
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
},
"payment_method_data": {
"card": {
"card_number": "4622943127013705",
"card_exp_month": "06",
"card_exp_year": "31",
"card_holder_name": "joseph Doe",
"card_cvc": "838"
}
},
"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": "8056594427",
"country_code": "+91"
}
},
"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"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
}
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
},
"setup_future_usage": "off_session"
}'
```
Response
```
{
"payment_id": "pay_yyRFNGg7kADdi6l0g3fj",
"merchant_id": "postman_merchant_GHAction_951ff582-2dff-4d8f-9290-13ed9baafd21",
"status": "requires_customer_action",
"amount": 6540,
"net_amount": 6540,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": null,
"connector": "cybersource",
"client_secret": "pay_yyRFNGg7kADdi6l0g3fj_secret_iYxjs9NiG6dekXkQdty9",
"created": "2025-09-17T12:40:49.467Z",
"currency": "USD",
"customer_id": "BamboraCustomer",
"customer": {
"id": "BamboraCustomer",
"name": "John Doe",
"email": "guest@example.com",
"phone": "999999999",
"phone_country_code": "+1"
},
"description": "Its my first payment request",
"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": "3705",
"card_type": null,
"card_network": null,
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "462294",
"card_extended_bin": null,
"card_exp_month": "06",
"card_exp_year": "31",
"card_holder_name": "joseph Doe",
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": "token_xIdZQPeCWkTQEXFU7zxc",
"shipping": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe",
"origin_zip": null
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"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",
"origin_zip": null
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": null
},
"order_details": null,
"email": "guest@example.com",
"name": "John Doe",
"phone": "999999999",
"return_url": "https://google.com/",
"authentication_type": "three_ds",
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"next_action": {
"type": "three_ds_invoke",
"three_ds_data": {
"three_ds_authentication_url": "http://localhost:8080/payments/pay_yyRFNGg7kADdi6l0g3fj/3ds/authentication",
"three_ds_authorize_url": "https://93a6a1e56b62.ngrok-free.app/payments/pay_yyRFNGg7kADdi6l0g3fj/postman_merchant_GHAction_951ff582-2dff-4d8f-9290-13ed9baafd21/authorize/cybersource",
"three_ds_method_details": {
"three_ds_method_key": "threeDSMethodData",
"three_ds_method_data_submission": false,
"three_ds_method_data": null,
"three_ds_method_url": null
},
"poll_config": {
"poll_id": "external_authentication_pay_yyRFNGg7kADdi6l0g3fj",
"delay_in_secs": 2,
"frequency": 5
},
"message_version": "2.2.0",
"directory_server_id": null
}
},
"cancellation_reason": null,
"error_code": null,
"error_message": null,
"unified_code": null,
"unified_message": null,
"payment_experience": null,
"payment_method_type": "debit",
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "BamboraCustomer",
"created_at": 1758112849,
"expires": 1758116449,
"secret": "epk_6f1ca90c360b4a268d0e0457c26426b9"
},
"manual_retry_allowed": null,
"connector_transaction_id": null,
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": null,
"feature_metadata": null,
"reference_id": null,
"payment_link": null,
"profile_id": "pro_wN2DDFFq3xrWz1xU7efg",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_rdmYF3bG2r0wu8zvOxHM",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": {
"authentication_flow": null,
"electronic_commerce_indicator": null,
"status": "pending",
"ds_transaction_id": "fc237cd5-09a1-45d3-ad79-215b0d9ab005",
"version": "2.2.0",
"error_code": null,
"error_message": null
},
"external_3ds_authentication_attempted": true,
"expires_on": "2025-09-17T12:55:49.467Z",
"fingerprint": null,
"browser_info": {
"language": "en-US",
"time_zone": 330,
"ip_address": "192.168.1.1",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
"color_depth": 24,
"java_enabled": false,
"screen_width": 1920,
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"screen_height": 1080,
"java_script_enabled": true
},
"payment_channel": null,
"payment_method_id": null,
"network_transaction_id": null,
"payment_method_status": null,
"updated": "2025-09-17T12:40:50.022Z",
"split_payments": null,
"frm_metadata": null,
"extended_authorization_applied": null,
"capture_before": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": null,
"card_discovery": "manual",
"force_3ds_challenge": false,
"force_3ds_challenge_trigger": false,
"issuer_error_code": null,
"issuer_error_message": null,
"is_iframe_redirection_enabled": null,
"whole_connector_response": null,
"enable_partial_authorization": null,
"enable_overcapture": null,
"is_overcapture_enabled": null,
"network_details": null
}
```
Auth Call
```
curl --location 'https://93a6a1e56b62.ngrok-free.app/payments/pay_yyRFNGg7kADdi6l0g3fj/3ds/authentication' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: pk_dev_b4e1e1d94cb342519cd24bb733dd37d4' \
--data '{
"client_secret": "pay_yyRFNGg7kADdi6l0g3fj_secret_iYxjs9NiG6dekXkQdty9",
"device_channel": "BRW",
"threeds_method_comp_ind": "N"
}'
```
Response
```
{
"trans_status": "C",
"acs_url": "https://mock-three-ds-server-small-lake-1937.fly.dev/processor/mock/acs/trigger-otp?redirectUrl=https%3A%2F%2F93a6a1e56b62.ngrok-free.app%2Fpayments%2Fpay_yyRFNGg7kADdi6l0g3fj%2Fpostman_merchant_GHAction_951ff582-2dff-4d8f-9290-13ed9baafd21%2Fauthorize%2Fcybersource",
"challenge_request": "eyJtZXNzYWdlVHlwZSI6IkNSZXEiLCJ0aHJlZURTU2VydmVyVHJhbnNJRCI6ImZjMjM3Y2Q1LTA5YTEtNDVkMy1hZDc5LTIxNWIwZDlhYjAwNSIsImFjc1RyYW5zSUQiOiIwMzZjY2EyYi02YTg2LTQ4N2UtODI1NS0zYmJlMmRiNDBiOGYiLCJjaGFsbGVuZ2VXaW5kb3dTaXplIjoiMDEiLCJtZXNzYWdlVmVyc2lvbiI6IjIuMi4wIn0=",
"acs_reference_number": "036cca2b-6a86-487e-8255-3bbe2db40b8f",
"acs_trans_id": "036cca2b-6a86-487e-8255-3bbe2db40b8f",
"three_dsserver_trans_id": "fc237cd5-09a1-45d3-ad79-215b0d9ab005",
"acs_signed_content": null,
"three_ds_requestor_url": "https://google.com",
"three_ds_requestor_app_url": null
}
```
Mock Server Call
```
curl --location 'https://mock-three-ds-server-small-lake-1937.fly.dev/processor/mock/acs/trigger-otp?redirectUrl=https%3A%2F%2F93a6a1e56b62.ngrok-free.app%2Fpayments%2Fpay_yyRFNGg7kADdi6l0g3fj%2Fpostman_merchant_GHAction_951ff582-2dff-4d8f-9290-13ed9baafd21%2Fauthorize%2Fcybersource' \
--header 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' \
--header 'accept-language: en-GB,en-US;q=0.9,en;q=0.8' \
--header 'cache-control: no-cache' \
--header 'content-type: application/x-www-form-urlencoded' \
--header 'origin: https://juspay-3ds-sdk.netlify.app' \
--header 'pragma: no-cache' \
--header 'priority: u=0, i' \
--header 'referer: https://juspay-3ds-sdk.netlify.app/' \
--header 'sec-ch-ua: "Google Chrome";v="137", "Chromium";v="137", "Not/A)Brand";v="24"' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'sec-ch-ua-platform: "macOS"' \
--header 'sec-fetch-dest: iframe' \
--header 'sec-fetch-mode: navigate' \
--header 'sec-fetch-site: cross-site' \
--header 'sec-fetch-storage-access: active' \
--header 'upgrade-insecure-requests: 1' \
--header 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36' \
--header 'api-key: dev_g7rE9SY1JQkqi1uMGDZtsGgkN63HNZYH3PwHpe4mkQYsOIRjxPvl9dHgY5NL2nlw' \
--data-urlencode 'creq={"messageType":"CReq","threeDSServerTransID":"fc237cd5-09a1-45d3-ad79-215b0d9ab005","acsTransID":"036cca2b-6a86-487e-8255-3bbe2db40b8f","challengeWindowSize":"01","messageVersion":"2.2.0"}'
```
Response
<img width="838" height="545" alt="Screenshot 2025-09-18 at 1 23 52 PM" src="https://github.com/user-attachments/assets/31760ae6-48a9-4418-908e-8e20b8913ca2" />
Psync Response
```
{
"payment_id": "pay_yyRFNGg7kADdi6l0g3fj",
"merchant_id": "postman_merchant_GHAction_951ff582-2dff-4d8f-9290-13ed9baafd21",
"status": "succeeded",
"amount": 6540,
"net_amount": 6540,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": 6540,
"connector": "cybersource",
"client_secret": "pay_yyRFNGg7kADdi6l0g3fj_secret_iYxjs9NiG6dekXkQdty9",
"created": "2025-09-17T12:40:49.467Z",
"currency": "USD",
"customer_id": "BamboraCustomer",
"customer": {
"id": "BamboraCustomer",
"name": "John Doe",
"email": "guest@example.com",
"phone": "999999999",
"phone_country_code": "+1"
},
"description": "Its my first payment request",
"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": "3705",
"card_type": null,
"card_network": null,
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "462294",
"card_extended_bin": null,
"card_exp_month": "06",
"card_exp_year": "31",
"card_holder_name": "joseph Doe",
"payment_checks": {
"avs_response": {
"code": "Y",
"codeRaw": "Y"
},
"card_verification": {
"resultCode": "M",
"resultCodeRaw": "M"
}
},
"authentication_data": null
},
"billing": null
},
"payment_token": "token_xIdZQPeCWkTQEXFU7zxc",
"shipping": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe",
"origin_zip": null
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"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",
"origin_zip": null
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": null
},
"order_details": null,
"email": "guest@example.com",
"name": "John Doe",
"phone": "999999999",
"return_url": "https://google.com/",
"authentication_type": "three_ds",
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"next_action": null,
"cancellation_reason": null,
"error_code": null,
"error_message": null,
"unified_code": null,
"unified_message": null,
"payment_experience": null,
"payment_method_type": "debit",
"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": "7581129668626524704805",
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": null,
"feature_metadata": {
"redirect_response": {
"param": "",
"json_payload": {}
},
"search_tags": null,
"apple_pay_recurring_details": null,
"gateway_system": "direct"
},
"reference_id": "pay_yyRFNGg7kADdi6l0g3fj_1",
"payment_link": null,
"profile_id": "pro_wN2DDFFq3xrWz1xU7efg",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_rdmYF3bG2r0wu8zvOxHM",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": {
"authentication_flow": "challenge",
"electronic_commerce_indicator": "02",
"status": "success",
"ds_transaction_id": "fc237cd5-09a1-45d3-ad79-215b0d9ab005",
"version": "2.2.0",
"error_code": null,
"error_message": null
},
"external_3ds_authentication_attempted": true,
"expires_on": "2025-09-17T12:55:49.467Z",
"fingerprint": null,
"browser_info": {
"language": "en-US",
"time_zone": 330,
"ip_address": "192.168.1.1",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
"color_depth": 24,
"java_enabled": false,
"screen_width": 1920,
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"screen_height": 1080,
"java_script_enabled": true
},
"payment_channel": null,
"payment_method_id": null,
"network_transaction_id": "016153570198200",
"payment_method_status": null,
"updated": "2025-09-17T12:42:47.491Z",
"split_payments": null,
"frm_metadata": null,
"extended_authorization_applied": null,
"capture_before": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": null,
"card_discovery": "manual",
"force_3ds_challenge": false,
"force_3ds_challenge_trigger": false,
"issuer_error_code": null,
"issuer_error_message": null,
"is_iframe_redirection_enabled": null,
"whole_connector_response": null,
"enable_partial_authorization": null,
"enable_overcapture": null,
"is_overcapture_enabled": null,
"network_details": null
}
```
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Core Business Logic**
- `crates/router/src/core/payments/operations/payment_confirm.rs`
**2. Other**
- `crates/router/src/routes/app.rs`
**Code Patterns Applied:**
- Extend existing types with new fields (9 changes)
**Detailed Identifier Changes:**
Commit f906847b:
Files to modify:
**crates/router/src/core/payments/operations/payment_confirm.rs**
Modify existing code
**crates/router/src/routes/app.rs**
Modify existing code
|
{"pr_number": 9433, "pr_title": "feat(core): Juspay 3DS Server via Payments API", "merged_at": "2025-09-19T07:37:59Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/operations/payment_confirm.rs"], "other": ["crates/router/src/routes/app.rs"]}, "change_types": {"fields_added": 9}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
fix(connector): [nuvei] pass state field in the request, network handling for proxy flow
## 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 -->
PR has the following fix :
- mapping for states supported by Nuvei has been added. If we receive a value beyond the list we send None to the connector(since it is an optional field)
- Card network handling for Proxy flow
- Removing MAC from payment checks (as this will be handled in the network_details field)
### 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).
-->
Proxy flow :
Request
```
{
"amount": 10023,
"currency": "EUR",
"confirm": true,
"customer_id": "nithxxinn",
"return_url": "https://www.google.com",
"capture_method": "automatic",
"authentication_type": "no_three_ds",
"description": "hellow world",
"billing": {
"address": {
"zip": "560095",
"country": "US",
"first_name": "Sakil",
"last_name": "Mostak",
"line1": "Fasdf",
"line2": "Fasdf",
"city": "Fasdf"
}
},
"browser_info": {
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"ip_address": "192.168.1.1",
"java_enabled": false,
"java_script_enabled": true,
"language": "en-US",
"color_depth": 24,
"screen_height": 1080,
"screen_width": 1920,
"time_zone": 330,
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
},
"email": "hello@gmail.com",
"payment_method": "card",
"payment_method_type": "credit",
"off_session": true,
"recurring_details": {
"type": "network_transaction_id_and_card_details",
"data": {
"card_number": "4242424242424242",
"card_exp_month": "03",
"card_exp_year": "2030",
// "card_network":"VISA",
"network_transaction_id": "347561493133251757587"
}
}
}
```
Response:
```
{
"payment_id": "pay_BewlnEq3rJCYySIqjmjU",
"merchant_id": "merchant_1757919130",
"status": "succeeded",
"amount": 10023,
"net_amount": 10023,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": 10023,
"connector": "nuvei",
"client_secret": "pay_BewlnEq3rJCYySIqjmjU_secret_G9h95CjBd5LGeW91cxvc",
"created": "2025-09-15T09:21:19.520Z",
"currency": "EUR",
"customer_id": null,
"customer": null,
"description": "hellow world",
"refunds": null,
"disputes": null,
"mandate_id": null,
"mandate_data": null,
"setup_future_usage": null,
"off_session": true,
"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": "2030",
"card_holder_name": null,
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": {
"address": {
"city": "Fasdf",
"country": "US",
"line1": "Fasdf",
"line2": "Fasdf",
"line3": null,
"zip": "560095",
"state": null,
"first_name": "Sakil",
"last_name": "Mostak",
"origin_zip": null
},
"phone": null,
"email": null
},
"order_details": null,
"email": null,
"name": null,
"phone": null,
"return_url": "https://www.google.com/",
"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": "nithxxinn",
"created_at": 1757928079,
"expires": 1757931679,
"secret": "epk_5c7d139a9bee42f7af466c697a391f2d"
},
"manual_retry_allowed": false,
"connector_transaction_id": "8110000000014362678",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": "8813798121",
"payment_link": null,
"profile_id": "pro_Ky0GbFtFBTkmi4I8kpY5",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_hg4JTXAy8RBFQYDVr2A1",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-09-15T09:36:19.520Z",
"fingerprint": null,
"browser_info": {
"language": "en-US",
"time_zone": 330,
"ip_address": "192.168.1.1",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
"color_depth": 24,
"java_enabled": false,
"screen_width": 1920,
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"screen_height": 1080,
"java_script_enabled": true
},
"payment_channel": null,
"payment_method_id": null,
"network_transaction_id": "",
"payment_method_status": null,
"updated": "2025-09-15T09:21:21.404Z",
"split_payments": null,
"frm_metadata": null,
"extended_authorization_applied": null,
"capture_before": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": null,
"card_discovery": "manual",
"force_3ds_challenge": false,
"force_3ds_challenge_trigger": false,
"issuer_error_code": null,
"issuer_error_message": null,
"is_iframe_redirection_enabled": null,
"whole_connector_response": null,
"enable_partial_authorization": null,
"enable_overcapture": null,
"is_overcapture_enabled": null,
"network_details": null
}
```
Removed MAC field from `payment_checks` and pass `state` field to the connector in `billingAddress` :
Request
```
{
"amount": 4324,
"currency": "EUR",
"confirm": true,
"customer_id": "nithxxinn",
"return_url": "https://www.google.com",
"capture_method": "automatic",
"payment_method": "card",
"payment_method_type": "credit",
"authentication_type": "three_ds",
"description": "hellow world",
"all_keys_required": true,
"billing": {
"address": {
"zip": "560095",
"country" : "NZ",
"first_name": "Sakil",
"last_name": "Mostak",
"line1": "Fasdf",
"line2": "Fasdf",
"city": "Fasdf",
"state" : "auckland"
}
},
"shipping": {
"address": {
"first_name": "joseph",
"last_name": "Doe"
}
},
"browser_info": {
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"ip_address": "192.168.1.1",
"java_enabled": false,
"java_script_enabled": true,
"language": "en-US",
"color_depth": 24,
"screen_height": 1080,
"screen_width": 1920,
"time_zone": 330,
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
},
"email": "hello@gmail.com",
"payment_method_data": {
"card": {
"card_number": "4000000000009995",
// "card_number" : "6233050545583578",
"card_exp_month": "01",
"card_exp_year": "2026",
"card_holder_name": "John Smith",
"card_cvc": "100"
}
}
}
```
Response:
```
{
"payment_id": "pay_KQTnKxNnofZyrEicGo7Q",
"merchant_id": "merchant_1758115433",
"status": "succeeded",
"amount": 4324,
"net_amount": 4324,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": 4324,
"connector": "nuvei",
"client_secret": "pay_KQTnKxNnofZyrEicGo7Q_secret_rRCYXiqDGYERRatSUm8O",
"created": "2025-09-17T13:24:03.181Z",
"currency": "EUR",
"customer_id": "nithxxinn",
"customer": {
"id": "nithxxinn",
"name": null,
"email": "hello@gmail.com",
"phone": null,
"phone_country_code": null
},
"description": "hellow world",
"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": "9995",
"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": "2026",
"card_holder_name": "John Smith",
"payment_checks": {
"avs_result": "",
"avs_description": null,
"card_validation_result": "",
"card_validation_description": null
},
"authentication_data": {
"flow": "none",
"threeDFlow": "0",
"decisionReason": "NoPreference",
"acquirerDecision": "ExemptionRequest",
"challengePreferenceReason": "12"
}
},
"billing": null
},
"payment_token": "token_yzquY4DgDjDl8UkPHkhF",
"shipping": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"line3": null,
"zip": null,
"state": null,
"first_name": "joseph",
"last_name": "Doe",
"origin_zip": null
},
"phone": null,
"email": null
},
"billing": {
"address": {
"city": "Fasdf",
"country": "NZ",
"line1": "Fasdf",
"line2": "Fasdf",
"line3": null,
"zip": "560095",
"state": "auckland",
"first_name": "Sakil",
"last_name": "Mostak",
"origin_zip": null
},
"phone": null,
"email": null
},
"order_details": null,
"email": "hello@gmail.com",
"name": null,
"phone": null,
"return_url": "https://www.google.com/",
"authentication_type": "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": "nithxxinn",
"created_at": 1758115443,
"expires": 1758119043,
"secret": "epk_2b0a610bb51846c89625ab0442d5e89d"
},
"manual_retry_allowed": null,
"connector_transaction_id": "8110000000014611178",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": {
"redirect_response": null,
"search_tags": null,
"apple_pay_recurring_details": null,
"gateway_system": "direct"
},
"reference_id": "8908205111",
"payment_link": null,
"profile_id": "pro_Y52k6squmlAEoL2YMU0P",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_XiLm3Ew3ESxbmzq15YYf",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-09-17T13:39:03.180Z",
"fingerprint": null,
"browser_info": {
"language": "en-US",
"time_zone": 330,
"ip_address": "192.168.1.1",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
"color_depth": 24,
"java_enabled": false,
"screen_width": 1920,
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"screen_height": 1080,
"java_script_enabled": true
},
"payment_channel": null,
"payment_method_id": null,
"network_transaction_id": "483299310332879",
"payment_method_status": null,
"updated": "2025-09-17T13:24:10.650Z",
"split_payments": null,
"frm_metadata": null,
"extended_authorization_applied": null,
"capture_before": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": null,
"card_discovery": "manual",
"force_3ds_challenge": false,
"force_3ds_challenge_trigger": false,
"issuer_error_code": null,
"issuer_error_message": null,
"is_iframe_redirection_enabled": null,
"whole_connector_response": "{\"internalRequestId\":59377102111,\"status\":\"SUCCESS\",\"errCode\":0,\"reason\":\"\",\"merchantId\":\"8068622888249377739\",\"merchantSiteId\":\"1005117\",\"version\":\"1.0\",\"clientRequestId\":\"pay_KQTnKxNnofZyrEicGo7Q_1\",\"sessionToken\":\"216b40a27b9c4cc3a0d2a9c08ffb90b30121\",\"clientUniqueId\":\"\",\"orderId\":\"8908205111\",\"userTokenId\":\"nithxxinn\",\"paymentOption\":{\"userPaymentOptionId\":\"2073997111\",\"card\":{\"ccCardNumber\":\"4****9995\",\"bin\":\"400000\",\"last4Digits\":\"9995\",\"ccExpMonth\":\"01\",\"ccExpYear\":\"26\",\"acquirerId\":\"19\",\"cvv2Reply\":\"\",\"avsCode\":\"\",\"cardBrand\":\"VISA\",\"issuerBankName\":\"\",\"isPrepaid\":\"false\",\"threeD\":{\"threeDFlow\":\"0\",\"sdk\":{},\"challengePreferenceReason\":\"12\",\"flow\":\"none\",\"acquirerDecision\":\"ExemptionRequest\",\"decisionReason\":\"NoPreference\"},\"processedBrand\":\"VISA\"}},\"transactionStatus\":\"APPROVED\",\"gwErrorCode\":0,\"gwExtendedErrorCode\":0,\"issuerDeclineCode\":\"\",\"issuerDeclineReason\":\"\",\"transactionType\":\"Sale\",\"transactionId\":\"8110000000014611178\",\"externalTransactionId\":\"\",\"authCode\":\"111383\",\"customData\":\"\",\"fraudDetails\":{\"finalDecision\":\"Accept\",\"score\":\"0\"},\"externalSchemeTransactionId\":\"483299310332879\",\"merchantAdviceCode\":\"\"}",
"enable_partial_authorization": null,
"enable_overcapture": null,
"is_overcapture_enabled": null,
"network_details": null
}
```
<img width="1048" height="295" alt="Screenshot 2025-09-17 at 6 56 53 PM" src="https://github.com/user-attachments/assets/028aba69-c029-496a-88c4-c491b5e6bd5a" />
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. External Connector Integration**
- `crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs`
- `crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs`
- `crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs`
- ... and 4 more files
**2. Other**
- `crates/common_enums/src/enums.rs`
**Code Patterns Applied:**
- Implement new functions (11 changes)
- Extend existing types with new fields (19 changes)
**Detailed Identifier Changes:**
Commit 1b8cd9db:
Files to modify:
**crates/common_enums/src/enums.rs**
Add:
- enum: pub::AustraliaStatesAbbreviation
- enum: pub::JapanStatesAbbreviation
- enum: pub::NewZealandStatesAbbreviation
- enum: pub::SingaporeStatesAbbreviation
- enum: pub::ThailandStatesAbbreviation
- enum: pub::PhilippinesStatesAbbreviation
- enum: pub::IndiaStatesAbbreviation
**crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs**
Remove:
- function: private::get_merchant_advice_code_description
Add:
- function: private::try_from
- function: private::try_from
- enum: pub::NuveiCardType
- impl: impl TryFrom<common_enums::CardNetwork> for NuveiCardType
- impl: impl TryFrom<&utils::CardIssuer> for NuveiCardType
**crates/hyperswitch_connectors/src/connectors/payeezy/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/payone/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/utils.rs**
Add:
- function: private::foreign_try_from
- function: private::foreign_try_from
- function: private::foreign_try_from
- function: private::foreign_try_from
- function: private::foreign_try_from
- function: private::foreign_try_from
- function: private::foreign_try_from
- function: private::normalize_state
- function: pub::parse_state_enum
- impl: impl ForeignTryFrom<String> for AustraliaStatesAbbreviation
- impl: impl ForeignTryFrom<String> for JapanStatesAbbreviation
- impl: impl ForeignTryFrom<String> for ThailandStatesAbbreviation
- impl: impl ForeignTryFrom<String> for NewZealandStatesAbbreviation
- impl: impl ForeignTryFrom<String> for SingaporeStatesAbbreviation
- impl: impl ForeignTryFrom<String> for PhilippinesStatesAbbreviation
- impl: impl ForeignTryFrom<String> for IndiaStatesAbbreviation
|
{"pr_number": 9351, "pr_title": "fix(connector): [nuvei] pass state field in the request, network handling for proxy flow", "merged_at": "2025-09-17T17:59:19Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs", "crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs", "crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs", "crates/hyperswitch_connectors/src/connectors/payeezy/transformers.rs", "crates/hyperswitch_connectors/src/connectors/payone/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs"], "other": ["crates/common_enums/src/enums.rs"]}, "change_types": {"functions_added": 11, "enums_added": 8, "fields_added": 19, "imports_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(connector): [AIRWALLEX] - Added Paypal, Trustly, Klarna , Atome, Blik Payment Methods
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Added the following payment methods in `airwallex` :
paypal, trustly, klarna , atome, blik
### 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`
-->
---
### Paypal :
<details>
<summary> Create Payment </summary>
```
{
"amount": 6540,
"currency": "EUR",
"amount_to_capture": 6540,
"confirm": true,
"capture_method": "automatic",
"all_keys_required":true,
"capture_on": "2022-09-10T10:11:12Z",
"authentication_type": "no_three_ds",
"setup_future_usage": "on_session",
"customer": {
"id": "customer123",
"name": "John Doe",
"email": "customer@gmail.com",
"phone": "9999999999",
"phone_country_code": "+1"
},
"customer_id": "customer123",
"phone_country_code": "+1",
"description": "Its my first payment request",
"return_url": "https://google.com",
"payment_method": "wallet",
"payment_method_type": "paypal",
"payment_method_data": {
"wallet": {
"paypal_redirect": {
"email": "abc@gmail.com"
}
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "HK",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": "guest@example.com"
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "HK",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": "guest@example.com"
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"order_details": [
{
"product_name": "Apple iphone 15",
"quantity": 1,
"amount": 6540,
"account_name": "transaction_processing"
}
],
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
},
"browser_info": {
"user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
"accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
"language": "nl-NL",
"color_depth": 24,
"screen_height": 723,
"screen_width": 1536,
"time_zone": 0,
"java_enabled": true,
"java_script_enabled": true,
"ip_address": "128.0.0.1"
},
"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"
}
},
"connector_metadata": {
"noon": {
"order_category": "pay"
}
},
"payment_type": "normal",
"request_incremental_authorization": false,
"merchant_order_reference_id": "test_ord",
"session_expiry": 900
}
```
</details>
<details>
<summary>Response</summary>
```
{
"payment_id": "pay_4aHkWHUarJoOmR90ORwq",
"merchant_id": "merchant_1750958630",
"status": "requires_customer_action",
"amount": 6540,
"net_amount": 6540,
"shipping_cost": null,
"amount_capturable": 6540,
"amount_received": null,
"connector": "airwallex",
"created": "2025-06-26T19:12:36.054Z",
"currency": "EUR",
"customer_id": "customer123",
"customer": {
"id": "customer123",
"name": "John Doe",
"email": "customer@gmail.com",
"phone": "9999999999",
"phone_country_code": "+1"
},
"description": "Its my first payment request",
"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": "wallet",
"payment_method_data": {
"wallet": {},
"billing": null
},
"payment_token": null,
"shipping": {
"address": {
"city": "San Fransico",
"country": "HK",
"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": "guest@example.com"
},
"billing": {
"address": {
"city": "San Fransico",
"country": "HK",
"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": "guest@example.com"
},
"order_details": [
{
"brand": null,
"amount": 6540,
"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": "customer@gmail.com",
"name": "John Doe",
"phone": "9999999999",
"return_url": "https://google.com/",
"authentication_type": "no_three_ds",
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"next_action": {
"type": "redirect_to_url",
"redirect_to_url": "http://localhost:8080/payments/redirect/pay_4aHkWHUarJoOmR90ORwq/merchant_1750958630/pay_4aHkWHUarJoOmR90ORwq_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": "customer123",
"created_at": 1750965155,
"expires": 1750968755,
"secret": "epk_a49360905e284d708f0a681aaa5065e6"
},
"manual_retry_allowed": null,
"connector_transaction_id": "int_hkdm265frh8nyaepe8q",
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": {
"apple_pay": null,
"airwallex": null,
"noon": {
"order_category": "pay"
},
"braintree": null,
"adyen": null
},
"feature_metadata": null,
"reference_id": "int_hkdm265frh8nyaepe8q",
"payment_link": null,
"profile_id": "pro_J0pFTFxKgxpI8FXwicJu",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_p6XXXMInjnRPawUESzN8",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-06-26T19:27:36.054Z",
"fingerprint": null,
"browser_info": {
"language": "nl-NL",
"time_zone": 0,
"ip_address": "128.0.0.1",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
"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-06-26T19:12:41.466Z",
"split_payments": null,
"frm_metadata": null,
"extended_authorization_applied": null,
"capture_before": null,
"merchant_order_reference_id": "test_ord",
"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,
"is_iframe_redirection_enabled": null
}
```
</details>
---
### Trustly
<details>
<summary> Create payments </summary>
```
{
"amount": 6540,
"currency": "EUR",
"amount_to_capture": 6540,
"confirm": true,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"authentication_type": "no_three_ds",
"setup_future_usage": "on_session",
"all_keys_required": true,
"customer": {
"id": "customer123",
"name": "John Doe",
"email": "customer@gmail.com",
"phone": "9999999999",
"phone_country_code": "+1"
},
"customer_id": "customer123",
"phone_country_code": "+1",
"description": "Its my first payment request",
"return_url": "https://google.com",
"payment_method": "bank_redirect",
"payment_method_type": "trustly",
"payment_method_data": {
"bank_redirect": {
"trustly": {
"country": "NL"
}
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "NL",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": "guest@example.com"
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "NL",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": "guest@example.com"
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"order_details": [
{
"product_name": "Apple iphone 15",
"quantity": 1,
"amount": 6540,
"account_name": "transaction_processing"
}
],
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
},
"browser_info": {
"user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
"accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
"language": "nl-NL",
"color_depth": 24,
"screen_height": 723,
"screen_width": 1536,
"time_zone": 0,
"java_enabled": true,
"java_script_enabled": true,
"ip_address": "128.0.0.1"
},
"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"
}
},
"connector_metadata": {
"noon": {
"order_category": "pay"
}
},
"payment_link": false,
"payment_link_config": {
"theme": "",
"logo": "",
"seller_name": "",
"sdk_layout": "",
"display_sdk_only": false,
"enabled_saved_payment_method": false
},
"payment_type": "normal",
"request_incremental_authorization": false,
"merchant_order_reference_id": "test_ord",
"session_expiry": 900
}
```
</details>
<details>
<summary> Response </summary>
```
{
"payment_id": "pay_CldC39Hg8rQIeLj1Nayz",
"merchant_id": "merchant_1750958630",
"status": "requires_customer_action",
"amount": 6540,
"net_amount": 6540,
"shipping_cost": null,
"amount_capturable": 6540,
"amount_received": null,
"connector": "airwallex",
"created": "2025-06-26T19:21:54.342Z",
"currency": "EUR",
"customer_id": "customer123",
"customer": {
"id": "customer123",
"name": "John Doe",
"email": "customer@gmail.com",
"phone": "9999999999",
"phone_country_code": "+1"
},
"description": "Its my first payment request",
"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": "bank_redirect",
"payment_method_data": {
"bank_redirect": {
"type": "BankRedirectResponse",
"bank_name": null
},
"billing": null
},
"payment_token": null,
"shipping": {
"address": {
"city": "San Fransico",
"country": "NL",
"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": "guest@example.com"
},
"billing": {
"address": {
"city": "San Fransico",
"country": "NL",
"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": "guest@example.com"
},
"order_details": [
{
"brand": null,
"amount": 6540,
"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": "customer@gmail.com",
"name": "John Doe",
"phone": "9999999999",
"return_url": "https://google.com/",
"authentication_type": "no_three_ds",
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"next_action": {
"type": "redirect_to_url",
"redirect_to_url": "http://localhost:8080/payments/redirect/pay_CldC39Hg8rQIeLj1Nayz/merchant_1750958630/pay_CldC39Hg8rQIeLj1Nayz_1"
},
"cancellation_reason": null,
"error_code": null,
"error_message": null,
"unified_code": null,
"unified_message": null,
"payment_experience": null,
"payment_method_type": "trustly",
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "customer123",
"created_at": 1750965714,
"expires": 1750969314,
"secret": "epk_0c48dbb1db5d4805a821ce0c56662f41"
},
"manual_retry_allowed": null,
"connector_transaction_id": "int_hkdmk6msch8nyjlsugr",
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": {
"apple_pay": null,
"airwallex": null,
"noon": {
"order_category": "pay"
},
"braintree": null,
"adyen": null
},
"feature_metadata": null,
"reference_id": "int_hkdmk6msch8nyjlsugr",
"payment_link": null,
"profile_id": "pro_J0pFTFxKgxpI8FXwicJu",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_p6XXXMInjnRPawUESzN8",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-06-26T19:36:54.342Z",
"fingerprint": null,
"browser_info": {
"language": "nl-NL",
"time_zone": 0,
"ip_address": "128.0.0.1",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
"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-06-26T19:21:56.394Z",
"split_payments": null,
"frm_metadata": null,
"extended_authorization_applied": null,
"capture_before": null,
"merchant_order_reference_id": "test_ord",
"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,
"is_iframe_redirection_enabled": null,
}
```
</details>
---
### Klarna
<details>
<summary> Create payment </summary>
```
{
"currency": "EUR",
"amount": 1230,
"amount_to_capture": 1230,
"confirm": true,
"connector": [
"airwallex"
],
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"authentication_type": "no_three_ds",
"all_keys_required": true,
"setup_future_usage": "on_session",
"customer_id": "customer123",
"description": "Its my first payment request",
"return_url": "https://google.com",
"payment_method": "pay_later",
"payment_method_type": "klarna",
"payment_method_data": {
"pay_later": {
"klarna_redirect": {
"billing_email": "abc@gmail.com",
"billing_country": "DE"
}
}
},
"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": "8056594427",
"country_code": "+91"
},
"email": "guest@example.com"
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "DK",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": "guest@example.com"
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"order_details": [
{
"product_name": "Apple iphone 15",
"quantity": 1,
"amount": 6540,
"account_name": "transaction_processing"
}
],
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
},
"browser_info": {
"user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
"accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
"language": "en",
"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"
},
"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"
}
},
"connector_metadata": {
"noon": {
"order_category": "pay"
}
},
"payment_link": false,
"payment_link_config": {
"theme": "",
"logo": "",
"seller_name": "",
"sdk_layout": "",
"display_sdk_only": false,
"enabled_saved_payment_method": false
},
"payment_type": "normal",
"request_incremental_authorization": false,
"merchant_order_reference_id": "test_ord",
"session_expiry": 900
}
```
</details>
<details>
<summary> Response </summary>
```
{
"payment_id": "pay_cgfYEcrXlTHaRx3AzeAk",
"merchant_id": "merchant_1750958630",
"status": "requires_customer_action",
"amount": 1230,
"net_amount": 1230,
"shipping_cost": null,
"amount_capturable": 1230,
"amount_received": null,
"connector": "airwallex",
"created": "2025-06-26T19:20:48.849Z",
"currency": "EUR",
"customer_id": "customer123",
"customer": {
"id": "customer123",
"name": "John Doe",
"email": "customer@gmail.com",
"phone": "9999999999",
"phone_country_code": "+1"
},
"description": "Its my first payment request",
"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": "pay_later",
"payment_method_data": {
"pay_later": {
"klarna_sdk": null
},
"billing": null
},
"payment_token": null,
"shipping": {
"address": {
"city": "San Fransico",
"country": "DK",
"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": "guest@example.com"
},
"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": "8056594427",
"country_code": "+91"
},
"email": "guest@example.com"
},
"order_details": [
{
"brand": null,
"amount": 6540,
"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": "customer@gmail.com",
"name": "John Doe",
"phone": "9999999999",
"return_url": "https://google.com/",
"authentication_type": "no_three_ds",
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"next_action": {
"type": "redirect_to_url",
"redirect_to_url": "http://localhost:8080/payments/redirect/pay_cgfYEcrXlTHaRx3AzeAk/merchant_1750958630/pay_cgfYEcrXlTHaRx3AzeAk_1"
},
"cancellation_reason": null,
"error_code": null,
"error_message": null,
"unified_code": null,
"unified_message": null,
"payment_experience": null,
"payment_method_type": "klarna",
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "customer123",
"created_at": 1750965648,
"expires": 1750969248,
"secret": "epk_da24ccfcd07d4e948cf122f7db0b102b"
},
"manual_retry_allowed": null,
"connector_transaction_id": "int_hkdmk6msch8nyiisxju",
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": {
"apple_pay": null,
"airwallex": null,
"noon": {
"order_category": "pay"
},
"braintree": null,
"adyen": null
},
"feature_metadata": null,
"reference_id": "int_hkdmk6msch8nyiisxju",
"payment_link": null,
"profile_id": "pro_J0pFTFxKgxpI8FXwicJu",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_p6XXXMInjnRPawUESzN8",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-06-26T19:35:48.849Z",
"fingerprint": null,
"browser_info": {
"language": "en",
"time_zone": 0,
"ip_address": "128.0.0.1",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
"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-06-26T19:20:51.752Z",
"split_payments": null,
"frm_metadata": null,
"extended_authorization_applied": null,
"capture_before": null,
"merchant_order_reference_id": "test_ord",
"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,
"is_iframe_redirection_enabled": null
}
```
</details>
---
### Blik
<details>
<summary> Create Payment </summary>
```
{
"amount": 6540,
"currency": "PLN",
"amount_to_capture": 6540,
"confirm": true,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"authentication_type": "no_three_ds",
"setup_future_usage": "on_session",
"all_keys_required" : true,
"customer": {
"id": "customer123",
"name": "John Doe",
"email": "customer@gmail.com",
"phone": "9999999999",
"phone_country_code": "+1"
},
"customer_id": "customer123",
"phone_country_code": "+1",
"description": "Its my first payment request",
"return_url": "https://google.com",
"payment_method": "bank_redirect",
"payment_method_type": "blik",
"payment_method_data": {
"bank_redirect": {
"blik": {
"blik_code": "000000"
}
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "PL",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": "guest@example.com"
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "PL",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": "guest@example.com"
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"order_details": [
{
"product_name": "Apple iphone 15",
"quantity": 1,
"amount": 6540,
"account_name": "transaction_processing"
}
],
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
},
"browser_info": {
"user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
"accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
"language": "nl-NL",
"color_depth": 24,
"screen_height": 723,
"screen_width": 1536,
"time_zone": 0,
"java_enabled": true,
"java_script_enabled": true,
"ip_address": "128.0.0.1"
},
"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"
}
},
"connector_metadata": {
"noon": {
"order_category": "pay"
}
},
"payment_link": false,
"payment_link_config": {
"theme": "",
"logo": "",
"seller_name": "",
"sdk_layout": "",
"display_sdk_only": false,
"enabled_saved_payment_method": false
},
"payment_type": "normal",
"request_incremental_authorization": false,
"merchant_order_reference_id": "test_ord",
"session_expiry": 900
}
```
</details>
<details>
<summary> Response </summary>
```
{
"payment_id": "pay_CLlN8FBeUoEPclLJ4WPa",
"merchant_id": "merchant_1750958630",
"status": "requires_customer_action",
"amount": 6540,
"net_amount": 6540,
"shipping_cost": null,
"amount_capturable": 6540,
"amount_received": null,
"connector": "airwallex",
"created": "2025-06-26T19:24:05.578Z",
"currency": "PLN",
"customer_id": "customer123",
"customer": {
"id": "customer123",
"name": "John Doe",
"email": "customer@gmail.com",
"phone": "9999999999",
"phone_country_code": "+1"
},
"description": "Its my first payment request",
"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": "bank_redirect",
"payment_method_data": {
"bank_redirect": {
"type": "BankRedirectResponse",
"bank_name": null,
"Blik": {
"blik_code": "000000"
}
},
"billing": null
},
"payment_token": null,
"shipping": {
"address": {
"city": "San Fransico",
"country": "PL",
"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": "guest@example.com"
},
"billing": {
"address": {
"city": "San Fransico",
"country": "PL",
"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": "guest@example.com"
},
"order_details": [
{
"brand": null,
"amount": 6540,
"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": "customer@gmail.com",
"name": "John Doe",
"phone": "9999999999",
"return_url": "https://google.com/",
"authentication_type": "no_three_ds",
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"next_action": {
"type": "redirect_to_url",
"redirect_to_url": "http://localhost:8080/payments/redirect/pay_CLlN8FBeUoEPclLJ4WPa/merchant_1750958630/pay_CLlN8FBeUoEPclLJ4WPa_1"
},
"cancellation_reason": null,
"error_code": null,
"error_message": null,
"unified_code": null,
"unified_message": null,
"payment_experience": null,
"payment_method_type": "blik",
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "customer123",
"created_at": 1750965845,
"expires": 1750969445,
"secret": "epk_5eeb1ffbe0a44f0ca490856ff272e8f4"
},
"manual_retry_allowed": null,
"connector_transaction_id": "int_hkdmk6msch8nylry1yj",
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": {
"apple_pay": null,
"airwallex": null,
"noon": {
"order_category": "pay"
},
"braintree": null,
"adyen": null
},
"feature_metadata": null,
"reference_id": "int_hkdmk6msch8nylry1yj",
"payment_link": null,
"profile_id": "pro_J0pFTFxKgxpI8FXwicJu",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_p6XXXMInjnRPawUESzN8",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-06-26T19:39:05.577Z",
"fingerprint": null,
"browser_info": {
"language": "nl-NL",
"time_zone": 0,
"ip_address": "128.0.0.1",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
"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-06-26T19:24:07.739Z",
"split_payments": null,
"frm_metadata": null,
"extended_authorization_applied": null,
"capture_before": null,
"merchant_order_reference_id": "test_ord",
"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,
"is_iframe_redirection_enabled": null,
}
```
</details>
---
### Atome
<details>
<summary> Create Payment </summary>
```
{
"currency": "SGD",
"amount": 1230,
"amount_to_capture": 1230,
"confirm": true,
"connector": [
"airwallex"
],
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"authentication_type": "no_three_ds",
"all_keys_required": true,
"setup_future_usage": "on_session",
"customer_id": "customer123",
"description": "Its my first payment request",
"return_url": "https://google.com",
"payment_method": "pay_later",
"payment_method_type": "atome",
"payment_method_data": {
"pay_later": {
"atome_redirect": {
}
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "SG",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+65"
},
"email": "guest@example.com"
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "SG",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+65"
},
"email": "guest@example.com"
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"order_details": [
{
"product_name": "Apple iphone 15",
"quantity": 1,
"amount": 6540,
"account_name": "transaction_processing"
}
],
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
},
"browser_info": {
"user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
"accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
"language": "en",
"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"
},
"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"
}
},
"connector_metadata": {
"noon": {
"order_category": "pay"
}
},
"payment_link": false,
"payment_link_config": {
"theme": "",
"logo": "",
"seller_name": "",
"sdk_layout": "",
"display_sdk_only": false,
"enabled_saved_payment_method": false
},
"payment_type": "normal",
"request_incremental_authorization": false,
"merchant_order_reference_id": "test_ord",
"session_expiry": 900
}
```
</details>
<details>
<summary> Response </summary>
```
{
"payment_id": "pay_yGTcwdeF6JzleQrYxqBp",
"merchant_id": "merchant_1750958630",
"status": "requires_customer_action",
"amount": 1230,
"net_amount": 1230,
"shipping_cost": null,
"amount_capturable": 1230,
"amount_received": null,
"connector": "airwallex",
"created": "2025-06-26T20:25:11.390Z",
"currency": "SGD",
"customer_id": "customer123",
"customer": {
"id": "customer123",
"name": "John Doe",
"email": "customer@gmail.com",
"phone": "9999999999",
"phone_country_code": "+1"
},
"description": "Its my first payment request",
"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": "pay_later",
"payment_method_data": {
"pay_later": {
"klarna_sdk": null
},
"billing": null
},
"payment_token": null,
"shipping": {
"address": {
"city": "San Fransico",
"country": "SG",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+65"
},
"email": "guest@example.com"
},
"billing": {
"address": {
"city": "San Fransico",
"country": "SG",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+65"
},
"email": "guest@example.com"
},
"order_details": [
{
"brand": null,
"amount": 6540,
"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": "customer@gmail.com",
"name": "John Doe",
"phone": "9999999999",
"return_url": "https://google.com/",
"authentication_type": "no_three_ds",
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"next_action": {
"type": "redirect_to_url",
"redirect_to_url": "http://localhost:8080/payments/redirect/pay_yGTcwdeF6JzleQrYxqBp/merchant_1750958630/pay_yGTcwdeF6JzleQrYxqBp_1"
},
"cancellation_reason": null,
"error_code": null,
"error_message": null,
"unified_code": null,
"unified_message": null,
"payment_experience": null,
"payment_method_type": "atome",
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "customer123",
"created_at": 1750969511,
"expires": 1750973111,
"secret": "epk_7b1908078bbf43c6b684d0fde8805c55"
},
"manual_retry_allowed": null,
"connector_transaction_id": "int_hkdmk6msch8o0af0c01",
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": {
"apple_pay": null,
"airwallex": null,
"noon": {
"order_category": "pay"
},
"braintree": null,
"adyen": null
},
"feature_metadata": null,
"reference_id": "int_hkdmk6msch8o0af0c01",
"payment_link": null,
"profile_id": "pro_J0pFTFxKgxpI8FXwicJu",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_p6XXXMInjnRPawUESzN8",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-06-26T20:40:11.390Z",
"fingerprint": null,
"browser_info": {
"language": "en",
"time_zone": 0,
"ip_address": "128.0.0.1",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
"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-06-26T20:25:13.841Z",
"split_payments": null,
"frm_metadata": null,
"extended_authorization_applied": null,
"capture_before": null,
"merchant_order_reference_id": "test_ord",
"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,
"is_iframe_redirection_enabled": null
}
```
</details>
---
<details>
<summary> Cypress tests </summary>
<img width="524" alt="Screenshot 2025-07-09 at 1 50 57 PM" src="https://github.com/user-attachments/assets/f158d9df-85f5-4879-822c-c3f2a21d7619" />
</details>
---
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. External Connector Integration**
- `crates/hyperswitch_connectors/src/connectors/airwallex.rs`
- `crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs`
**2. Tests**
- `config/deployments/integration_test.toml`
- `cypress-tests/cypress/e2e/configs/Payment/Airwallex.js`
- `loadtest/config/development.toml`
**3. Configuration Files**
- `config/config.example.toml`
- `config/deployments/production.toml`
- `config/deployments/sandbox.toml`
- ... and 2 more files
**Code Patterns Applied:**
- Define new data structures (19 changes)
- Implement new functions (9 changes)
- Extend existing types with new fields (172 changes)
**Detailed Identifier Changes:**
Commit d5f55274:
Files to modify:
**crates/hyperswitch_connectors/src/connectors/airwallex.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs**
Add:
- function: private::try_from
- function: private::try_from
- function: private::get_paylater_details
- function: private::get_bankredirect_details
- function: private::foreign_try_from
- struct: pub::AirwallexOrderData
- struct: pub::AirwallexProductData
- struct: pub::AirwallexShippingData
- struct: pub::AirwallexPLShippingAddress
- struct: pub::PaypalData
- struct: pub::PaypalDetails
- struct: pub::KlarnaData
- struct: pub::KlarnaDetails
- struct: pub::Billing
- struct: pub::AddressAirwallex
- struct: pub::AtomeData
- struct: pub::AtomeDetails
- struct: pub::TrustlyData
- struct: pub::TrustlyDetails
- struct: pub::BlikData
- struct: pub::BlikDetails
- struct: pub::AirwallexPayLaterPaymentOptions
- struct: pub::AirwallexRedirectNextAction
- struct: pub::AirwallexRedirectResponse
- enum: pub::AirwallexPayLaterData
- enum: pub::AirwallexBankRedirectData
- enum: pub::AirwallexAuthorizeResponse
- impl: impl TryFrom<&AirwallexRouterData<&types::PaymentsPreProcessingRouterData>> for AirwallexIntentRequest
- impl: impl TryFrom<(StringMajorUnit, T)> for AirwallexRouterData<T>
- impl: impl ForeignTryFrom<ResponseRouterData<F, AirwallexAuthorizeResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData>
|
{"pr_number": 8475, "pr_title": "feat(connector): [AIRWALLEX] - Added Paypal, Trustly, Klarna , Atome, Blik Payment Methods", "merged_at": "2025-07-11T07:39:44Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/airwallex.rs", "crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs"], "tests": ["config/deployments/integration_test.toml", "cypress-tests/cypress/e2e/configs/Payment/Airwallex.js", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"]}, "change_types": {"structs_added": 19, "functions_added": 9, "enums_added": 4, "fields_added": 172, "imports_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(connector): [Stripebilling] add record back support for stripebilling
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Add support for record back flow for Stripebilling.
What is record back flow ?
After payment is retried by revenue recovery, we need to update the billing processor invoice.
Stripebilling flow
Call the api end point in the connector integration to update the invoice status.
### 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
## 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 can only be tested in local since the entire recovery flow is not complete. Tested locally by triggering the connector integration manually.
Here are the local testing logs :
Request
<img width="1464" alt="Screenshot 2025-03-19 at 8 22 57 PM" src="https://github.com/user-attachments/assets/f410927a-eecc-4578-8028-7138ba7af7f2" />
Response
<img width="1238" alt="Screenshot 2025-03-19 at 8 23 07 PM" src="https://github.com/user-attachments/assets/f4fb5f0a-ed15-43d6-8a13-515dd089e3ed" />
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. External Connector Integration**
- `crates/hyperswitch_connectors/src/connectors/stripebilling.rs`
- `crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs`
- `crates/hyperswitch_connectors/src/default_implementations.rs`
**2. Other**
- `api-reference-v2/openapi_spec.json`
- `api-reference/openapi_spec.json`
**Code Patterns Applied:**
- Define new data structures (1 changes)
- Implement new functions (7 changes)
- Extend existing types with new fields (18 changes)
**Detailed Identifier Changes:**
Commit 1c3f0572:
Files to modify:
**crates/hyperswitch_connectors/src/connectors/stripebilling.rs**
Add:
- function: private::get_headers
- function: private::get_content_type
- function: private::get_url
- function: private::build_request
- function: private::handle_response
- function: private::get_error_response
- impl: impl api::revenue_recovery::RevenueRecoveryRecordBack for Stripebilling
- impl: impl ConnectorIntegration<
RecoveryRecordBack,
RevenueRecoveryRecordBackRequest,
RevenueRecoveryRecordBackResponse,
> for Stripebilling
**crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs**
Add:
- function: private::try_from
- struct: pub::StripebillingRecordBackResponse
- impl: impl TryFrom<
ResponseRouterData<
RecoveryRecordBack,
StripebillingRecordBackResponse,
RevenueRecoveryRecordBackRequest,
RevenueRecoveryRecordBackResponse,
>,
> for RevenueRecoveryRecordBackRouterData
**crates/hyperswitch_connectors/src/default_implementations.rs**
Modify existing code
|
{"pr_number": 7561, "pr_title": "feat(connector): [Stripebilling] add record back support for stripebilling", "merged_at": "2025-03-24T08:05:10Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "connector"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/stripebilling.rs", "crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json"]}, "change_types": {"structs_added": 1, "functions_added": 7, "fields_added": 18, "imports_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(analytics): add `sessionized_metrics` and `currency_conversion` for refunds analytics
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [x] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
- Add sessionized metrics module and implement backwards compatibility.
- Implement currency conversion for refunds analytics
### Minor unrelated changes
- refactor inconsistent naming of fields in some places => [commit](https://github.com/juspay/hyperswitch/pull/6419/commits/08e53d63b5561163712bdfaefebed1caecdb793b)
- fix sankey incorrect formula => [commit](https://github.com/juspay/hyperswitch/pull/6419/commits/6ae2fb68290bf91a6d10178aa620893c3fd45846)
### Fixes #6417
### 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).
-->
- Refund metrics didn't had a `sessionized_metrics` module and implementation as were there in payments and payment_intents metrics
- Refund metrics weren't implementing currency conversion.
## 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)?
-->
```bash
curl --location 'http://localhost:8080/analytics/v1/org/metrics/refunds' \
--header 'Accept: */*' \
--header 'Accept-Language: en-GB,en-US;q=0.9,en;q=0.8' \
--header 'Connection: keep-alive' \
--header 'Content-Type: application/json' \
--header 'Origin: http://localhost:9000' \
--header 'QueryType: SingleStat' \
--header 'Referer: http://localhost:9000/' \
--header 'Sec-Fetch-Dest: empty' \
--header 'Sec-Fetch-Mode: cors' \
--header 'Sec-Fetch-Site: same-site' \
--header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36' \
--header 'api-key: dev_r3kVZ4URj3fMiHhJJuhHOVqteaXwKyEMGCaFo6PiCS6S9vZsb0ErV4kCVqogM60H' \
--header 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMDZlOGRmZWYtMzI0Zi00Yjc0LTg2MTItYzdkZjNhOGZmZTcyIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzI3NDM0NTkzIiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTczMTA4ODY3NSwib3JnX2lkIjoib3JnXzl3Y0kxQ2hTOGVEdnRRQmRXak9IIiwicHJvZmlsZV9pZCI6InByb19FNW5lek43YjZUbVB1WlUzbEU1VSJ9.S0OBbdBmFjnRC-1hP-QTVA2fzQESHIvou_8dtmFDCgY' \
--header 'sec-ch-ua: "Chromium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99"' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'sec-ch-ua-platform: "macOS"' \
--data '[
{
"timeRange": {
"startTime": "2024-10-15T18:30:00Z",
"endTime": "2024-11-07T09:30:00Z"
},
"mode": "ORDER",
"source": "BATCH",
"metrics": [
"sessionized_refund_processed_amount"
],
"delta": true
}
]'
```
<img width="750" alt="Screenshot 2024-11-07 at 2 56 08 PM" src="https://github.com/user-attachments/assets/6f5ba9b3-1b41-498f-a685-b1e8bf30f78d">
### For sankey changes
```bash
curl --location 'http://localhost:8080/analytics/v1/profile/metrics/sankey' \
--header 'accept: */*' \
--header 'accept-language: en-US,en;q=0.9' \
--header 'api-key: dev_r3kVZ4URj3fMiHhJJuhHOVqteaXwKyEMGCaFo6PiCS6S9vZsb0ErV4kCVqogM60H' \
--header 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiMDZlOGRmZWYtMzI0Zi00Yjc0LTg2MTItYzdkZjNhOGZmZTcyIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzI3NDM0NTkzIiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTczMTA4ODY3NSwib3JnX2lkIjoib3JnXzl3Y0kxQ2hTOGVEdnRRQmRXak9IIiwicHJvZmlsZV9pZCI6InByb19FNW5lek43YjZUbVB1WlUzbEU1VSJ9.S0OBbdBmFjnRC-1hP-QTVA2fzQESHIvou_8dtmFDCgY' \
--header 'content-type: application/json' \
--header 'origin: https://integ.hyperswitch.io' \
--header 'priority: u=1, i' \
--header 'referer: https://integ.hyperswitch.io/dashboard/new-analytics-payment' \
--header 'sec-ch-ua: "Chromium";v="130", "Google Chrome";v="130", "Not?A_Brand";v="99"' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'sec-ch-ua-platform: "macOS"' \
--header 'sec-fetch-dest: empty' \
--header 'sec-fetch-mode: cors' \
--header 'sec-fetch-site: same-origin' \
--header 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36' \
--data '{"startTime":"2024-10-30T18:30:00Z","endTime":"2024-11-08T11:16:00Z"}'
```
<img width="537" alt="Screenshot 2024-11-08 at 3 03 12 PM" src="https://github.com/user-attachments/assets/1fb56fd2-1585-4423-84dd-3883cc3dfc63">
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] I formatted the code `cargo +nightly fmt --all`
- [ ] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. API Request/Response Models**
- `crates/api_models/src/analytics.rs`
- `crates/api_models/src/analytics/payments.rs`
- `crates/api_models/src/analytics/refunds.rs`
- ... and 1 more files
**2. Core Business Logic**
- `crates/analytics/src/payment_intents/core.rs`
- `crates/analytics/src/payments/core.rs`
- `crates/analytics/src/refunds/core.rs`
**3. Other**
- `crates/analytics/src/payments/accumulator.rs`
- `crates/analytics/src/refunds/accumulator.rs`
- `crates/analytics/src/refunds/metrics.rs`
- ... and 7 more files
**Code Patterns Applied:**
- Define new data structures (3 changes)
- Implement new functions (5 changes)
- Extend existing types with new fields (90 changes)
- Add conditional logic for feature flags or filtering (5 changes)
**Detailed Identifier Changes:**
Commit afd7f7d2:
Files to modify:
**crates/analytics/src/payment_intents/core.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/refunds/accumulator.rs**
Modify existing code
**crates/analytics/src/refunds/core.rs**
Modify existing code
**crates/analytics/src/refunds/metrics.rs**
Add:
- mod: private::sessionized_metrics
**crates/analytics/src/refunds/metrics/refund_processed_amount.rs**
Modify existing code
**crates/analytics/src/refunds/metrics/sessionized_metrics/mod.rs**
Add:
- mod: private::refund_count
- mod: private::refund_processed_amount
- mod: private::refund_success_count
- mod: private::refund_success_rate
**crates/analytics/src/refunds/metrics/sessionized_metrics/refund_count.rs**
Add:
- function: private::load_metrics
- struct: pub::RefundCount
- impl: impl super::RefundMetric<T> for RefundCount
**crates/analytics/src/refunds/metrics/sessionized_metrics/refund_processed_amount.rs**
Add:
- function: private::load_metrics
- struct: pub::RefundProcessedAmount
- impl: impl super::RefundMetric<T> for RefundProcessedAmount
**crates/analytics/src/refunds/metrics/sessionized_metrics/refund_success_count.rs**
Add:
- function: private::load_metrics
- struct: pub::RefundSuccessCount
- impl: impl super::RefundMetric<T> for RefundSuccessCount
**crates/analytics/src/refunds/metrics/sessionized_metrics/refund_success_rate.rs**
Add:
- function: private::load_metrics
- struct: pub::RefundSuccessRate
- impl: impl super::RefundMetric<T> for RefundSuccessRate
**crates/api_models/src/analytics.rs**
Add:
- struct: pub::RefundsAnalyticsMetadata
- struct: pub::RefundsMetricsResponse
**crates/api_models/src/analytics/payments.rs**
Modify existing code
**crates/api_models/src/analytics/refunds.rs**
Modify existing code
**crates/api_models/src/events.rs**
Add:
- function: private::get_api_event_type
- impl: impl ApiEventMetric for RefundsMetricsResponse<T>
**crates/router/src/analytics.rs**
Modify existing code
|
{"pr_number": 6419, "pr_title": "feat(analytics): add `sessionized_metrics` and `currency_conversion` for refunds analytics ", "merged_at": "2024-11-14T09:13:34Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "order"]}, "hierarchy": {"api_models": ["crates/api_models/src/analytics.rs", "crates/api_models/src/analytics/payments.rs", "crates/api_models/src/analytics/refunds.rs", "crates/api_models/src/events.rs"], "core_business": ["crates/analytics/src/payment_intents/core.rs", "crates/analytics/src/payments/core.rs", "crates/analytics/src/refunds/core.rs"], "other": ["crates/analytics/src/payments/accumulator.rs", "crates/analytics/src/refunds/accumulator.rs", "crates/analytics/src/refunds/metrics.rs", "crates/analytics/src/refunds/metrics/refund_processed_amount.rs", "crates/analytics/src/refunds/metrics/sessionized_metrics/mod.rs", "crates/analytics/src/refunds/metrics/sessionized_metrics/refund_count.rs", "crates/analytics/src/refunds/metrics/sessionized_metrics/refund_processed_amount.rs", "crates/analytics/src/refunds/metrics/sessionized_metrics/refund_success_count.rs", "crates/analytics/src/refunds/metrics/sessionized_metrics/refund_success_rate.rs", "crates/router/src/analytics.rs"]}, "change_types": {"structs_added": 3, "functions_added": 5, "fields_added": 90, "imports_added": 33, "conditionals_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
fix(connector): [Novalnet] allow debit card MITs
## 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 allows debit card MITs through Novalnet.
### 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
Fixes the bug which allows debit card mandate creation, but does not allow MITs for the same payment method entry.
## How did you test it?
<details>
<summary>1. Create debit card off_session payment</summary>
cURL
curl --location --request POST 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_76MSBBu8s4TG6Y7Ojx5jOojVZveVEZJpr4vTtKAATvBqp8iWdzH5nfzfuDIIbw5Y' \
--data-raw '{"amount":6500,"currency":"EUR","confirm":true,"capture_method":"automatic","capture_on":"2022-09-10T10:11:12Z","customer_id":"cus_Wz8ND2QMGUTQCZBgO4Jx","email":"guest@example.com","name":"John Doe","phone":"999999999","profile_id":"pro_Z2e4ZhoVw0PTjZm7slwC","phone_country_code":"+65","description":"Its my first payment request","authentication_type":"no_three_ds","return_url":"https://hyperswitch.io","setup_future_usage":"off_session","customer_acceptance":{"acceptance_type":"online","accepted_at":"1963-05-03T04:07:52.723Z","online":{"ip_address":"127.0.0.1","user_agent":"amet irure esse"}},"connector":["novalnet"],"payment_method":"card","payment_method_type":"debit","payment_method_data":{"card":{"card_number":"4200000000000000","card_exp_month":"03","card_exp_year":"2030","card_holder_name":"New Cust","card_cvc":"737"}},"billing":{"address":{"line1":"1467","line2":"Harrison Street","line3":"Harrison Street","city":"San Fransico","state":"California","zip":"94122","country":"US","first_name":"John"},"email":"guest@example.com"},"statement_descriptor_name":"joseph","statement_descriptor_suffix":"JS","metadata":{"udf1":"value1","new_customer":"true","login_date":"2019-09-10T10:11:12Z"},"browser_info":{"ip_address":"129.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.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-US","color_depth":32,"screen_height":1117,"screen_width":1728,"time_zone":-330,"java_enabled":true,"java_script_enabled":true}}'
Response
{"payment_id":"pay_dxgBFIHVjdItFGdpiH4w","merchant_id":"merchant_1746438452","status":"succeeded","amount":6500,"net_amount":6500,"shipping_cost":null,"amount_capturable":0,"amount_received":6500,"connector":"novalnet","client_secret":"pay_dxgBFIHVjdItFGdpiH4w_secret_MFvU65z04c83Y6186Ac4","created":"2025-05-05T09:57:04.990Z","currency":"EUR","customer_id":"cus_Wz8ND2QMGUTQCZBgO4Jx","customer":{"id":"cus_Wz8ND2QMGUTQCZBgO4Jx","name":"John Doe","email":"guest@example.com","phone":"999999999","phone_country_code":"+65"},"description":"Its my first payment request","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":"0000","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"420000","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"2030","card_holder_name":"New Cust","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"John","last_name":null},"phone":null,"email":"guest@example.com"},"order_details":null,"email":"guest@example.com","name":"John Doe","phone":"999999999","return_url":"https://hyperswitch.io/","authentication_type":"no_three_ds","statement_descriptor_name":"joseph","statement_descriptor_suffix":"JS","next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"debit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"cus_Wz8ND2QMGUTQCZBgO4Jx","created_at":1746439024,"expires":1746442624,"secret":"epk_896560e8fef4458d854bc8945143cbd1"},"manual_retry_allowed":false,"connector_transaction_id":"15184500106516399","frm_message":null,"metadata":{"udf1":"value1","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":null,"feature_metadata":null,"reference_id":"15184500106516399","payment_link":null,"profile_id":"pro_Z2e4ZhoVw0PTjZm7slwC","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_YYFd2kSg2qqQsBFvFiCn","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-05-05T10:12:04.990Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"129.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","color_depth":32,"java_enabled":true,"screen_width":1728,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":1117,"java_script_enabled":true},"payment_method_id":"pm_t8cucM8S2ZonPkfcMNvH","payment_method_status":"active","updated":"2025-05-05T09:57:07.689Z","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":"VVBV24y20uF-D20uND14oV24y-12m14oJ22wB12mZ20uJ22wRPJZFZZ100548151","card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null}
</details>
<details>
<summary>2. Create a MIT using this</summary>
cURL
curl --location --request POST 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_76MSBBu8s4TG6Y7Ojx5jOojVZveVEZJpr4vTtKAATvBqp8iWdzH5nfzfuDIIbw5Y' \
--data-raw '{"amount":6500,"currency":"EUR","confirm":true,"capture_method":"automatic","capture_on":"2022-09-10T10:11:12Z","customer_id":"cus_Wz8ND2QMGUTQCZBgO4Jx","email":"guest@example.com","name":"John Doe","phone":"999999999","profile_id":"pro_Z2e4ZhoVw0PTjZm7slwC","phone_country_code":"+65","description":"Its my first payment request","return_url":"https://hyperswitch.io","off_session":true,"recurring_details":{"type":"payment_method_id","data":"pm_t8cucM8S2ZonPkfcMNvH"},"statement_descriptor_name":"joseph","statement_descriptor_suffix":"JS","browser_info":{"ip_address":"129.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.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-US","color_depth":32,"screen_height":1117,"screen_width":1728,"time_zone":-330,"java_enabled":true,"java_script_enabled":true}}'
Response
{"payment_id":"pay_PBQLhYMeYK26I1AEqzdA","merchant_id":"merchant_1746438452","status":"succeeded","amount":6500,"net_amount":6500,"shipping_cost":null,"amount_capturable":0,"amount_received":6500,"connector":"novalnet","client_secret":"pay_PBQLhYMeYK26I1AEqzdA_secret_S7Xf6HH6vDZ7oT7UZemU","created":"2025-05-05T09:59:18.140Z","currency":"EUR","customer_id":"cus_Wz8ND2QMGUTQCZBgO4Jx","customer":{"id":"cus_Wz8ND2QMGUTQCZBgO4Jx","name":"John Doe","email":"guest@example.com","phone":"999999999","phone_country_code":"+65"},"description":"Its my first payment request","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":true,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"0000","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"420000","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"2030","card_holder_name":"New Cust","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":"guest@example.com","name":"John Doe","phone":"999999999","return_url":"https://hyperswitch.io/","authentication_type":"no_three_ds","statement_descriptor_name":"joseph","statement_descriptor_suffix":"JS","next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"debit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"cus_Wz8ND2QMGUTQCZBgO4Jx","created_at":1746439158,"expires":1746442758,"secret":"epk_8a97908c609b49cbbec54348af8df8e0"},"manual_retry_allowed":false,"connector_transaction_id":"15184500106800825","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"15184500106800825","payment_link":null,"profile_id":"pro_Z2e4ZhoVw0PTjZm7slwC","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_YYFd2kSg2qqQsBFvFiCn","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-05-05T10:14:18.140Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"129.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","color_depth":32,"java_enabled":true,"screen_width":1728,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":1117,"java_script_enabled":true},"payment_method_id":"pm_t8cucM8S2ZonPkfcMNvH","payment_method_status":"active","updated":"2025-05-05T09:59:23.492Z","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":"VVBV24y20uF-D20uND14oV24y-12m14oJ22wB12mZ20uJ22wRPJZFZZ100548151","card_discovery":"manual","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 -->
- [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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. External Connector Integration**
- `crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs`
**Detailed Identifier Changes:**
Commit 18142a4f:
Files to modify:
**crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs**
Modify existing code
|
{"pr_number": 7956, "pr_title": "fix(connector): [Novalnet] allow debit card MITs", "merged_at": "2025-05-05T11:24:26Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(nuvei): L2L3 Data
## 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 -->
Include support for L2L3Data for nuvei connector
- L2L3 data is primarily used for B2B, government, and corporate card transactions where detailed purchase information is required for lower interchange rates and compliance purposes.
- `NOTE` : In Nuvei shipping details can be passed for each item but we are not supporting it as of now as it will be included if required practically. Other connectors doesn't support this
<details>
<summary> Payment test </summary>
# Request
```json
{
"amount": 4324,
"currency": "EUR",
"confirm": true,
"setup_future_usage": "on_session",
"customer_acceptance": {
"acceptance_type": "offline",
"accepted_at": "1963-05-03T04:07:52.723Z",
"online": {
"ip_address": "127.0.0.1",
"user_agent": "amet irure esse"
}
},
"connector": [
"nuvei"
],
"customer_id": "nidthxxinn",
"return_url": "https://www.google.com",
"capture_method": "automatic",
"payment_method": "card",
"payment_method_type": "credit",
"authentication_type": "no_three_ds",
"description": "hellow world",
"billing": {
"address": {
"zip": "560095",
"country": "US",
"first_name": "Sakil",
"last_name": "Mostak",
"line1": "Fasdf",
"line2": "Fasdf",
"city": "Fasdf"
}
},
"browser_info": {
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"ip_address": "192.168.1.1",
"java_enabled": false,
"java_script_enabled": true,
"language": "en-US",
"color_depth": 24,
"screen_height": 1080,
"screen_width": 1920,
"time_zone": 330,
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"
},
"email": "hello@gmail.com",
"payment_method_data": {
"card": {
"card_number": "4000000000009995",
"card_exp_month": "01",
"card_exp_year": "2026",
"card_holder_name": "John Smith",
"card_cvc": "100"
}
},
// l2 l3 data 's
"order_tax_amount": 8900,
"shipping_cost": 8299,
"discount_amount": 3000,
"duty_amount": 2409,
"order_details": [ //l2 l3data
{
"product_name": "Laptop",
"quantity": 1,
"amount": 8000,
"description": "Business laptop 23214324",
"sku": "LAP-001",
"upc": "123456789012",
"commodity_code": "8471",
"unit_of_measure": "EA",
"unit_price": 8000,
"unit_discount_amount": 200,
"tax_rate": 0.08,
"total_tax_amount": 640
},
{
"product_name": "Mouse",
"quantity": 2,
"amount": 2000,
"description": "Wireless office mouse",
"sku": "MOU-001",
"upc": "123456789013",
"commodity_code": "8471",
"unit_of_measure": "EA",
"unit_price": 1000,
"unit_discount_amount": 50,
"tax_rate": 0.08,
"total_tax_amount": 160
}
]
}
```
# Response
```json
{
"payment_id": "pay_t0Izz9tAgCQtylk9Mcbf",
"merchant_id": "merchant_1756789409",
"status": "succeeded",
"amount": 4324,
"net_amount": 12623,
"shipping_cost": 8299,
"amount_capturable": 0,
"amount_received": 12623,
"connector": "nuvei",
"client_secret": "pay_t0Izz9tAgCQtylk9Mcbf_secret_cjXmBdaE9S6gTQorZcq8",
"created": "2025-09-07T03:38:00.787Z",
"currency": "EUR",
"customer_id": "nidthxxinn",
"customer": {
"id": "nidthxxinn",
"name": null,
"email": "hello@gmail.com",
"phone": null,
"phone_country_code": null
},
"description": "hellow world",
"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": "9995",
"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": "2026",
"card_holder_name": "John Smith",
"payment_checks": {
"avs_result": "",
"cvv_2_reply": "",
"avs_description": null,
"cvv_2_description": null,
"merchant_advice_code": "",
"merchant_advice_code_description": null
},
"authentication_data": {
"challengePreferenceReason": "12"
}
},
"billing": null
},
"payment_token": "token_pKckYLN5M2Qcs4MJuGDz",
"shipping": null,
"billing": {
"address": {
"city": "Fasdf",
"country": "US",
"line1": "Fasdf",
"line2": "Fasdf",
"line3": null,
"zip": "560095",
"state": null,
"first_name": "Sakil",
"last_name": "Mostak",
"origin_zip": null
},
"phone": null,
"email": null
},
"order_details": [
{
"sku": "LAP-001",
"upc": "123456789012",
"brand": null,
"amount": 8000,
"category": null,
"quantity": 1,
"tax_rate": 0.08,
"product_id": null,
"description": "Business laptop 23214324",
"product_name": "Laptop",
"product_type": null,
"sub_category": null,
"total_amount": null,
"commodity_code": "8471",
"unit_of_measure": "EA",
"product_img_link": null,
"product_tax_code": null,
"total_tax_amount": 640,
"requires_shipping": null,
"unit_discount_amount": 200
},
{
"sku": "MOU-001",
"upc": "123456789013",
"brand": null,
"amount": 2000,
"category": null,
"quantity": 2,
"tax_rate": 0.08,
"product_id": null,
"description": "Wireless office mouse",
"product_name": "Mouse",
"product_type": null,
"sub_category": null,
"total_amount": null,
"commodity_code": "8471",
"unit_of_measure": "EA",
"product_img_link": null,
"product_tax_code": null,
"total_tax_amount": 160,
"requires_shipping": null,
"unit_discount_amount": 50
}
],
"email": "hello@gmail.com",
"name": null,
"phone": null,
"return_url": "https://www.google.com/",
"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": "nidthxxinn",
"created_at": 1757216280,
"expires": 1757219880,
"secret": "epk_e4ed9423c18546afac8b4c6540f4b193"
},
"manual_retry_allowed": false,
"connector_transaction_id": "8110000000013731386",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": {
"redirect_response": null,
"search_tags": null,
"apple_pay_recurring_details": null,
"gateway_system": "direct"
},
"reference_id": "8566044111",
"payment_link": null,
"profile_id": "pro_EzO6xGQZdE5pd9I5Rdzs",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_i5QVCDvXmBLbZg7n97n2",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-09-07T03:53:00.787Z",
"fingerprint": null,
"browser_info": {
"language": "en-US",
"time_zone": 330,
"ip_address": "192.168.1.1",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
"color_depth": 24,
"java_enabled": false,
"screen_width": 1920,
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8",
"screen_height": 1080,
"java_script_enabled": true
},
"payment_channel": null,
"payment_method_id": null,
"network_transaction_id": null,
"payment_method_status": null,
"updated": "2025-09-07T03:38:04.582Z",
"split_payments": null,
"frm_metadata": null,
"extended_authorization_applied": null,
"capture_before": null,
"merchant_order_reference_id": null,
"order_tax_amount": 8900,
"connector_mandate_id": null,
"card_discovery": "manual",
"force_3ds_challenge": false,
"force_3ds_challenge_trigger": false,
"issuer_error_code": null,
"issuer_error_message": null,
"is_iframe_redirection_enabled": null,
"whole_connector_response": null,
"enable_partial_authorization": null
}
```
</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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. External Connector Integration**
- `crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs`
**Code Patterns Applied:**
- Define new data structures (2 changes)
- Implement new functions (3 changes)
- Extend existing types with new fields (37 changes)
**Detailed Identifier Changes:**
Commit 1d0551a6:
Files to modify:
**crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs**
Remove:
- function: private::get_order_tax_amount
- function: private::get_order_tax_amount
- function: private::get_order_tax_amount
- struct: pub::NuvieAmountDetails
Add:
- function: private::from
- struct: pub::NuveiAmountDetails
- struct: pub::NuveiItem
- enum: pub::NuveiItemType
- impl: impl From<Option<enums::ProductType>> for NuveiItemType
|
{"pr_number": 9290, "pr_title": "feat(nuvei): L2L3 Data", "merged_at": "2025-09-09T14:10:52Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs"]}, "change_types": {"structs_added": 2, "functions_added": 3, "enums_added": 1, "fields_added": 37}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(connector): [Coingate] implement refunds
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
- Implement Refunds for Coingate
- Implement Refunds Sync for Coingate
- Handle 4xx error response
### 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?
- We can not test refunds, as real cryptocurrency_address is required for testing, and we don't have that.
- We can test 4xx error handling
1. Create Merchant
2. Create API key
3. Create MCA of coingate
```
curl --location 'http://localhost:8080/account/merchant_1742369861/connectors' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: test_admin' \
--data '{
"connector_type": "payment_processor",
"connector_name": "coingate",
"connector_account_details": {
"auth_type": "HeaderKey",
"api_key": "___"
},
"test_mode": false,
"disabled": false,
"payment_methods_enabled": [
{
"payment_method": "crypto",
"payment_method_types": [
{
"payment_method_type": "crypto_currency",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
}
]
}
],
"metadata":{
"currency_id": 1,
"platform_id": 6,
"ledger_account_id": "___"
}
}'
```
4. Create a payment with` amount:0`
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: ___' \
--data-raw '{
"amount": 0,
"currency": "USD",
"confirm": true,
"email": "guest@example.com",
"return_url": "https://google.com",
"payment_method": "crypto",
"payment_method_type": "crypto_currency",
"payment_experience": "redirect_to_url",
"payment_method_data": {
"crypto": {
}
}
}'
```
Response
```
{"payment_id":"pay_VgDgzqk5GiLATsXobqjg","merchant_id":"merchant_1742369861","status":"failed","amount":0,"net_amount":0,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"coingate","client_secret":"pay_VgDgzqk5GiLATsXobqjg_secret_g5ollLaT7bkHxn8P440v","created":"2025-03-19T08:49:22.616Z","currency":"USD","customer_id":null,"customer":{"id":null,"name":null,"email":"guest@example.com","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":null,"payment_method":"crypto","payment_method_data":{"crypto":{"pay_currency":null,"network":null},"billing":null},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":null,"name":null,"phone":null,"return_url":"https://google.com/","authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":"Order is not valid","error_message":"Price amount must be greater or equal to 0.109 USD","unified_code":"UE_9000","unified_message":"Something went wrong","payment_experience":"redirect_to_url","payment_method_type":"crypto_currency","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":true,"connector_transaction_id":null,"frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":null,"payment_link":null,"profile_id":"pro_EfM2zu4p0kebcfpaV7Rn","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_KFCYFZgnRHO6eaS0dLAk","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-03-19T09:04:22.616Z","fingerprint":null,"browser_info":null,"payment_method_id":null,"payment_method_status":null,"updated":"2025-03-19T08:49:23.292Z","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,"issuer_error_code":null,"issuer_error_message":null}
```
It will give a proper failed status.
Before this PR - we were getting 5xx in this case
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Domain Models (Business Logic Types)**
- `crates/hyperswitch_domain_models/src/router_request_types.rs`
**2. Core Business Logic**
- `crates/router/src/core/admin.rs`
- `crates/router/src/core/relay/utils.rs`
- `crates/router/src/core/utils.rs`
**3. External Connector Integration**
- `crates/hyperswitch_connectors/src/connectors/coingate.rs`
- `crates/hyperswitch_connectors/src/connectors/coingate/transformers.rs`
- `crates/router/tests/connectors/utils.rs`
**Code Patterns Applied:**
- Define new data structures (3 changes)
- Implement new functions (18 changes)
- Extend existing types with new fields (69 changes)
**Detailed Identifier Changes:**
Commit 4af86523:
Files to modify:
**crates/hyperswitch_connectors/src/connectors/coingate.rs**
Add:
- function: private::get_headers
- function: private::get_content_type
- function: private::get_url
- function: private::get_request_body
**crates/hyperswitch_connectors/src/connectors/coingate/transformers.rs**
Add:
- function: private::try_from
- function: private::try_from
- function: private::try_from
- function: private::try_from
- function: private::from
- struct: pub::CoingateConnectorMetadataObject
- struct: pub::CoingateRefundRequest
- struct: pub::CoingateRefundResponse
- enum: pub::CoingateRefundStatus
- impl: impl TryFrom<&Option<pii::SecretSerdeValue>> for CoingateConnectorMetadataObject
- impl: impl TryFrom<&CoingateRouterData<&RefundsRouterData<F>>> for CoingateRefundRequest
- impl: impl TryFrom<RefundsResponseRouterData<Execute, CoingateRefundResponse>> for RefundsRouterData<Execute>
- impl: impl TryFrom<RefundsResponseRouterData<RSync, CoingateRefundResponse>> for RefundsRouterData<RSync>
- impl: impl From<CoingateRefundStatus> for common_enums::RefundStatus
**crates/hyperswitch_domain_models/src/router_request_types.rs**
Modify existing code
**crates/router/src/core/admin.rs**
Modify existing code
**crates/router/src/core/relay/utils.rs**
Modify existing code
**crates/router/src/core/utils.rs**
Modify existing code
**crates/router/tests/connectors/utils.rs**
Modify existing code
|
{"pr_number": 7513, "pr_title": "feat(connector): [Coingate] implement refunds ", "merged_at": "2025-03-23T19:06:29Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/router_request_types.rs"], "core_business": ["crates/router/src/core/admin.rs", "crates/router/src/core/relay/utils.rs", "crates/router/src/core/utils.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/coingate.rs", "crates/hyperswitch_connectors/src/connectors/coingate/transformers.rs", "crates/router/tests/connectors/utils.rs"]}, "change_types": {"structs_added": 3, "functions_added": 18, "enums_added": 1, "fields_added": 69, "imports_added": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(opensearch): refactor global search querybuilder and add case insensitivity opensearch filters
## 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 -->
- Currently the global search query builder logic is entirely present in a single function.
- With more and more features getting added on, it is better to separate out the logic to build the query into separate modules.
- Also, with the enhancement of global search, it is better to give out some fields as case sensitive and others as case insensitive.
Case Sensitive filters:
- customer_email
- payment_id
- card_last_4
- search_tags
Case Insensitive filters:
- payment_method
- payment_method_type
- card_network
- currency
- connector
- status
The new structure would be divided into separate functions for the respective modules as follows:
- Free Search Query + Time Range + Filters (case sensitive)
- Filters (case insensitive)
- Authentication and Search Params
The query generated to hit opensearch will now look like the following:
```json
{
"query": {
"bool": {
"filter": [
{
"multi_match": {
"type": "phrase",
"query": "merchant_1726046328",
"lenient": true
}
},
{
"terms": {
"customer_email.keyword": [
"f6cd0753a831880835a0e0d23136ef66318d8303605bd37fa80b4ecf248bd303"
]
}
},
{
"terms": {
"card_last_4.keyword": [
"4242"
]
}
},
{
"terms": {
"payment_id.keyword": [
"pay_QdstJpRVAcRKHzRIRK4d"
]
}
},
{
"range": {
"@timestamp": {
"gte": "2024-09-13T00:30:00.000Z",
"lte": "2024-10-30T21:45:00.000Z"
}
}
}
],
"must": [
{
"bool": {
"must": [
{
"bool": {
"should": [
{
"term": {
"currency.keyword": {
"value": "UsD",
"case_insensitive": true
}
}
}
],
"minimum_should_match": 1
}
}
]
}
},
{
"bool": {
"must": [
{
"bool": {
"should": [
{
"term": {
"status.keyword": {
"value": "CharGed",
"case_insensitive": true
}
}
},
{
"term": {
"status.keyword": {
"value": "succeeded",
"case_insensitive": true
}
}
}
],
"minimum_should_match": 1
}
}
]
}
},
{
"bool": {
"must": [
{
"bool": {
"should": [
{
"term": {
"payment_method.keyword": {
"value": "cArd",
"case_insensitive": true
}
}
},
{
"term": {
"payment_method.keyword": {
"value": "iwubefi",
"case_insensitive": true
}
}
}
],
"minimum_should_match": 1
}
}
]
}
},
{
"bool": {
"must": [
{
"bool": {
"should": [
{
"term": {
"connector.keyword": {
"value": "striPe_Test",
"case_insensitive": true
}
}
}
],
"minimum_should_match": 1
}
}
]
}
},
{
"bool": {
"must": [
{
"bool": {
"should": [
{
"term": {
"payment_method_type.keyword": {
"value": "credit",
"case_insensitive": true
}
}
}
],
"minimum_should_match": 1
}
}
]
}
},
{
"bool": {
"must": [
{
"bool": {
"should": [
{
"bool": {
"must": [
{
"term": {
"organization_id.keyword": {
"value": "org_VpSHOjsYfDvabVYJgCAJ"
}
}
}
]
}
}
],
"minimum_should_match": 1
}
}
]
}
}
]
}
},
"sort": [
{
"@timestamp": {
"order": "desc"
}
}
]
}
```
### 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).
-->
- Enhanced search experience based on free search and specific filters using global search.
- Can now search via filters in a case-insensitive manner for some common filters.
## 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)?
-->
Can send the following filters in any case:
- payment_method
- payment_method_type
- card_network
- currency
- connector
- status
Must send the following filters in the exact case:
- customer_email
- payment_id
- card_last_4
- search_tags
#### Hit the curl:
```bash
curl --location 'http://localhost:8080/analytics/v1/search' \
--header 'sec-ch-ua-platform: "macOS"' \
--header 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTQ5ZTNkMmItMTY5Yi00NzUzLWJmNTQtZDcxMTM2YjRiN2JkIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzI2MDQ2MzI4Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTczMDg3MDI4Niwib3JnX2lkIjoib3JnX1ZwU0hPanNZZkR2YWJWWUpnQ0FKIiwicHJvZmlsZV9pZCI6InByb192NXNGb0hlODBPZWlVbElvbm9jTSJ9.luU7VDVnDVz7xuHLKEY5UWfxU78sGvzysZ99R8-1Bxo' \
--header 'Referer: http://localhost:9000/' \
--header 'sec-ch-ua: "Google Chrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129"' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'api-key: dev_LZcIA7XeMpnK5satp4CDvjcnHCaeKTBcosyuBBJaknZu1odhFo96cwS0nSdfzuJF' \
--header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36' \
--header 'Content-Type: application/json' \
--data-raw '{
"query": "merchant_1726046328",
"filters": {
"currency": [
"UsD"
],
"connector": [
"striPe_Test"
],
"customer_email": [
"test@test14.com"
],
"payment_method_type": [
"credit"
],
"payment_method": [
"cArd", "iwubefi"
],
"payment_id": [
"pay_QdstJpRVAcRKHzRIRK4d"
],
"card_last_4": [
"4242"
],
"status": [
"CharGed", "succeeded"
]
},
"timeRange": {
"startTime": "2024-09-13T00:30:00Z",
"endTime": "2024-10-30T21:45:00Z"
}
}'
```
Expected response:
```json
[
{
"count": 0,
"index": "payment_attempts",
"hits": [],
"status": "Success"
},
{
"count": 0,
"index": "payment_intents",
"hits": [],
"status": "Success"
},
{
"count": 0,
"index": "refunds",
"hits": [],
"status": "Success"
},
{
"count": 0,
"index": "disputes",
"hits": [],
"status": "Failure"
},
{
"count": 1,
"index": "sessionizer_payment_attempts",
"hits": [
{
"@timestamp": "2024-10-24T07:59:12.887Z",
"amount": 6540,
"amount_capturable": 0,
"amount_to_capture": 6540,
"attempt_id": "pay_QdstJpRVAcRKHzRIRK4d_1",
"authentication_type": "no_three_ds",
"capture_method": "automatic",
"capture_on": 1662804672000,
"card_last_4": "4242",
"confirm": true,
"connector": "stripe_test",
"connector_transaction_id": "pay_BV1cUypv6paxZvJl2SiQ",
"created_at": 1729756752887,
"currency": "USD",
"customer_email": "f6cd0753a831880835a0e0d23136ef66318d8303605bd37fa80b4ecf248bd303",
"customer_id": "StripeCustomer",
"first_attempt": true,
"headers": {},
"log_count": 9,
"merchant_connector_id": "mca_NNsdIEb1AjEOkyALerP6",
"merchant_id": "merchant_1726046328",
"modified_at": 1729756754123,
"net_amount": 6540,
"organization_id": "org_VpSHOjsYfDvabVYJgCAJ",
"payment_id": "pay_QdstJpRVAcRKHzRIRK4d",
"payment_method": "card",
"payment_method_data": "{\"card\":{\"last4\":\"4242\",\"bank_code\":null,\"card_isin\":\"424242\",\"card_type\":null,\"card_issuer\":null,\"card_network\":null,\"card_exp_year\":\"25\",\"card_exp_month\":\"10\",\"payment_checks\":null,\"card_holder_name\":null,\"card_extended_bin\":null,\"authentication_data\":null,\"card_issuing_country\":null}}",
"payment_method_type": "credit",
"profile_id": "pro_v5sFoHe80OeiUlIonocM",
"source_type": "kafka",
"status": "charged",
"tenant_id": "public",
"timestamp": "2024-10-24T07:59:12.887Z"
}
],
"status": "Success"
},
{
"count": 1,
"index": "sessionizer_payment_intents",
"hits": [
{
"@timestamp": "2024-10-24T07:59:12.886Z",
"active_attempt_id": "pay_QdstJpRVAcRKHzRIRK4d_1",
"amount": 6540,
"amount_captured": 6540,
"attempt_count": 1,
"attempts_list": [
{
"amount": 6540,
"amount_capturable": 0,
"amount_to_capture": 6540,
"attempt_id": "pay_QdstJpRVAcRKHzRIRK4d_1",
"authentication_type": "no_three_ds",
"capture_method": "automatic",
"capture_on": 1662804672000,
"confirm": true,
"connector": "stripe_test",
"connector_transaction_id": "pay_BV1cUypv6paxZvJl2SiQ",
"created_at": 1729756752887,
"currency": "USD",
"last_synced": 1729756752887,
"merchant_connector_id": "mca_NNsdIEb1AjEOkyALerP6",
"merchant_id": "merchant_1726046328",
"modified_at": 1729756754123,
"net_amount": 6540,
"organization_id": "org_VpSHOjsYfDvabVYJgCAJ",
"payment_id": "pay_QdstJpRVAcRKHzRIRK4d",
"payment_method": "card",
"payment_method_data": "{\"card\":{\"last4\":\"4242\",\"bank_code\":null,\"card_isin\":\"424242\",\"card_type\":null,\"card_issuer\":null,\"card_network\":null,\"card_exp_year\":\"25\",\"card_exp_month\":\"10\",\"payment_checks\":null,\"card_holder_name\":null,\"card_extended_bin\":null,\"authentication_data\":null,\"card_issuing_country\":null}}",
"payment_method_type": "credit",
"profile_id": "pro_v5sFoHe80OeiUlIonocM",
"status": "charged",
"tenant_id": "public"
}
],
"authentication_type": "no_three_ds",
"business_label": "default",
"card_last_4": "4242",
"client_secret": "pay_QdstJpRVAcRKHzRIRK4d_secret_u2WJTHVO3BmpJfkzdXaY",
"connector": "stripe_test",
"created_at": 1729756752886,
"currency": "USD",
"customer_email": "f6cd0753a831880835a0e0d23136ef66318d8303605bd37fa80b4ecf248bd303",
"customer_id": "StripeCustomer",
"description": "Its my first payment request",
"dispute_list": [],
"headers": {},
"log_count": 9,
"merchant_connector_id": "mca_NNsdIEb1AjEOkyALerP6",
"merchant_id": "merchant_1726046328",
"metadata": "{\"data2\":\"camel\",\"login_date\":\"2019-09-10T10:11:12Z\",\"new_customer\":\"true\"}",
"modified_at": 1729756754123,
"organization_id": "org_VpSHOjsYfDvabVYJgCAJ",
"payment_id": "pay_QdstJpRVAcRKHzRIRK4d",
"payment_method": "card",
"payment_method_data": "{\"card\":{\"last4\":\"4242\",\"bank_code\":null,\"card_isin\":\"424242\",\"card_type\":null,\"card_issuer\":null,\"card_network\":null,\"card_exp_year\":\"25\",\"card_exp_month\":\"10\",\"payment_checks\":null,\"card_holder_name\":null,\"card_extended_bin\":null,\"authentication_data\":null,\"card_issuing_country\":null}}",
"payment_method_type": "credit",
"profile_id": "pro_v5sFoHe80OeiUlIonocM",
"refund_list": [
{
"attempt_id": "pay_QdstJpRVAcRKHzRIRK4d_1",
"connector": "stripe_test",
"connector_refund_id": "dummy_ref_6HyIEJcmDyE75QiFnv76",
"connector_transaction_id": "pay_BV1cUypv6paxZvJl2SiQ",
"created_at": 1729756766669,
"currency": "USD",
"description": "Customer returned product",
"external_reference_id": "ref_Tc3KfBVm5HEuzECytr9g",
"internal_reference_id": "refid_vDztMj3wI0ETCFXEoWUG",
"merchant_id": "merchant_1726046328",
"modified_at": 1729756767668,
"organization_id": "org_VpSHOjsYfDvabVYJgCAJ",
"payment_id": "pay_QdstJpRVAcRKHzRIRK4d",
"profile_id": "pro_v5sFoHe80OeiUlIonocM",
"refund_amount": 600,
"refund_arn": "",
"refund_id": "ref_Tc3KfBVm5HEuzECytr9g",
"refund_reason": "Customer returned product",
"refund_status": "success",
"refund_type": "instant_refund",
"sent_to_gateway": true,
"tenant_id": "public",
"total_amount": 6540
}
],
"refunds_status": "partial_refunded",
"return_url": "https://google.com/",
"source_type": "kafka",
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"status": "succeeded",
"tenant_id": "public",
"timestamp": "2024-10-24T07:59:12.886Z"
}
],
"status": "Success"
},
{
"count": 0,
"index": "sessionizer_refunds",
"hits": [],
"status": "Success"
},
{
"count": 0,
"index": "sessionizer_disputes",
"hits": [],
"status": "Failure"
}
]
```
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Other**
- `crates/analytics/src/opensearch.rs`
- `crates/analytics/src/search.rs`
**Code Patterns Applied:**
- Implement new functions (4 changes)
- Extend existing types with new fields (7 changes)
- Add conditional logic for feature flags or filtering (5 changes)
- Modify database queries (3 changes)
**Detailed Identifier Changes:**
Commit 529f1a76:
Files to modify:
**crates/analytics/src/opensearch.rs**
Remove:
- function: pub::replace_status_field
Add:
- function: pub::build_filter_array
- function: pub::build_case_insensitive_filters
- function: pub::build_auth_array
**crates/analytics/src/search.rs**
Modify existing code
|
{"pr_number": 6476, "pr_title": "feat(opensearch): refactor global search querybuilder and add case insensitivity opensearch filters", "merged_at": "2024-11-08T10:47:07Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"other": ["crates/analytics/src/opensearch.rs", "crates/analytics/src/search.rs"]}, "change_types": {"functions_added": 4, "fields_added": 7, "imports_added": 2, "conditionals_added": 5, "database_queries": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
fix(connector): [paysafe] make `eci_indicator` field optional
## 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 -->
`eci_indicator` should be optional since transactions done from cards like mastercard do not send 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).
-->
this is a bug fix. when transaction done from a mastercard, we do not get eci_indicator. since we treat it as a mandatory, it results in `5xx` and hence this pr
## 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)?
-->
<details>
<summary>payment create</summary>
```bash
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Accept-Language: ja' \
--header 'api-key: dev_p4KwZyWhyuLslln1ZDZtsiCdaZZPGteBmDjti3ML09sRhl8w9RuJvw5m9fEZRVbl' \
--data-raw '{
"amount": 1000,
"currency": "USD",
"confirm": false,
"business_country": "US",
"business_label": "default",
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"customer_id": "StripeCustomer",
"email": "likhin.bopanna@gmail.com",
"name": "John Doe",
"phone": "999999999",
"phone_country_code": "+65",
"description": "Its my first payment request",
"authentication_type": "no_three_ds",
"return_url": "https://duck.com",
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
}
}'
```
```json
{
"payment_id": "pay_l9VGqZyhLBoDv5QIqUAh",
"merchant_id": "postman_merchant_GHAction_1759125682",
"status": "requires_payment_method",
"amount": 1000,
"net_amount": 1000,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": null,
"connector": null,
"client_secret": "pay_l9VGqZyhLBoDv5QIqUAh_secret_S7NICANrsyU1MMmPOwxw",
"created": "2025-09-29T06:13:54.321Z",
"currency": "USD",
"customer_id": "StripeCustomer",
"customer": {
"id": "StripeCustomer",
"name": "John Doe",
"email": "likhin.bopanna@gmail.com",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Its my first payment request",
"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": null,
"payment_method_data": null,
"payment_token": null,
"shipping": null,
"billing": null,
"order_details": null,
"email": "likhin.bopanna@gmail.com",
"name": "John Doe",
"phone": "999999999",
"return_url": "https://duck.com/",
"authentication_type": "no_three_ds",
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"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": "US",
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "StripeCustomer",
"created_at": 1759126434,
"expires": 1759130034,
"secret": "epk_0068b218153a4786bbbca8294cf9ca88"
},
"manual_retry_allowed": null,
"connector_transaction_id": null,
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": null,
"feature_metadata": null,
"reference_id": null,
"payment_link": null,
"profile_id": "pro_31U1aVcxPji356abB9Oz",
"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-09-29T06:28:54.321Z",
"fingerprint": null,
"browser_info": null,
"payment_channel": null,
"payment_method_id": null,
"network_transaction_id": null,
"payment_method_status": null,
"updated": "2025-09-29T06:13:54.336Z",
"split_payments": null,
"frm_metadata": null,
"extended_authorization_applied": null,
"request_extended_authorization": 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,
"is_iframe_redirection_enabled": null,
"whole_connector_response": null,
"enable_partial_authorization": null,
"enable_overcapture": null,
"is_overcapture_enabled": null,
"network_details": null
}
```
</details>
<details>
<summary>session call</summary>
```bash
curl --location 'http://localhost:8080/payments/session_tokens' \
--header 'Content-Type: application/json' \
--header 'api-key: pk_dev_c93332bf30c64ad59e0af14f1f83c2e5' \
--data '{
"payment_id": "pay_l9VGqZyhLBoDv5QIqUAh",
"wallets": [],
"client_secret": "pay_l9VGqZyhLBoDv5QIqUAh_secret_S7NICANrsyU1MMmPOwxw"
}'
```
```json
{
"payment_id": "pay_l9VGqZyhLBoDv5QIqUAh",
"client_secret": "pay_l9VGqZyhLBoDv5QIqUAh_secret_S7NICANrsyU1MMmPOwxw",
"session_token": [
{
"wallet_name": "apple_pay",
"session_token_data": {
"epoch_timestamp": 1759126436460,
"expires_at": 1759130036460,
"merchant_session_identifier": "SS..C3",
"nonce": "e6c4ab10",
"merchant_identifier": "8C..C4",
"domain_name": "hyperswitch.app",
"display_name": "apple pay",
"signature": "30..00",
"operational_analytics_identifier": "apple pay:8C..C4",
"retries": 0,
"psp_id": "8C..C4"
},
"payment_request_data": {
"country_code": "US",
"currency_code": "USD",
"total": {
"label": "applepay",
"type": "final",
"amount": "10.00"
},
"merchant_capabilities": [
"supports3DS"
],
"supported_networks": [
"visa",
"masterCard",
"amex",
"discover"
],
"merchant_identifier": "merchant.lol"
},
"connector": "paysafe",
"delayed_session_token": false,
"sdk_next_action": {
"next_action": "confirm"
},
"connector_reference_id": null,
"connector_sdk_public_key": null,
"connector_merchant_id": null
}
]
}
```
</details>
<details>
<summary>payment confirm</summary>
```bash
curl --location 'http://localhost:8080/payments/pay_l9VGqZyhLBoDv5QIqUAh/confirm' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_p4KwZyWhyuLslln1ZDZtsiCdaZZPGteBmDjti3ML09sRhl8w9RuJvw5m9fEZRVbl' \
--data '{
"confirm": true,
"payment_method": "wallet",
"payment_method_type": "apple_pay",
"payment_method_data": {
"wallet": {
"apple_pay": {
"payment_data": {
"application_primary_account_number": "5204245253050839",
"application_expiration_month": "01",
"application_expiration_year": "30",
"payment_data": {
"online_payment_cryptogram": "A..A=",
"eci_indicator": "1"
}
},
"payment_method": {
"display_name": "Visa 4228",
"network": "Mastercard",
"type": "debit"
},
"transaction_identifier": "a0..4a"
}
},
"billing": null
},
"browser_info": {
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"language": "nl-NL",
"color_depth": 24,
"screen_height": 723,
"screen_width": 1536,
"time_zone": 0,
"java_enabled": true,
"java_script_enabled": true,
"ip_address": "127.0.0.1"
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "John",
"last_name": "Doe"
}
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "John",
"last_name": "Doe"
}
}
}'
```
```json
{
"payment_id": "pay_l9VGqZyhLBoDv5QIqUAh",
"merchant_id": "postman_merchant_GHAction_1759125682",
"status": "succeeded",
"amount": 1000,
"net_amount": 1000,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": 1000,
"connector": "paysafe",
"client_secret": "pay_l9VGqZyhLBoDv5QIqUAh_secret_S7NICANrsyU1MMmPOwxw",
"created": "2025-09-29T06:13:54.321Z",
"currency": "USD",
"customer_id": "StripeCustomer",
"customer": {
"id": "StripeCustomer",
"name": "John Doe",
"email": "likhin.bopanna@gmail.com",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Its my first payment request",
"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": {
"apple_pay": {
"last4": "4228",
"card_network": "Mastercard",
"type": "debit"
}
},
"billing": null
},
"payment_token": null,
"shipping": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "John",
"last_name": "Doe",
"origin_zip": null
},
"phone": null,
"email": null
},
"billing": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "John",
"last_name": "Doe",
"origin_zip": null
},
"phone": null,
"email": null
},
"order_details": null,
"email": "likhin.bopanna@gmail.com",
"name": "John Doe",
"phone": "999999999",
"return_url": "https://duck.com/",
"authentication_type": "no_three_ds",
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"next_action": null,
"cancellation_reason": null,
"error_code": null,
"error_message": null,
"unified_code": null,
"unified_message": null,
"payment_experience": null,
"payment_method_type": "apple_pay",
"connector_label": "paysafe_US_default",
"business_country": "US",
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": null,
"manual_retry_allowed": null,
"connector_transaction_id": "84eab9d5-25bc-48a8-8672-c9775491787c",
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": null,
"feature_metadata": {
"redirect_response": null,
"search_tags": null,
"apple_pay_recurring_details": null,
"gateway_system": "direct"
},
"reference_id": null,
"payment_link": null,
"profile_id": "pro_31U1aVcxPji356abB9Oz",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_elKlZ2pGPWPAiySGe825",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-09-29T06:28:54.321Z",
"fingerprint": null,
"browser_info": {
"os_type": null,
"referer": null,
"language": "nl-NL",
"time_zone": 0,
"ip_address": "127.0.0.1",
"os_version": null,
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
"color_depth": 24,
"device_model": null,
"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,
"accept_language": "en",
"java_script_enabled": true
},
"payment_channel": null,
"payment_method_id": null,
"network_transaction_id": null,
"payment_method_status": null,
"updated": "2025-09-29T06:13:59.443Z",
"split_payments": null,
"frm_metadata": null,
"extended_authorization_applied": null,
"request_extended_authorization": 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,
"is_iframe_redirection_enabled": null,
"whole_connector_response": null,
"enable_partial_authorization": null,
"enable_overcapture": null,
"is_overcapture_enabled": null,
"network_details": null
}
```
</details>
<details>
<summary>logs</summary>
<img width="1400" height="535" alt="image" src="https://github.com/user-attachments/assets/dd18b58c-b29b-4e2a-a302-ced98d27785a" />
<img width="1405" height="399" alt="image" src="https://github.com/user-attachments/assets/702e41f5-ecc3-4ad0-ba35-f247bb256d76" />
</details>
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. External Connector Integration**
- `crates/hyperswitch_connectors/src/connectors/paysafe/transformers.rs`
**Code Patterns Applied:**
- Extend existing types with new fields (2 changes)
**Detailed Identifier Changes:**
Commit f6716f61:
Files to modify:
**crates/hyperswitch_connectors/src/connectors/paysafe/transformers.rs**
Modify existing code
|
{"pr_number": 9591, "pr_title": "fix(connector): [paysafe] make `eci_indicator` field optional", "merged_at": "2025-09-30T07:42:15Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/paysafe/transformers.rs"]}, "change_types": {"fields_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(connector): [BILLWERK, FISERVEMEA, TSYS] add in feature matrix api
## 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 Billwerk, Fiservemea, Tsys supported payment methods, currencies and countries in feature matrix
### 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).
-->
[#7164](https://github.com/juspay/hyperswitch/issues/7164)
## 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)?
-->
Postman Test
Feature API curl:
```
curl --location 'http://localhost:8080/feature_matrix' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_JQif2lR5NNugTdsi6xSqQ1ozsn6QA4r750wFN5yvwrAsRlcsdyk24VnEiYguAAxZ'
```
Response -
```
{
"connector_count": 3,
"connectors": [
{
"name": "BILLWERK",
"display_name": "Billwerk",
"description": "Billwerk+ Pay is an acquirer independent payment gateway that's easy to setup with more than 50 recurring and non-recurring payment methods.",
"category": "payment_gateway",
"supported_payment_methods": [
{
"payment_method": "card",
"payment_method_type": "debit",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"manual",
"sequential_automatic"
],
"three_ds": "not_supported",
"no_three_ds": "supported",
"supported_card_networks": [
"Mastercard",
"Visa",
"AmericanExpress",
"Discover",
"JCB",
"UnionPay",
"DinersClub",
"Interac",
"CartesBancaires"
],
"supported_countries": [
"DK",
"DE",
"FR",
"SE"
],
"supported_currencies": [
"DKK",
"NOK"
]
},
{
"payment_method": "card",
"payment_method_type": "credit",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"manual",
"sequential_automatic"
],
"three_ds": "not_supported",
"no_three_ds": "supported",
"supported_card_networks": [
"Mastercard",
"Visa",
"AmericanExpress",
"Discover",
"JCB",
"UnionPay",
"DinersClub",
"Interac",
"CartesBancaires"
],
"supported_countries": [
"SE",
"FR",
"DE",
"DK"
],
"supported_currencies": [
"NOK",
"DKK"
]
}
],
"supported_webhook_flows": []
},
{
"name": "FISERVEMEA",
"display_name": "Fiservemea",
"description": "Fiserv powers over 6+ million merchants and 10,000+ financial institutions enabling them to accept billions of payments a year.",
"category": "bank_acquirer",
"supported_payment_methods": [
{
"payment_method": "card",
"payment_method_type": "debit",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"manual",
"sequential_automatic"
],
"three_ds": "not_supported",
"no_three_ds": "supported",
"supported_card_networks": [
"Mastercard",
"Visa",
"AmericanExpress",
"Discover",
"JCB",
"UnionPay",
"DinersClub",
"Interac",
"CartesBancaires"
],
"supported_countries": [
"AE",
"PL",
"FR",
"ES",
"GB",
"ZA",
"DE",
"NL",
"IT"
],
"supported_currencies": [
"SSP",
"BIF",
"MOP",
"KMF",
"HNL",
"SYP",
"CVE",
"SGD",
"KHR",
"MXN",
"NPR",
"RUB",
"TMT",
"BRL",
"MRU",
"SHP",
"KPW",
"KZT",
"SLE",
"CZK",
"CAD",
"VUV",
"PYG",
"SOS",
"AFN",
"MVR",
"YER",
"ZAR",
"TTD",
"CHF",
"AMD",
"NGN",
"KYD",
"ERN",
"PKR",
"MZN",
"TJS",
"BTN",
"IDR",
"SCR",
"AED",
"MUR",
"CLP",
"XPF",
"TOP",
"PHP",
"THB",
"AZN",
"RON",
"DZD",
"SBD",
"PAB",
"HRK",
"KRW",
"SEK",
"BOB",
"LKR",
"SAR",
"KGS",
"NIO",
"RSD",
"PLN",
"NZD",
"BYN",
"SVC",
"GYD",
"SZL",
"USD",
"ISK",
"BMD",
"COP",
"SDG",
"TZS",
"KWD",
"UYU",
"JOD",
"CUP",
"LYD",
"LAK",
"DOP",
"AUD",
"VES",
"FJD",
"CRC",
"FKP",
"HKD",
"IRR",
"BDT",
"BBD",
"EUR",
"BHD",
"UAH",
"MGA",
"CNY",
"HTG",
"ALL",
"INR",
"GHS",
"MAD",
"TWD",
"MYR",
"BND",
"NAD",
"QAR",
"GIP",
"GEL",
"AOA",
"UGX",
"LSL",
"XAF",
"LBP",
"DJF",
"ETB",
"TND",
"XCD",
"SRD",
"GNF",
"BGN",
"GTQ",
"MWK",
"ZMW",
"MKD",
"HUF",
"PEN",
"RWF",
"DKK",
"BZD",
"IQD",
"ANG",
"ARS",
"GBP",
"WST",
"ZWL",
"PGK",
"TRY",
"KES",
"MDL",
"MNT",
"CDF",
"BAM",
"LRD",
"JPY",
"GMD",
"STN",
"VND",
"BWP",
"OMR",
"NOK",
"SLL",
"JMD",
"XOF",
"MMK",
"EGP",
"AWG",
"ILS",
"UZS",
"BSD"
]
},
{
"payment_method": "card",
"payment_method_type": "credit",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"manual",
"sequential_automatic"
],
"three_ds": "not_supported",
"no_three_ds": "supported",
"supported_card_networks": [
"Mastercard",
"Visa",
"AmericanExpress",
"Discover",
"JCB",
"UnionPay",
"DinersClub",
"Interac",
"CartesBancaires"
],
"supported_countries": [
"NL",
"ES",
"DE",
"PL",
"IT",
"AE",
"GB",
"ZA",
"FR"
],
"supported_currencies": [
"JOD",
"AED",
"ALL",
"BOB",
"ERN",
"LBP",
"PAB",
"HNL",
"AZN",
"TMT",
"DKK",
"AWG",
"PKR",
"LAK",
"PGK",
"JMD",
"CUP",
"PHP",
"BAM",
"THB",
"FKP",
"HRK",
"UYU",
"KZT",
"BYN",
"PLN",
"SDG",
"VND",
"NZD",
"KWD",
"CDF",
"SCR",
"VUV",
"CHF",
"USD",
"GYD",
"ANG",
"DOP",
"MKD",
"STN",
"SAR",
"QAR",
"PEN",
"RSD",
"BRL",
"KGS",
"SGD",
"TWD",
"BHD",
"KHR",
"MOP",
"GHS",
"UGX",
"XPF",
"SSP",
"CAD",
"TOP",
"OMR",
"MXN",
"BGN",
"RUB",
"MDL",
"GNF",
"PYG",
"SRD",
"AFN",
"MNT",
"NOK",
"XAF",
"BWP",
"NGN",
"GIP",
"CZK",
"MGA",
"DZD",
"YER",
"DJF",
"SBD",
"CNY",
"ZAR",
"LYD",
"BMD",
"MUR",
"NIO",
"UZS",
"GBP",
"VES",
"SVC",
"CVE",
"NPR",
"RON",
"KMF",
"BZD",
"KPW",
"SLL",
"LKR",
"AUD",
"LSL",
"XCD",
"TJS",
"KYD",
"UAH",
"ARS",
"NAD",
"SEK",
"GTQ",
"BSD",
"IDR",
"WST",
"AMD",
"BTN",
"HUF",
"ZMW",
"COP",
"BIF",
"FJD",
"INR",
"IRR",
"GEL",
"HTG",
"SOS",
"CLP",
"ISK",
"MVR",
"RWF",
"BBD",
"KRW",
"BDT",
"LRD",
"AOA",
"MMK",
"MWK",
"SLE",
"XOF",
"MRU",
"KES",
"MYR",
"MZN",
"SYP",
"SZL",
"TRY",
"SHP",
"TTD",
"GMD",
"TZS",
"ETB",
"ILS",
"IQD",
"CRC",
"BND",
"HKD",
"EGP",
"JPY",
"MAD",
"TND",
"EUR",
"ZWL"
]
}
],
"supported_webhook_flows": []
},
{
"name": "TSYS",
"display_name": "Tsys",
"description": "TSYS, a Global Payments company, is the payment stack for the future, powered by unmatched expertise.",
"category": "bank_acquirer",
"supported_payment_methods": [
{
"payment_method": "card",
"payment_method_type": "credit",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"manual",
"sequential_automatic"
],
"three_ds": "not_supported",
"no_three_ds": "supported",
"supported_card_networks": [
"Mastercard",
"Visa",
"AmericanExpress",
"Discover",
"JCB",
"UnionPay"
],
"supported_countries": [
"NA"
],
"supported_currencies": [
"CUP",
"SZL",
"GMD",
"AMD",
"MRU",
"BWP",
"SSP",
"QAR",
"XOF",
"VES",
"XAF",
"BBD",
"BSD",
"ETB",
"GBP",
"BHD",
"UYU",
"XCD",
"JPY",
"VUV",
"SAR",
"ZAR",
"MOP",
"MDL",
"IRR",
"SGD",
"MVR",
"BIF",
"BTN",
"STN",
"AED",
"TTD",
"TWD",
"UZS",
"KZT",
"ALL",
"UGX",
"DOP",
"BMD",
"FJD",
"KGS",
"KPW",
"ZMW",
"IQD",
"HRK",
"KMF",
"GTQ",
"LSL",
"NOK",
"MWK",
"CDF",
"KRW",
"ERN",
"RUB",
"GEL",
"MGA",
"OMR",
"HUF",
"HTG",
"PYG",
"MUR",
"HKD",
"BZD",
"LRD",
"SRD",
"THB",
"IDR",
"TJS",
"TRY",
"VND",
"JOD",
"PKR",
"GNF",
"LKR",
"TND",
"BDT",
"DJF",
"SDG",
"AOA",
"SVC",
"PEN",
"KYD",
"BRL",
"JMD",
"ISK",
"COP",
"BAM",
"BOB",
"CVE",
"INR",
"RWF",
"SCR",
"YER",
"LYD",
"MYR",
"LBP",
"CZK",
"NIO",
"SEK",
"DKK",
"UAH",
"USD",
"AZN",
"RON",
"HNL",
"SYP",
"CHF",
"PAB",
"NGN",
"NPR",
"AFN",
"CAD",
"ANG",
"GYD",
"MXN",
"BND",
"LAK",
"PGK",
"PLN",
"SHP",
"ARS",
"KWD",
"ILS",
"TMT",
"XPF",
"ZWL",
"FKP",
"CLP",
"AUD",
"DZD",
"GHS",
"PHP",
"NAD",
"TZS",
"CNY",
"MAD",
"NZD",
"MNT",
"WST",
"KHR",
"CRC",
"SLE",
"AWG",
"GIP",
"BGN",
"RSD",
"SOS",
"MKD",
"MMK",
"TOP",
"MZN",
"BYN",
"KES",
"EGP",
"EUR",
"SBD"
]
},
{
"payment_method": "card",
"payment_method_type": "debit",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": [
"automatic",
"manual",
"sequential_automatic"
],
"three_ds": "not_supported",
"no_three_ds": "supported",
"supported_card_networks": [
"Mastercard",
"Visa",
"AmericanExpress",
"Discover",
"JCB",
"UnionPay"
],
"supported_countries": [
"NA"
],
"supported_currencies": [
"AZN",
"SAR",
"ZWL",
"MRU",
"SZL",
"TRY",
"TOP",
"YER",
"LKR",
"ISK",
"NIO",
"TTD",
"BMD",
"PAB",
"MNT",
"BTN",
"SYP",
"HUF",
"CHF",
"UAH",
"DJF",
"DOP",
"XPF",
"MVR",
"WST",
"ZMW",
"TMT",
"TWD",
"LBP",
"PGK",
"XOF",
"ARS",
"PLN",
"MUR",
"MZN",
"NGN",
"MDL",
"SDG",
"SLE",
"VND",
"STN",
"KZT",
"THB",
"SGD",
"HRK",
"AUD",
"NAD",
"KHR",
"BSD",
"GEL",
"NOK",
"KPW",
"GNF",
"GHS",
"MWK",
"RUB",
"MAD",
"GMD",
"BWP",
"VUV",
"GTQ",
"BZD",
"MYR",
"BND",
"KMF",
"CVE",
"SSP",
"BBD",
"ALL",
"UZS",
"ERN",
"GYD",
"CUP",
"TJS",
"CZK",
"OMR",
"GIP",
"XCD",
"CNY",
"SBD",
"RON",
"KES",
"HKD",
"IQD",
"BDT",
"CDF",
"SEK",
"JPY",
"HNL",
"ETB",
"GBP",
"VES",
"TZS",
"MXN",
"XAF",
"CLP",
"AMD",
"LAK",
"EGP",
"NZD",
"SCR",
"SHP",
"ILS",
"KRW",
"SOS",
"MGA",
"JMD",
"ZAR",
"NPR",
"BAM",
"BIF",
"EUR",
"UYU",
"CRC",
"RSD",
"TND",
"PKR",
"SRD",
"AED",
"BOB",
"INR",
"MOP",
"USD",
"PEN",
"LRD",
"UGX",
"MMK",
"KGS",
"BRL",
"SVC",
"FKP",
"ANG",
"MKD",
"BGN",
"BHD",
"PHP",
"IRR",
"KYD",
"RWF",
"LSL",
"QAR",
"DKK",
"IDR",
"DZD",
"LYD",
"AWG",
"AFN",
"KWD",
"BYN",
"JOD",
"AOA",
"HTG",
"COP",
"FJD",
"CAD",
"PYG"
]
}
],
"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`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. External Connector Integration**
- `crates/hyperswitch_connectors/src/connectors/billwerk.rs`
- `crates/hyperswitch_connectors/src/connectors/fiservemea.rs`
- `crates/hyperswitch_connectors/src/connectors/tsys.rs`
**2. Tests**
- `config/deployments/integration_test.toml`
**3. Configuration Files**
- `config/config.example.toml`
- `config/deployments/production.toml`
- `config/deployments/sandbox.toml`
- ... and 2 more files
**Code Patterns Applied:**
- Implement new functions (9 changes)
- Extend existing types with new fields (51 changes)
**Detailed Identifier Changes:**
Commit e15c8146:
Files to modify:
**crates/hyperswitch_connectors/src/connectors/billwerk.rs**
Remove:
- function: private::validate_connector_against_payment_request
- impl: impl ConnectorValidation for Billwerk
- impl: impl ConnectorSpecifications for Billwerk
Add:
- function: private::get_connector_about
- function: private::get_supported_payment_methods
- function: private::get_supported_webhook_flows
- impl: impl ConnectorValidation for Billwerk
- impl: impl ConnectorSpecifications for Billwerk
**crates/hyperswitch_connectors/src/connectors/fiservemea.rs**
Remove:
- function: private::validate_connector_against_payment_request
- impl: impl ConnectorValidation for Fiservemea
- impl: impl ConnectorSpecifications for Fiservemea
Add:
- function: private::get_connector_about
- function: private::get_supported_payment_methods
- function: private::get_supported_webhook_flows
- impl: impl ConnectorValidation for Fiservemea
- impl: impl ConnectorSpecifications for Fiservemea
**crates/hyperswitch_connectors/src/connectors/tsys.rs**
Remove:
- function: private::validate_connector_against_payment_request
- impl: impl ConnectorValidation for Tsys
- impl: impl ConnectorSpecifications for Tsys
Add:
- function: private::get_connector_about
- function: private::get_supported_payment_methods
- function: private::get_supported_webhook_flows
- impl: impl ConnectorValidation for Tsys
- impl: impl ConnectorSpecifications for Tsys
|
{"pr_number": 7165, "pr_title": "feat(connector): [BILLWERK, FISERVEMEA, TSYS] add in feature matrix api", "merged_at": "2025-03-11T13:56:43Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "refund"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/billwerk.rs", "crates/hyperswitch_connectors/src/connectors/fiservemea.rs", "crates/hyperswitch_connectors/src/connectors/tsys.rs"], "tests": ["config/deployments/integration_test.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"]}, "change_types": {"functions_added": 9, "fields_added": 51, "imports_added": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(user_roles): add parent group info based API to fetch permissions for user role
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Adds a new API endpoint GET /user/role/v3 that returns user role permissions using parent group information with resource details.
### 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
This PR adds a new API endpoint that provides structured parent group info with resources and scopes, enabling the frontend to implement proper resource + scope based permission checks.
## How did you test it?
```
curl --location 'http://localhost:9000/api/user/role/v3' \
--header 'Cookie: *******
```
Response:
```
[
{
"name": "ReconReports",
"resources": [
"recon_token",
"recon_and_settlement_analytics",
"recon_reports",
"account"
],
"scopes": [
"write",
"read"
]
},
{
"name": "Analytics",
"resources": [
"analytics",
"report",
"account"
],
"scopes": [
"read"
]
},
{
"name": "Theme",
"resources": [
"theme"
],
"scopes": [
"read",
"write"
]
},
{
"name": "Operations",
"resources": [
"payment",
"refund",
"mandate",
"dispute",
"customer",
"payout",
"report",
"account"
],
"scopes": [
"write",
"read"
]
},
{
"name": "Connectors",
"resources": [
"connector",
"account"
],
"scopes": [
"write",
"read"
]
},
{
"name": "Users",
"resources": [
"user",
"account"
],
"scopes": [
"read",
"write"
]
},
{
"name": "Workflows",
"resources": [
"routing",
"three_ds_decision_manager",
"surcharge_decision_manager",
"account",
"revenue_recovery"
],
"scopes": [
"read",
"write"
]
},
{
"name": "ReconOps",
"resources": [
"recon_token",
"recon_files",
"recon_upload",
"run_recon",
"recon_config",
"recon_and_settlement_analytics",
"recon_reports",
"account"
],
"scopes": [
"write",
"read"
]
},
{
"name": "Account",
"resources": [
"account",
"api_key",
"webhook_event"
],
"scopes": [
"write",
"read"
]
}
]
```
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. API Request/Response Models**
- `crates/api_models/src/user_role/role.rs`
**2. Core Business Logic**
- `crates/router/src/core/user_role.rs`
- `crates/router/src/core/user_role/role.rs`
**3. Type Definitions**
- `crates/router_env/src/logger/types.rs`
**4. Utils**
- `crates/router/src/routes/lock_utils.rs`
- `crates/router/src/utils/user_role.rs`
**5. Other**
- `crates/router/src/routes/app.rs`
- `crates/router/src/routes/user_role.rs`
- `crates/router/src/services/authorization/permission_groups.rs`
- ... and 1 more files
**Code Patterns Applied:**
- Define new data structures (2 changes)
- Implement new functions (5 changes)
- Extend existing types with new fields (24 changes)
- Add conditional logic for feature flags or filtering (1 changes)
- Modify database queries (8 changes)
**Detailed Identifier Changes:**
Commit c44c3ed2:
Files to modify:
**crates/api_models/src/user_role/role.rs**
Remove:
- struct: pub::ParentGroupInfo
Add:
- struct: pub::ParentGroupDescription
**crates/router/src/core/user_role.rs**
Modify existing code
**crates/router/src/core/user_role/role.rs**
Add:
- function: pub::get_parent_groups_info_for_role_from_token
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/routes/lock_utils.rs**
Modify existing code
**crates/router/src/routes/user_role.rs**
Add:
- function: pub::get_parent_groups_info_for_role_from_token
**crates/router/src/services/authorization/permission_groups.rs**
Modify existing code
**crates/router/src/services/authorization/permissions.rs**
Add:
- function: pub::filter_resources_by_entity_type
**crates/router/src/utils/user_role.rs**
Add:
- function: pub::resources_to_description
**crates/router_env/src/logger/types.rs**
Modify existing code
|
{"pr_number": 9487, "pr_title": "feat(user_roles): add parent group info based API to fetch permissions for user role", "merged_at": "2025-10-07T15:25:25Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "user"]}, "hierarchy": {"api_models": ["crates/api_models/src/user_role/role.rs"], "core_business": ["crates/router/src/core/user_role.rs", "crates/router/src/core/user_role/role.rs"], "types": ["crates/router_env/src/logger/types.rs"], "utils": ["crates/router/src/routes/lock_utils.rs", "crates/router/src/utils/user_role.rs"], "other": ["crates/router/src/routes/app.rs", "crates/router/src/routes/user_role.rs", "crates/router/src/services/authorization/permission_groups.rs", "crates/router/src/services/authorization/permissions.rs"]}, "change_types": {"structs_added": 2, "functions_added": 5, "fields_added": 24, "imports_added": 1, "conditionals_added": 1, "database_queries": 8}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
fix(connector): [FORTE] Deserialization Error in PSync Response
## 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 -->
When an automatic capture is done and a sync is done -> No Deserialization issue found
When a manual capture is done and a sync is done post that -> Deserialization issue found
### 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).
-->
Ref : https://restdocs.forte.net/#fd4c4170-ae63-45fc-94c3-db58756e0827
## 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. Payments Create - Automatic Capture
cURL :
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_tgUgPmumCNvxuuaYLUkwFJ5oF5sHkc3C0PJpkWdbxc7NuuwMPtbKwHAKIu2hpc5c' \
--header 'Cookie: PHPSESSID=0b47db9d7de94c37b6b272087a9f2fa7' \
--data-raw '{
"amount": 65,
"currency": "USD",
"connector": ["forte"],
"confirm": true,
"capture_method": "manual",
"capture_on": "2022-09-10T10:11:12Z",
"customer_id": "First_Customer",
"name": "John Doe",
"authentication_type": "three_ds",
"return_url": "https://google.com",
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4147463011110083",
"card_exp_month": "12",
"card_exp_year": "27",
"card_holder_name": "joseph Doe",
"card_cvc": "123"
}
},
"billing": {
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": "guest@example.com"
}
}'
```
Response:
```
{
"payment_id": "pay_8OYjrZtKVk31OtqYUW8i",
"merchant_id": "merchant_1753725230",
"status": "processing",
"amount": 65,
"net_amount": 65,
"shipping_cost": null,
"amount_capturable": 65,
"amount_received": null,
"connector": "forte",
"client_secret": "pay_8OYjrZtKVk31OtqYUW8i_secret_vXuowDw0x6p1bw56VbL1",
"created": "2025-07-28T18:11:38.423Z",
"currency": "USD",
"customer_id": "First_Customer",
"customer": {
"id": "First_Customer",
"name": "John Doe",
"email": null,
"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": "manual",
"payment_method": "card",
"payment_method_data": {
"card": {
"last4": "0083",
"card_type": null,
"card_network": null,
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "414746",
"card_extended_bin": null,
"card_exp_month": "12",
"card_exp_year": "27",
"card_holder_name": "joseph Doe",
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": {
"address": null,
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": "guest@example.com"
},
"order_details": null,
"email": null,
"name": "John Doe",
"phone": null,
"return_url": "https://google.com/",
"authentication_type": "three_ds",
"statement_descriptor_name": null,
"statement_descriptor_suffix": null,
"next_action": null,
"cancellation_reason": null,
"error_code": "TIMEOUT",
"error_message": "Connector did not respond in specified time",
"unified_code": "UE_9000",
"unified_message": "Something went wrong",
"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": "First_Customer",
"created_at": 1753726298,
"expires": 1753729898,
"secret": "epk_61b28dae4e5c4d9b810186d7be0dccba"
},
"manual_retry_allowed": false,
"connector_transaction_id": null,
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": null,
"payment_link": null,
"profile_id": "pro_Spt4sCgxa6ymf1MPlfGM",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_e0dzUJWZBSkhaMONkb5w",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-07-28T18:26:38.423Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2025-07-28T18:12:08.498Z",
"split_payments": null,
"frm_metadata": null,
"extended_authorization_applied": null,
"capture_before": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": null,
"card_discovery": "manual",
"force_3ds_challenge": false,
"force_3ds_challenge_trigger": false,
"issuer_error_code": null,
"issuer_error_message": null,
"is_iframe_redirection_enabled": null,
"whole_connector_response": null
}
```
PSync
cURL :
```
curl --location 'http://localhost:8080/payments/pay_8OYjrZtKVk31OtqYUW8i?force_sync=true&expand_captures=true&expand_attempts=true&all_keys_required=true' \
--header 'Accept: application/json' \
--header 'api-key: dev_tgUgPmumCNvxuuaYLUkwFJ5oF5sHkc3C0PJpkWdbxc7NuuwMPtbKwHAKIu2hpc5c' \
--header 'Cookie: PHPSESSID=0b47db9d7de94c37b6b272087a9f2fa7' \
--data ''
```
Response:
```
{
"payment_id": "pay_8OYjrZtKVk31OtqYUW8i",
"merchant_id": "merchant_1753725230",
"status": "processing",
"amount": 65,
"net_amount": 65,
"shipping_cost": null,
"amount_capturable": 65,
"amount_received": null,
"connector": "forte",
"client_secret": "pay_8OYjrZtKVk31OtqYUW8i_secret_vXuowDw0x6p1bw56VbL1",
"created": "2025-07-28T18:11:38.423Z",
"currency": "USD",
"customer_id": "First_Customer",
"customer": {
"id": "First_Customer",
"name": "John Doe",
"email": null,
"phone": null,
"phone_country_code": null
},
"description": null,
"refunds": null,
"disputes": null,
"attempts": [
{
"attempt_id": "pay_8OYjrZtKVk31OtqYUW8i_1",
"status": "pending",
"amount": 65,
"order_tax_amount": null,
"currency": "USD",
"connector": "forte",
"error_message": "Connector did not respond in specified time",
"payment_method": "card",
"connector_transaction_id": null,
"capture_method": "manual",
"authentication_type": "three_ds",
"created_at": "2025-07-28T18:11:38.423Z",
"modified_at": "2025-07-28T18:12:08.497Z",
"cancellation_reason": null,
"mandate_id": null,
"error_code": "TIMEOUT",
"payment_token": null,
"connector_metadata": null,
"payment_experience": null,
"payment_method_type": "credit",
"reference_id": null,
"unified_code": "UE_9000",
"unified_message": "Something went wrong",
"client_source": null,
"client_version": null
}
],
"mandate_id": null,
"mandate_data": null,
"setup_future_usage": null,
"off_session": null,
"capture_on": null,
"capture_method": "manual",
"payment_method": "card",
"payment_method_data": {
"card": {
"last4": "0083",
"card_type": null,
"card_network": null,
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "414746",
"card_extended_bin": null,
"card_exp_month": "12",
"card_exp_year": "27",
"card_holder_name": "joseph Doe",
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": {
"address": null,
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": "guest@example.com"
},
"order_details": null,
"email": null,
"name": "John Doe",
"phone": null,
"return_url": "https://google.com/",
"authentication_type": "three_ds",
"statement_descriptor_name": null,
"statement_descriptor_suffix": null,
"next_action": null,
"cancellation_reason": null,
"error_code": "TIMEOUT",
"error_message": "Connector did not respond in specified time",
"unified_code": "UE_9000",
"unified_message": "Something went wrong",
"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": null,
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": null,
"payment_link": null,
"profile_id": "pro_Spt4sCgxa6ymf1MPlfGM",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_e0dzUJWZBSkhaMONkb5w",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-07-28T18:26:38.423Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2025-07-28T18:13:10.746Z",
"split_payments": null,
"frm_metadata": null,
"extended_authorization_applied": null,
"capture_before": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": null,
"card_discovery": "manual",
"force_3ds_challenge": false,
"force_3ds_challenge_trigger": false,
"issuer_error_code": null,
"issuer_error_message": null,
"is_iframe_redirection_enabled": null,
"whole_connector_response": null
}
```
2. Payments Create - Manual Capture
cURL :
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_tgUgPmumCNvxuuaYLUkwFJ5oF5sHkc3C0PJpkWdbxc7NuuwMPtbKwHAKIu2hpc5c' \
--header 'Cookie: PHPSESSID=0b47db9d7de94c37b6b272087a9f2fa7' \
--data-raw '{
"amount": 65,
"currency": "USD",
"connector": ["forte"],
"confirm": true,
"capture_method": "manual",
"capture_on": "2022-09-10T10:11:12Z",
"customer_id": "First_Customer",
"name": "John Doe",
"authentication_type": "three_ds",
"return_url": "https://google.com",
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4147463011110083",
"card_exp_month": "12",
"card_exp_year": "27",
"card_holder_name": "joseph Doe",
"card_cvc": "123"
}
},
"billing": {
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": "guest@example.com"
}
}'
```
Response:
```
{
"payment_id": "pay_S6O6m2fqiKJD78bopdOF",
"merchant_id": "merchant_1753725230",
"status": "requires_capture",
"amount": 65,
"net_amount": 65,
"shipping_cost": null,
"amount_capturable": 65,
"amount_received": null,
"connector": "forte",
"client_secret": "pay_S6O6m2fqiKJD78bopdOF_secret_zgtfCKOMhFiZHRvFl4m9",
"created": "2025-07-28T18:13:50.323Z",
"currency": "USD",
"customer_id": "First_Customer",
"customer": {
"id": "First_Customer",
"name": "John Doe",
"email": null,
"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": "manual",
"payment_method": "card",
"payment_method_data": {
"card": {
"last4": "0083",
"card_type": null,
"card_network": null,
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "414746",
"card_extended_bin": null,
"card_exp_month": "12",
"card_exp_year": "27",
"card_holder_name": "joseph Doe",
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": {
"address": null,
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": "guest@example.com"
},
"order_details": null,
"email": null,
"name": "John Doe",
"phone": null,
"return_url": "https://google.com/",
"authentication_type": "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": "First_Customer",
"created_at": 1753726430,
"expires": 1753730030,
"secret": "epk_3c7a168149ea4a2ead3081b08956e6fd"
},
"manual_retry_allowed": false,
"connector_transaction_id": "trn_4c9f27e0-a7ce-4b15-b4c9-adf4fd8971d3",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": "trn_4c9f27e0-a7ce-4b15-b4c9-adf4fd8971d3",
"payment_link": null,
"profile_id": "pro_Spt4sCgxa6ymf1MPlfGM",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_e0dzUJWZBSkhaMONkb5w",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-07-28T18:28:50.323Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2025-07-28T18:13:53.678Z",
"split_payments": null,
"frm_metadata": null,
"extended_authorization_applied": null,
"capture_before": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": null,
"card_discovery": "manual",
"force_3ds_challenge": false,
"force_3ds_challenge_trigger": false,
"issuer_error_code": null,
"issuer_error_message": null,
"is_iframe_redirection_enabled": null,
"whole_connector_response": null
}
```
Capture Call
cURL :
```
curl --location 'http://localhost:8080/payments/pay_S6O6m2fqiKJD78bopdOF/capture' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_tgUgPmumCNvxuuaYLUkwFJ5oF5sHkc3C0PJpkWdbxc7NuuwMPtbKwHAKIu2hpc5c' \
--header 'Cookie: PHPSESSID=0b47db9d7de94c37b6b272087a9f2fa7' \
--data '{
"amount_to_capture": 65,
"statement_descriptor_name": "Joseph",
"statement_descriptor_prefix" :"joseph",
"statement_descriptor_suffix": "JS"
}'
```
Response :
```
{
"payment_id": "pay_S6O6m2fqiKJD78bopdOF",
"merchant_id": "merchant_1753725230",
"status": "processing",
"amount": 65,
"net_amount": 65,
"shipping_cost": null,
"amount_capturable": 65,
"amount_received": null,
"connector": "forte",
"client_secret": "pay_S6O6m2fqiKJD78bopdOF_secret_zgtfCKOMhFiZHRvFl4m9",
"created": "2025-07-28T18:13:50.323Z",
"currency": "USD",
"customer_id": "First_Customer",
"customer": {
"id": "First_Customer",
"name": "John Doe",
"email": null,
"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": "manual",
"payment_method": "card",
"payment_method_data": {
"card": {
"last4": "0083",
"card_type": null,
"card_network": null,
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "414746",
"card_extended_bin": null,
"card_exp_month": "12",
"card_exp_year": "27",
"card_holder_name": "joseph Doe",
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": {
"address": null,
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": "guest@example.com"
},
"order_details": null,
"email": null,
"name": "John Doe",
"phone": null,
"return_url": "https://google.com/",
"authentication_type": "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": "trn_a565b036-48b0-4efe-9538-6038f198609d",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": "trn_a565b036-48b0-4efe-9538-6038f198609d",
"payment_link": null,
"profile_id": "pro_Spt4sCgxa6ymf1MPlfGM",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_e0dzUJWZBSkhaMONkb5w",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-07-28T18:28:50.323Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2025-07-28T18:14:35.425Z",
"split_payments": null,
"frm_metadata": null,
"extended_authorization_applied": null,
"capture_before": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": null,
"card_discovery": "manual",
"force_3ds_challenge": false,
"force_3ds_challenge_trigger": false,
"issuer_error_code": null,
"issuer_error_message": null,
"is_iframe_redirection_enabled": null,
"whole_connector_response": null
}
```
PSync
cURL :
```
curl --location 'http://localhost:8080/payments/pay_S6O6m2fqiKJD78bopdOF?force_sync=true&expand_captures=true&expand_attempts=true&all_keys_required=true' \
--header 'Accept: application/json' \
--header 'api-key: dev_tgUgPmumCNvxuuaYLUkwFJ5oF5sHkc3C0PJpkWdbxc7NuuwMPtbKwHAKIu2hpc5c' \
--header 'Cookie: PHPSESSID=0b47db9d7de94c37b6b272087a9f2fa7' \
--data ''
```
Response :
```
{
"payment_id": "pay_S6O6m2fqiKJD78bopdOF",
"merchant_id": "merchant_1753725230",
"status": "succeeded",
"amount": 65,
"net_amount": 65,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": 65,
"connector": "forte",
"client_secret": "pay_S6O6m2fqiKJD78bopdOF_secret_zgtfCKOMhFiZHRvFl4m9",
"created": "2025-07-28T18:13:50.323Z",
"currency": "USD",
"customer_id": "First_Customer",
"customer": {
"id": "First_Customer",
"name": "John Doe",
"email": null,
"phone": null,
"phone_country_code": null
},
"description": null,
"refunds": null,
"disputes": null,
"attempts": [
{
"attempt_id": "pay_S6O6m2fqiKJD78bopdOF_1",
"status": "pending",
"amount": 65,
"order_tax_amount": null,
"currency": "USD",
"connector": "forte",
"error_message": "Connector did not respond in specified time",
"payment_method": "card",
"connector_transaction_id": "trn_a565b036-48b0-4efe-9538-6038f198609d",
"capture_method": "manual",
"authentication_type": "three_ds",
"created_at": "2025-07-28T18:13:50.324Z",
"modified_at": "2025-07-28T18:15:31.121Z",
"cancellation_reason": null,
"mandate_id": null,
"error_code": "TIMEOUT",
"payment_token": null,
"connector_metadata": {
"auth_id": "2VY537"
},
"payment_experience": null,
"payment_method_type": "credit",
"reference_id": "trn_a565b036-48b0-4efe-9538-6038f198609d",
"unified_code": "UE_9000",
"unified_message": "Something went wrong",
"client_source": null,
"client_version": null
}
],
"mandate_id": null,
"mandate_data": null,
"setup_future_usage": null,
"off_session": null,
"capture_on": null,
"capture_method": "manual",
"payment_method": "card",
"payment_method_data": {
"card": {
"last4": "0083",
"card_type": null,
"card_network": null,
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "414746",
"card_extended_bin": null,
"card_exp_month": "12",
"card_exp_year": "27",
"card_holder_name": "joseph Doe",
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": {
"address": null,
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": "guest@example.com"
},
"order_details": null,
"email": null,
"name": "John Doe",
"phone": null,
"return_url": "https://google.com/",
"authentication_type": "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": "trn_a565b036-48b0-4efe-9538-6038f198609d",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": "trn_a565b036-48b0-4efe-9538-6038f198609d",
"payment_link": null,
"profile_id": "pro_Spt4sCgxa6ymf1MPlfGM",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_e0dzUJWZBSkhaMONkb5w",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-07-28T18:28:50.323Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2025-07-28T18:15:40.705Z",
"split_payments": null,
"frm_metadata": null,
"extended_authorization_applied": null,
"capture_before": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": null,
"card_discovery": "manual",
"force_3ds_challenge": false,
"force_3ds_challenge_trigger": false,
"issuer_error_code": null,
"issuer_error_message": null,
"is_iframe_redirection_enabled": null,
"whole_connector_response": "{\"transaction_id\":\"trn_a565b036-48b0-4efe-9538-6038f198609d\",\"organization_id\":\"org_438530\",\"location_id\":\"loc_316671\",\"original_transaction_id\":\"trn_4c9f27e0-a7ce-4b15-b4c9-adf4fd8971d3\",\"status\":\"complete\",\"action\":\"capture\",\"authorization_code\":\"481542\",\"entered_by\":\"0ec774886e654a66c2e4\",\"received_date\":\"2025-07-28T11:14:35.043\",\"origination_date\":\"2025-07-28T11:14:35.043\",\"card\":{\"last_4_account_number\":\"0000\",\"masked_account_number\":\"****0000\"},\"biller_name\":\"N/A\",\"attempt_number\":1,\"response\":{\"environment\":\"sandbox\",\"response_type\":\"A\",\"response_code\":\"A01\",\"response_desc\":\"APPROVED\",\"authorization_code\":\"481542\"},\"links\":{\"disputes\":\"https://sandbox.forte.net/v3/transactions/trn_a565b036-48b0-4efe-9538-6038f198609d/disputes\",\"settlements\":\"https://sandbox.forte.net/v3/transactions/trn_a565b036-48b0-4efe-9538-6038f198609d/settlements\",\"self\":\"https://sandbox.forte.net/v3/transactions/trn_a565b036-48b0-4efe-9538-6038f198609d/\"}}"
}
```
## Cypress test
<details>
<summary> Forte </summary>
<img width="391" height="928" alt="Screenshot 2025-08-04 at 4 31 36 PM" src="https://github.com/user-attachments/assets/2f578bcb-be2d-4ae9-800f-e25964d0a105" />
</details>
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. External Connector Integration**
- `crates/hyperswitch_connectors/src/connectors/forte/transformers.rs`
**Code Patterns Applied:**
- Define new data structures (1 changes)
- Extend existing types with new fields (14 changes)
**Detailed Identifier Changes:**
Commit a0c2a6bc:
Files to modify:
**crates/hyperswitch_connectors/src/connectors/forte/transformers.rs**
Add:
- struct: pub::ForteLink
|
{"pr_number": 8775, "pr_title": "fix(connector): [FORTE] Deserialization Error in PSync Response", "merged_at": "2025-08-12T13:14:38Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/forte/transformers.rs"]}, "change_types": {"structs_added": 1, "fields_added": 14}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
refactor(events): Tenant config in API, Connector and Outgoing Web-hook events
## 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 -->
The changes are required for pushing tenant ID for API events, Connector events and Outgoing Webhook events
### 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)?
-->
Attaching screenshots
<img width="917" alt="Screenshot 2024-12-09 at 3 20 34 PM" src="https://github.com/user-attachments/assets/b8918318-68b5-426c-aad3-9eed76cd5150">
<img width="925" alt="Screenshot 2024-12-09 at 3 20 08 PM" src="https://github.com/user-attachments/assets/b21c5b4b-359b-4d35-a875-c33154c06e66">
<img width="910" alt="Screenshot 2024-12-09 at 3 20 21 PM" src="https://github.com/user-attachments/assets/771b9b0d-c073-49c6-b711-0c5fa24df49e">
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Core Business Logic**
- `crates/router/src/core/webhooks/incoming.rs`
- `crates/router/src/core/webhooks/incoming_v2.rs`
- `crates/router/src/core/webhooks/outgoing.rs`
**2. External Connector Integration**
- `crates/hyperswitch_interfaces/src/events/connector_api_logs.rs`
**3. Other**
- `crates/router/src/events/api_logs.rs`
- `crates/router/src/events/outgoing_webhook_logs.rs`
- `crates/router/src/services/api.rs`
**Code Patterns Applied:**
- Extend existing types with new fields (6 changes)
**Detailed Identifier Changes:**
Commit c620779b:
Files to modify:
**crates/hyperswitch_interfaces/src/events/connector_api_logs.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/core/webhooks/outgoing.rs**
Modify existing code
**crates/router/src/events/api_logs.rs**
Modify existing code
**crates/router/src/events/outgoing_webhook_logs.rs**
Modify existing code
**crates/router/src/services/api.rs**
Modify existing code
|
{"pr_number": 6777, "pr_title": "refactor(events): Tenant config in API, Connector and Outgoing Web-hook events", "merged_at": "2024-12-10T12:28:09Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user", "connector", "webhook"]}, "hierarchy": {"core_business": ["crates/router/src/core/webhooks/incoming.rs", "crates/router/src/core/webhooks/incoming_v2.rs", "crates/router/src/core/webhooks/outgoing.rs"], "connectors": ["crates/hyperswitch_interfaces/src/events/connector_api_logs.rs"], "other": ["crates/router/src/events/api_logs.rs", "crates/router/src/events/outgoing_webhook_logs.rs", "crates/router/src/services/api.rs"]}, "change_types": {"fields_added": 6}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(router): add debit routing support for saved card 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 -->
Once debit routing is performed for a card and the card is saved in the payment, we can also store the debit routing output. This allows us to reuse the saved data in future saved card flows instead of re-running the debit routing process.
Changes:
In this PR, support for co-badged card data has been introduced. This data will be stored in the payment_method_data column of the payment_methods table and will contain the debit routing output.
In the saved card flow, we check if the co-badged card data is present in the payment_method_data of the payment method. If it is present, the same data will be sent to the open router for debit routing.
If the co-badged card data is not available, then the card_isin, which contains the card BIN, will be used to call the open router.
### 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`
-->
add debit routing support for saved card flow
## 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 locally by creating dummy co-badged card bin dump
-> Create a merchant account and business profile
-> Enable debit routing and provide merchant business country for the business profile
```
curl --location 'http://localhost:8080/account/merchant_1745690754/business_profile/pro_OiJkBiFuCYbYAkCG9X02' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: ' \
--data '{
"is_debit_routing_enabled": true,
"merchant_business_country": "US"
}'
```
-> Create a payment
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'x-tenant-id: hyperswitch' \
--header 'api-key: dev_t6MGc7fYh7s9QLODlx0Pvl5QaGQtKhHFq0eUOJm6hNBfrWK2FqqWZ4tDXpqMUzfZ' \
--data-raw '{
"amount": 100,
"amount_to_capture": 100,
"currency": "USD",
"confirm": true,
"capture_method": "automatic",
"setup_future_usage": "on_session",
"capture_on": "2022-09-10T10:11:12Z",
"email": "guest@example.com",
"name": "John Doe",
"phone": "999999999",
"phone_country_code": "+1",
"description": "Its my first payment request",
"authentication_type": "no_three_ds",
"customer_id": "cu_1745917372",
"return_url": "http://127.0.0.1:4040",
"payment_method": "card",
"payment_method_type": "debit",
"payment_method_data": {
"card": {
"card_number": "4400002000000004",
"card_exp_month": "03",
"card_exp_year": "2030",
"card_holder_name": "joseph Doe",
"card_cvc": "737"
}
},
"customer_acceptance": {
"acceptance_type": "offline",
"accepted_at": "1963-05-03T04:07:52.723Z",
"online": {
"ip_address": "in sit",
"user_agent": "amet irure esse"
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "PiX",
"last_name": "ss"
},
"email": "raj@gmail.com"
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "PiX"
}
},
"browser_info": {
"user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
"accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
"language": "nl-NL",
"color_depth": 24,
"screen_height": 723,
"screen_width": 1536,
"time_zone": 0,
"java_enabled": true,
"java_script_enabled": true,
"ip_address": "125.0.0.1"
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
}
}'
```
```
{
"payment_id": "pay_p70wBAMKn2Cwih0biDX0",
"merchant_id": "merchant_1745690754",
"status": "succeeded",
"amount": 100,
"net_amount": 100,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": 100,
"connector": "adyen",
"client_secret": "pay_p70wBAMKn2Cwih0biDX0_secret_n9DPdVNK5DMvaPoYj3y2",
"created": "2025-04-29T09:02:58.609Z",
"currency": "USD",
"customer_id": "cu_1745917372",
"customer": {
"id": "cu_1745917372",
"name": "John Doe",
"email": "guest@example.com",
"phone": "999999999",
"phone_country_code": "+1"
},
"description": "Its my first payment request",
"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": "0004",
"card_type": null,
"card_network": null,
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "440000",
"card_extended_bin": null,
"card_exp_month": "03",
"card_exp_year": "2030",
"card_holder_name": "joseph Doe",
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": null,
"shipping": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "PiX",
"last_name": null
},
"phone": null,
"email": null
},
"billing": {
"address": {
"city": "San",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "PiX",
"last_name": "ss"
},
"phone": null,
"email": "raj@gmail.com"
},
"order_details": null,
"email": "guest@example.com",
"name": "John Doe",
"phone": "999999999",
"return_url": "http://127.0.0.1:4040/",
"authentication_type": "no_three_ds",
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"next_action": null,
"cancellation_reason": null,
"error_code": null,
"error_message": null,
"unified_code": null,
"unified_message": null,
"payment_experience": null,
"payment_method_type": "debit",
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "cu_1745917372",
"created_at": 1745917378,
"expires": 1745920978,
"secret": "epk_248a7b7506aa4a60b28db8ddf75d38ad"
},
"manual_retry_allowed": false,
"connector_transaction_id": "B6WPZCJ7DLDD9J75",
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": null,
"feature_metadata": null,
"reference_id": "pay_p70wBAMKn2Cwih0biDX0_1",
"payment_link": null,
"profile_id": "pro_OiJkBiFuCYbYAkCG9X02",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_VyX6BwB09KJrmeR1ODFD",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-04-29T09:17:58.609Z",
"fingerprint": null,
"browser_info": {
"language": "nl-NL",
"time_zone": 0,
"ip_address": "125.0.0.1",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
"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-29T09:03:00.705Z",
"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
}
```
-> Connector request indicating the card brand as star

-> Create a payment for the same customer
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_t6MGc7fYh7s9QLODlx0Pvl5QaGQtKhHFq0eUOJm6hNBfrWK2FqqWZ4tDXpqMUzfZ' \
--data-raw '{
"amount": 6100,
"currency": "USD",
"confirm": false,
"business_country": "US",
"business_label": "default",
"amount_to_capture": 6100,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"return_url": "https://google.com",
"email": "something@gmail.com",
"setup_future_usage": "on_session",
"name": "Joseph Doe",
"phone": "999999999",
"phone_country_code": "+65",
"description": "Its my first payment request",
"statement_descriptor_name": "Juspay",
"statement_descriptor_suffix": "Router",
"customer_id": "cu_1745917372",
"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": "8056594427",
"country_code": "+91"
}
}
}'
```
```
{
"payment_id": "pay_icPaUi7x7A2gK2F43q56",
"merchant_id": "merchant_1745690754",
"status": "requires_payment_method",
"amount": 6100,
"net_amount": 6100,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": null,
"connector": null,
"client_secret": "pay_icPaUi7x7A2gK2F43q56_secret_gKv1GroVoPf0i000siHK",
"created": "2025-04-29T09:06:25.436Z",
"currency": "USD",
"customer_id": "cu_1745917372",
"customer": {
"id": "cu_1745917372",
"name": "Joseph Doe",
"email": "something@gmail.com",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Its my first payment request",
"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": 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": "8056594427",
"country_code": "+91"
},
"email": null
},
"order_details": null,
"email": "something@gmail.com",
"name": "Joseph Doe",
"phone": "999999999",
"return_url": "https://google.com/",
"authentication_type": null,
"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": null,
"connector_label": null,
"business_country": "US",
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "cu_1745917372",
"created_at": 1745917585,
"expires": 1745921185,
"secret": "epk_03223a8293164e14a0b1dc07cc86404a"
},
"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_OiJkBiFuCYbYAkCG9X02",
"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-29T09:21:25.436Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2025-04-29T09:06:25.462Z",
"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
}
```
-> list payment methods for the same customer
```
curl --location 'http://localhost:8080/customers/cu_1745917372/payment_methods' \
--header 'Accept: application/json' \
--header 'api-key: dev_t6MGc7fYh7s9QLODlx0Pvl5QaGQtKhHFq0eUOJm6hNBfrWK2FqqWZ4tDXpqMUzfZ'
```
```
{
"customer_payment_methods": [
{
"payment_token": "token_mzQEW3GchjpQQDxWqQ7G",
"payment_method_id": "pm_KNynHcJOxmcco1GrzdWm",
"customer_id": "cu_1745917372",
"payment_method": "card",
"payment_method_type": "debit",
"payment_method_issuer": null,
"payment_method_issuer_code": null,
"recurring_enabled": false,
"installment_payment_enabled": false,
"payment_experience": [
"redirect_to_url"
],
"card": {
"scheme": "Star",
"issuer_country": null,
"last4_digits": "0004",
"expiry_month": "03",
"expiry_year": "2030",
"card_token": null,
"card_holder_name": "joseph Doe",
"card_fingerprint": null,
"nick_name": null,
"card_network": "Star",
"card_isin": "440000",
"card_issuer": null,
"card_type": null,
"saved_to_locker": true
},
"metadata": null,
"created": "2025-04-29T09:03:00.719Z",
"bank": null,
"surcharge_details": null,
"requires_cvv": true,
"last_used_at": "2025-04-29T09:03:00.719Z",
"default_payment_method_set": true,
"billing": {
"address": {
"city": "San",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": null,
"email": "raj@gmail.com"
}
}
],
"is_guest_customer": null
}
```
-> Confirm the a payment with the payment token
```
curl --location 'http://localhost:8080/payments/pay_icPaUi7x7A2gK2F43q56/confirm' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: pk_dev_f3e0703c217345e3ace5d6c6cd2046ad' \
--data '{
"payment_token": "token_mzQEW3GchjpQQDxWqQ7G",
"payment_method_type": "debit",
"payment_method": "card",
"browser_info": {
"user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
"accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
"language": "nl-NL",
"color_depth": 24,
"screen_height": 723,
"screen_width": 1536,
"time_zone": 0,
"java_enabled": true,
"java_script_enabled": true,
"ip_address": "125.0.0.1"
},
"client_secret": "pay_icPaUi7x7A2gK2F43q56_secret_gKv1GroVoPf0i000siHK",
"setup_future_usage": "on_session",
"payment_method_data": {
"card_token": {
"card_cvc": "123"
}
}
}'
```
```
{
"payment_id": "pay_icPaUi7x7A2gK2F43q56",
"merchant_id": "merchant_1745690754",
"status": "failed",
"amount": 6100,
"net_amount": 6100,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": null,
"connector": "adyen",
"client_secret": "pay_icPaUi7x7A2gK2F43q56_secret_gKv1GroVoPf0i000siHK",
"created": "2025-04-29T09:06:25.436Z",
"currency": "USD",
"customer_id": "cu_1745917372",
"customer": {
"id": "cu_1745917372",
"name": "Joseph Doe",
"email": "something@gmail.com",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Its my first payment request",
"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": "0004",
"card_type": null,
"card_network": null,
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "440000",
"card_extended_bin": null,
"card_exp_month": "03",
"card_exp_year": "2030",
"card_holder_name": "joseph Doe",
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": "token_mzQEW3GchjpQQDxWqQ7G",
"shipping": 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": "8056594427",
"country_code": "+91"
},
"email": null
},
"order_details": null,
"email": "something@gmail.com",
"name": "Joseph Doe",
"phone": "999999999",
"return_url": "https://google.com/",
"authentication_type": "no_three_ds",
"statement_descriptor_name": "Juspay",
"statement_descriptor_suffix": "Router",
"next_action": null,
"cancellation_reason": null,
"error_code": "24",
"error_message": "CVC Declined",
"unified_code": "UE_9000",
"unified_message": "Something went wrong",
"payment_experience": null,
"payment_method_type": "debit",
"connector_label": "adyen_US_default",
"business_country": "US",
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": null,
"manual_retry_allowed": true,
"connector_transaction_id": "C87D7CD547P6TNV5",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": null,
"payment_link": null,
"profile_id": "pro_OiJkBiFuCYbYAkCG9X02",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_VyX6BwB09KJrmeR1ODFD",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-04-29T09:21:25.436Z",
"fingerprint": null,
"browser_info": {
"os_type": null,
"language": "nl-NL",
"time_zone": 0,
"ip_address": "125.0.0.1",
"os_version": null,
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
"color_depth": 24,
"device_model": null,
"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,
"accept_language": "en",
"java_script_enabled": true
},
"payment_method_id": "pm_KNynHcJOxmcco1GrzdWm",
"payment_method_status": "active",
"updated": "2025-04-29T09:10:38.933Z",
"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": "DECLINED CVC Incorrect"
}
```
-> Logs showing the debit routing flow was triggered with the previously saved co-badged card data

-> Logs showing the card brand was set star in the connector request

## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. API Request/Response Models**
- `crates/api_models/src/open_router.rs`
- `crates/api_models/src/payment_methods.rs`
**2. Domain Models (Business Logic Types)**
- `crates/hyperswitch_domain_models/src/payment_method_data.rs`
- `crates/hyperswitch_domain_models/src/payment_methods.rs`
**3. Core Business Logic**
- `crates/router/src/core/debit_routing.rs`
- `crates/router/src/core/payment_methods.rs`
- `crates/router/src/core/payment_methods/cards.rs`
- ... and 8 more files
**4. External Connector Integration**
- `crates/router/src/utils/verify_connector.rs`
- `crates/router/tests/connectors/aci.rs`
- `crates/router/tests/connectors/adyen.rs`
- ... and 5 more files
**5. Other**
- `crates/common_enums/src/enums.rs`
**Code Patterns Applied:**
- Define new data structures (1 changes)
- Implement new functions (23 changes)
- Extend existing types with new fields (62 changes)
- Add conditional logic for feature flags or filtering (5 changes)
|
{"pr_number": 7923, "pr_title": "feat(router): add debit routing support for saved card flow", "merged_at": "2025-05-14T18:07:14Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/open_router.rs", "crates/api_models/src/payment_methods.rs"], "domain": ["crates/hyperswitch_domain_models/src/payment_method_data.rs", "crates/hyperswitch_domain_models/src/payment_methods.rs"], "core_business": ["crates/router/src/core/debit_routing.rs", "crates/router/src/core/payment_methods.rs", "crates/router/src/core/payment_methods/cards.rs", "crates/router/src/core/payment_methods/tokenize.rs", "crates/router/src/core/payment_methods/tokenize/card_executor.rs", "crates/router/src/core/payment_methods/tokenize/payment_method_executor.rs", "crates/router/src/core/payment_methods/vault.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/tokenization.rs", "crates/router/src/core/payouts/helpers.rs"], "connectors": ["crates/router/src/utils/verify_connector.rs", "crates/router/tests/connectors/aci.rs", "crates/router/tests/connectors/adyen.rs", "crates/router/tests/connectors/airwallex.rs", "crates/router/tests/connectors/fiserv.rs", "crates/router/tests/connectors/rapyd.rs", "crates/router/tests/connectors/utils.rs", "crates/router/tests/connectors/worldline.rs"], "other": ["crates/common_enums/src/enums.rs"]}, "change_types": {"structs_added": 1, "functions_added": 23, "fields_added": 62, "imports_added": 5, "conditionals_added": 5}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
|
fix(mandates): handle the connector_mandate creation once and only if the payment is charged
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Earlier we used to store the connector mandate id irrespective of the payments status being charged or not for 3DS flows, now we would handle the connector_mandate_id updation in payment_method once and only if the payment has a status as charged.
This PR is a hot fix for the [PR](https://github.com/juspay/hyperswitch/pull/6327)
### Additional Changes
- [ ] 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
<!--
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?
- Configure a MA and a MCA
- Make a 3ds mandate failed payment, it would be populated in the payment_attempt, but not in the payment_method table
```
Create
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'x-feature: router-custom' \
--header 'api-key: dev_5SpseUd7WAhIwgQeMpoCKwEeaPjmduquAv3Qu4VxdRkSBkilsq5arTZa6nXoPokw' \
--data-raw '{
"amount": 8500,
"currency": "USD",
"confirm": false,
"customer_id": "CustomerX777",
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"authentication_type": "three_ds",
"return_url": "https://google.com",
"email": "something@gmail.com",
"name": "Joseph Doe",
"phone": "999999999",
"phone_country_code": "+65",
"description": "Its my first payment request",
"setup_future_usage":"off_session",
"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": "8056594427",
"country_code": "+91"
}
},
"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"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
}
},
"connector_metadata": {
"noon": {
"order_category": "pay"
}
}
}'
```
```
Confirm
curl --location 'http://localhost:8080/payments/pay_v7bENZR0bgPe0g6ThobF/confirm' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'x-feature: router-custom' \
--header 'api-key: pk_dev_07feea3d36ed4f8da3cd844b07b8e3e9' \
--data '{
"confirm": true,
"client_secret":"pay_v7bENZR0bgPe0g6ThobF_secret_d792ajlpJ4z6XlS9esjK",
"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": "8056594427",
"country_code": "+91"
}
},
"browser_info": {
"user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
"accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
"language": "nl-NL",
"color_depth": 24,
"screen_height": 723,
"screen_width": 1536,
"time_zone": 0,
"java_enabled": true,
"java_script_enabled": true,
"ip_address": "125.0.0.1"
},
"customer_acceptance": {
"acceptance_type": "offline",
"accepted_at": "1963-05-03T04:07:52.723Z",
"online": {
"ip_address": "in sit",
"user_agent": "amet irure esse"
}
},
"payment_method": "card",
"payment_method_type": "debit",
"payment_method_data": {
"card": {
"card_number": "4000008400001629",
"card_exp_month": "06",
"card_exp_year": "2030",
"card_holder_name": "John T",
"card_cvc": "737"
}
}
}'
```
```
Response
{
"payment_id": "pay_v7bENZR0bgPe0g6ThobF",
"merchant_id": "merchant_1729155606",
"status": "requires_customer_action",
"amount": 8500,
"net_amount": 8500,
"amount_capturable": 8500,
"amount_received": 0,
"connector": "stripe",
"client_secret": "pay_v7bENZR0bgPe0g6ThobF_secret_d792ajlpJ4z6XlS9esjK",
"created": "2024-10-17T09:01:29.364Z",
"currency": "USD",
"customer_id": "CustomerX777",
"customer": {
"id": "CustomerX777",
"name": "Joseph Doe",
"email": "something@gmail.com",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Its my first payment request",
"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": "1629",
"card_type": null,
"card_network": null,
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "400000",
"card_extended_bin": null,
"card_exp_month": "06",
"card_exp_year": "2030",
"card_holder_name": null,
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": null,
"shipping": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"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": "8056594427",
"country_code": "+91"
},
"email": null
},
"order_details": null,
"email": "something@gmail.com",
"name": "Joseph Doe",
"phone": "999999999",
"return_url": "https://google.com/",
"authentication_type": "three_ds",
"statement_descriptor_name": null,
"statement_descriptor_suffix": null,
"next_action": {
"type": "redirect_to_url",
"redirect_to_url": "http://localhost:8080/payments/redirect/pay_v7bENZR0bgPe0g6ThobF/merchant_1729155606/pay_v7bENZR0bgPe0g6ThobF_1"
},
"cancellation_reason": null,
"error_code": null,
"error_message": null,
"unified_code": null,
"unified_message": null,
"payment_experience": null,
"payment_method_type": "debit",
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": null,
"manual_retry_allowed": null,
"connector_transaction_id": "pi_3QApaRD5R7gDAGff0khxOUA8",
"frm_message": null,
"metadata": null,
"connector_metadata": {
"apple_pay": null,
"airwallex": null,
"noon": {
"order_category": "pay"
}
},
"feature_metadata": null,
"reference_id": "pi_3QApaRD5R7gDAGff0khxOUA8",
"payment_link": null,
"profile_id": "pro_OYE7Iv9nauJb3HXYFB1u",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_LKJi6vdC2IEQwbEaVJQP",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2024-10-17T09:16:29.364Z",
"fingerprint": null,
"browser_info": {
"language": "nl-NL",
"time_zone": 0,
"ip_address": "125.0.0.1",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
"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": "pm_PxUXcAinbE62hBE1mAg2",
"payment_method_status": "inactive",
"updated": "2024-10-17T09:01:39.749Z",
"charges": null,
"frm_metadata": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": "pm_1QApaRD5R7gDAGffKM5cG6sU"
}
```
```
The payment_method_table won't have connectir_mandate_details
```
<img width="1725" alt="Screenshot 2024-10-17 at 2 48 01 PM" src="https://github.com/user-attachments/assets/c361f388-0c64-4b57-b5ff-ae8b4d5a3881">
- Make a 3ds payment successful, then only it will be populated in the payment_method
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'x-feature: router-custom' \
--header 'api-key: dev_5SpseUd7WAhIwgQeMpoCKwEeaPjmduquAv3Qu4VxdRkSBkilsq5arTZa6nXoPokw' \
--data-raw '{
"amount": 8500,
"currency": "USD",
"confirm": false,
"customer_id": "CustomerX777",
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"authentication_type": "three_ds",
"return_url": "https://google.com",
"email": "something@gmail.com",
"name": "Joseph Doe",
"phone": "999999999",
"phone_country_code": "+65",
"description": "Its my first payment request",
"setup_future_usage":"off_session",
"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": "8056594427",
"country_code": "+91"
}
},
"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"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
}
},
"connector_metadata": {
"noon": {
"order_category": "pay"
}
}
}'
```
```
Confirm
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'x-feature: router-custom' \
--header 'api-key: dev_5SpseUd7WAhIwgQeMpoCKwEeaPjmduquAv3Qu4VxdRkSBkilsq5arTZa6nXoPokw' \
--data-raw '{
"amount": 8500,
"currency": "USD",
"confirm": false,
"customer_id": "CustomerX777",
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"authentication_type": "three_ds",
"return_url": "https://google.com",
"email": "something@gmail.com",
"name": "Joseph Doe",
"phone": "999999999",
"phone_country_code": "+65",
"description": "Its my first payment request",
"setup_future_usage":"off_session",
"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": "8056594427",
"country_code": "+91"
}
},
"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"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
}
},
"connector_metadata": {
"noon": {
"order_category": "pay"
}
}
}'
```
```
response
{
"payment_id": "pay_m59xmko152RMgzTqgUeP",
"merchant_id": "merchant_1729155606",
"status": "succeeded",
"amount": 8500,
"net_amount": 8500,
"amount_capturable": 0,
"amount_received": 8500,
"connector": "stripe",
"client_secret": "pay_m59xmko152RMgzTqgUeP_secret_m8J1xt82aJYVaK4o4vNs",
"created": "2024-10-17T09:18:18.049Z",
"currency": "USD",
"customer_id": "CustomerX777",
"customer": {
"id": "CustomerX777",
"name": "Joseph Doe",
"email": "something@gmail.com",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Its my first payment request",
"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": null,
"card_network": null,
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "411111",
"card_extended_bin": null,
"card_exp_month": "06",
"card_exp_year": "2030",
"card_holder_name": null,
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": null,
"shipping": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"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": "8056594427",
"country_code": "+91"
},
"email": null
},
"order_details": null,
"email": "something@gmail.com",
"name": "Joseph Doe",
"phone": "999999999",
"return_url": "https://google.com/",
"authentication_type": "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": "debit",
"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": "pi_3QApqiD5R7gDAGff1ykvxYD0",
"frm_message": null,
"metadata": null,
"connector_metadata": {
"apple_pay": null,
"airwallex": null,
"noon": {
"order_category": "pay"
}
},
"feature_metadata": null,
"reference_id": "pi_3QApqiD5R7gDAGff1ykvxYD0",
"payment_link": null,
"profile_id": "pro_OYE7Iv9nauJb3HXYFB1u",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_LKJi6vdC2IEQwbEaVJQP",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2024-10-17T09:33:18.049Z",
"fingerprint": null,
"browser_info": {
"language": "nl-NL",
"time_zone": 0,
"ip_address": "125.0.0.1",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
"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": "pm_9ahIWQWjvWNTYCi1myPc",
"payment_method_status": "active",
"updated": "2024-10-17T09:18:35.865Z",
"charges": null,
"frm_metadata": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": null
}
```
The payment_method would have a connector_mandate_id with it
<img width="1725" alt="Screenshot 2024-10-17 at 2 54 03 PM" src="https://github.com/user-attachments/assets/847ad97b-2cd0-4f48-a00f-8b833967df37">
- If another CIT mandate payment is made it wouldn't be populated anymore
- Make a complete authorise mandate payment , it should be saved in the payment_method, for that mca_id
- Make a external 3ds mandate payment , it should be saved in the payment_method, for that mca_id
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Database Layer (Queries & Schema)**
- `crates/diesel_models/src/payment_attempt.rs`
- `crates/diesel_models/src/schema.rs`
- `crates/diesel_models/src/schema_v2.rs`
- ... and 1 more files
**2. Domain Models (Business Logic Types)**
- `crates/hyperswitch_domain_models/src/payments/payment_attempt.rs`
**3. Core Business Logic**
- `crates/router/src/core/payments/helpers.rs`
- `crates/router/src/core/payments/operations/payment_complete_authorize.rs`
- `crates/router/src/core/payments/operations/payment_confirm.rs`
- ... and 7 more files
**4. External Connector Integration**
- `migrations/2024-10-13-182546_add_connector_mandate_id_in_payment_attempt/down.sql`
- `migrations/2024-10-13-182546_add_connector_mandate_id_in_payment_attempt/up.sql`
**5. Type Definitions**
- `crates/router/src/types/storage/payment_attempt.rs`
- `crates/router/src/types/storage/payment_method.rs`
**6. Utils**
- `crates/router/src/utils/user/sample_data.rs`
**7. Other**
- `crates/common_enums/src/enums.rs`
- `crates/router/src/db/address.rs`
- `crates/router/src/db/customers.rs`
- ... and 11 more files
**Code Patterns Applied:**
- Define new data structures (1 changes)
- Implement new functions (5 changes)
- Extend existing types with new fields (87 changes)
- Add conditional logic for feature flags or filtering (6 changes)
- Modify database queries (1 changes)
**Detailed Identifier Changes:**
Commit 66e86205:
Files to modify:
**crates/common_enums/src/enums.rs**
Add:
- enum: pub::ConnectorMandateStatus
**crates/diesel_models/src/payment_attempt.rs**
Add:
- struct: pub::ConnectorMandateReferenceId
**crates/diesel_models/src/schema.rs**
Modify existing code
**crates/diesel_models/src/schema_v2.rs**
Modify existing code
**crates/diesel_models/src/user/sample_data.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/payments/payment_attempt.rs**
Modify existing code
**crates/router/src/core/payments/helpers.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_complete_authorize.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_confirm.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_create.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_response.rs**
Add:
- function: private::update_connector_mandate_details_for_the_flow
**crates/router/src/core/payments/operations/payment_update.rs**
Modify existing code
**crates/router/src/core/payments/retry.rs**
Modify existing code
**crates/router/src/core/payments/tokenization.rs**
Modify existing code
**crates/router/src/core/payments/transformers.rs**
Add:
- function: private::foreign_from
- function: private::foreign_from
- impl: impl ForeignFrom<DieselConnectorMandateReferenceId> for ConnectorMandateReferenceId
- impl: impl ForeignFrom<ConnectorMandateReferenceId> for DieselConnectorMandateReferenceId
**crates/router/src/core/webhooks/incoming.rs**
Modify existing code
**crates/router/src/db/address.rs**
Modify existing code
**crates/router/src/db/customers.rs**
Modify existing code
**crates/router/src/db/mandate.rs**
Modify existing code
**crates/router/src/db/payment_method.rs**
Modify existing code
**crates/router/src/db/refund.rs**
Modify existing code
**crates/router/src/db/reverse_lookup.rs**
Modify existing code
**crates/router/src/types/storage/payment_attempt.rs**
Modify existing code
**crates/router/src/types/storage/payment_method.rs**
Modify existing code
**crates/router/src/utils/user/sample_data.rs**
Modify existing code
**crates/storage_impl/src/lookup.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
**crates/storage_impl/src/payments/payment_intent.rs**
Modify existing code
**crates/storage_impl/src/payouts/payout_attempt.rs**
Modify existing code
**crates/storage_impl/src/payouts/payouts.rs**
Modify existing code
**crates/storage_impl/src/redis/kv_store.rs**
Modify existing code
|
{"pr_number": 6358, "pr_title": "fix(mandates): handle the connector_mandate creation once and only if the payment is charged", "merged_at": "2024-10-17T19:27:56Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"database": ["crates/diesel_models/src/payment_attempt.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs", "crates/diesel_models/src/user/sample_data.rs"], "domain": ["crates/hyperswitch_domain_models/src/payments/payment_attempt.rs"], "core_business": ["crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/operations/payment_complete_authorize.rs", "crates/router/src/core/payments/operations/payment_confirm.rs", "crates/router/src/core/payments/operations/payment_create.rs", "crates/router/src/core/payments/operations/payment_response.rs", "crates/router/src/core/payments/operations/payment_update.rs", "crates/router/src/core/payments/retry.rs", "crates/router/src/core/payments/tokenization.rs", "crates/router/src/core/payments/transformers.rs", "crates/router/src/core/webhooks/incoming.rs"], "connectors": ["migrations/2024-10-13-182546_add_connector_mandate_id_in_payment_attempt/down.sql", "migrations/2024-10-13-182546_add_connector_mandate_id_in_payment_attempt/up.sql"], "types": ["crates/router/src/types/storage/payment_attempt.rs", "crates/router/src/types/storage/payment_method.rs"], "utils": ["crates/router/src/utils/user/sample_data.rs"], "other": ["crates/common_enums/src/enums.rs", "crates/router/src/db/address.rs", "crates/router/src/db/customers.rs", "crates/router/src/db/mandate.rs", "crates/router/src/db/payment_method.rs", "crates/router/src/db/refund.rs", "crates/router/src/db/reverse_lookup.rs", "crates/storage_impl/src/lookup.rs", "crates/storage_impl/src/mock_db/payment_attempt.rs", "crates/storage_impl/src/payments/payment_attempt.rs", "crates/storage_impl/src/payments/payment_intent.rs", "crates/storage_impl/src/payouts/payout_attempt.rs", "crates/storage_impl/src/payouts/payouts.rs", "crates/storage_impl/src/redis/kv_store.rs"]}, "change_types": {"structs_added": 1, "functions_added": 5, "enums_added": 1, "fields_added": 87, "imports_added": 4, "conditionals_added": 6, "database_queries": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
fix(connector): Add Support for CUSTOMERREQUEST Refund Reason in Adyen
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
Closes this [issue](https://github.com/juspay/hyperswitch/issues/9034)
## Description
<!-- Describe your changes in detail -->
Added Support for CUSTOMERREQUEST Refund Reason in Adyen
### 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)?
-->
Postman Test:
Refunds:
Request:
```
curl --location 'http://localhost:8080/refunds' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_KYKqKi3f1IgAl2wzfLwajdyMApB5XvTmX7SjYWpAcuLRnYxXToxXjDDuMoKPJ5h2' \
--data '{
"payment_id": "pay_rcvdW42PBSd2ik1tYEpA",
"amount": 1000,
"reason": "CustomerRequest",
"refund_type": "instant",
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
}
}'
```
Response:
```
{
"refund_id": "ref_3UOUCY4WziTz0iWhRGjT",
"payment_id": "pay_rcvdW42PBSd2ik1tYEpA",
"amount": 1000,
"currency": "USD",
"status": "pending",
"reason": "CUSTOMER REQUEST",
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
},
"error_message": null,
"error_code": null,
"unified_code": null,
"unified_message": null,
"created_at": "2025-08-06T04:02:37.782Z",
"updated_at": "2025-08-06T04:02:39.280Z",
"connector": "adyen",
"profile_id": "pro_H4NAjXx3vY9NI4nQbXom",
"merchant_connector_id": "mca_EC2PLdAi5hhl8zAKbt0G",
"split_refunds": null,
"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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. External Connector Integration**
- `crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs`
**Detailed Identifier Changes:**
Commit 2da681a2:
Files to modify:
**crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs**
Modify existing code
|
{"pr_number": 9035, "pr_title": "fix(connector): Add Support for CUSTOMERREQUEST Refund Reason in Adyen", "merged_at": "2025-08-25T13:23:11Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(tokenio): Add OpenBanking Redirection 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 -->
Added OpenBanking Flow for Tokenio
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [x] 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)?
-->
**MCA Create**
```
{
"connector_name": "tokenio",
"connector_type": "payment_processor",
"connector_account_details": {
"auth_type": "MultiAuthKey",
"api_key": "",
"key1": "",
"api_secret": "",
"key2": ""
},
"test_mode": true,
"disabled": false,
"payment_methods_enabled": [
{
"payment_method": "open_banking",
"payment_method_types": [
{
"payment_method_type": "open_banking_pis",
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
}
]
}
],
"connector_webhook_details": {
"merchant_secret": ""
},
"business_country": "US",
"business_label": "default",
"connector_label": "stripe_US_default",
"additional_merchant_data": {
"open_banking_recipient_data": {
"account_data": {
"sepa":{
"name":"",
"iban":"",
"bic": ""
}
}
}
}
}
```
**Payments Create**
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_f7vpzTvr8iTfK2WcpkHVR6lHqsp5Wivga9b9VkYfSbqd94dVhXR9eKQ0p3V1aZVF' \
--data-raw '{
"amount": 1023,
"payment_method":"open_banking",
"payment_method_type":"open_banking_pis",
"payment_method_data":{
"open_banking":{
"open_banking_pis":{}
}
},
"currency": "EUR",
"confirm": true,
"return_url": "https://hyperswitch.requestcatcher.com/",
"email": "user@gmail.com",
"description": "Hello this is description",
"shipping": {
"address": {
"state": "California",
"city": "Banglore",
"country": "US",
"line1": "sdsdfsdf",
"line2": "hsgdbhd",
"line3": "alsksoe",
"zip": "571201",
"first_name": "John",
"last_name": "Doe"
},
"phone": {
"number": "123456789",
"country_code": "+1"
}
},
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
},
"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": "8056594427",
"country_code": "+91"
}
},
"customer_id": "hyperswitch_sdk_demo_id"
}'
```
**Response**
```
{
"payment_id": "pay_lnjZ6CXYSXzAbaEBbRUV",
"merchant_id": "merchant_1748828604",
"status": "requires_customer_action",
"amount": 1023,
"net_amount": 1023,
"shipping_cost": null,
"amount_capturable": 1023,
"amount_received": null,
"connector": "tokenio",
"client_secret": "pay_lnjZ6CXYSXzAbaEBbRUV_secret_Qu9qYCowz1xbZrcVKLnF",
"created": "2025-06-02T01:47:49.067Z",
"currency": "EUR",
"customer_id": "hyperswitch_sdk_demo_id",
"customer": {
"id": "hyperswitch_sdk_demo_id",
"name": null,
"email": "user@gmail.com",
"phone": null,
"phone_country_code": null
},
"description": "Hello this is description",
"refunds": null,
"disputes": null,
"mandate_id": null,
"mandate_data": null,
"setup_future_usage": null,
"off_session": null,
"capture_on": null,
"capture_method": null,
"payment_method": "open_banking",
"payment_method_data": {
"open_banking": {
"open_banking_pis": {}
},
"billing": null
},
"payment_token": null,
"shipping": {
"address": {
"city": "Banglore",
"country": "US",
"line1": "sdsdfsdf",
"line2": "hsgdbhd",
"line3": "alsksoe",
"zip": "571201",
"state": "California",
"first_name": "John",
"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": "8056594427",
"country_code": "+91"
},
"email": null
},
"order_details": null,
"email": "user@gmail.com",
"name": null,
"phone": null,
"return_url": "https://hyperswitch.requestcatcher.com/",
"authentication_type": "no_three_ds",
"statement_descriptor_name": null,
"statement_descriptor_suffix": null,
"next_action": {
"type": "redirect_to_url",
"redirect_to_url": "http://localhost:8080/payments/redirect/pay_lnjZ6CXYSXzAbaEBbRUV/merchant_1748828604/pay_lnjZ6CXYSXzAbaEBbRUV_1"
},
"cancellation_reason": null,
"error_code": null,
"error_message": null,
"unified_code": null,
"unified_message": null,
"payment_experience": null,
"payment_method_type": "open_banking_pis",
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "hyperswitch_sdk_demo_id",
"created_at": 1748828869,
"expires": 1748832469,
"secret": "epk_2933d08ab87442ff81659f7deb51bafb"
},
"manual_retry_allowed": null,
"connector_transaction_id": "pm2:wiM9uNqPuMPGvtUw2dMpnuGY7VV:2gFUX1NDegn",
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": {
"apple_pay": null,
"airwallex": null,
"noon": {
"order_category": "applepay"
},
"braintree": null,
"adyen": null
},
"feature_metadata": null,
"reference_id": null,
"payment_link": null,
"profile_id": "pro_MvUrdzpFtLmHlW2I0HBY",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_Z1YfTpUU5y7ZFWDBLz5Q",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-06-02T02:02:49.067Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2025-06-02T01:47:49.410Z",
"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,
"is_iframe_redirection_enabled": null,
"whole_connector_response": null
}
```
<img width="935" alt="Screenshot 2025-06-02 at 7 24 57 AM" src="https://github.com/user-attachments/assets/f1c63018-7dd7-4663-8a38-764d0013a2cd" />
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. API Request/Response Models**
- `crates/api_models/src/admin.rs`
**2. Core Business Logic**
- `crates/pm_auth/src/core/errors.rs`
- `crates/router/src/core/admin.rs`
- `crates/router/src/core/payment_methods/cards.rs`
- ... and 3 more files
**3. External Connector Integration**
- `crates/common_enums/src/connector_enums.rs`
- `crates/connector_configs/src/connector.rs`
- `crates/connector_configs/toml/development.toml`
- ... and 7 more files
**4. Type Definitions**
- `crates/pm_auth/src/types.rs`
- `crates/router/src/types.rs`
- `crates/router/src/types/api.rs`
- ... and 1 more files
**5. Utils**
- `crates/common_utils/src/crypto.rs`
**6. Tests**
- `config/deployments/integration_test.toml`
- `loadtest/config/development.toml`
**7. Configuration Files**
- `config/config.example.toml`
- `config/deployments/production.toml`
- `config/deployments/sandbox.toml`
- ... and 2 more files
**8. Other**
- `Cargo.lock`
- `api-reference-v2/openapi_spec.json`
- `api-reference/openapi_spec.json`
- ... and 1 more files
**Code Patterns Applied:**
- Define new data structures (8 changes)
- Implement new functions (31 changes)
- Extend existing types with new fields (282 changes)
- Add conditional logic for feature flags or filtering (18 changes)
**Detailed Identifier Changes:**
Commit 4c73d748:
Files to modify:
**crates/api_models/src/admin.rs**
Modify existing code
**crates/common_enums/src/connector_enums.rs**
Modify existing code
**crates/common_utils/src/crypto.rs**
Add:
- function: private::validate_inputs
- function: private::verify_signature
- function: private::sign_message
- struct: pub::Ed25519
- impl: impl Ed25519
- impl: impl VerifySignature for Ed25519
- impl: impl SignMessage for Ed25519
**crates/connector_configs/src/connector.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/tokenio.rs**
Add:
- function: private::create_jwt_token
- function: private::base64url_encode
- function: private::sign_rsa
- function: private::sign_ecdsa
- function: private::sign_eddsa
**crates/hyperswitch_connectors/src/connectors/tokenio/transformers.rs**
Remove:
- struct: pub::TokenioCard
Add:
- function: private::from
- function: pub::get_error_code
- struct: pub::PaymentInitiation
- struct: pub::Amount
- struct: pub::TokenioWebhookPayload
- struct: pub::TokenioPaymentObjectV2
- enum: pub::LocalInstrument
- enum: pub::Creditor
- enum: pub::TokenioWebhookEventType
- enum: pub::TokenioWebhookPaymentStatus
- enum: pub::TokenioWebhookEventData
- enum: pub::TokenioPaymentStatus
- impl: impl From<(StringMajorUnit, T)> for TokenioRouterData<T>
**crates/pm_auth/src/connector/plaid.rs**
Modify existing code
**crates/pm_auth/src/connector/plaid/transformers.rs**
Remove:
- function: private::from
- impl: impl From<&types::RecipientAccountData> for PlaidRecipientAccountData
Add:
- function: private::try_from
- impl: impl TryFrom<&types::RecipientAccountData> for PlaidRecipientAccountData
**crates/pm_auth/src/core/errors.rs**
Modify existing code
**crates/pm_auth/src/types.rs**
Modify existing code
**crates/router/src/consts.rs**
Modify existing code
**crates/router/src/core/admin.rs**
Remove:
- function: private::validate_bank_account_data
**crates/router/src/core/payment_methods/cards.rs**
Modify existing code
**crates/router/src/core/payments/helpers.rs**
Modify existing code
**crates/router/src/core/pm_auth/transformers.rs**
Modify existing code
**crates/router/src/core/utils.rs**
Add:
- function: pub::validate_bank_account_data
- function: private::validate_iban
- function: private::validate_uk_account
- function: private::validate_elixir_account
- function: private::validate_bankgiro_number
- function: private::validate_plusgiro_number
**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
|
{"pr_number": 8152, "pr_title": "feat(tokenio): Add OpenBanking Redirection Flow", "merged_at": "2025-06-09T08:50:38Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/admin.rs"], "core_business": ["crates/pm_auth/src/core/errors.rs", "crates/router/src/core/admin.rs", "crates/router/src/core/payment_methods/cards.rs", "crates/router/src/core/payments/helpers.rs", "crates/router/src/core/pm_auth/transformers.rs", "crates/router/src/core/utils.rs"], "connectors": ["crates/common_enums/src/connector_enums.rs", "crates/connector_configs/src/connector.rs", "crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/hyperswitch_connectors/Cargo.toml", "crates/hyperswitch_connectors/src/connectors/tokenio.rs", "crates/hyperswitch_connectors/src/connectors/tokenio/transformers.rs", "crates/pm_auth/src/connector/plaid.rs", "crates/pm_auth/src/connector/plaid/transformers.rs"], "types": ["crates/pm_auth/src/types.rs", "crates/router/src/types.rs", "crates/router/src/types/api.rs", "crates/router/src/types/transformers.rs"], "utils": ["crates/common_utils/src/crypto.rs"], "tests": ["config/deployments/integration_test.toml", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"], "other": ["Cargo.lock", "api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/router/src/consts.rs"]}, "change_types": {"structs_added": 8, "functions_added": 31, "enums_added": 12, "fields_added": 282, "imports_added": 16, "conditionals_added": 18}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(redis-interface): add redis interface command to set multiple the keys in redis and increment if the key already exists
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
add redis interface command to set multiple the keys in redis and increment if the key already exists
### 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?
- Wrote a unit test to insert the keys
<img width="1725" alt="Screenshot 2024-12-13 at 1 05 33 PM" src="https://github.com/user-attachments/assets/5165c747-6e53-4db2-9dce-6aa338c33517" />
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Other**
- `crates/redis_interface/src/commands.rs`
**Code Patterns Applied:**
- Implement new functions (2 changes)
- Extend existing types with new fields (4 changes)
**Detailed Identifier Changes:**
Commit 94ad90f9:
Files to modify:
**crates/redis_interface/src/commands.rs**
Add:
- function: pub::incr_keys_using_script
|
{"pr_number": 6827, "pr_title": "feat(redis-interface): add redis interface command to set multiple the keys in redis and increment if the key already exists", "merged_at": "2024-12-17T10:49:01Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"other": ["crates/redis_interface/src/commands.rs"]}, "change_types": {"functions_added": 2, "fields_added": 4, "imports_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(subscription): Add support to call payments microservice from subscription service via payments API client
## 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 -->
Adding support to call payments microservice for subscription related usecases
### 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).
-->
As part of the subscriptions, we need to make several payments API call, adding a API client to facilitate such calls by reusing the call_connector API we already have.
## 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)?
-->
```
Enable internal API key Auth by changing config/development.toml
[internal_merchant_id_profile_id_auth]
enabled = true
internal_api_key = "test_internal_api_key"
```
1. Create Merchant, API key, Payment connector, Billing Connector
2. Update profile to set the billing processor
Request
```
curl --location 'http://localhost:8080/account/merchant_1759125756/business_profile/pro_71jcERFiZERp44d8fuSJ' \
--header 'Content-Type: application/json' \
--header 'api-key: dev_0RJW0cwZDeGfSkod0eJWOkfZHK0PCoZtDYJJ1FxeHqhHky1VNPU6nkgFQiTFSDvA' \
--data '{
"billing_processor_id": "mca_NLnCEvS2DfuHWHFVa09o"
}'
```
Response
```
{"merchant_id":"merchant_1759125756","profile_id":"pro_71jcERFiZERp44d8fuSJ","profile_name":"US_default","return_url":"https://google.com/success","enable_payment_response_hash":true,"payment_response_hash_key":"ZFjTKSE1EYiXaPcRhacrwlNh4wieUorlmP7r2uSHI8fyHigGmNCKY2hqVtzAq51m","redirect_to_merchant_with_http_post":false,"webhook_details":{"webhook_version":"1.0.1","webhook_username":"ekart_retail","webhook_password":"password_ekart@123","webhook_url":null,"payment_created_enabled":true,"payment_succeeded_enabled":true,"payment_failed_enabled":true,"payment_statuses_enabled":null,"refund_statuses_enabled":null,"payout_statuses_enabled":null},"metadata":null,"routing_algorithm":null,"intent_fulfillment_time":900,"frm_routing_algorithm":null,"payout_routing_algorithm":null,"applepay_verified_domains":null,"session_expiry":900,"payment_link_config":null,"authentication_connector_details":null,"use_billing_as_payment_method_billing":true,"extended_card_info_config":null,"collect_shipping_details_from_wallet_connector":false,"collect_billing_details_from_wallet_connector":false,"always_collect_shipping_details_from_wallet_connector":false,"always_collect_billing_details_from_wallet_connector":false,"is_connector_agnostic_mit_enabled":false,"payout_link_config":null,"outgoing_webhook_custom_http_headers":null,"tax_connector_id":null,"is_tax_connector_enabled":false,"is_network_tokenization_enabled":false,"is_auto_retries_enabled":false,"max_auto_retries_enabled":null,"always_request_extended_authorization":null,"is_click_to_pay_enabled":false,"authentication_product_ids":null,"card_testing_guard_config":{"card_ip_blocking_status":"disabled","card_ip_blocking_threshold":3,"guest_user_card_blocking_status":"disabled","guest_user_card_blocking_threshold":10,"customer_id_blocking_status":"disabled","customer_id_blocking_threshold":5,"card_testing_guard_expiry":3600},"is_clear_pan_retries_enabled":false,"force_3ds_challenge":false,"is_debit_routing_enabled":false,"merchant_business_country":null,"is_pre_network_tokenization_enabled":false,"acquirer_configs":null,"is_iframe_redirection_enabled":null,"merchant_category_code":null,"merchant_country_code":null,"dispute_polling_interval":null,"is_manual_retry_enabled":null,"always_enable_overcapture":null,"is_external_vault_enabled":"skip","external_vault_connector_details":null,"billing_processor_id":"mca_NLnCEvS2DfuHWHFVa09o"}
```
3. Create Customer
Request
```
curl --location 'http://localhost:8080/customers' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_0RJW0cwZDeGfSkod0eJWOkfZHK0PCoZtDYJJ1FxeHqhHky1VNPU6nkgFQiTFSDvA' \
--data-raw '{
"email": "guest@example.com",
"name": "John Doe",
"phone": "999999999",
"phone_country_code": "+65",
"description": "First customer",
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
}
}'
```
Response
```
{
"customer_id": "cus_OYy3hzTTt04Enegu3Go3",
"name": "John Doe",
"email": "guest@example.com",
"phone": "999999999",
"phone_country_code": "+65",
"description": "First customer",
"address": null,
"created_at": "2025-09-29T14:45:14.430Z",
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
},
"default_payment_method_id": null,
"tax_registration_id": null
}
```
4. Create Subscription
Request
```
curl --location 'http://localhost:8080/subscriptions/create' \
--header 'Content-Type: application/json' \
--header 'X-Profile-Id: pro_MiKOgwbj84jJ095MoWdj' \
--header 'api-key: dev_I62cGvBVijteiN61aMcAOeYvXpO8s36gT8BFvPznYYDXF4GFtVtjzgiel9oIpvUK' \
--data '{
"customer_id": "cus_uBtUJLSVSICr8ctmoL8i",
"amount": 14100,
"currency": "USD",
"payment_details": {
"authentication_type": "no_three_ds",
"setup_future_usage": "off_session",
"capture_method": "automatic",
"return_url": "https://google.com"
}
}'
```
Response
```
{
"id": "sub_dNLiu9sB55eCnByGNPdd",
"merchant_reference_id": null,
"status": "created",
"plan_id": null,
"profile_id": "pro_MiKOgwbj84jJ095MoWdj",
"client_secret": "sub_dNLiu9sB55eCnByGNPdd_secret_4QTnPXm7c3B4zMF07WXt",
"merchant_id": "merchant_1759157014",
"coupon_code": null,
"customer_id": "cus_aNko2i9A9Mg7EwXMJKzz"
}
```
5. Confirm Subscription
Request
```
curl --location 'http://localhost:8080/subscriptions/sub_CkPzNaFAyxzX2WwdKFCr/confirm' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'X-Profile-Id: pro_MiKOgwbj84jJ095MoWdj' \
--header 'api-key: dev_I62cGvBVijteiN61aMcAOeYvXpO8s36gT8BFvPznYYDXF4GFtVtjzgiel9oIpvUK' \
--data '{
"item_price_id": "cbdemo_enterprise-suite-monthly",
"customer_id": "cus_uBtUJLSVSICr8ctmoL8i",
"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"
}
},
"payment_details": {
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4111111111111111",
"card_exp_month": "03",
"card_exp_year": "2030",
"card_holder_name": "CLBRW dffdg",
"card_cvc": "737"
}
},
"customer_acceptance": {
"acceptance_type": "online",
"accepted_at": "1963-05-03T04:07:52.723Z",
"online": {
"ip_address": "127.0.0.1",
"user_agent": "amet irure esse"
}
}
}
}'
```
Response
```
{
"id": "sub_dNLiu9sB55eCnByGNPdd",
"merchant_reference_id": null,
"status": "active",
"plan_id": null,
"price_id": null,
"coupon": null,
"profile_id": "pro_MiKOgwbj84jJ095MoWdj",
"payment": {
"payment_id": "sub_pay_WiJK7OF07DGdlJGjp1BC",
"status": "succeeded",
"amount": 14100,
"currency": "USD",
"connector": "stripe",
"payment_method_id": "pm_aMEJiPUp3y0kMPUzzUcU",
"payment_experience": null,
"error_code": null,
"error_message": null
},
"customer_id": "cus_aNko2i9A9Mg7EwXMJKzz",
"invoice": {
"id": "invoice_9VSdsGCGJGxyXQiTaeaX",
"subscription_id": "sub_dNLiu9sB55eCnByGNPdd",
"merchant_id": "merchant_1759157014",
"profile_id": "pro_MiKOgwbj84jJ095MoWdj",
"merchant_connector_id": "mca_oMyzcBFcpfISftwDDVuG",
"payment_intent_id": "sub_pay_WiJK7OF07DGdlJGjp1BC",
"payment_method_id": "pm_aMEJiPUp3y0kMPUzzUcU",
"customer_id": "cus_aNko2i9A9Mg7EwXMJKzz",
"amount": 14100,
"currency": "USD",
"status": "payment_pending"
},
"billing_processor_subscription_id": "sub_dNLiu9sB55eCnByGNPdd"
}
```
6. Create Customer and Create subscription again, do subscription confirm with Invalid postal code
Request
```
curl --location 'http://localhost:8080/subscriptions/sub_PRAyYMVAalH7kPjfMpZP/confirm' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'X-Profile-Id: pro_MiKOgwbj84jJ095MoWdj' \
--header 'api-key: dev_I62cGvBVijteiN61aMcAOeYvXpO8s36gT8BFvPznYYDXF4GFtVtjzgiel9oIpvUK' \
--data '{
"item_price_id": "cbdemo_enterprise-suite-monthly",
"customer_id": "cus_efEv4nqfrYEo8wSKZ10C",
"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": "IN",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "123456789",
"country_code": "+1"
}
},
"payment_details": {
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4111111111111111",
"card_exp_month": "03",
"card_exp_year": "2030",
"card_holder_name": "CLBRW dffdg",
"card_cvc": "737"
}
},
"customer_acceptance": {
"acceptance_type": "online",
"accepted_at": "1963-05-03T04:07:52.723Z",
"online": {
"ip_address": "127.0.0.1",
"user_agent": "amet irure esse"
}
}
}
}'
```
Response
```
{
"error": {
"type": "connector",
"message": "param_wrong_value: param_wrong_value",
"code": "CE_00",
"connector": "chargebee",
"reason": "billing_address[zip] : invalid zip/postal code"
}
}
```
7. Subscription create and confirm
Request
```
curl --location 'http://localhost:8080/subscriptions' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'X-Profile-Id: pro_MiKOgwbj84jJ095MoWdj' \
--header 'api-key: dev_I62cGvBVijteiN61aMcAOeYvXpO8s36gT8BFvPznYYDXF4GFtVtjzgiel9oIpvUK' \
--data '{
"item_price_id": "cbdemo_enterprise-suite-monthly",
"customer_id": "cus_efEv4nqfrYEo8wSKZ10C",
"description": "Hello this is description",
"merchant_reference_id": "mer_ref_1759334677",
"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"
}
},
"payment_details": {
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4111111111111111",
"card_exp_month": "03",
"card_exp_year": "2030",
"card_holder_name": "CLBRW dffdg",
"card_cvc": "737"
}
},
"authentication_type": "no_three_ds",
"setup_future_usage": "off_session",
"capture_method": "automatic",
"return_url": "https://google.com",
"customer_acceptance": {
"acceptance_type": "online",
"accepted_at": "1963-05-03T04:07:52.723Z",
"online": {
"ip_address": "127.0.0.1",
"user_agent": "amet irure esse"
}
}
}
}'
```
Response
```
{
"id": "sub_CkPzNaFAyxzX2WwdKFCr",
"merchant_reference_id": "mer_ref_1759334529",
"status": "active",
"plan_id": null,
"price_id": null,
"coupon": null,
"profile_id": "pro_MiKOgwbj84jJ095MoWdj",
"payment": {
"payment_id": "sub_pay_KXEtoTxvu0EsadB5wxNn",
"status": "succeeded",
"amount": 14100,
"currency": "INR",
"connector": "stripe",
"payment_method_id": "pm_bDPHgNaP7UZGjtZ7QPrS",
"payment_experience": null,
"error_code": null,
"error_message": null
},
"customer_id": "cus_uBtUJLSVSICr8ctmoL8i",
"invoice": {
"id": "invoice_Ht72m0Enqy4YOGRKAtbZ",
"subscription_id": "sub_CkPzNaFAyxzX2WwdKFCr",
"merchant_id": "merchant_1759157014",
"profile_id": "pro_MiKOgwbj84jJ095MoWdj",
"merchant_connector_id": "mca_oMyzcBFcpfISftwDDVuG",
"payment_intent_id": "sub_pay_KXEtoTxvu0EsadB5wxNn",
"payment_method_id": null,
"customer_id": "cus_uBtUJLSVSICr8ctmoL8i",
"amount": 14100,
"currency": "INR",
"status": "payment_pending"
},
"billing_processor_subscription_id": "sub_CkPzNaFAyxzX2WwdKFCr"
}
```
8. Get subscription
```
curl --location 'http://localhost:8080/subscriptions/sub_PRAyYMVAalH7kPjfMpZP' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'X-Profile-Id: pro_MiKOgwbj84jJ095MoWdj' \
--header 'api-key: dev_I62cGvBVijteiN61aMcAOeYvXpO8s36gT8BFvPznYYDXF4GFtVtjzgiel9oIpvUK'
```
Response
```
{
"id": "sub_CkPzNaFAyxzX2WwdKFCr",
"merchant_reference_id": "mer_ref_1759334529",
"status": "active",
"plan_id": null,
"profile_id": "pro_MiKOgwbj84jJ095MoWdj",
"client_secret": "sub_CkPzNaFAyxzX2WwdKFCr_secret_F8z6T70udfgFVYpd4FsX",
"merchant_id": "merchant_1759157014",
"coupon_code": null,
"customer_id": "cus_uBtUJLSVSICr8ctmoL8i"
}
```
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. API Request/Response Models**
- `crates/api_models/src/subscription.rs`
**2. Database Layer (Queries & Schema)**
- `crates/diesel_models/src/query/invoice.rs`
- `crates/diesel_models/src/query/utils.rs`
- `crates/diesel_models/src/subscription.rs`
**3. Domain Models (Business Logic Types)**
- `crates/hyperswitch_domain_models/src/router_response_types/subscriptions.rs`
**4. Core Business Logic**
- `crates/router/src/core/subscription.rs`
- `crates/router/src/core/subscription/billing_processor_handler.rs`
- `crates/router/src/core/subscription/invoice_handler.rs`
- ... and 2 more files
**5. External Connector Integration**
- `crates/common_enums/src/connector_enums.rs`
- `crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs`
**6. Type Definitions**
- `crates/router_env/src/logger/types.rs`
**7. Utils**
- `crates/common_utils/src/id_type/subscription.rs`
- `crates/router/src/routes/lock_utils.rs`
**8. Tests**
- `config/deployments/integration_test.toml`
- `loadtest/config/development.toml`
**9. Configuration Files**
- `config/config.example.toml`
- `config/deployments/env_specific.toml`
- `config/deployments/production.toml`
- ... and 5 more files
**10. Other**
- `crates/router/src/db/invoice.rs`
- `crates/router/src/routes/app.rs`
- `crates/router/src/routes/payments.rs`
- ... and 1 more files
**Code Patterns Applied:**
- Define new data structures (16 changes)
- Implement new functions (43 changes)
- Extend existing types with new fields (352 changes)
- Add conditional logic for feature flags or filtering (3 changes)
- Modify database queries (3 changes)
**Detailed Identifier Changes:**
Commit df663129:
Files to modify:
**crates/api_models/src/subscription.rs**
Remove:
- struct: pub::CreateSubscriptionResponse
Add:
- struct: pub::SubscriptionResponse
- struct: pub::CreateSubscriptionPaymentDetails
- struct: pub::CreatePaymentsRequestData
- struct: pub::ConfirmPaymentsRequestData
**crates/common_enums/src/connector_enums.rs**
Modify existing code
**crates/common_utils/src/id_type/subscription.rs**
Modify existing code
**crates/diesel_models/src/query/invoice.rs**
Add:
- function: pub::list_invoices_by_subscription_id
**crates/diesel_models/src/query/utils.rs**
Modify existing code
**crates/diesel_models/src/subscription.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs**
Add:
- function: private::from
- function: private::from
- enum: pub::ChargebeeInvoiceStatus
- impl: impl From<ChargebeeInvoiceData> for SubscriptionInvoiceData
- impl: impl From<ChargebeeInvoiceStatus> for connector_enums::InvoiceStatus
**crates/hyperswitch_domain_models/src/router_response_types/subscriptions.rs**
Add:
- struct: pub::SubscriptionInvoiceData
**crates/router/src/configs/secrets_transformers.rs**
Modify existing code
**crates/router/src/configs/settings.rs**
Add:
- struct: pub::InternalServicesConfig
**crates/router/src/core/subscription.rs**
Add:
- function: pub::confirm_subscription
- mod: pub::invoice_handler
- mod: pub::payments_api_client
- mod: pub::subscription_handler
**crates/router/src/core/subscription/billing_processor_handler.rs**
Add:
- function: pub::create
- function: pub::create_customer_on_connector
- function: pub::create_subscription_on_connector
- function: private::call_connector
- function: private::build_router_data
- struct: pub::BillingHandler
- impl: impl BillingHandler
**crates/router/src/core/subscription/invoice_handler.rs**
Add:
- function: pub::create_invoice_entry
- function: pub::update_invoice
- function: pub::get_amount_and_currency
- function: pub::create_payment_with_confirm_false
- function: pub::get_payment_details
- function: pub::create_and_confirm_payment
- function: pub::confirm_payment
- function: pub::get_latest_invoice
- function: pub::create_invoice_record_back_job
- struct: pub::InvoiceHandler
- impl: impl InvoiceHandler
**crates/router/src/core/subscription/payments_api_client.rs**
Add:
- function: private::get_internal_auth_headers
- function: private::make_payment_api_call
- function: pub::create_cit_payment
- function: pub::create_and_confirm_payment
- function: pub::confirm_payment
- function: pub::sync_payment
- struct: pub::PaymentsApiClient
- struct: pub::ErrorResponse
- struct: pub::ErrorResponseDetails
- impl: impl PaymentsApiClient
**crates/router/src/core/subscription/subscription_handler.rs**
Add:
- function: pub::new
- function: pub::create_subscription_entry
- function: pub::find_customer
- function: pub::find_business_profile
- function: pub::find_subscription
- function: pub::generate_response
- function: pub::to_subscription_response
- function: pub::update_subscription
- function: pub::get_invoice_handler
- struct: pub::SubscriptionHandler
- struct: pub::SubscriptionWithHandler
- impl: impl SubscriptionHandler<'a>
- impl: impl SubscriptionWithHandler<'_>
**crates/router/src/db/invoice.rs**
Add:
- function: private::get_latest_invoice_for_subscription
- function: private::get_latest_invoice_for_subscription
- function: private::get_latest_invoice_for_subscription
**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/routes/subscription.rs**
Add:
- function: private::extract_profile_id
**crates/router_env/src/logger/types.rs**
Modify existing code
|
{"pr_number": 9590, "pr_title": "feat(subscription): Add support to call payments microservice from subscription service via payments API client", "merged_at": "2025-10-01T19:29:29Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/subscription.rs"], "database": ["crates/diesel_models/src/query/invoice.rs", "crates/diesel_models/src/query/utils.rs", "crates/diesel_models/src/subscription.rs"], "domain": ["crates/hyperswitch_domain_models/src/router_response_types/subscriptions.rs"], "core_business": ["crates/router/src/core/subscription.rs", "crates/router/src/core/subscription/billing_processor_handler.rs", "crates/router/src/core/subscription/invoice_handler.rs", "crates/router/src/core/subscription/payments_api_client.rs", "crates/router/src/core/subscription/subscription_handler.rs"], "connectors": ["crates/common_enums/src/connector_enums.rs", "crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs"], "types": ["crates/router_env/src/logger/types.rs"], "utils": ["crates/common_utils/src/id_type/subscription.rs", "crates/router/src/routes/lock_utils.rs"], "tests": ["config/deployments/integration_test.toml", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/env_specific.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml", "crates/router/src/configs/secrets_transformers.rs", "crates/router/src/configs/settings.rs"], "other": ["crates/router/src/db/invoice.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/payments.rs", "crates/router/src/routes/subscription.rs"]}, "change_types": {"structs_added": 16, "functions_added": 43, "enums_added": 1, "fields_added": 352, "imports_added": 36, "conditionals_added": 3, "database_queries": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
refactor(users): remove lineage checks in roles get operations
## 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 -->
- Refactor the find_by_role_id_in_merchant_scope query to make it a generic query that uses only org_id and role_id as parameters.
- This PR also includes backfilling user_roles entity_type column based on user_role
### 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).
-->
Closes [6702](https://github.com/juspay/hyperswitch/issues/6702)
## 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)?
-->
Using dashboard . All the below should work as before
Cases to test :
- Create a custom role from dashboard
- Invite someone for that custom role
- signin via that custom-role-user
- List roles and list roles at entity level
- List users
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Database Layer (Queries & Schema)**
- `crates/diesel_models/src/query/role.rs`
- `crates/diesel_models/src/user_role.rs`
**2. Core Business Logic**
- `crates/router/src/core/user.rs`
- `crates/router/src/core/user_role.rs`
- `crates/router/src/core/user_role/role.rs`
**3. Type Definitions**
- `crates/router/src/types/domain/user/decision_manager.rs`
**4. Utils**
- `crates/router/src/utils/user.rs`
- `crates/router/src/utils/user_role.rs`
**5. Other**
- `crates/router/src/analytics.rs`
- `crates/router/src/db/kafka_store.rs`
- `crates/router/src/db/role.rs`
- ... and 4 more files
**Code Patterns Applied:**
- Implement new functions (15 changes)
- Extend existing types with new fields (16 changes)
- Add conditional logic for feature flags or filtering (2 changes)
- Modify database queries (19 changes)
**Detailed Identifier Changes:**
Commit f96a87d0:
Files to modify:
**crates/diesel_models/src/query/role.rs**
Add:
- function: pub::find_by_role_id_in_lineage
**crates/diesel_models/src/user_role.rs**
Modify existing code
**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/core/user_role/role.rs**
Modify existing code
**crates/router/src/db/kafka_store.rs**
Add:
- function: private::find_role_by_role_id_in_lineage
**crates/router/src/db/role.rs**
Modify existing code
**crates/router/src/services/authorization.rs**
Modify existing code
**crates/router/src/services/authorization/roles.rs**
Modify existing code
**crates/router/src/types/domain/user/decision_manager.rs**
Modify existing code
**crates/router/src/utils/user.rs**
Modify existing code
**crates/router/src/utils/user_role.rs**
Modify existing code
|
{"pr_number": 6701, "pr_title": "refactor(users): remove lineage checks in roles get operations", "merged_at": "2024-12-10T12:37:44Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant", "user"]}, "hierarchy": {"database": ["crates/diesel_models/src/query/role.rs", "crates/diesel_models/src/user_role.rs"], "core_business": ["crates/router/src/core/user.rs", "crates/router/src/core/user_role.rs", "crates/router/src/core/user_role/role.rs"], "types": ["crates/router/src/types/domain/user/decision_manager.rs"], "utils": ["crates/router/src/utils/user.rs", "crates/router/src/utils/user_role.rs"], "other": ["crates/router/src/analytics.rs", "crates/router/src/db/kafka_store.rs", "crates/router/src/db/role.rs", "crates/router/src/services/authorization.rs", "crates/router/src/services/authorization/roles.rs", "migrations/2024-12-02-110129_update-user-role-entity-type/down.sql", "migrations/2024-12-02-110129_update-user-role-entity-type/up.sql"]}, "change_types": {"functions_added": 15, "fields_added": 16, "conditionals_added": 2, "database_queries": 19}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
chore(postman): postman tests fixes
## Type of Change
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [x] CI/CD
## Description
### 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?
### Connector:`adyen_uk`
<img width="1270" alt="image" src="https://github.com/user-attachments/assets/b4886786-5f02-4657-8d74-dee18ee45734" />
_**Note:** The `Sofort` Test Cases are removed in PR #7099 after being deprecated by `adyen` connector._
<img width="500" alt="image" src="https://github.com/user-attachments/assets/20641a84-fdba-440e-bc6b-6ec5f3a248a7" />
### Connector:`bluesnap`
<img width="500" alt="image" src="https://github.com/user-attachments/assets/4ac36593-17a9-430c-84ac-22a2090f58c1" />
### Connector:`cybersource`
_Before_
<img width="500" alt="image" src="https://github.com/user-attachments/assets/897fd331-ae52-46df-b03f-60fa835f7bf6" />
<details>
<summary>Changes</summary>
- Updated `card_exp_year` from `25` to `35` in `postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Create/request.json` because `01/25` is not a valid expiration anymore.
- Manual Capture in `Cybersource` connector takes upto 24 hours to show `succeeded` or `failed` status. So, it remains in `pending` status.
- And, because the Payment with Manual Capture does not get a status `succeeded` anytime soon, Payments can not be Refunded anytime soon.
- A `Refunds - Retrieve` assertion was failing due to the `refund_id` issue in the `Refunds - Create`. Because it was assigned with the `refund_id` value of `Scenario9-Add card flow/Refunds - Create` which had the amount of `600`, the assertion in this conditional statement was failing expecting it to be `540` according to the request created in `Scenario11-Save card payment with manual capture`.
- However, added an assertion to check the Error Message.
- In `postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario12-Zero auth mandates/Payments - Confirm/request.json`, adding a string without space between considers it as the first name and throws `Declined - The request is missing one or more fields, detailed_error_information: orderInformation.billTo.lastName : MISSING_FIELD`, So added a space in the `card_holder_name` string making it have a `firstName` and a `lastName`.
- Removed Incremental Auth Flows because you don't have the required credentials to pass the flows.
- Added `"metadata": {}` in `postman/collection-dir/cybersource/Flow Testcases/QuickStart/Payment Connector - Create/request.json` because without it, `The metadata is invalid` error message is thrown.
</details>
_After_
<img width="500" alt="image" src="https://github.com/user-attachments/assets/7f8cf1a1-38fd-4c6e-8885-b7befa0ad614" />
### Connector:`nmi`
_Before_
<img width="500" alt="image" src="https://github.com/user-attachments/assets/9f2d01b8-b8db-4353-8e31-13c9b0fe1bb5" />
<details>
<summary>Changes</summary>
- An error reason was expected to be `"credit mandate payment is not supported by nmi"` instead of `"mandate payment is not supported by nmi"`.
</details>
_After_
<img width="500" alt="image" src="https://github.com/user-attachments/assets/5e4d596a-7a1b-400c-b0e1-50179392ae10" />
### Connector: `paypal`
<img width="500" alt="image" src="https://github.com/user-attachments/assets/cd3c0a0b-2a73-447d-bb1c-570530bc96fe" />
### Connector: `stripe`
Failing too inconsistently. Different number of test cases are failing. It is not even the same test cases each time it fails.
### Connector: `trustpay`
_Before_
<img width="500" alt="image" src="https://github.com/user-attachments/assets/8807d1fc-d845-4ea3-b8ba-d922bdd63af4" />
<details>
<summary>Changes</summary>
- Added assertions to verify Payments and Refunds status to be succeeded.
- Added assertions to verify the amount in Refunds.
- Added Delay in Payments - Retrieve so that we can initiate Refunds.
</details>
_After_
<img width="500" alt="image" src="https://github.com/user-attachments/assets/7e402564-0758-421b-8e79-6b9d6eb7ee99" />
## 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
|
To implement this **payment** feature, you'll need to modify these architectural layers:
**1. Tests**
- `postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario11-Save card payment with manual capture/Payments - Capture/event.test.js`
- `postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario11-Save card payment with manual capture/Payments - Retrieve-copy/event.test.js`
- `postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario11-Save card payment with manual capture/Refunds - Create/event.test.js`
- ... and 75 more files
**2. Other**
- `postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Create/request.json`
- `postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario12-Zero auth mandates/Payments - Confirm/request.json`
- `postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario13-Incremental auth/.meta.json`
- ... and 212 more files
**Code Patterns Applied:**
- Add conditional logic for feature flags or filtering (7 changes)
|
{"pr_number": 7159, "pr_title": "chore(postman): postman tests fixes", "merged_at": "2025-03-06T08:48:47Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["payment", "user", "order"]}, "hierarchy": {"tests": ["postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario11-Save card payment with manual capture/Payments - Capture/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario11-Save card payment with manual capture/Payments - Retrieve-copy/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario11-Save card payment with manual capture/Refunds - Create/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario11-Save card payment with manual capture/Refunds - Retrieve/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario13-Incremental auth/Incremental Authorization/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario13-Incremental auth/Payments - Capture/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario13-Incremental auth/Payments - Create/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario13-Incremental auth/Payments - Retrieve/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario13-Incremental auth/Refunds - Create/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario13-Incremental auth/Refunds - Retrieve/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario16-Verify PML for mandate/List payment methods for a Merchant-copy/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario16-Verify PML for mandate/List payment methods for a Merchant/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario16-Verify PML for mandate/Payments - Create-copy/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario16-Verify PML for mandate/Payments - Create/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario14-Incremental auth for mandates/Incremental Authorization/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario14-Incremental auth for mandates/Payments - Capture/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario14-Incremental auth for mandates/Payments - Create/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario14-Incremental auth for mandates/Payments - Retrieve/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario17-Revoke mandates/List - Mandates-copy/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario17-Revoke mandates/List - Mandates/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario17-Revoke mandates/Payments - Create/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario17-Revoke mandates/Payments - Retrieve/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario17-Revoke mandates/Revoke - Mandates/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario18-Create 3ds payment/Payments - Create/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario18-Create 3ds payment/Payments - Retrieve/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario15-Incremental auth with partial capture/Incremental Authorization/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario15-Incremental auth with partial capture/Payments - Capture/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario15-Incremental auth with partial capture/Payments - Create/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario15-Incremental auth with partial capture/Payments - Retrieve/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario15-Incremental auth with partial capture/Refunds - Create/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario15-Incremental auth with partial capture/Refunds - Retrieve/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario19-Create 3ds mandate/Payments - Create/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario19-Create 3ds mandate/Payments - Retrieve/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario20-Create a mandate without customer acceptance/Payments - Confirm/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario20-Create a mandate without customer acceptance/Payments - Create/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario20-Create a mandate without customer acceptance/Payments - Retrieve-copy/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario20-Create a mandate without customer acceptance/Payments - Retrieve/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario20-Create a mandate without customer acceptance/Recurring Payments - Create/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Capture/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario4-Create payment with Manual capture/Payments - Retrieve/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario4a-Create payment with partial capture/Payments - Capture/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario4a-Create payment with partial capture/Payments - Retrieve/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario7a-Manual capture for recurring payments/Payments - Capture/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario7a-Manual capture for recurring payments/Payments - Retrieve-copy/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario11-Refund exceeds amount captured/Payments - Capture/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario11-Refund exceeds amount captured/Payments - Create/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario11-Refund exceeds amount captured/Payments - Retrieve/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario11-Refund exceeds amount captured/Refunds - Create/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario12-Revoke for revoked mandates/Payments - Create/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario12-Revoke for revoked mandates/Payments - Retrieve/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario12-Revoke for revoked mandates/Revoke - Mandates-copy/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario12-Revoke for revoked mandates/Revoke - Mandates/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario13-Recurring payment for revoked mandates/Payments - Create/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario13-Recurring payment for revoked mandates/Payments - Retrieve/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario13-Recurring payment for revoked mandates/Recurring Payments - Create/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario13-Recurring payment for revoked mandates/Revoke - Mandates/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario14-Setup_future_usage is off_session for normal payments/Payments - Create/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario15-Setup_future_usage is on_session for mandates payments -confirm false/Payments - Confirm/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario15-Setup_future_usage is on_session for mandates payments -confirm false/Payments - Create/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario16-Setup_future_usage is null for normal payments/List payment methods for a Customer/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario16-Setup_future_usage is null for normal payments/Payments - Confirm/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario16-Setup_future_usage is null for normal payments/Payments - Create/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario7-Refund exceeds amount/Payments - Create/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario7-Refund exceeds amount/Payments - Retrieve/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario7-Refund exceeds amount/Refunds - Create/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario8-Refund for unsuccessful payment/Payments - Create/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario8-Refund for unsuccessful payment/Payments - Retrieve/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario8-Refund for unsuccessful payment/Refunds - Create/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario9-Create a recurring payment with greater mandate amount/Payments - Create/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario9-Create a recurring payment with greater mandate amount/Payments - Retrieve/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario9-Create a recurring payment with greater mandate amount/Recurring Payments - Create/event.test.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario10-Manual multiple capture/Payments - Create/event.test.js", "postman/collection-dir/nmi/Flow Testcases/Variation Cases/Scenario9-Create a mandate payment/Payments - Create/event.test.js", "postman/collection-dir/trustpay/Flow Testcases/Happy Cases/Scenario6-Refund full payment/Payments - Retrieve/event.test.js", "postman/collection-dir/trustpay/Flow Testcases/QuickStart/Payments - Create/event.test.js", "postman/collection-dir/trustpay/Flow Testcases/QuickStart/Payments - Retrieve/event.test.js", "postman/collection-dir/trustpay/Flow Testcases/QuickStart/Refunds - Create/event.test.js", "postman/collection-dir/trustpay/Flow Testcases/QuickStart/Refunds - Retrieve/event.test.js"], "other": ["postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario1-Create payment with confirm true/Payments - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario12-Zero auth mandates/Payments - Confirm/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario13-Incremental auth/.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario13-Incremental auth/Incremental Authorization/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario13-Incremental auth/Payments - Capture/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario13-Incremental auth/Payments - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario13-Incremental auth/Payments - Retrieve/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario13-Incremental auth/Refunds - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario13-Incremental auth/Refunds - Retrieve/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario16-Verify PML for mandate/.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario13-Incremental auth/Incremental Authorization/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario16-Verify PML for mandate/List payment methods for a Merchant-copy/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario13-Incremental auth/Incremental Authorization/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario13-Incremental auth/Payments - Capture/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario16-Verify PML for mandate/List payment methods for a Merchant/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario13-Incremental auth/Payments - Capture/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario13-Incremental auth/Payments - Create/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario16-Verify PML for mandate/Payments - Create-copy/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario13-Incremental auth/Payments - Create/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario13-Incremental auth/Payments - Retrieve/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario16-Verify PML for mandate/Payments - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario13-Incremental auth/Payments - Retrieve/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario14-Incremental auth for mandates/.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario14-Incremental auth for mandates/Incremental Authorization/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario14-Incremental auth for mandates/Payments - Capture/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario14-Incremental auth for mandates/Payments - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario14-Incremental auth for mandates/Payments - Retrieve/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario17-Revoke mandates/.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario13-Incremental auth/Refunds - Create/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario17-Revoke mandates/List - Mandates-copy/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario13-Incremental auth/Refunds - Create/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario13-Incremental auth/Refunds - Retrieve/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario17-Revoke mandates/List - Mandates/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario13-Incremental auth/Refunds - Retrieve/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario14-Incremental auth for mandates/Incremental Authorization/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario17-Revoke mandates/Payments - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario14-Incremental auth for mandates/Incremental Authorization/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario14-Incremental auth for mandates/Payments - Capture/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario17-Revoke mandates/Payments - Retrieve/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario14-Incremental auth for mandates/Payments - Capture/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario14-Incremental auth for mandates/Payments - Create/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario17-Revoke mandates/Revoke - Mandates/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario14-Incremental auth for mandates/Payments - Create/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario18-Create 3ds payment/.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario14-Incremental auth for mandates/Payments - Retrieve/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario18-Create 3ds payment/Payments - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario14-Incremental auth for mandates/Payments - Retrieve/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario15-Incremental auth with partial capture/Incremental Authorization/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario18-Create 3ds payment/Payments - Retrieve/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario15-Incremental auth with partial capture/Incremental Authorization/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario15-Incremental auth with partial capture/.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario15-Incremental auth with partial capture/Incremental Authorization/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario15-Incremental auth with partial capture/Payments - Capture/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario15-Incremental auth with partial capture/Payments - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario15-Incremental auth with partial capture/Payments - Retrieve/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario15-Incremental auth with partial capture/Refunds - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario15-Incremental auth with partial capture/Refunds - Retrieve/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario19-Create 3ds mandate/.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario15-Incremental auth with partial capture/Payments - Capture/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario19-Create 3ds mandate/Payments - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario15-Incremental auth with partial capture/Payments - Capture/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario15-Incremental auth with partial capture/Payments - Create/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario19-Create 3ds mandate/Payments - Retrieve/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario15-Incremental auth with partial capture/Payments - Create/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario20-Create a mandate without customer acceptance/.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario20-Create a mandate without customer acceptance/Payments - Confirm/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario20-Create a mandate without customer acceptance/Payments - Confirm/event.prerequest.js", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario20-Create a mandate without customer acceptance/Payments - Confirm/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario15-Incremental auth with partial capture/Payments - Retrieve/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario15-Incremental auth with partial capture/Payments - Retrieve/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario20-Create a mandate without customer acceptance/Payments - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario15-Incremental auth with partial capture/Refunds - Create/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario15-Incremental auth with partial capture/Refunds - Create/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario20-Create a mandate without customer acceptance/Payments - Retrieve-copy/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario15-Incremental auth with partial capture/Refunds - Retrieve/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario15-Incremental auth with partial capture/Refunds - Retrieve/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario20-Create a mandate without customer acceptance/Payments - Retrieve/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario16-Verify PML for mandate/List payment methods for a Merchant-copy/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario16-Verify PML for mandate/List payment methods for a Merchant-copy/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario20-Create a mandate without customer acceptance/Recurring Payments - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario16-Verify PML for mandate/List payment methods for a Merchant/response.json", "postman/collection-dir/cybersource/Flow Testcases/QuickStart/Payment Connector - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario11-Refund exceeds amount captured/.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario16-Verify PML for mandate/List payment methods for a Merchant/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario11-Refund exceeds amount captured/Payments - Capture/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario16-Verify PML for mandate/Payments - Create-copy/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario16-Verify PML for mandate/Payments - Create-copy/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario11-Refund exceeds amount captured/Payments - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario16-Verify PML for mandate/Payments - Create/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario16-Verify PML for mandate/Payments - Create/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario11-Refund exceeds amount captured/Payments - Retrieve/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario17-Revoke mandates/List - Mandates-copy/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario17-Revoke mandates/List - Mandates-copy/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario11-Refund exceeds amount captured/Refunds - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario17-Revoke mandates/List - Mandates/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario12-Revoke for revoked mandates/.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario17-Revoke mandates/List - Mandates/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario12-Revoke for revoked mandates/Payments - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario17-Revoke mandates/Payments - Create/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario17-Revoke mandates/Payments - Create/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario12-Revoke for revoked mandates/Payments - Retrieve/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario17-Revoke mandates/Payments - Retrieve/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario17-Revoke mandates/Payments - Retrieve/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario12-Revoke for revoked mandates/Revoke - Mandates-copy/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario17-Revoke mandates/Revoke - Mandates/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario17-Revoke mandates/Revoke - Mandates/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario12-Revoke for revoked mandates/Revoke - Mandates/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario18-Create 3ds payment/Payments - Create/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario13-Recurring payment for revoked mandates/.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario18-Create 3ds payment/Payments - Create/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario13-Recurring payment for revoked mandates/Payments - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario18-Create 3ds payment/Payments - Retrieve/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario18-Create 3ds payment/Payments - Retrieve/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario13-Recurring payment for revoked mandates/Payments - Retrieve/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario19-Create 3ds mandate/Payments - Create/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario19-Create 3ds mandate/Payments - Create/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario13-Recurring payment for revoked mandates/Recurring Payments - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario19-Create 3ds mandate/Payments - Retrieve/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario19-Create 3ds mandate/Payments - Retrieve/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario13-Recurring payment for revoked mandates/Revoke - Mandates/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario20-Create a mandate without customer acceptance/Payments - Confirm/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario12-Revoke for revoked mandates/Revoke - Mandates-copy/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario12-Revoke for revoked mandates/Revoke - Mandates/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario13-Recurring payment for revoked mandates/Payments - Create/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario13-Recurring payment for revoked mandates/Payments - Retrieve/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario13-Recurring payment for revoked mandates/Recurring Payments - Create/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario13-Recurring payment for revoked mandates/Revoke - Mandates/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario13-Recurring payment for revoked mandates/Revoke - Mandates/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario10-Manual multiple capture/.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario14-Setup_future_usage is off_session for normal payments/Payments - Create/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario14-Setup_future_usage is off_session for normal payments/Payments - Create/event.prerequest.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario14-Setup_future_usage is off_session for normal payments/Payments - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario20-Create a mandate without customer acceptance/Payments - Create/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario14-Setup_future_usage is off_session for normal payments/Payments - Create/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario15-Setup_future_usage is on_session for mandates payments -confirm false/.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario15-Setup_future_usage is on_session for mandates payments -confirm false/Payments - Confirm/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario15-Setup_future_usage is on_session for mandates payments -confirm false/Payments - Confirm/event.prerequest.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario15-Setup_future_usage is on_session for mandates payments -confirm false/Payments - Confirm/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario20-Create a mandate without customer acceptance/Payments - Retrieve-copy/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario15-Setup_future_usage is on_session for mandates payments -confirm false/Payments - Create/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario15-Setup_future_usage is on_session for mandates payments -confirm false/Payments - Create/event.prerequest.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario15-Setup_future_usage is on_session for mandates payments -confirm false/Payments - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario20-Create a mandate without customer acceptance/Payments - Retrieve/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario16-Setup_future_usage is null for normal payments/.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario20-Create a mandate without customer acceptance/Payments - Create/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario16-Setup_future_usage is null for normal payments/List payment methods for a Customer/request.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario20-Create a mandate without customer acceptance/Recurring Payments - Create/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario16-Setup_future_usage is null for normal payments/Payments - Confirm/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario16-Setup_future_usage is null for normal payments/Payments - Confirm/event.prerequest.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario16-Setup_future_usage is null for normal payments/Payments - Confirm/request.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario10-Manual multiple capture/Payments - Create/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario16-Setup_future_usage is null for normal payments/Payments - Create/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario16-Setup_future_usage is null for normal payments/Payments - Create/event.prerequest.js", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario16-Setup_future_usage is null for normal payments/Payments - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario11-Refund exceeds amount captured/Payments - Capture/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario15-Setup_future_usage is on_session for mandates payments -confirm false/Payments - Confirm/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario15-Setup_future_usage is on_session for mandates payments -confirm false/Payments - Create/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario16-Setup_future_usage is null for normal payments/List payment methods for a Customer/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario16-Setup_future_usage is null for normal payments/List payment methods for a Customer/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario16-Setup_future_usage is null for normal payments/Payments - Confirm/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario16-Setup_future_usage is null for normal payments/Payments - Create/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario7-Refund exceeds amount/.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario20-Create a mandate without customer acceptance/Payments - Retrieve-copy/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario7-Refund exceeds amount/Payments - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario11-Refund exceeds amount captured/Payments - Create/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario20-Create a mandate without customer acceptance/Payments - Retrieve/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario7-Refund exceeds amount/Payments - Retrieve/request.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario11-Refund exceeds amount captured/Payments - Retrieve/response.json", "postman/collection-dir/cybersource/Flow Testcases/Happy Cases/Scenario20-Create a mandate without customer acceptance/Recurring Payments - Create/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario7-Refund exceeds amount/Refunds - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario11-Refund exceeds amount captured/Refunds - Create/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario7-Refund exceeds amount/Payments - Create/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario7-Refund exceeds amount/Payments - Create/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario7-Refund exceeds amount/Payments - Retrieve/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario7-Refund exceeds amount/Payments - Retrieve/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario7-Refund exceeds amount/Refunds - Create/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario7-Refund exceeds amount/Refunds - Create/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario8-Refund for unsuccessful payment/.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario10-Manual multiple capture/Payments - Create/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario8-Refund for unsuccessful payment/Payments - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario12-Revoke for revoked mandates/Payments - Create/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario11-Refund exceeds amount captured/Payments - Capture/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario8-Refund for unsuccessful payment/Payments - Retrieve/request.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario12-Revoke for revoked mandates/Payments - Retrieve/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario11-Refund exceeds amount captured/Payments - Create/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario8-Refund for unsuccessful payment/Refunds - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario12-Revoke for revoked mandates/Revoke - Mandates-copy/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario9-Create a recurring payment with greater mandate amount/.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario11-Refund exceeds amount captured/Payments - Retrieve/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario9-Create a recurring payment with greater mandate amount/Payments - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario12-Revoke for revoked mandates/Revoke - Mandates/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario11-Refund exceeds amount captured/Refunds - Create/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario9-Create a recurring payment with greater mandate amount/Payments - Retrieve/request.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario13-Recurring payment for revoked mandates/Payments - Create/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario12-Revoke for revoked mandates/Payments - Create/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario9-Create a recurring payment with greater mandate amount/Recurring Payments - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario13-Recurring payment for revoked mandates/Payments - Retrieve/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario8-Refund for unsuccessful payment/Payments - Create/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario8-Refund for unsuccessful payment/Payments - Create/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario8-Refund for unsuccessful payment/Payments - Retrieve/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario8-Refund for unsuccessful payment/Payments - Retrieve/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario8-Refund for unsuccessful payment/Refunds - Create/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario8-Refund for unsuccessful payment/Refunds - Create/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario9-Create a recurring payment with greater mandate amount/Payments - Create/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario9-Create a recurring payment with greater mandate amount/Payments - Create/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario9-Create a recurring payment with greater mandate amount/Payments - Retrieve/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario9-Create a recurring payment with greater mandate amount/Payments - Retrieve/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario9-Create a recurring payment with greater mandate amount/Recurring Payments - Create/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario9-Create a recurring payment with greater mandate amount/Recurring Payments - Create/response.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario14-Setup_future_usage is off_session for normal payments/.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario12-Revoke for revoked mandates/Payments - Retrieve/.event.meta.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario10-Manual multiple capture/Payments - Create/request.json", "postman/collection-dir/cybersource/Flow Testcases/Variation Cases/Scenario13-Recurring payment for revoked mandates/Recurring Payments - Create/response.json", "postman/collection-dir/trustpay/Flow Testcases/Happy Cases/Scenario6-Refund full payment/Refunds - Create/event.prerequest.js", "postman/collection-dir/trustpay/Flow Testcases/QuickStart/Refunds - Create/event.prerequest.js"]}, "change_types": {"conditionals_added": 7}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
|
refactor(cypress): update BOA configs for manual payments' refunds and connector agnostic
## 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 -->
Refunds for Manually Captured No3DS Payments and Connector Agnostic NTID Test Cases in Cypress were failing for `Bank of America` Payment Processor.
- The Refunds for Manually Captured No3DS Payments were staying in `pending` status instead of `succeeded` with `error_message` as `null` and on RSync, it yields `errorInformation.message` as `"Request was processed successfully."` with status still as `pending`.
- The `00024-ConnectorAgnosticNTID` was failing with the error message in the response as `"No eligible connector was found for the current payment method configuration"` because it did not support Connector Agnostic.
So, made the following changes:-
- Mapped the status accordingly. Changed `succeeded` to `pending` for No3DS Manual Payment Refunds.
- Excluded `bankofamerica` from the Connectors which are allowing Connector Agnostic.
### 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).
-->
Bank of America Cypress Test Cases were failing.
## 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)?
-->
<img width="718" alt="image" src="https://github.com/user-attachments/assets/440774ed-944e-4a10-8447-4fa75e05e915" />
_(Tested on Integ Environment)_
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Tests**
- `cypress-tests/cypress/e2e/configs/Payment/BankOfAmerica.js`
- `cypress-tests/cypress/e2e/configs/Payment/Utils.js`
**Code Patterns Applied:**
- Extend existing types with new fields (3 changes)
|
{"pr_number": 7690, "pr_title": "refactor(cypress): update BOA configs for manual payments' refunds and connector agnostic", "merged_at": "2025-04-08T10:27:13Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "refund"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/configs/Payment/BankOfAmerica.js", "cypress-tests/cypress/e2e/configs/Payment/Utils.js"]}, "change_types": {"fields_added": 3}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
|
fix(connectors): [Nexixpay] send recurrence obj in non cit payments
## 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 -->
As requested by connector we need to send recurrence object in connector requests of init and payments call for non cit payment with action as NoRecurring.
### 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).
-->
One off payments are getting rejected from nexixpay as they have changed their api contract.
## 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)?
-->
Payments create:
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_****' \
--data-raw '{
"amount": 3545,
"currency": "EUR",
"return_url": "https://google.com",
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4349 9401 9900 4549",
"card_exp_month": "05",
"card_exp_year": "26",
"card_cvc": "396"
}
},
"confirm": true,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"authentication_type": "three_ds",
"setup_future_usage": "on_session",
"customer": {
"id": "customer123",
"name": "John Doe",
"email": "customer@gmail.com",
"phone": "9999999999",
"phone_country_code": "+1"
},
"customer_id": "customer123",
"phone_country_code": "+1",
"description": "Its my first payment request",
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"country": "BR",
"zip": "94122",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": "guest@example.com"
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "BR",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": "guest@example.com"
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"order_details": [
{
"product_name": "Apple iphone 15",
"quantity": 1,
"amount": 3545,
"account_name": "transaction_processing"
}
],
"browser_info": {
"user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
"accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
"language": "nl-NL",
"color_depth": 24,
"screen_height": 723,
"screen_width": 1536,
"time_zone": 0,
"java_enabled": true,
"java_script_enabled": true,
"ip_address": "128.0.0.1"
},
"connector_metadata": {
"noon": {
"order_category": "pay"
}
},
"payment_link": false,
"payment_link_config": {
"theme": "",
"logo": "",
"seller_name": "",
"sdk_layout": "",
"display_sdk_only": false,
"enabled_saved_payment_method": false
},
"payment_type": "normal",
"request_incremental_authorization": false,
"merchant_order_reference_id": "test_ord",
"session_expiry": 900
}'
```
response:
```
{"payment_id":"pay_enzsqwG32eOsB0HzGN4C","merchant_id":"merchant_1757963735","status":"requires_customer_action","amount":3545,"net_amount":3545,"shipping_cost":null,"amount_capturable":3545,"amount_received":null,"connector":"nexixpay","client_secret":"pay_enzsqwG32eOsB0HzGN4C_secret_BdiC32A0XqFsV2xbrq5D","created":"2025-09-15T19:19:49.306Z","currency":"EUR","customer_id":"customer123","customer":{"id":"customer123","name":"John Doe","email":"customer@gmail.com","phone":"9999999999","phone_country_code":"+1"},"description":"Its my first payment request","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":"4549","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"434994","card_extended_bin":null,"card_exp_month":"05","card_exp_year":"26","card_holder_name":null,"payment_checks":null,"authentication_data":null},"billing":null},"payment_token":"token_4Mtt2rFkwhP1VFwnqqG1","shipping":{"address":{"city":"San Fransico","country":"BR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":"guest@example.com"},"billing":{"address":{"city":"San Fransico","country":"BR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":"guest@example.com"},"order_details":[{"sku":null,"upc":null,"brand":null,"amount":3545,"category":null,"quantity":1,"tax_rate":null,"product_id":null,"description":null,"product_name":"Apple iphone 15","product_type":null,"sub_category":null,"total_amount":null,"commodity_code":null,"unit_of_measure":null,"product_img_link":null,"product_tax_code":null,"total_tax_amount":null,"requires_shipping":null,"unit_discount_amount":null}],"email":"customer@gmail.com","name":"John Doe","phone":"9999999999","return_url":"https://google.com/","authentication_type":"three_ds","statement_descriptor_name":"joseph","statement_descriptor_suffix":"JS","next_action":{"type":"redirect_to_url","redirect_to_url":"http://localhost:8080/payments/redirect/pay_enzsqwG32eOsB0HzGN4C/merchant_1757963735/pay_enzsqwG32eOsB0HzGN4C_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":"customer123","created_at":1757963989,"expires":1757967589,"secret":"epk_"},"manual_retry_allowed":null,"connector_transaction_id":"F0Rxb8C1nzubCnlfKf","frm_message":null,"metadata":null,"connector_metadata":{"apple_pay":null,"airwallex":null,"noon":{"order_category":"pay"},"braintree":null,"adyen":null},"feature_metadata":{"redirect_response":null,"search_tags":null,"apple_pay_recurring_details":null,"gateway_system":"direct"},"reference_id":"F0Rxb8C1nzubCnlfKf","payment_link":null,"profile_id":"pro_pNYfKwzcccCUBOwarvVW","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_QmMn98hDhgKxgBDFp64p","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-09-15T19:34:49.306Z","fingerprint":null,"browser_info":{"language":"nl-NL","time_zone":0,"ip_address":"128.0.0.1","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36","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_channel":null,"payment_method_id":null,"network_transaction_id":null,"payment_method_status":null,"updated":"2025-09-15T19:19:51.320Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":"test_ord","order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null,"enable_partial_authorization":null,"enable_overcapture":null,"is_overcapture_enabled":null,"network_details":null}
```
Payments retrieve request:
```
curl --location 'http://localhost:8080/payments/pay_enzsqwG32eOsB0HzGN4C?force_sync=true&expand_captures=true&expand_attempts=true' \
--header 'Accept: application/json' \
--header 'api-key: dev_iQghjDyB2zimkX6J60unvxRuNIFuAFTjqwixKZX7CD70YiNg2seWOx5S1QobFeH6'
```
Payment retrieve Response:
```
{"payment_id":"pay_enzsqwG32eOsB0HzGN4C","merchant_id":"merchant_1757963735","status":"succeeded","amount":3545,"net_amount":3545,"shipping_cost":null,"amount_capturable":0,"amount_received":3545,"connector":"nexixpay","client_secret":"pay_enzsqwG32eOsB0HzGN4C_secret_BdiC32A0XqFsV2xbrq5D","created":"2025-09-15T19:19:49.306Z","currency":"EUR","customer_id":"customer123","customer":{"id":"customer123","name":"John Doe","email":"customer@gmail.com","phone":"9999999999","phone_country_code":"+1"},"description":"Its my first payment request","refunds":null,"disputes":null,"attempts":[{"attempt_id":"pay_enzsqwG32eOsB0HzGN4C_1","status":"charged","amount":3545,"order_tax_amount":null,"currency":"EUR","connector":"nexixpay","error_message":null,"payment_method":"card","connector_transaction_id":"F0Rxb8C1nzubCnlfKf","capture_method":"automatic","authentication_type":"three_ds","created_at":"2025-09-15T19:19:49.306Z","modified_at":"2025-09-15T19:20:21.314Z","cancellation_reason":null,"mandate_id":null,"error_code":null,"payment_token":"token_4Mtt2rFkwhP1VFwnqqG1","connector_metadata":{"psyncFlow":"Authorize","cancelOperationId":null,"threeDSAuthResult":{"authenticationValue":"AAcAAThkaAAAAA3Zl4JYdQAAAAA="},"captureOperationId":"887416293836952589","threeDSAuthResponse":"notneeded","authorizationOperationId":"887416293836952589"},"payment_experience":null,"payment_method_type":"credit","reference_id":"F0Rxb8C1nzubCnlfKf","unified_code":null,"unified_message":null,"client_source":null,"client_version":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":"4549","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"434994","card_extended_bin":null,"card_exp_month":"05","card_exp_year":"26","card_holder_name":null,"payment_checks":null,"authentication_data":null},"billing":null},"payment_token":"token_4Mtt2rFkwhP1VFwnqqG1","shipping":{"address":{"city":"San Fransico","country":"BR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":"guest@example.com"},"billing":{"address":{"city":"San Fransico","country":"BR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":"guest@example.com"},"order_details":[{"sku":null,"upc":null,"brand":null,"amount":3545,"category":null,"quantity":1,"tax_rate":null,"product_id":null,"description":null,"product_name":"Apple iphone 15","product_type":null,"sub_category":null,"total_amount":null,"commodity_code":null,"unit_of_measure":null,"product_img_link":null,"product_tax_code":null,"total_tax_amount":null,"requires_shipping":null,"unit_discount_amount":null}],"email":"customer@gmail.com","name":"John Doe","phone":"9999999999","return_url":"https://google.com/","authentication_type":"three_ds","statement_descriptor_name":"joseph","statement_descriptor_suffix":"JS","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":"F0Rxb8C1nzubCnlfKf","frm_message":null,"metadata":null,"connector_metadata":{"apple_pay":null,"airwallex":null,"noon":{"order_category":"pay"},"braintree":null,"adyen":null},"feature_metadata":{"redirect_response":null,"search_tags":null,"apple_pay_recurring_details":null,"gateway_system":"direct"},"reference_id":"F0Rxb8C1nzubCnlfKf","payment_link":null,"profile_id":"pro_pNYfKwzcccCUBOwarvVW","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_QmMn98hDhgKxgBDFp64p","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-09-15T19:34:49.306Z","fingerprint":null,"browser_info":{"language":"nl-NL","time_zone":0,"ip_address":"128.0.0.1","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36","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_channel":null,"payment_method_id":null,"network_transaction_id":null,"payment_method_status":null,"updated":"2025-09-15T19:20:21.314Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":"test_ord","order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null,"enable_partial_authorization":null,"enable_overcapture":null,"is_overcapture_enabled":null,"network_details":null}
```
<img width="1728" height="501" alt="image" src="https://github.com/user-attachments/assets/476b5832-518d-4587-ab10-a8763ad0e2a5" />
<img width="1728" height="501" alt="image" src="https://github.com/user-attachments/assets/079ef2bc-a681-4647-ae46-599c3f44b3d9" />
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. External Connector Integration**
- `crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs`
**Code Patterns Applied:**
- Extend existing types with new fields (14 changes)
**Detailed Identifier Changes:**
Commit a76ec7da:
Files to modify:
**crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs**
Modify existing code
|
{"pr_number": 9395, "pr_title": "fix(connectors): [Nexixpay] send recurrence obj in non cit payments", "merged_at": "2025-09-16T09:30:48Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs"]}, "change_types": {"fields_added": 14}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
refactor(euclid): refactor logs for evaluation of equality for dynamic routing evaluate response
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
This PR refactors the routing logic to improve how **logs are emitted and connector evaluation is handled** when dynamic routing is performed using the Decision Engine (Euclid). Key updates include:
- Replaces raw response propagation from `perform_decision_euclid_routing` with a wrapped `RoutingEvaluateResponse` containing both `output` and `evaluated_output`.
- Introduces a new function `extract_de_output_connectors()` to deserialize and normalize `output` from Euclid into a list of `ConnectorInfo`.
- Adds `transform_de_output_for_router()` to combine `output` and `evaluated_output`, ensuring deduplication and priority order.
- Enhances logging in `compare_and_log_result` to include diff details between `de_result` and `router_result` more clearly.
- Adds `TryFrom<ConnectorInfo> for DeRoutableConnectorChoice` to safely convert API inputs to internal representations.
## Diff Hunk Explanation
### `crates/router/src/core/payments/routing.rs`
- Renamed `de_euclid_connectors` → `de_evaluated_connector` to reflect the structured response.
- Wrapped `perform_decision_euclid_routing` call with success match block to:
- Extract connectors from `output` using `extract_de_output_connectors`.
- Merge `output` and `evaluated_output` using `transform_de_output_for_router`.
- Updated logs to emit clearer error/debug statements during extraction, transformation, and comparison.
### `crates/router/src/core/payments/routing/utils.rs`
- Refactored `perform_decision_euclid_routing` to return `RoutingEvaluateResponse` instead of just connector list.
- Added `extract_de_output_connectors`: deserializes various output types (`single`, `priority`, `volume_split`, etc.).
- Added `transform_de_output_for_router`: deduplicates connectors and maintains priority between `evaluated_output` and fallback `output`.
- Improved `compare_and_log_result` to log equality and diff details between Decision Engine result and final connector result.
- Introduced `TryFrom<ConnectorInfo>` for `DeRoutableConnectorChoice`.
This refactor sets the stage for cleaner observability and deterministic routing behavior between evaluated and fallback paths.
## 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)?
-->
The testing guidelines are present in this [doc](https://docs.google.com/document/d/1Atb-5bIgA-H_H2lS2O-plhtGUqHK4fcQ1XDXWjrcTHE/edit?usp=sharing).
## 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
|
To implement this **payment** feature, you'll need to modify these architectural layers:
**1. Core Business Logic**
- `crates/router/src/core/payments/routing.rs`
- `crates/router/src/core/payments/routing/utils.rs`
**Code Patterns Applied:**
- Implement new functions (4 changes)
- Extend existing types with new fields (14 changes)
- Add conditional logic for feature flags or filtering (4 changes)
**Detailed Identifier Changes:**
Commit ef27ac5c:
Files to modify:
**crates/router/src/core/payments/routing.rs**
Modify existing code
**crates/router/src/core/payments/routing/utils.rs**
Add:
- function: private::transform_de_output_for_router
- function: pub::decision_engine_routing
- function: private::try_from
- impl: impl TryFrom<ConnectorInfo> for DeRoutableConnectorChoice
|
{"pr_number": 8834, "pr_title": "refactor(euclid): refactor logs for evaluation of equality for dynamic routing evaluate response", "merged_at": "2025-08-08T13:23:45Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["payment", "order", "connector"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/routing.rs", "crates/router/src/core/payments/routing/utils.rs"]}, "change_types": {"functions_added": 4, "fields_added": 14, "imports_added": 2, "conditionals_added": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
ci(cypress): fix noon connector
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [x] CI/CD
## Description
Fix Noon connector in cypress
Updated amount which noon is expecting
### 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
Noon test cases are failing in cypress
## How did you test it?
Cypress
- NOON
<img width="721" alt="image" src="https://github.com/user-attachments/assets/dfe1edb9-b66f-45b5-9c5e-b710ba0679aa" />
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [ ] I formatted the code `cargo +nightly fmt --all`
- [ ] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Tests**
- `cypress-tests/cypress/e2e/configs/Payment/Noon.js`
- `cypress-tests/cypress/support/commands.js`
**Code Patterns Applied:**
- Extend existing types with new fields (52 changes)
- Add conditional logic for feature flags or filtering (4 changes)
|
{"pr_number": 8029, "pr_title": "ci(cypress): fix noon connector", "merged_at": "2025-05-15T12:48:49Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user", "connector"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/configs/Payment/Noon.js", "cypress-tests/cypress/support/commands.js"]}, "change_types": {"fields_added": 52, "conditionals_added": 4}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
|
fix: remove straight through routing from routing 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 -->
Remove straight through routing from routing approach enum.
### 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)?
-->
1. make a 3ds payment
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_BNOaWRzwyZ3hMAbhRNtp9t6Mx7ZSVyK5gPvd1bavl0FWehvrHlre1eMifYA244TE' \
--data-raw '{
"amount": 6540,
"currency": "USD",
"confirm": true,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"amount_to_capture": 6540,
"customer_id": "StripeCustomer",
"profile_id": "pro_EfD8EtQQSPZxXStG6B7x",
"email": "guest@example.com",
"name": "John Doe",
"phone": "999999999",
"phone_country_code": "+1",
"description": "Its my first payment request",
"authentication_type": "three_ds",
"return_url": "https://google.com",
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4242424242424242",
"card_exp_month": "03",
"card_exp_year": "30",
"card_holder_name": "joseph Doe",
"card_cvc": "737"
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "NL",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
}
},
"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"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
}
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
},
"browser_info": {
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"language": "nl-NL",
"color_depth": 24,
"screen_height": 723,
"screen_width": 1536,
"time_zone": 0,
"java_enabled": true,
"java_script_enabled": true,
"ip_address": "127.0.0.1"
}
}'
```
Response -
```
{"payment_id":"pay_RmAYKXp8BtCemEuRsj4o","merchant_id":"merchant_1749723893","status":"requires_customer_action","amount":6540,"net_amount":6540,"shipping_cost":null,"amount_capturable":6540,"amount_received":0,"connector":"stripe","client_secret":"pay_RmAYKXp8BtCemEuRsj4o_secret_4DWtAW8CDiarCFCdz4KD","created":"2025-07-18T13:36:02.483Z","currency":"USD","customer_id":"StripeCustomer","customer":{"id":"StripeCustomer","name":"John Doe","email":"guest@example.com","phone":"999999999","phone_country_code":"+1"},"description":"Its my first payment request","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":"30","card_holder_name":"joseph Doe","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe"},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"billing":{"address":{"city":"San Fransico","country":"NL","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":null,"email":"guest@example.com","name":"John Doe","phone":"999999999","return_url":"https://google.com/","authentication_type":"three_ds","statement_descriptor_name":"joseph","statement_descriptor_suffix":"JS","next_action":{"type":"redirect_to_url","redirect_to_url":"http://localhost:8080/payments/redirect/pay_RmAYKXp8BtCemEuRsj4o/merchant_1749723893/pay_RmAYKXp8BtCemEuRsj4o_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":"StripeCustomer","created_at":1752845762,"expires":1752849362,"secret":"epk_9a34bbc728564d28ac2a731804987c0a"},"manual_retry_allowed":null,"connector_transaction_id":"pi_3RmESFD5R7gDAGff075WNWss","frm_message":null,"metadata":{"udf1":"value1","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":null,"feature_metadata":null,"reference_id":"pi_3RmESFD5R7gDAGff075WNWss","payment_link":null,"profile_id":"pro_EfD8EtQQSPZxXStG6B7x","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_SdftCCtpClu32qA6oijC","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-18T13:51:02.483Z","fingerprint":null,"browser_info":{"language":"nl-NL","time_zone":0,"ip_address":"127.0.0.1","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36","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-07-18T13:36:03.545Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null}
```
DB -
<img width="1142" height="1029" alt="image" src="https://github.com/user-attachments/assets/b08a0a60-d167-490f-9f5c-54993672c021" />
Perform a Sync -
```
curl --location 'http://localhost:8080/payments/pay_RmAYKXp8BtCemEuRsj4o' \
--header 'Accept: application/json' \
--header 'api-key: dev_BNOaWRzwyZ3hMAbhRNtp9t6Mx7ZSVyK5gPvd1bavl0FWehvrHlre1eMifYA244TE'
```
Response -
```
{"payment_id":"pay_RmAYKXp8BtCemEuRsj4o","merchant_id":"merchant_1749723893","status":"succeeded","amount":6540,"net_amount":6540,"shipping_cost":null,"amount_capturable":0,"amount_received":6540,"connector":"stripe","client_secret":"pay_RmAYKXp8BtCemEuRsj4o_secret_4DWtAW8CDiarCFCdz4KD","created":"2025-07-18T13:36:02.483Z","currency":"USD","customer_id":"StripeCustomer","customer":{"id":"StripeCustomer","name":"John Doe","email":"guest@example.com","phone":"999999999","phone_country_code":"+1"},"description":"Its my first payment request","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":"30","card_holder_name":"joseph Doe","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe"},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"billing":{"address":{"city":"San Fransico","country":"NL","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":null,"email":"guest@example.com","name":"John Doe","phone":"999999999","return_url":"https://google.com/","authentication_type":"three_ds","statement_descriptor_name":"joseph","statement_descriptor_suffix":"JS","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":"pi_3RmESFD5R7gDAGff075WNWss","frm_message":null,"metadata":{"udf1":"value1","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":null,"feature_metadata":null,"reference_id":"pi_3RmESFD5R7gDAGff075WNWss","payment_link":null,"profile_id":"pro_EfD8EtQQSPZxXStG6B7x","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_SdftCCtpClu32qA6oijC","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-18T13:51:02.483Z","fingerprint":null,"browser_info":{"language":"nl-NL","time_zone":0,"ip_address":"127.0.0.1","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36","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-07-18T13:36:11.257Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null}
```
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Core Business Logic**
- `crates/router/src/core/payments.rs`
- `crates/router/src/core/payments/routing.rs`
**2. Other**
- `crates/common_enums/src/enums.rs`
**Code Patterns Applied:**
- Modify database queries (1 changes)
**Detailed Identifier Changes:**
Commit 53e7e7fa:
Files to modify:
**crates/common_enums/src/enums.rs**
Modify existing code
**crates/router/src/core/payments.rs**
Modify existing code
**crates/router/src/core/payments/routing.rs**
Modify existing code
|
{"pr_number": 8695, "pr_title": "fix: remove straight through routing from routing approach", "merged_at": "2025-07-21T09:21:48Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments.rs", "crates/router/src/core/payments/routing.rs"], "other": ["crates/common_enums/src/enums.rs"]}, "change_types": {"database_queries": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
docs: improve readme
## 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 -->
I updated the readme for better navigation
### 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?
updated the readme for improved developer experience
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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Other**
- `README.md`
- `docs/gifs/quickstart.gif`
- `docs/imgs/try-the-sandbox.png`
|
{"pr_number": 8251, "pr_title": "docs: improve readme", "merged_at": "2025-06-11T09:50:00Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"other": ["README.md", "docs/gifs/quickstart.gif", "docs/imgs/try-the-sandbox.png"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
|
refactor(euclid): transform enum types to include sub-variants of payment method types
## 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 refactors the Euclid routing parameter transformation logic to **include sub-variants of payment method types** in the Decision Engine evaluation request.
Key updates:
- Added logic to **convert `(payment_method_type, payment_method)` pairs** into a `DirValue` representation.
- Introduced `insert_dirvalue_param()` to map each `DirValue` variant into a corresponding routing parameter key.
- Enhanced `convert_backend_input_to_routing_eval` to insert these sub-variant parameters alongside existing routing parameters.
- This ensures richer context is sent to Euclid for more granular routing decisions.
## Outcomes
- Enables **finer-grained routing rules** based on payment method sub-types (e.g., `WalletType`, `CryptoType`, `GiftCardType`).
- Improves compatibility with dashboard-configured payment method rules in Euclid.
- Makes routing evaluation requests **more descriptive and precise**, improving match accuracy.
## Diff Hunk Explanation
### `crates/router/src/core/payments/routing/utils.rs`
- **Modified** `convert_backend_input_to_routing_eval`:
- Added check for both `payment_method_type` and `payment_method` presence.
- Converted them into a `DirValue` using `into_dir_value()`.
- Inserted the resulting parameters into the evaluation request map.
- **Added** new helper `insert_dirvalue_param()`:
- Matches on each `DirValue` variant and inserts it as a `ValueType::EnumVariant` with an appropriate key (e.g., `"wallet"`, `"crypto"`, `"bank_transfer"`).
- Ignores unsupported or non-converging variants for now.
- **No changes** to external APIs or DB schema — purely internal parameter transformation refactor.
This refactor lays the groundwork for **sub-type aware routing** in Euclid without requiring external schema changes.
## 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)?
-->
Testing isn't required as this is just an enum mapping change.
## 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
|
To implement this **payment** feature, you'll need to modify these architectural layers:
**1. Core Business Logic**
- `crates/router/src/core/payments/routing/utils.rs`
**Code Patterns Applied:**
- Implement new functions (1 changes)
- Add conditional logic for feature flags or filtering (1 changes)
**Detailed Identifier Changes:**
Commit 165f5a15:
Files to modify:
**crates/router/src/core/payments/routing/utils.rs**
Add:
- function: private::insert_dirvalue_param
|
{"pr_number": 8909, "pr_title": "refactor(euclid): transform enum types to include sub-variants of payment method types", "merged_at": "2025-08-13T13:43:35Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["payment", "card"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/routing/utils.rs"]}, "change_types": {"functions_added": 1, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
refactor(router): Remove `refunds_v2` feature flag
## 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 -->
removed the `refunds_v2` feature flag from router, payment method, domain model, diesel model, api model and storage impl 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).
-->
## 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)?
-->
Sanity testing for v1 and v2 - refunds flow
## 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`
- [ ] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
<!-- @coderabbitai ignore -->
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. API Request/Response Models**
- `crates/api_models/Cargo.toml`
- `crates/api_models/src/refunds.rs`
**2. Database Layer (Queries & Schema)**
- `crates/diesel_models/Cargo.toml`
- `crates/diesel_models/src/kv.rs`
- `crates/diesel_models/src/query/refund.rs`
- ... and 1 more files
**3. Domain Models (Business Logic Types)**
- `crates/hyperswitch_domain_models/Cargo.toml`
- `crates/hyperswitch_domain_models/src/refunds.rs`
**4. Core Business Logic**
- `crates/router/src/core/payments.rs`
- `crates/router/src/core/refunds.rs`
- `crates/router/src/core/refunds_v2.rs`
- ... and 3 more files
**5. Type Definitions**
- `crates/router/src/types/api/refunds.rs`
- `crates/router/src/types/storage/refund.rs`
**6. Configuration Files**
- `crates/openapi/Cargo.toml`
- `crates/router/Cargo.toml`
- `crates/storage_impl/Cargo.toml`
**7. Other**
- `crates/router/src/db/kafka_store.rs`
- `crates/router/src/db/refund.rs`
- `crates/router/src/routes/app.rs`
- ... and 2 more files
**Code Patterns Applied:**
- Implement new functions (9 changes)
- Extend existing types with new fields (42 changes)
- Modify database queries (2 changes)
**Detailed Identifier Changes:**
Commit c5c0e677:
Files to modify:
**crates/api_models/src/refunds.rs**
Modify existing code
**crates/diesel_models/src/kv.rs**
Modify existing code
**crates/diesel_models/src/query/refund.rs**
Modify existing code
**crates/diesel_models/src/refund.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/refunds.rs**
Modify existing code
**crates/router/src/core/payments.rs**
Modify existing code
**crates/router/src/core/refunds.rs**
Modify existing code
**crates/router/src/core/refunds_v2.rs**
Modify existing code
**crates/router/src/core/utils.rs**
Modify existing code
**crates/router/src/core/utils/refunds_validator.rs**
Modify existing code
**crates/router/src/core/webhooks/incoming.rs**
Modify existing code
**crates/router/src/db/kafka_store.rs**
Modify existing code
**crates/router/src/db/refund.rs**
Modify existing code
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/routes/refunds.rs**
Modify existing code
**crates/router/src/types/api/refunds.rs**
Modify existing code
**crates/router/src/types/storage/refund.rs**
Modify existing code
**crates/storage_impl/src/lib.rs**
Modify existing code
|
{"pr_number": 8310, "pr_title": "refactor(router): Remove `refunds_v2` feature flag", "merged_at": "2025-06-25T10:53:49Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "refund"]}, "hierarchy": {"api_models": ["crates/api_models/Cargo.toml", "crates/api_models/src/refunds.rs"], "database": ["crates/diesel_models/Cargo.toml", "crates/diesel_models/src/kv.rs", "crates/diesel_models/src/query/refund.rs", "crates/diesel_models/src/refund.rs"], "domain": ["crates/hyperswitch_domain_models/Cargo.toml", "crates/hyperswitch_domain_models/src/refunds.rs"], "core_business": ["crates/router/src/core/payments.rs", "crates/router/src/core/refunds.rs", "crates/router/src/core/refunds_v2.rs", "crates/router/src/core/utils.rs", "crates/router/src/core/utils/refunds_validator.rs", "crates/router/src/core/webhooks/incoming.rs"], "types": ["crates/router/src/types/api/refunds.rs", "crates/router/src/types/storage/refund.rs"], "config": ["crates/openapi/Cargo.toml", "crates/router/Cargo.toml", "crates/storage_impl/Cargo.toml"], "other": ["crates/router/src/db/kafka_store.rs", "crates/router/src/db/refund.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/refunds.rs", "crates/storage_impl/src/lib.rs"]}, "change_types": {"functions_added": 9, "fields_added": 42, "imports_added": 10, "database_queries": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
refactor(users): move roles schema to global interface
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Refactor:
- move roles to global schema
- remove themes from global schema
### 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
Closes [#6861](https://github.com/juspay/hyperswitch/issues/6861)
## How did you test it?
Refactoring changes, currently in config global schema points to public, so no change in behaviour.
Changes will be reflected after we turn on feature flag for multi-tenancy and update the configs. Global interface will point to global (shared resources) schema.
When interacting with roles and themes storeage fucntions/queries we are getting expected response as we were getting before.
```
curl --location 'http://localhost:8080/user/role' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer JWT' \
--header 'Cookie: Cookier' \
--data '{
"role_name": "custom_role_1",
"groups": ["users_view"],
"role_scope": "merchant"
}'
```
Response
```
{
"role_id": "role_Ve3BT4c2knBPYnI0EIbq",
"groups": [
"users_view"
],
"role_name": "custom_role_1",
"role_scope": "merchant"
}
```
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Core Business Logic**
- `crates/router/src/core/user/theme.rs`
- `crates/router/src/core/user_role/role.rs`
**2. Utils**
- `crates/router/src/utils/user/theme.rs`
- `crates/router/src/utils/user_role.rs`
**3. Other**
- `crates/router/src/db.rs`
- `crates/router/src/services/authorization.rs`
- `crates/router/src/services/authorization/roles.rs`
**Detailed Identifier Changes:**
Commit 2d8af882:
Files to modify:
**crates/router/src/core/user/theme.rs**
Modify existing code
**crates/router/src/core/user_role/role.rs**
Modify existing code
**crates/router/src/db.rs**
Modify existing code
**crates/router/src/services/authorization.rs**
Modify existing code
**crates/router/src/services/authorization/roles.rs**
Modify existing code
**crates/router/src/utils/user/theme.rs**
Modify existing code
**crates/router/src/utils/user_role.rs**
Modify existing code
|
{"pr_number": 6862, "pr_title": "refactor(users): move roles schema to global interface", "merged_at": "2024-12-19T13:36:13Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant", "user"]}, "hierarchy": {"core_business": ["crates/router/src/core/user/theme.rs", "crates/router/src/core/user_role/role.rs"], "utils": ["crates/router/src/utils/user/theme.rs", "crates/router/src/utils/user_role.rs"], "other": ["crates/router/src/db.rs", "crates/router/src/services/authorization.rs", "crates/router/src/services/authorization/roles.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
fix(connector): Expiration Year Incorrectly Populated as YYYY Format in Paybox Mandates
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Expiration Year Incorrectly Populated as YYYY Format in Paybox Mandates
### 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?
CIT : Create Call
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_wmCOQW4LM2BHYugFWaU8crmipDtmGDsq0iozaQhe17CtM59tqCHSAtD8w646AkZU' \
--data-raw '{
"amount": 6500,
"order_details": [
{
"product_name": "Apple iphone 15",
"quantity": 1,
"amount": 6500
}
],
"currency": "EUR",
"confirm": false,
"capture_method": "manual",
"authentication_type": "three_ds",
"setup_future_usage": "off_session",
"request_external_three_ds_authentication": false,
"email": "user@gmail.com",
"description": "Hello this is description",
"shipping": {
"address": {
"state": "California",
"city": "Banglore",
"country": "US",
"line1": "sdsdfsdf",
"line2": "hsgdbhd",
"line3": "alsksoe",
"zip": "571201",
"first_name": "John",
"last_name": "Doe"
},
"phone": {
"number": "123456789",
"country_code": "+1"
}
},
"connector_metadata": {
"noon": {
"order_category": "applepay"
}
},
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
},
"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": "8056594427",
"country_code": "+91"
}
},
"customer_id": "hyperswitch_sdk_demo_id"
}'
```
Response
```
{
"payment_id": "pay_BMLqu4ec2IkNCiOd6JEw",
"merchant_id": "postman_merchant_GHAction_3a560136-e947-4667-bb84-2f015fcc1196",
"status": "requires_payment_method",
"amount": 6500,
"net_amount": 6500,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": null,
"connector": null,
"client_secret": "pay_BMLqu4ec2IkNCiOd6JEw_secret_N2jkOMsPFKQjWfxiCnFD",
"created": "2024-11-04T12:23:09.767Z",
"currency": "EUR",
"customer_id": "hyperswitch_sdk_demo_id",
"customer": {
"id": "hyperswitch_sdk_demo_id",
"name": null,
"email": "user@gmail.com",
"phone": null,
"phone_country_code": null
},
"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": "manual",
"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": "California",
"first_name": "John",
"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": "8056594427",
"country_code": "+91"
},
"email": null
},
"order_details": [
{
"brand": null,
"amount": 6500,
"category": null,
"quantity": 1,
"product_id": null,
"product_name": "Apple iphone 15",
"product_type": null,
"sub_category": null,
"product_img_link": null,
"product_tax_code": null,
"requires_shipping": null
}
],
"email": "user@gmail.com",
"name": null,
"phone": null,
"return_url": null,
"authentication_type": "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": "hyperswitch_sdk_demo_id",
"created_at": 1730722989,
"expires": 1730726589,
"secret": "epk_cc688b1f87a04cba86c93df6c9887bbd"
},
"manual_retry_allowed": null,
"connector_transaction_id": null,
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": {
"apple_pay": null,
"airwallex": null,
"noon": {
"order_category": "applepay"
}
},
"feature_metadata": null,
"reference_id": null,
"payment_link": null,
"profile_id": "pro_hl5seUYAuPOk5MN8bSGO",
"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": "2024-11-04T12:38:09.767Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2024-11-04T12:23:09.793Z",
"charges": null,
"frm_metadata": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": null
}
```
CIT Confirm
```
**REQUEST**
curl --location 'http://localhost:8080/payments/pay_BMLqu4ec2IkNCiOd6JEw/confirm' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_wmCOQW4LM2BHYugFWaU8crmipDtmGDsq0iozaQhe17CtM59tqCHSAtD8w646AkZU' \
--data '{
"customer_acceptance": {
"acceptance_type": "online",
"accepted_at":"1963-05-03T04:07:52.723Z",
"online": {
"ip_address":"127.0.0.1",
"user_agent": "amet irure esse"
}
},
"payment_method": "card",
"payment_method_data": {
"card": {
"card_number": "5200000000000007",
"card_exp_month": "01",
"card_exp_year": "39",
"card_holder_name": "John T",
"card_cvc": "123"
}
}
}'
```
**Response**
```
{
"payment_id": "pay_Htly0zwEDt5YneewpMJM",
"merchant_id": "postman_merchant_GHAction_3a560136-e947-4667-bb84-2f015fcc1196",
"status": "requires_customer_action",
"amount": 6500,
"net_amount": 6500,
"shipping_cost": null,
"amount_capturable": 6500,
"amount_received": null,
"connector": "paybox",
"client_secret": "pay_Htly0zwEDt5YneewpMJM_secret_grGlWUBT60UDj0ys0BWd",
"created": "2024-11-04T11:23:23.238Z",
"currency": "EUR",
"customer_id": "hyperswitch_sdk_demo_id",
"customer": {
"id": "hyperswitch_sdk_demo_id",
"name": null,
"email": "user@gmail.com",
"phone": null,
"phone_country_code": null
},
"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": "manual",
"payment_method": "card",
"payment_method_data": {
"card": {
"last4": "0007",
"card_type": null,
"card_network": null,
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "520000",
"card_extended_bin": null,
"card_exp_month": "01",
"card_exp_year": "39",
"card_holder_name": null,
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": "token_xjdiHaJkkJD0XwPG6eOL",
"shipping": {
"address": {
"city": "Banglore",
"country": "US",
"line1": "sdsdfsdf",
"line2": "hsgdbhd",
"line3": "alsksoe",
"zip": "571201",
"state": "California",
"first_name": "John",
"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": "8056594427",
"country_code": "+91"
},
"email": null
},
"order_details": [
{
"brand": null,
"amount": 6500,
"category": null,
"quantity": 1,
"product_id": null,
"product_name": "Apple iphone 15",
"product_type": null,
"sub_category": null,
"product_img_link": null,
"product_tax_code": null,
"requires_shipping": null
}
],
"email": "user@gmail.com",
"name": null,
"phone": null,
"return_url": null,
"authentication_type": "three_ds",
"statement_descriptor_name": null,
"statement_descriptor_suffix": null,
"next_action": {
"type": "redirect_to_url",
"redirect_to_url": "http://localhost:8080/payments/redirect/pay_Htly0zwEDt5YneewpMJM/postman_merchant_GHAction_3a560136-e947-4667-bb84-2f015fcc1196/pay_Htly0zwEDt5YneewpMJM_1"
},
"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": null,
"connector_transaction_id": null,
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": {
"apple_pay": null,
"airwallex": null,
"noon": {
"order_category": "applepay"
}
},
"feature_metadata": null,
"reference_id": null,
"payment_link": null,
"profile_id": "pro_hl5seUYAuPOk5MN8bSGO",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_DsQkwRcnsQVWJ7jbsSZl",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2024-11-04T11:38:23.238Z",
"fingerprint": null,
"browser_info": {
"language": null,
"time_zone": null,
"ip_address": "::1",
"user_agent": null,
"color_depth": null,
"java_enabled": null,
"screen_width": null,
"accept_header": null,
"screen_height": null,
"java_script_enabled": null
},
"payment_method_id": "pm_glGuR0eeKRrhdY92etZh",
"payment_method_status": "inactive",
"updated": "2024-11-04T11:23:32.947Z",
"charges": null,
"frm_metadata": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": null
}
```
MIT Flow
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_wmCOQW4LM2BHYugFWaU8crmipDtmGDsq0iozaQhe17CtM59tqCHSAtD8w646AkZU' \
--data '{
"amount": 7100,
"currency": "EUR",
"confirm": true,
"customer_id": "hyperswitch_sdk_demo_id",
"authentication_type":"no_three_ds",
"capture_method":"automatic",
"return_url": "https://google.com",
"recurring_details": {
"type": "payment_method_id",
"data": "pm_glGuR0eeKRrhdY92etZh"
},
"off_session": true,
"billing": {
"address": {
"first_name":"John",
"last_name":"Doe",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
}
},
"browser_info": {
"user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
"accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
"language": "nl-NL",
"color_depth": 24,
"screen_height": 723,
"screen_width": 1536,
"time_zone": 0,
"java_enabled": true,
"java_script_enabled": true,
"ip_address": "125.0.0.1"
}
}'
```
Response
```
{
"payment_id": "pay_zvHe15wNhU09wObW38cy",
"merchant_id": "postman_merchant_GHAction_3a560136-e947-4667-bb84-2f015fcc1196",
"status": "succeeded",
"amount": 7100,
"net_amount": 7100,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": 7100,
"connector": "paybox",
"client_secret": "pay_zvHe15wNhU09wObW38cy_secret_3tW5WCs4DEPL6NMC3OEt",
"created": "2024-11-04T12:24:54.776Z",
"currency": "EUR",
"customer_id": "hyperswitch_sdk_demo_id",
"customer": {
"id": "hyperswitch_sdk_demo_id",
"name": null,
"email": "user@gmail.com",
"phone": null,
"phone_country_code": null
},
"description": null,
"refunds": null,
"disputes": null,
"mandate_id": null,
"mandate_data": null,
"setup_future_usage": null,
"off_session": true,
"capture_on": null,
"capture_method": "automatic",
"payment_method": "card",
"payment_method_data": {
"card": {
"last4": "0007",
"card_type": null,
"card_network": null,
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "520000",
"card_extended_bin": null,
"card_exp_month": "01",
"card_exp_year": "39",
"card_holder_name": "John T",
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "John",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": null
},
"order_details": null,
"email": "user@gmail.com",
"name": null,
"phone": null,
"return_url": "https://google.com/",
"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": "hyperswitch_sdk_demo_id",
"created_at": 1730723094,
"expires": 1730726694,
"secret": "epk_25cc159180d94556879117aa98e93825"
},
"manual_retry_allowed": false,
"connector_transaction_id": "0080065887",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": null,
"payment_link": null,
"profile_id": "pro_hl5seUYAuPOk5MN8bSGO",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_DsQkwRcnsQVWJ7jbsSZl",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2024-11-04T12:39:54.776Z",
"fingerprint": null,
"browser_info": {
"language": "nl-NL",
"time_zone": 0,
"ip_address": "125.0.0.1",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
"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": "pm_glGuR0eeKRrhdY92etZh",
"payment_method_status": "active",
"updated": "2024-11-04T12:24:56.467Z",
"charges": null,
"frm_metadata": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": "SM@LpCp@L@C"
}
```
CIT with YYYY format
Create
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_wmCOQW4LM2BHYugFWaU8crmipDtmGDsq0iozaQhe17CtM59tqCHSAtD8w646AkZU' \
--data-raw '{
"amount": 6500,
"order_details": [
{
"product_name": "Apple iphone 15",
"quantity": 1,
"amount": 6500
}
],
"currency": "EUR",
"confirm": false,
"capture_method": "manual",
"authentication_type": "three_ds",
"setup_future_usage": "off_session",
"request_external_three_ds_authentication": false,
"email": "user@gmail.com",
"description": "Hello this is description",
"shipping": {
"address": {
"state": "California",
"city": "Banglore",
"country": "US",
"line1": "sdsdfsdf",
"line2": "hsgdbhd",
"line3": "alsksoe",
"zip": "571201",
"first_name": "John",
"last_name": "Doe"
},
"phone": {
"number": "123456789",
"country_code": "+1"
}
},
"connector_metadata": {
"noon": {
"order_category": "applepay"
}
},
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
},
"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": "8056594427",
"country_code": "+91"
}
},
"customer_id": "hyperswitch_sdk_demo_id"
}'
```
Response(CIT Create)
```
{
"payment_id": "pay_WnjKUpljd1MePeB8EUEE",
"merchant_id": "postman_merchant_GHAction_3a560136-e947-4667-bb84-2f015fcc1196",
"status": "requires_payment_method",
"amount": 6500,
"net_amount": 6500,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": null,
"connector": null,
"client_secret": "pay_WnjKUpljd1MePeB8EUEE_secret_TY7rjUytNEx10pw67eme",
"created": "2024-11-04T14:54:08.276Z",
"currency": "EUR",
"customer_id": "hyperswitch_sdk_demo_id",
"customer": {
"id": "hyperswitch_sdk_demo_id",
"name": null,
"email": "user@gmail.com",
"phone": null,
"phone_country_code": null
},
"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": "manual",
"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": "California",
"first_name": "John",
"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": "8056594427",
"country_code": "+91"
},
"email": null
},
"order_details": [
{
"brand": null,
"amount": 6500,
"category": null,
"quantity": 1,
"product_id": null,
"product_name": "Apple iphone 15",
"product_type": null,
"sub_category": null,
"product_img_link": null,
"product_tax_code": null,
"requires_shipping": null
}
],
"email": "user@gmail.com",
"name": null,
"phone": null,
"return_url": null,
"authentication_type": "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": "hyperswitch_sdk_demo_id",
"created_at": 1730732048,
"expires": 1730735648,
"secret": "epk_7fbee01401014afa92a522644756b076"
},
"manual_retry_allowed": null,
"connector_transaction_id": null,
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": {
"apple_pay": null,
"airwallex": null,
"noon": {
"order_category": "applepay"
}
},
"feature_metadata": null,
"reference_id": null,
"payment_link": null,
"profile_id": "pro_hl5seUYAuPOk5MN8bSGO",
"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": "2024-11-04T15:09:08.276Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2024-11-04T14:54:08.321Z",
"charges": null,
"frm_metadata": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": null
}
```
CIT Confirm
```
curl --location 'http://localhost:8080/payments/pay_WnjKUpljd1MePeB8EUEE/confirm' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_wmCOQW4LM2BHYugFWaU8crmipDtmGDsq0iozaQhe17CtM59tqCHSAtD8w646AkZU' \
--data '{
"customer_acceptance": {
"acceptance_type": "online",
"accepted_at":"1963-05-03T04:07:52.723Z",
"online": {
"ip_address":"127.0.0.1",
"user_agent": "amet irure esse"
}
},
"payment_method": "card",
"payment_method_data": {
"card": {
"card_number": "5200000000000007",
"card_exp_month": "01",
"card_exp_year": "2039",
"card_holder_name": "John T",
"card_cvc": "123"
}
}
}'
```
Response Confirm (CIT)
```
{
"payment_id": "pay_WnjKUpljd1MePeB8EUEE",
"merchant_id": "postman_merchant_GHAction_3a560136-e947-4667-bb84-2f015fcc1196",
"status": "requires_customer_action",
"amount": 6500,
"net_amount": 6500,
"shipping_cost": null,
"amount_capturable": 6500,
"amount_received": null,
"connector": "paybox",
"client_secret": "pay_WnjKUpljd1MePeB8EUEE_secret_TY7rjUytNEx10pw67eme",
"created": "2024-11-04T14:54:08.276Z",
"currency": "EUR",
"customer_id": "hyperswitch_sdk_demo_id",
"customer": {
"id": "hyperswitch_sdk_demo_id",
"name": null,
"email": "user@gmail.com",
"phone": null,
"phone_country_code": null
},
"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": "manual",
"payment_method": "card",
"payment_method_data": {
"card": {
"last4": "0007",
"card_type": null,
"card_network": null,
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "520000",
"card_extended_bin": null,
"card_exp_month": "01",
"card_exp_year": "2039",
"card_holder_name": null,
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": "token_8fv8xDOAoX2vYnZ3RkQq",
"shipping": {
"address": {
"city": "Banglore",
"country": "US",
"line1": "sdsdfsdf",
"line2": "hsgdbhd",
"line3": "alsksoe",
"zip": "571201",
"state": "California",
"first_name": "John",
"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": "8056594427",
"country_code": "+91"
},
"email": null
},
"order_details": [
{
"brand": null,
"amount": 6500,
"category": null,
"quantity": 1,
"product_id": null,
"product_name": "Apple iphone 15",
"product_type": null,
"sub_category": null,
"product_img_link": null,
"product_tax_code": null,
"requires_shipping": null
}
],
"email": "user@gmail.com",
"name": null,
"phone": null,
"return_url": null,
"authentication_type": "three_ds",
"statement_descriptor_name": null,
"statement_descriptor_suffix": null,
"next_action": {
"type": "redirect_to_url",
"redirect_to_url": "http://localhost:8080/payments/redirect/pay_WnjKUpljd1MePeB8EUEE/postman_merchant_GHAction_3a560136-e947-4667-bb84-2f015fcc1196/pay_WnjKUpljd1MePeB8EUEE_1"
},
"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": null,
"connector_transaction_id": null,
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": {
"apple_pay": null,
"airwallex": null,
"noon": {
"order_category": "applepay"
}
},
"feature_metadata": null,
"reference_id": null,
"payment_link": null,
"profile_id": "pro_hl5seUYAuPOk5MN8bSGO",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_DsQkwRcnsQVWJ7jbsSZl",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2024-11-04T15:09:08.276Z",
"fingerprint": null,
"browser_info": {
"language": null,
"time_zone": null,
"ip_address": "::1",
"user_agent": null,
"color_depth": null,
"java_enabled": null,
"screen_width": null,
"accept_header": null,
"screen_height": null,
"java_script_enabled": null
},
"payment_method_id": "pm_21dmpSqBZ7fisiGBK6ZH",
"payment_method_status": "inactive",
"updated": "2024-11-04T14:56:07.560Z",
"charges": null,
"frm_metadata": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": null
}
```
MIT (YYYY format)
Request
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_wmCOQW4LM2BHYugFWaU8crmipDtmGDsq0iozaQhe17CtM59tqCHSAtD8w646AkZU' \
--data '{
"amount": 7100,
"currency": "EUR",
"confirm": true,
"customer_id": "hyperswitch_sdk_demo_id",
"authentication_type":"no_three_ds",
"capture_method":"automatic",
"return_url": "https://google.com",
"recurring_details": {
"type": "payment_method_id",
"data": "pm_21dmpSqBZ7fisiGBK6ZH"
},
"off_session": true,
"billing": {
"address": {
"first_name":"John",
"last_name":"Doe",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
}
},
"browser_info": {
"user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
"accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
"language": "nl-NL",
"color_depth": 24,
"screen_height": 723,
"screen_width": 1536,
"time_zone": 0,
"java_enabled": true,
"java_script_enabled": true,
"ip_address": "125.0.0.1"
}
}'
```
Response
```
{
"payment_id": "pay_8UZj0LWR5EI4jGvVaaGU",
"merchant_id": "postman_merchant_GHAction_3a560136-e947-4667-bb84-2f015fcc1196",
"status": "succeeded",
"amount": 7100,
"net_amount": 7100,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": 7100,
"connector": "paybox",
"client_secret": "pay_8UZj0LWR5EI4jGvVaaGU_secret_gLuOcgSFj7msRF5IJAqA",
"created": "2024-11-04T14:56:46.387Z",
"currency": "EUR",
"customer_id": "hyperswitch_sdk_demo_id",
"customer": {
"id": "hyperswitch_sdk_demo_id",
"name": null,
"email": "user@gmail.com",
"phone": null,
"phone_country_code": null
},
"description": null,
"refunds": null,
"disputes": null,
"mandate_id": null,
"mandate_data": null,
"setup_future_usage": null,
"off_session": true,
"capture_on": null,
"capture_method": "automatic",
"payment_method": "card",
"payment_method_data": {
"card": {
"last4": "0007",
"card_type": null,
"card_network": null,
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "520000",
"card_extended_bin": null,
"card_exp_month": "01",
"card_exp_year": "2039",
"card_holder_name": "John T",
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "John",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": null
},
"order_details": null,
"email": "user@gmail.com",
"name": null,
"phone": null,
"return_url": "https://google.com/",
"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": "hyperswitch_sdk_demo_id",
"created_at": 1730732206,
"expires": 1730735806,
"secret": "epk_daafc10e40764fad8c231cda2ca8bc70"
},
"manual_retry_allowed": false,
"connector_transaction_id": "0080066347",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": null,
"payment_link": null,
"profile_id": "pro_hl5seUYAuPOk5MN8bSGO",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_DsQkwRcnsQVWJ7jbsSZl",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2024-11-04T15:11:46.387Z",
"fingerprint": null,
"browser_info": {
"language": "nl-NL",
"time_zone": 0,
"ip_address": "125.0.0.1",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
"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": "pm_21dmpSqBZ7fisiGBK6ZH",
"payment_method_status": "active",
"updated": "2024-11-04T14:56:48.255Z",
"charges": null,
"frm_metadata": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": "SM@LpCp@L@C"
}
```
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. External Connector Integration**
- `crates/router/src/connector/paybox/transformers.rs`
**Detailed Identifier Changes:**
Commit e457ccd9:
Files to modify:
**crates/router/src/connector/paybox/transformers.rs**
Modify existing code
|
{"pr_number": 6474, "pr_title": "fix(connector): Expiration Year Incorrectly Populated as YYYY Format in Paybox Mandates", "merged_at": "2024-11-05T07:38:03Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/router/src/connector/paybox/transformers.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(authentication): create authentications to fallback to ApiKeyAuth if AdminApiAuth fails
## 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 -->
Hotfix PR
Original PR: [https://github.com/juspay/hyperswitch/pull/7744](https://github.com/juspay/hyperswitch/pull/7744)
### 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Configuration Files**
- `crates/router/src/configs/secrets_transformers.rs`
- `crates/router/src/configs/settings.rs`
**2. Other**
- `crates/router/src/routes/admin.rs`
- `crates/router/src/routes/api_keys.rs`
- `crates/router/src/services/authentication.rs`
**Code Patterns Applied:**
- Define new data structures (3 changes)
- Implement new functions (5 changes)
- Extend existing types with new fields (25 changes)
- Add conditional logic for feature flags or filtering (9 changes)
**Detailed Identifier Changes:**
Commit 0c2c4295:
Files to modify:
**crates/router/src/configs/secrets_transformers.rs**
Modify existing code
**crates/router/src/configs/settings.rs**
Add:
- function: private::deserialize_merchant_ids_inner
- function: private::deserialize_merchant_ids
- struct: pub::FallbackMerchantIds
**crates/router/src/routes/admin.rs**
Modify existing code
**crates/router/src/routes/api_keys.rs**
Modify existing code
**crates/router/src/services/authentication.rs**
Add:
- function: private::authenticate_and_fetch
- function: private::fetch_merchant_key_store_and_account
- function: private::authenticate_and_fetch
- struct: pub::AdminApiAuthWithApiKeyFallback
- struct: pub::AdminApiAuthWithApiKeyFallbackAndMerchantIdFromRoute
- impl: impl AuthenticateAndFetch<(), A> for AdminApiAuthWithApiKeyFallback
- impl: impl AdminApiAuthWithApiKeyFallbackAndMerchantIdFromRoute
- impl: impl AuthenticateAndFetch<AuthenticationData, A> for AdminApiAuthWithApiKeyFallbackAndMerchantIdFromRoute
|
{"pr_number": 7758, "pr_title": "feat(authentication): create authentications to fallback to ApiKeyAuth if AdminApiAuth fails", "merged_at": "2025-04-08T09:00:47Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"config": ["crates/router/src/configs/secrets_transformers.rs", "crates/router/src/configs/settings.rs"], "other": ["crates/router/src/routes/admin.rs", "crates/router/src/routes/api_keys.rs", "crates/router/src/services/authentication.rs"]}, "change_types": {"structs_added": 3, "functions_added": 5, "fields_added": 25, "conditionals_added": 9}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(connector): [AUTHORIZEDOTNET] create connector customer flow added
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
Previously, the `setup_mandate` flow was responsible for creating a customer profile in `Authorize.Net`. This caused issues when the same `customer_id` and `customer_email` were used in subsequent `setup_mandate` calls (even with different `payment_details`), resulting in an error:
"A duplicate record with ID 932042699 already exists."
In this PR, segregated customer creation logic:
- createConnectorCustomer
Creates the customer profile without payment details.
This logic was previously part of setup_mandate.
- setup_mandate
Now only creates a customerPaymentProfile (a separate Authorize.Net API call).
Allows passing billTo details, which were not permitted in createCustomerProfile API calls but are supported in createCustomerPaymentProfile.
Benefits
- Supports saving multiple payment methods for the same customer_id and customer_email.
- Prevents duplicate-customer errors in setup_mandate calls.
- Enables including billTo information, improving compatibility with payment profiles.
### 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)?
-->
<img width="1570" height="1028" alt="Screenshot 2025-08-04 at 5 42 06 PM" src="https://github.com/user-attachments/assets/2a4a248b-e48a-4c36-93dd-68b5d9c5b52b" />
<details>
<summary>1. Setup mandate flow with new customer id and email (succeeded)</summary>
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_NArOvTgCUUPP6V2rDoKmK763cqpUdUs7F2vSbwbQbGd0VzyRnOyXJEpxALlP6W9O' \
--data-raw '
{
"amount": 0,
"currency": "USD",
"confirm": true,
"customer": {
"email": "johndoe15@gmail.com",
"id": "johndoe15",
"name": "Manisha Slack",
"phone": "1234567890",
"phone_country_code": "+1"
},
"setup_future_usage": "off_session",
"payment_type": "setup_mandate",
"off_session": true,
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4111111111111111",
"card_exp_month": "07",
"card_exp_year": "26",
"card_holder_name": "Joseph Does",
"card_cvc": "123"
}
},
"mandate_data": {
"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"
}
},
"mandate_type": {
"multi_use": {
"amount": 1000,
"currency": "USD",
"start_date": "2023-04-21T00:00:00Z",
"end_date": "2023-05-21T00:00:00Z",
"metadata": {
"frequency": "13"
}
}
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "John",
"last_name": "Doe"
},
"email": "johndoe@gmail.com"
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "John",
"last_name": "Doe"
}
}
}
'
```
Response
```
{"payment_id":"pay_0z1mgolWl2l5dJdOuZwV","merchant_id":"merchant_1752844609","status":"succeeded","amount":0,"net_amount":0,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"authorizedotnet","client_secret":"pay_0z1mgolWl2l5dJdOuZwV_secret_48WIGG8egWSFUTQqs7Rc","created":"2025-07-28T11:11:43.858Z","currency":"USD","customer_id":"johndoe15","customer":{"id":"johndoe15","name":"Manisha Slack","email":"johndoe15@gmail.com","phone":"1234567890","phone_country_code":"+1"},"description":null,"refunds":null,"disputes":null,"mandate_id":"man_jdtgX5xSFsX24xvtXr6E","mandate_data":{"update_mandate_id":null,"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"}},"mandate_type":{"multi_use":{"amount":1000,"currency":"USD","start_date":"2023-04-21T00:00:00.000Z","end_date":"2023-05-21T00:00:00.000Z","metadata":{"frequency":"13"}}}},"setup_future_usage":"off_session","off_session":true,"capture_on":null,"capture_method":null,"payment_method":"card","payment_method_data":{"card":{"last4":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"07","card_exp_year":"26","card_holder_name":"Joseph Does","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"John","last_name":"Doe"},"phone":null,"email":null},"billing":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"John","last_name":"Doe"},"phone":null,"email":"johndoe@gmail.com"},"order_details":null,"email":"johndoe15@gmail.com","name":"Manisha Slack","phone":"1234567890","return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"johndoe15","created_at":1753701103,"expires":1753704703,"secret":"epk_c235ebf80b6e4565a8a61b6ce3b6d113"},"manual_retry_allowed":false,"connector_transaction_id":null,"frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":null,"payment_link":null,"profile_id":"pro_gqhHNlHuk3bYhHxu7Or4","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_3U25eUMykwv26k6svLyu","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-28T11:26:43.857Z","fingerprint":null,"browser_info":null,"payment_method_id":"pm_qdasbRK2GjImZNqEV5t8","payment_method_status":"active","updated":"2025-07-28T11:11:46.340Z","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":"932042512-931323047","card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null}
```
</details>
<details>
<summary>2. Setup mandate flow with same customer id, email and payment details (failed, as expected)</summary>
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_NArOvTgCUUPP6V2rDoKmK763cqpUdUs7F2vSbwbQbGd0VzyRnOyXJEpxALlP6W9O' \
--data-raw '
{
"amount": 0,
"currency": "USD",
"confirm": true,
"customer": {
"email": "johndoe15@gmail.com",
"id": "johndoe15",
"name": "Manisha Slack",
"phone": "1234567890",
"phone_country_code": "+1"
},
"setup_future_usage": "off_session",
"payment_type": "setup_mandate",
"off_session": true,
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4111111111111111",
"card_exp_month": "07",
"card_exp_year": "26",
"card_holder_name": "Joseph Does",
"card_cvc": "123"
}
},
"mandate_data": {
"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"
}
},
"mandate_type": {
"multi_use": {
"amount": 1000,
"currency": "USD",
"start_date": "2023-04-21T00:00:00Z",
"end_date": "2023-05-21T00:00:00Z",
"metadata": {
"frequency": "13"
}
}
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "John",
"last_name": "Doe"
},
"email": "johndoe@gmail.com"
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "John",
"last_name": "Doe"
}
}
}
'
```
```
{"payment_id":"pay_7wcbZnI1PqCseXtiLbf1","merchant_id":"merchant_1752844609","status":"failed","amount":0,"net_amount":0,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"authorizedotnet","client_secret":"pay_7wcbZnI1PqCseXtiLbf1_secret_mTT27SBbCZANImE48hxR","created":"2025-07-28T11:13:28.256Z","currency":"USD","customer_id":"johndoe15","customer":{"id":"johndoe15","name":"Manisha Slack","email":"johndoe15@gmail.com","phone":"1234567890","phone_country_code":"+1"},"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":{"update_mandate_id":null,"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"}},"mandate_type":{"multi_use":{"amount":1000,"currency":"USD","start_date":"2023-04-21T00:00:00.000Z","end_date":"2023-05-21T00:00:00.000Z","metadata":{"frequency":"13"}}}},"setup_future_usage":"off_session","off_session":true,"capture_on":null,"capture_method":null,"payment_method":"card","payment_method_data":{"card":{"last4":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"07","card_exp_year":"26","card_holder_name":"Joseph Does","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"John","last_name":"Doe"},"phone":null,"email":null},"billing":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"John","last_name":"Doe"},"phone":null,"email":"johndoe@gmail.com"},"order_details":null,"email":"johndoe15@gmail.com","name":"Manisha Slack","phone":"1234567890","return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":"E00039","error_message":"A duplicate customer payment profile already exists.","unified_code":"UE_9000","unified_message":"Something went wrong","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":"johndoe15","created_at":1753701207,"expires":1753704807,"secret":"epk_8dac9cc934e2421bb15f23a4caefb8ac"},"manual_retry_allowed":true,"connector_transaction_id":null,"frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":null,"payment_link":null,"profile_id":"pro_gqhHNlHuk3bYhHxu7Or4","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_3U25eUMykwv26k6svLyu","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-28T11:28:28.256Z","fingerprint":null,"browser_info":null,"payment_method_id":null,"payment_method_status":null,"updated":"2025-07-28T11:13:30.456Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null}
```
</details>
<details>
<summary>3. Setup mandate flow with same customer id, email but different payment details (succeeded)</summary>
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_NArOvTgCUUPP6V2rDoKmK763cqpUdUs7F2vSbwbQbGd0VzyRnOyXJEpxALlP6W9O' \
--data-raw '
{
"amount": 0,
"currency": "USD",
"confirm": true,
"customer": {
"email": "johndoe15@gmail.com",
"id": "johndoe15",
"name": "Manisha Slack",
"phone": "1234567890",
"phone_country_code": "+1"
},
"setup_future_usage": "off_session",
"payment_type": "setup_mandate",
"off_session": true,
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4242424242424242",
"card_exp_month": "07",
"card_exp_year": "31",
"card_holder_name": "Joseph Does",
"card_cvc": "123"
}
},
"mandate_data": {
"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"
}
},
"mandate_type": {
"multi_use": {
"amount": 1000,
"currency": "USD",
"start_date": "2023-04-21T00:00:00Z",
"end_date": "2023-05-21T00:00:00Z",
"metadata": {
"frequency": "13"
}
}
}
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "John",
"last_name": "Doe"
},
"email": "johndoe@gmail.com"
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "John",
"last_name": "Doe"
}
}
}
'
```
Response
```
{"payment_id":"pay_BlquUEzJXm83W4DQUIwz","merchant_id":"merchant_1752844609","status":"succeeded","amount":0,"net_amount":0,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"authorizedotnet","client_secret":"pay_BlquUEzJXm83W4DQUIwz_secret_zusBA34KyXKcsdBU82BI","created":"2025-07-28T11:17:01.809Z","currency":"USD","customer_id":"johndoe15","customer":{"id":"johndoe15","name":"Manisha Slack","email":"johndoe15@gmail.com","phone":"1234567890","phone_country_code":"+1"},"description":null,"refunds":null,"disputes":null,"mandate_id":"man_c8f0DBxqidxF2ozbn7lV","mandate_data":{"update_mandate_id":null,"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"}},"mandate_type":{"multi_use":{"amount":1000,"currency":"USD","start_date":"2023-04-21T00:00:00.000Z","end_date":"2023-05-21T00:00:00.000Z","metadata":{"frequency":"13"}}}},"setup_future_usage":"off_session","off_session":true,"capture_on":null,"capture_method":null,"payment_method":"card","payment_method_data":{"card":{"last4":"4242","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"424242","card_extended_bin":null,"card_exp_month":"07","card_exp_year":"31","card_holder_name":"Joseph Does","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"John","last_name":"Doe"},"phone":null,"email":null},"billing":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"John","last_name":"Doe"},"phone":null,"email":"johndoe@gmail.com"},"order_details":null,"email":"johndoe15@gmail.com","name":"Manisha Slack","phone":"1234567890","return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"johndoe15","created_at":1753701421,"expires":1753705021,"secret":"epk_0d1b918768af4f7b8ee94bbbbbd336b0"},"manual_retry_allowed":false,"connector_transaction_id":null,"frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":null,"payment_link":null,"profile_id":"pro_gqhHNlHuk3bYhHxu7Or4","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_3U25eUMykwv26k6svLyu","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-28T11:32:01.809Z","fingerprint":null,"browser_info":null,"payment_method_id":"pm_mwP8b8fWJXgvBITnw0P6","payment_method_status":"active","updated":"2025-07-28T11:17:05.551Z","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":"932042512-931323107","card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null}
```
</details>
<details>
<summary>4. Normal payment (succeeded)</summary>
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_NArOvTgCUUPP6V2rDoKmK763cqpUdUs7F2vSbwbQbGd0VzyRnOyXJEpxALlP6W9O' \
--data-raw '{
"amount": 6540,
"currency": "USD",
"amount_to_capture": 6540,
"confirm": true,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"authentication_type": "no_three_ds",
"setup_future_usage": "on_session",
"customer": {
"id": "sweta11",
"name": "John Doe",
"email": "sweta11_on@gmail.com",
"phone": "9999999999",
"phone_country_code": "+1"
},
"phone_country_code": "+1",
"routing": {
"type": "single",
"data": "stripe"
},
"description": "Its my first payment request",
"return_url": "https://google.com",
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "5424000000000015",
"card_exp_month": "10",
"card_exp_year": "25",
"card_holder_name": "joseph Doe",
"card_cvc": "999"
}
},
"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": "8056594427",
"country_code": "+91"
},
"email": "guest@example.com"
},
"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"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": "guest@example.com"
},
"merchant_order_reference_id":"order",
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"order_details": [
{
"product_name": "Apple iphone 15",
"quantity": 1,
"amount": 6540,
"account_name": "transaction_processing"
}
],
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
},
"browser_info": {
"user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
"accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
"language": "nl-NL",
"color_depth": 24,
"screen_height": 723,
"screen_width": 1536,
"time_zone": 0,
"java_enabled": true,
"java_script_enabled": true,
"ip_address": "128.0.0.1"
},
"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"
}
},
"connector_metadata": {
"noon": {
"order_category": "pay"
}
},
"payment_link": false,
"payment_link_config": {
"theme": "",
"logo": "",
"seller_name": "",
"sdk_layout": "",
"display_sdk_only": false,
"enabled_saved_payment_method": false
},
"payment_type": "normal",
"request_incremental_authorization": false,
"session_expiry": 900
'
```
Response:
```
{"payment_id":"pay_RIKYKqjzmDhlh6sa2NKi","merchant_id":"merchant_1752844609","status":"succeeded","amount":6540,"net_amount":6540,"shipping_cost":null,"amount_capturable":0,"amount_received":6540,"connector":"authorizedotnet","client_secret":"pay_RIKYKqjzmDhlh6sa2NKi_secret_PH5fWmlk5wPyacehepe7","created":"2025-07-29T13:29:05.166Z","currency":"USD","customer_id":"sweta11","customer":{"id":"sweta11","name":"John Doe","email":"sweta11_on@gmail.com","phone":"9999999999","phone_country_code":"+1"},"description":"Its my first payment request","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":"0015","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"542400","card_extended_bin":null,"card_exp_month":"10","card_exp_year":"25","card_holder_name":"joseph Doe","payment_checks":{"description":"The street address and postal code matched.","avs_result_code":"Y"},"authentication_data":null},"billing":null},"payment_token":null,"shipping":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe"},"phone":{"number":"8056594427","country_code":"+91"},"email":"guest@example.com"},"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":"8056594427","country_code":"+91"},"email":"guest@example.com"},"order_details":[{"brand":null,"amount":6540,"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":"sweta11_on@gmail.com","name":"John Doe","phone":"9999999999","return_url":"https://google.com/","authentication_type":"no_three_ds","statement_descriptor_name":"joseph","statement_descriptor_suffix":"JS","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":"sweta11","created_at":1753795745,"expires":1753799345,"secret":"epk_0c8e0546611b44488fa296574063e57c"},"manual_retry_allowed":false,"connector_transaction_id":"120067982504","frm_message":null,"metadata":{"udf1":"value1","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":{"apple_pay":null,"airwallex":null,"noon":{"order_category":"pay"},"braintree":null,"adyen":null},"feature_metadata":null,"reference_id":"120067982504","payment_link":null,"profile_id":"pro_gqhHNlHuk3bYhHxu7Or4","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_3U25eUMykwv26k6svLyu","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-29T13:44:05.165Z","fingerprint":null,"browser_info":{"language":"nl-NL","time_zone":0,"ip_address":"128.0.0.1","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36","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-07-29T13:29:08.640Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":"order","order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null}
```
</details>
<details>
<summary>5. Non zero CIT (succeeded)</summary>
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_NArOvTgCUUPP6V2rDoKmK763cqpUdUs7F2vSbwbQbGd0VzyRnOyXJEpxALlP6W9O' \
--data-raw '{
"amount": 6540,
"currency": "USD",
"amount_to_capture": 6540,
"confirm": true,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"authentication_type": "no_three_ds",
"setup_future_usage": "off_session",
"customer": {
"id": "sweta13",
"name": "John Doe",
"email": "sweta13_on@gmail.com",
"phone": "9999999999",
"phone_country_code": "+1"
},
"phone_country_code": "+1",
"routing": {
"type": "single",
"data": "stripe"
},
"description": "Its my first payment request",
"return_url": "https://google.com",
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "5424000000000015",
"card_exp_month": "10",
"card_exp_year": "25",
"card_holder_name": "joseph Doe",
"card_cvc": "999"
}
},
"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": "8056594427",
"country_code": "+91"
},
"email": "guest@example.com"
},
"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"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": "guest@example.com"
},
"merchant_order_reference_id": "order",
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"order_details": [
{
"product_name": "Apple iphone 15",
"quantity": 1,
"amount": 6540,
"account_name": "transaction_processing"
}
],
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
},
"browser_info": {
"user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
"accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
"language": "nl-NL",
"color_depth": 24,
"screen_height": 723,
"screen_width": 1536,
"time_zone": 0,
"java_enabled": true,
"java_script_enabled": true,
"ip_address": "128.0.0.1"
},
"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"
}
},
"connector_metadata": {
"noon": {
"order_category": "pay"
}
},
"payment_link": false,
"payment_link_config": {
"theme": "",
"logo": "",
"seller_name": "",
"sdk_layout": "",
"display_sdk_only": false,
"enabled_saved_payment_method": false
},
"payment_type": "normal",
"request_incremental_authorization": false,
"session_expiry": 900
}'
```
Response:
```
{"payment_id":"pay_bI18ZUVKZd6nQxbs0X0l","merchant_id":"merchant_1753802295","status":"succeeded","amount":6540,"net_amount":6540,"shipping_cost":null,"amount_capturable":0,"amount_received":6540,"connector":"authorizedotnet","client_secret":"pay_bI18ZUVKZd6nQxbs0X0l_secret_QUuBCGUHYXfrneN5DCLu","created":"2025-07-30T09:24:52.819Z","currency":"USD","customer_id":"sweta13","customer":{"id":"sweta13","name":"John Doe","email":"sweta13_on@gmail.com","phone":"9999999999","phone_country_code":"+1"},"description":"Its my first payment request","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":"0015","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"542400","card_extended_bin":null,"card_exp_month":"10","card_exp_year":"25","card_holder_name":"joseph Doe","payment_checks":{"description":"The street address and postal code matched.","avs_result_code":"Y"},"authentication_data":null},"billing":null},"payment_token":null,"shipping":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe"},"phone":{"number":"8056594427","country_code":"+91"},"email":"guest@example.com"},"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":"8056594427","country_code":"+91"},"email":"guest@example.com"},"order_details":[{"brand":null,"amount":6540,"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":"sweta13_on@gmail.com","name":"John Doe","phone":"9999999999","return_url":"https://google.com/","authentication_type":"no_three_ds","statement_descriptor_name":"joseph","statement_descriptor_suffix":"JS","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":"sweta13","created_at":1753867492,"expires":1753871092,"secret":"epk_9aaad41b3fe74384adfc9ccea61dcb06"},"manual_retry_allowed":false,"connector_transaction_id":"120068033904","frm_message":null,"metadata":{"udf1":"value1","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":{"apple_pay":null,"airwallex":null,"noon":{"order_category":"pay"},"braintree":null,"adyen":null},"feature_metadata":null,"reference_id":"120068033904","payment_link":null,"profile_id":"pro_7LXZcwvuxrGCwWWqFMz3","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_bCot3yUDiHEUmqNWgzMj","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-30T09:39:52.819Z","fingerprint":null,"browser_info":{"language":"nl-NL","time_zone":0,"ip_address":"128.0.0.1","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36","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":"pm_Atbhhrr9E9o60CpC7TPH","payment_method_status":"active","updated":"2025-07-30T09:24:55.136Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":"order","order_tax_amount":null,"connector_mandate_id":"932071488-931353121","card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null}
```
</details>
<details>
<summary>6. Corresponding non zero MIT (succeeded)</summary>
Note: use different amount than the one used in CIT
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'api-key: dev_Ig1SMGH807BOWTGNx7hqATikO6HzoWjYGnQkQjDp2jDylJwav1e39ayvV15qMVmV' \
--data '
{
"amount": 1001,
"currency": "USD",
"customer_id": "sweta13",
"description": "Subsequent Mandate Test Payment (MIT from New CIT Demo)",
"confirm": true,
"off_session": true,
"recurring_details": {
"type": "payment_method_id",
"data": "pm_Atbhhrr9E9o60CpC7TPH"
}
}
'
```
Response:
```
{"payment_id":"pay_dBHhywr4LFjCWGMuKRWG","merchant_id":"merchant_1753802295","status":"succeeded","amount":1001,"net_amount":1001,"shipping_cost":null,"amount_capturable":0,"amount_received":1001,"connector":"authorizedotnet","client_secret":"pay_dBHhywr4LFjCWGMuKRWG_secret_K6OMSaLYEN3VuxDIgi4Z","created":"2025-07-30T09:26:07.782Z","currency":"USD","customer_id":"sweta13","customer":{"id":"sweta13","name":"John Doe","email":"sweta13_on@gmail.com","phone":"9999999999","phone_country_code":"+1"},"description":"Subsequent Mandate Test Payment (MIT from New CIT Demo)","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":true,"capture_on":null,"capture_method":null,"payment_method":"card","payment_method_data":{"card":{"last4":"0015","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"542400","card_extended_bin":null,"card_exp_month":"10","card_exp_year":"25","card_holder_name":"joseph Doe","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":"sweta13_on@gmail.com","name":"John Doe","phone":"9999999999","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":"sweta13","created_at":1753867567,"expires":1753871167,"secret":"epk_29f66f59f99c4fa397250dee944df8dd"},"manual_retry_allowed":false,"connector_transaction_id":"120068033946","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"120068033946","payment_link":null,"profile_id":"pro_7LXZcwvuxrGCwWWqFMz3","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_bCot3yUDiHEUmqNWgzMj","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-30T09:41:07.782Z","fingerprint":null,"browser_info":null,"payment_method_id":"pm_Atbhhrr9E9o60CpC7TPH","payment_method_status":"active","updated":"2025-07-30T09:26:08.420Z","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":"932071488-931353121","card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null}
```
</details>
<details>
<summary>7. Zero dollar MIT corresponding to setup-mandate CIT (succeeded)</summary>
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'api-key: dev_Ig1SMGH807BOWTGNx7hqATikO6HzoWjYGnQkQjDp2jDylJwav1e39ayvV15qMVmV' \
--data '
{
"amount": 1000,
"currency": "USD",
"confirm": true,
"customer_id": "johndoe17",
"mandate_id": "man_Vx8TOc35YxBjsq6jn7PJ",
"off_session": true
}'
```
Response:
```
{"payment_id":"pay_9PjTPCTcG3fdNCZSifAE","merchant_id":"merchant_1753802295","status":"succeeded","amount":1000,"net_amount":1000,"shipping_cost":null,"amount_capturable":0,"amount_received":1000,"connector":"authorizedotnet","client_secret":"pay_9PjTPCTcG3fdNCZSifAE_secret_Jv8T8xgmHXG7e8951uxj","created":"2025-07-30T09:20:56.536Z","currency":"USD","customer_id":"johndoe17","customer":{"id":"johndoe17","name":"Manisha Slack","email":"johndoe17@gmail.com","phone":"1234567890","phone_country_code":"+1"},"description":null,"refunds":null,"disputes":null,"mandate_id":"man_Vx8TOc35YxBjsq6jn7PJ","mandate_data":null,"setup_future_usage":null,"off_session":true,"capture_on":null,"capture_method":null,"payment_method":"card","payment_method_data":{"card":{"last4":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"07","card_exp_year":"26","card_holder_name":"Joseph Does","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":"f546796f-5b16-4a14-b2cd-c8b487b9a4f0","shipping":null,"billing":null,"order_details":null,"email":"johndoe17@gmail.com","name":"Manisha Slack","phone":"1234567890","return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"johndoe17","created_at":1753867256,"expires":1753870856,"secret":"epk_d8dd3db064824e5e8a36255fd3cab2ab"},"manual_retry_allowed":false,"connector_transaction_id":"120068033741","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"120068033741","payment_link":null,"profile_id":"pro_7LXZcwvuxrGCwWWqFMz3","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_bCot3yUDiHEUmqNWgzMj","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-30T09:35:56.536Z","fingerprint":null,"browser_info":null,"payment_method_id":"pm_Cs7cwb8MRmFY7BSVzyKK","payment_method_status":"active","updated":"2025-07-30T09:20:58.715Z","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":"932071411-931353043","card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null}
```
</details>
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. External Connector Integration**
- `crates/hyperswitch_connectors/src/connectors/authorizedotnet.rs`
- `crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs`
- `crates/hyperswitch_connectors/src/default_implementations.rs`
**2. Utils**
- `cypress-tests/cypress/utils/RequestBodyUtils.js`
**3. Tests**
- `config/deployments/integration_test.toml`
- `cypress-tests/cypress/e2e/configs/Payment/Authorizedotnet.js`
- `loadtest/config/development.toml`
**4. Configuration Files**
- `config/config.example.toml`
- `config/deployments/production.toml`
- `config/deployments/sandbox.toml`
- ... and 2 more files
**Code Patterns Applied:**
- Define new data structures (6 changes)
- Implement new functions (10 changes)
- Extend existing types with new fields (118 changes)
**Detailed Identifier Changes:**
Commit 8818a9b3:
Files to modify:
**crates/hyperswitch_connectors/src/connectors/authorizedotnet.rs**
Add:
- 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
- impl: impl api::ConnectorCustomer for Authorizedotnet
- impl: impl ConnectorIntegration<CreateConnectorCustomer, ConnectorCustomerData, PaymentsResponseData> for Authorizedotnet
**crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs**
Remove:
- struct: pub::CreateCustomerProfileRequest
Add:
- struct: pub::CustomerRequest
- struct: pub::CreateCustomerPaymentProfileRequest
- struct: pub::AuthorizedotnetPaymentProfileRequest
- struct: private::PaymentProfile
**crates/hyperswitch_connectors/src/default_implementations.rs**
Modify existing code
|
{"pr_number": 8774, "pr_title": "feat(connector): [AUTHORIZEDOTNET] create connector customer flow added", "merged_at": "2025-08-05T13:26:00Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/authorizedotnet.rs", "crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs"], "utils": ["cypress-tests/cypress/utils/RequestBodyUtils.js"], "tests": ["config/deployments/integration_test.toml", "cypress-tests/cypress/e2e/configs/Payment/Authorizedotnet.js", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"]}, "change_types": {"structs_added": 6, "functions_added": 10, "fields_added": 118, "imports_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(router): Deduplicate PML response and populate bank details (V2)
## 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 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 #8582
## 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 'http://localhost:8080/v2/payments/12345_pay_0197ee3c52887d51b074cecb88687a33/payment-methods' \
--header 'Content-Type: application/json' \
--header 'Authorization: publishable-key=pk_dev_bef28bbe20d64d52bf4658ad5f7bc91e,client-secret=cs_0197ee3c52bd71a38bf7932a4484b345' \
--header 'X-Profile-Id: pro_eW12tyr48EHRHFF9MfLa' \
--header 'api-key: pk_dev_bef28bbe20d64d52bf4658ad5f7bc91e'
```
Response:
```json
{
"payment_methods_enabled": [
{
"payment_method_type": "card",
"payment_method_subtype": "card",
"payment_experience": null,
"required_fields": null,
"surcharge_details": null
},
{
"payment_method_type": "card_redirect",
"payment_method_subtype": "card_redirect",
"payment_experience": [
"redirect_to_url"
],
"required_fields": null,
"surcharge_details": null
},
{
"payment_method_type": "pay_later",
"payment_method_subtype": "klarna",
"payment_experience": [
"redirect_to_url",
"invoke_sdk_client"
],
"required_fields": null,
"surcharge_details": null
},
{
"payment_method_type": "wallet",
"payment_method_subtype": "google_pay",
"payment_experience": null,
"required_fields": null,
"surcharge_details": null
},
{
"payment_method_type": "wallet",
"payment_method_subtype": "paypal",
"payment_experience": null,
"required_fields": null,
"surcharge_details": null
},
{
"payment_method_type": "bank_redirect",
"payment_method_subtype": "eps",
"payment_experience": [
"redirect_to_url"
],
"bank_names": [
"posojilnica_bank_e_gen",
"schoellerbank_ag",
"volksbank_gruppe",
"hypo_tirol_bank_ag",
"volkskreditbank_ag",
"bawag_psk_ag",
"easybank_ag",
"raiffeisen_bankengruppe_osterreich",
"sparda_bank_wien",
"dolomitenbank",
"erste_bank_und_sparkassen",
"bank_austria"
],
"required_fields": null,
"surcharge_details": null
},
{
"payment_method_type": "bank_redirect",
"payment_method_subtype": "ideal",
"payment_experience": [
"redirect_to_url"
],
"bank_names": [
"n26",
"knab",
"nationale_nederlanden",
"ing",
"rabobank",
"sns_bank",
"asn_bank",
"bunq",
"revolut",
"triodos_bank",
"regiobank",
"abn_amro",
"van_lanschot",
"yoursafe"
],
"required_fields": null,
"surcharge_details": null
},
{
"payment_method_type": "bank_debit",
"payment_method_subtype": "sepa",
"payment_experience": null,
"bank_names": [],
"required_fields": null,
"surcharge_details": null
}
],
"customer_payment_methods": []
}
```
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. API Request/Response Models**
- `crates/api_models/src/payment_methods.rs`
- `crates/api_models/src/payments.rs`
**2. Core Business Logic**
- `crates/router/src/core/payment_methods/vault.rs`
- `crates/router/src/core/payments/payment_methods.rs`
**3. Other**
- `api-reference/v2/openapi_spec_v2.json`
- `crates/common_enums/src/enums.rs`
**Code Patterns Applied:**
- Define new data structures (5 changes)
- Implement new functions (5 changes)
- Extend existing types with new fields (39 changes)
- Add conditional logic for feature flags or filtering (2 changes)
- Modify database queries (1 changes)
**Detailed Identifier Changes:**
Commit 7d54ce87:
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
|
{"pr_number": 8583, "pr_title": "feat(router): Deduplicate PML response and populate bank details (V2)", "merged_at": "2025-07-14T12:45:04Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "card"]}, "hierarchy": {"api_models": ["crates/api_models/src/payment_methods.rs", "crates/api_models/src/payments.rs"], "core_business": ["crates/router/src/core/payment_methods/vault.rs", "crates/router/src/core/payments/payment_methods.rs"], "other": ["api-reference/v2/openapi_spec_v2.json", "crates/common_enums/src/enums.rs"]}, "change_types": {"structs_added": 5, "functions_added": 5, "fields_added": 39, "imports_added": 5, "conditionals_added": 2, "database_queries": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Core Business Logic**
- `crates/router/src/core/admin.rs`
- `crates/router/src/core/routing.rs`
- `crates/router/src/core/routing/helpers.rs`
**Code Patterns Applied:**
- Implement new functions (3 changes)
- Extend existing types with new fields (13 changes)
- Add conditional logic for feature flags or filtering (2 changes)
**Detailed Identifier Changes:**
Commit 9bea8072:
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**
Add:
- function: pub::redact_cgraph_cache
- function: pub::redact_routing_cache
- function: pub::update_default_fallback_on_mca_update
|
{"pr_number": 9689, "pr_title": "refactor(routing): update configs on updation of mca", "merged_at": "2025-10-06T16:31:20Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant", "connector"]}, "hierarchy": {"core_business": ["crates/router/src/core/admin.rs", "crates/router/src/core/routing.rs", "crates/router/src/core/routing/helpers.rs"]}, "change_types": {"functions_added": 3, "fields_added": 13, "imports_added": 2, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(openapi): Add x-mcp extension to v1 spec
## 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/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 #8442
## 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)?
-->
Verified using:
`mintlify openapi-check api-reference/v1/openapi_spec_v1.json`
Tested mintlify's mcp server generation functionality by deploying the updated OpenAPI spec file on a custom mintlify account. Used the generated mcp server to do payments - create in cursor.

## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Other**
- `README.md`
- `api-reference/v1/openapi_spec_v1.json`
- `api-reference/v1/payments/payment--flows.mdx`
- ... and 1 more files
**Code Patterns Applied:**
- Add conditional logic for feature flags or filtering (1 changes)
**Detailed Identifier Changes:**
Commit a685f6b5:
Files to modify:
**crates/openapi/src/main.rs**
Modify existing code
|
{"pr_number": 8443, "pr_title": "feat(openapi): Add x-mcp extension to v1 spec", "merged_at": "2025-06-27T08:52:30Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user"]}, "hierarchy": {"other": ["README.md", "api-reference/v1/openapi_spec_v1.json", "api-reference/v1/payments/payment--flows.mdx", "crates/openapi/src/main.rs"]}, "change_types": {"conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
fix: fixed the just install error in migration-runner
## 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 migration-runner service in the `docker-compose.yml` file fails during a second deployment as `just` installer raises `just already installed` error. This PR fixes that issue issue by adding a conditional statement which calls the just installer only when just command is not available.
### 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).
-->
N/A
## 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)?
-->
Ran `docker compose up -d` twice.
<img width="476" height="491" alt="Screenshot 2025-10-08 at 3 44 53 PM" src="https://github.com/user-attachments/assets/c9de99cd-ac3a-4ab9-8c4e-5a1bb8d48d84" />
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Configuration Files**
- `docker-compose.yml`
**Code Patterns Applied:**
- Add conditional logic for feature flags or filtering (1 changes)
|
{"pr_number": 9745, "pr_title": "fix: fixed the just install error in migration-runner", "merged_at": "2025-10-10T07:28:21Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"config": ["docker-compose.yml"]}, "change_types": {"conditionals_added": 1}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
|
docs: changes for api ref
## 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 -->
We have changes the Intro page of the API-ref to make it more informative and navigable.
Also, The API sidebar is now re-organised basis of different use-cases to improve the dev experience.
Added an introduction page to payments API explaining all the scenarios an user can explore payment API.
### 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 #7323
## 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)?
-->
<img width="1140" alt="Screenshot 2025-02-20 at 5 55 09 PM" src="https://github.com/user-attachments/assets/9e979280-e081-48a0-b60e-33135d2461ec" />
<img width="1153" alt="Screenshot 2025-02-20 at 5 56 20 PM" src="https://github.com/user-attachments/assets/52f6adb1-3d5d-4ba7-99c9-3fdbadb2d4d4" />
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Other**
- `api-reference/api-reference/payments/Introduction--to--payments.mdx`
- `api-reference/api-reference/payments/payments--create.mdx`
- `api-reference/introduction.mdx`
- ... and 1 more files
|
{"pr_number": 7324, "pr_title": "docs: changes for api ref", "merged_at": "2025-02-25T19:02:34Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user"]}, "hierarchy": {"other": ["api-reference/api-reference/payments/Introduction--to--payments.mdx", "api-reference/api-reference/payments/payments--create.mdx", "api-reference/introduction.mdx", "api-reference/mint.json"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
|
fix(connector): [Cybersource] remove newline in billing address with space
## 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 -->
Newline in billing address failing the payment in production (speculated). This pr removes the newline (if present) in billing address with space.
Corresponding hotfix PR to #6478
### 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 for cybersource:
- Create a Payment with Cybersource:
```
{
"amount": 499,
"currency": "USD",
"confirm": true,
"capture_method": "automatic",
"customer_id": "test_rec7",
"email": "guest@example.com",
"request_external_three_ds_authentication": true,
"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": "Test Holder",
"card_cvc": "737"
}
},
"billing": {
"address": {
"city": "test",
"country": "US",
"line1": "here",
"line2": "there",
"line3": "anywhere",
"zip": "560095",
"state": "Washington",
"first_name": "One",
"last_name": "Two"
},
"phone": {
"number": "1234567890",
"country_code": "+1"
},
"email": "guest@example.com"
},
"authentication_type": "no_three_ds"
}
```
- The payment should be succeeded
```
{
"payment_id": "pay_LGt7Tbil8tLko2OpVHqJ",
"merchant_id": "merchant_1730121122",
"status": "succeeded",
"amount": 499,
"net_amount": 499,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": 499,
"connector": "cybersource",
"client_secret": "pay_LGt7Tbil8tLko2OpVHqJ_secret_dycae051HVaAJYXSCdCH",
"created": "2024-10-28T13:12:22.609Z",
"currency": "USD",
"customer_id": "test_rec7",
"customer": {
"id": "test_rec7",
"name": null,
"email": "guest@example.com",
"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": "Visa",
"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": null,
"payment_checks": {
"avs_response": {
"code": "Y",
"codeRaw": "Y"
},
"card_verification": {
"resultCode": "M",
"resultCodeRaw": "M"
}
},
"authentication_data": null
},
"billing": null
},
"payment_token": "token_LyziBYSQnkubuQbE91YF",
"shipping": null,
"billing": {
"address": {
"city": "test",
"country": "US",
"line1": "here",
"line2": "there",
"line3": "anywhere",
"zip": "560095",
"state": "Washington",
"first_name": "One",
"last_name": "Two"
},
"phone": {
"number": "1234567890",
"country_code": "+1"
},
"email": "guest@example.com"
},
"order_details": null,
"email": "guest@example.com",
"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": 1730121142,
"expires": 1730124742,
"secret": "epk_bb3a50134caa4214ad2ea7b534184d26"
},
"manual_retry_allowed": false,
"connector_transaction_id": "7301211437366791304951",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": "pay_LGt7Tbil8tLko2OpVHqJ_1",
"payment_link": null,
"profile_id": "pro_2pDEf41cwojHtrM9xItk",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_AFVVYXejTDoWa4IgaPnw",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2024-10-28T13:27:22.609Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2024-10-28T13:12:24.692Z",
"charges": null,
"frm_metadata": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. External Connector Integration**
- `crates/router/src/connector/cybersource/transformers.rs`
**Code Patterns Applied:**
- Implement new functions (3 changes)
- Extend existing types with new fields (6 changes)
**Detailed Identifier Changes:**
Commit ca21d64d:
Files to modify:
**crates/router/src/connector/cybersource/transformers.rs**
Add:
- function: private::remove_new_line
- function: private::remove_new_line
- trait: pub::RemoveNewLine
- impl: impl RemoveNewLine for Option<Secret<String>>
- impl: impl RemoveNewLine for Option<String>
|
{"pr_number": 6480, "pr_title": "fix(connector): [Cybersource] remove newline in billing address with space", "merged_at": "2024-11-05T10:52:11Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/router/src/connector/cybersource/transformers.rs"]}, "change_types": {"functions_added": 3, "fields_added": 6}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(payment-link): handle locale in payment links
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
Change Underscore(_) to hyphen(-) in payment link locale according to ISO standards.
### 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).
-->
We need to follow ISO standards when accepting the locale for payment links.
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: **' \
--header 'Accept-Language: zh-hant' \
--data '{
"amount": 10,
"setup_future_usage": "off_session",
"currency": "EUR",
"payment_link": true,
"session_expiry": 60,
"return_url": "https://google.com",
"payment_link_config": {
"theme": "#14356f",
"logo": "https://logo.com/wp-content/uploads/2020/08/zurich.svg",
"seller_name": "Zurich Inc."
}
}'
```
```
zh-hant - should see traditional chinese
zh_hant - english
zh-hant-abcdef - traditional chinese
zh - simplified chinese
Zh - simplified chinese
ZH-HANT - traditional chinese
zh-abcdef - simplified chinese
```
<img width="2560" height="1440" alt="image" src="https://github.com/user-attachments/assets/a1c25820-6e50-480f-96f6-5a831a856bfd" />
<img width="2560" height="1440" alt="image" src="https://github.com/user-attachments/assets/1db9322d-601e-49df-bf2f-6e5f1911d4cd" />
<img width="2560" height="1440" alt="image" src="https://github.com/user-attachments/assets/d934116c-a24a-479d-86e6-9f0b25028400" />
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Core Business Logic**
- `crates/router/src/core/payment_link/locale.js`
|
{"pr_number": 9064, "pr_title": "feat(payment-link): handle locale in payment links", "merged_at": "2025-08-26T16:26:05Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "session"]}, "hierarchy": {"core_business": ["crates/router/src/core/payment_link/locale.js"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
|
ci(cypress): fix mandates unsupported connectors
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [x] CI/CD
## Description
This PR fixes the connectors that do not support mandates. Due to a recent change in the core, `off_session` in the request is downgraded to `on_session`, allowing payments to go through. As a result, the payment_method_id will be `null` for on_session confirm calls. This behavior is handled in the assertions.
### 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
Tests were failing
## How did you test it?
- STRIPE
<img width="703" alt="image" src="https://github.com/user-attachments/assets/6f7a8193-0a27-44f8-bcf4-5e239ee16720" />
- BLUESNAP
<img width="703" alt="image" src="https://github.com/user-attachments/assets/8d638937-b9a7-4886-b26e-b524c8c36731" />
- NMI
<img width="703" alt="image" src="https://github.com/user-attachments/assets/122b8645-ff6e-4171-a80d-eb7f28b265dd" />
- TRUSTPAY
<img width="736" alt="image" src="https://github.com/user-attachments/assets/b29e9807-b529-49ba-b133-54d8e62b0e02" />
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [ ] I formatted the code `cargo +nightly fmt --all`
- [ ] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Tests**
- `cypress-tests/cypress/e2e/configs/Payment/Bluesnap.js`
- `cypress-tests/cypress/e2e/configs/Payment/Commons.js`
- `cypress-tests/cypress/e2e/configs/Payment/Nmi.js`
- ... and 4 more files
**Code Patterns Applied:**
- Extend existing types with new fields (476 changes)
- Add conditional logic for feature flags or filtering (1 changes)
|
{"pr_number": 8086, "pr_title": "ci(cypress): fix mandates unsupported connectors", "merged_at": "2025-05-27T10:31:48Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "connector"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/configs/Payment/Bluesnap.js", "cypress-tests/cypress/e2e/configs/Payment/Commons.js", "cypress-tests/cypress/e2e/configs/Payment/Nmi.js", "cypress-tests/cypress/e2e/configs/Payment/Trustpay.js", "cypress-tests/cypress/e2e/spec/Payment/00003-ConnectorCreate.cy.js", "cypress-tests/cypress/e2e/spec/Payment/00022-Variations.cy.js", "cypress-tests/cypress/support/commands.js"]}, "change_types": {"fields_added": 476, "conditionals_added": 1}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
|
feat(core): add manual retry cutoff duration
## 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 -->
introduces cutoff limit for manual retry
- after the creation of intent, if the cutoff duration is expired, don't allow any payment through manual retry
- cutoff duration is 50% of session expiry set in profile or default (50% of 15 minutes)
- this only happens in case of manual retry i.e doesn't affect the first confirm
### 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
- Update business profile with manual retry enabled and session expiry duration
```
curl --location '{{baseUrl}}/account/{{merchant_id}}/business_profile/{{profile_id}}' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key:{{api_key}}' \
--data '{
"is_manual_retry_enabled": true,
"session_expiry": 120
}'
```
- Create an intent
```
curl --location '{{baseUrl}}/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key:{{api_key}}' \
--data-raw '{
"amount": 10,
"currency": "EUR",
"confirm": false,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"customer_id": "cus_r4hlpxACcjdVr64ypkwQ",
"email": "guest@example.com",
"name": "John Doe",
"phone": "999999999",
"phone_country_code": "+65",
"description": "Its my first payment request",
"authentication_type": "no_three_ds",
"return_url": "https://hyperswitch.io",
"billing": {
"address": {
"city": "test",
"country": "AT",
"line1": "here is some \n there is some \n none is some? \n ",
"line2": "there",
"line3": "anywhere",
"zip": "560095",
"state": "Varaždin County",
"first_name": "S@k!l",
"last_name": "M*st@k"
}
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "AT",
"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"
}'
```
- Instantly do a confirm after the intent creation (failed case)
```
curl --location '{{baseUrl}}/payments/{{payment_Id}}/confirm' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key:{{publishable_key}}' \
--data-raw '{
"payment_method": "card",
"payment_method_data": {
"billing": {
"address": {
"city": "sakilmostak",
"country": "US",
"line1": "here",
"line2": "there",
"line3": "anywhere",
"zip": "560090",
"state": "Washingtonr",
"first_name": "One",
"last_name": "Two"
},
"phone": {
"number": "1234567890",
"country_code": "+1"
},
"email": "guest@example.com"
},
"card": {
"card_number": "4242424242424242",
"card_exp_month": "02",
"card_exp_year": "2026",
"card_holder_name": "Sakil Mostak",
"card_cvc": "999"
}
},
"connector": [
"cybersource"
],
"billing": {
"address": {
"city": "Mostak",
"country": "GB",
"line1": "here is some \n there is some \n none is some? \n ",
"line2": "there",
"line3": "anywhere",
"zip": "560095",
"state": "Varaždin County",
"first_name": "Sakil",
"last_name": "Mostak"
}
},
"client_secret": "pay_HBMbPEDLk4eAPKViLjdo_secret_jCFGoQ3wCB2D529cvMfj",
"browser_info": {
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"language": "nl-NL",
"color_depth": 24,
"screen_height": 723,
"screen_width": 1536,
"time_zone": 0,
"java_enabled": true,
"java_script_enabled": true,
"ip_address": "125.0.0.1"
}
}'
```
- wait for the cutoff duration to be over (1 minute in this case)
- try to confirm the intent again, it should throw the following error
```
{
"error": {
"type": "invalid_request",
"message": "You cannot confirm this payment using `manual_retry` because the allowed duration has expired",
"code": "IR_16"
}
}
```
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Core Business Logic**
- `crates/router/src/core/payments/helpers.rs`
**Code Patterns Applied:**
- Implement new functions (1 changes)
- Extend existing types with new fields (3 changes)
**Detailed Identifier Changes:**
Commit bc549d36:
Files to modify:
**crates/router/src/core/payments/helpers.rs**
Add:
- function: private::validate_manual_retry_cutoff
|
{"pr_number": 9330, "pr_title": "feat(core): add manual retry cutoff duration", "merged_at": "2025-09-18T08:40:02Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/helpers.rs"]}, "change_types": {"functions_added": 1, "fields_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
fix(core): allow accepting liability during arbitration stage
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
Allow accepting liability when the dispute stage is Arbitration
## 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)?
-->
Cannot be tested
## 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
|
To implement this **connector_integration** feature, you'll need to modify these architectural layers:
**1. Core Business Logic**
- `crates/router/src/core/utils.rs`
**Detailed Identifier Changes:**
Commit fb52869c:
Files to modify:
**crates/router/src/core/utils.rs**
Modify existing code
|
{"pr_number": 9504, "pr_title": "fix(core): allow accepting liability during arbitration stage", "merged_at": "2025-09-24T06:25:18Z", "intent": {"feature_type": "connector_integration", "action": "add_feature", "entities": []}, "hierarchy": {"core_business": ["crates/router/src/core/utils.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
chore: enable 128-column-tables feature for diesel crate
## 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 -->
enabled 128-column-tables feature for diesel crate in `diesel_models` and `common_enums` crate. In order to accumulate future addition of columns in payment_attempt
### 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)?
-->
cargo check
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Database Layer (Queries & Schema)**
- `crates/diesel_models/Cargo.toml`
**2. Configuration Files**
- `.github/workflows/CI-pr.yml`
- `.github/workflows/CI-push.yml`
- `crates/common_enums/Cargo.toml`
**Code Patterns Applied:**
- Extend existing types with new fields (11 changes)
|
{"pr_number": 6857, "pr_title": "chore: enable 128-column-tables feature for diesel crate", "merged_at": "2025-01-22T08:11:59Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "order"]}, "hierarchy": {"database": ["crates/diesel_models/Cargo.toml"], "config": [".github/workflows/CI-pr.yml", ".github/workflows/CI-push.yml", "crates/common_enums/Cargo.toml"]}, "change_types": {"fields_added": 11}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
|
refactor(core): made provider field in ctp_service_details backward compatible
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Refactoring
## Description
<!-- Describe your changes in detail -->
made provider field in ctp_service_details backward compatible
## 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)?
-->
Add config to make the merchant eligible for authentication service
```shell
curl --location 'http://localhost:8080/configs/' \
--header 'Content-Type: application/json' \
--header 'api-key: test_admin' \
--data '{
"key": "merchants_eligible_for_authentication_service",
"value": "[\"sahkal\", \"cewqcewc\", \"dqwdwljildwduoqwhduwqcqwjd\"]"
}'
```
Create merchant connector account for Ctp_visa
```shell
{
"connector_type": "authentication_processor",
"connector_name": "ctp_visa",
"connector_account_details": {
"auth_type": "NoKey"
}
}
'
```
Adyen
```shell
curl --location 'http://localhost:8080/account/dqwdwljildwduoqwhduwqcqwjd/connectors' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: test_admin' \
--data '
{
"connector_type": "payment_processor",
"connector_name": "adyen",
"connector_account_details": {
"auth_type": "SignatureKey",
"api_key": "API-KEY",
"key1": "KEY-1",
"api_secret": "API-SECRET"
},
"test_mode": true,
"disabled": false,
"payment_methods_enabled": [
{
"payment_method": "card",
"payment_method_types": [
{
"payment_method_type": "credit",
"card_networks": [
"Visa",
"Mastercard"
],
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_type": "debit",
"card_networks": [
"Visa",
"Mastercard"
],
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
}
],
"metadata": {
"city": "NY",
"unit": "245",
"live_endpoint_prefix": "vsfbjh"
},
"connector_webhook_details": {
"merchant_secret": "MERCHANT SECRET"
},
"business_country": "US",
"business_label": "default"
}
'
```
update business profile with ctp_visa mca_id
```shell
curl --location 'http://localhost:8080/account/dqwdwljildwduoqwhduwqcqwjd/business_profile/pro_KCTRv8sFQfC0r65CZxrn' \
--header 'Content-Type: application/json' \
--header 'api-key: test_admin' \
--data '{
"is_click_to_pay_enabled": true,
"authentication_product_ids": {"click_to_pay": "mca_XAXUpel8ABbpoGNF8lGz"}
}'
```
do payments create
```shell
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_fQsdc9JbERQ7CWvmguo84XDROuXOD1oK9sdfCJXOko3SossoI4zdxpJkOIPmojwn' \
--data '{
"amount": 1130,
"currency": "USD",
"confirm": false,
"return_url": "https://hyperswitch.io"
}
'
```
do payments confirm
```shell
curl --location 'http://localhost:8080/payments/pay_Ft9Ke5Lun924OCJa7yll/confirm' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: pk_dev_1f712ac5fd7f4d8c91da6a627862a4f0' \
--data '
{
"payment_method": "card",
"payment_method_type": "debit",
"client_secret": "pay_Ft9Ke5Lun924OCJa7yll_secret_po1FVW5adQWFolWJUhMb",
"ctp_service_details" : {
"encypted_payload": "eyJraWQiOiJMS1hNMExOOFE2UjdMV1YxOVUwVzEzc01pYjRvNTlRRXBKelpMeVloaXZ5cmNMRWprIiwiYWxnIjoiUlMyNTYiLCJqdGkiOiJNV0V6WWpWalltRXROR0pqWlMwME56ZzFMV0ppWVdFdE56WTJZamxtWlRWa1pXRXciLCJpYXQiOjE3MzYxNDczMTF9.eyJzcmNpVHJhbnNhY3Rpb25JZCI6IjcxZjFhYjQ3LWUzZDMtYzVhNC1lOTAyLTE3OWMyYzc1ZTgwMiIsImFzc3VyYW5jZURhdGEiOnsidmVyaWZpY2F0aW9uRGF0YSI6W3sibWV0aG9kUmVzdWx0cyI6eyJ0cmFuc1N0YXR1cyI6IlkiLCJkc1RyYW5zSWQiOiI4ZGUxMzQyMy1kZTM1LTQ3ZDYtODZhZC1hZmI5OWViZTE5YmMiLCJhY3NUcmFuc0lkIjoiZGMyMGMxYmUtYWM5OC00ZDc5LTg3NjItMDA2YTEwYjllNjYwIn19XSwiZWNpIjoiMDUifSwiZW5jcnlwdGVkUGF5bG9hZCI6ImV5SnJhV1FpT2lJeE1UZ3dNVE13T1RJNE1qUXlNak13T1RJNE5ueEZUVUZKVEVGRVJGSkZVMU05WVd0aGMyZ3VhMkZ0WW14bFFHcDFjM0JoZVM1cGJpd2dUMVU5U2xWVFVFRlpMQ0JQUFVwVlUxQkJXU3dnVEQxQ1FVNUhRVXhQVWtVc0lGTlVQVXRCVWs1QlZFRkxRU3dnUXoxSlRpSXNJblI1Y0NJNklrcFBVMFVpTENKbGJtTWlPaUpCTWpVMlIwTk5JaXdpWVd4bklqb2lVbE5CTFU5QlJWQXRNalUySW4wLlc4U2p6ZUNVd3MyYjRyWHlVbXRheEhsTGMwWlZhLTRJQjNCQURIVTBBNGI1STVjVGs0ckhHcFBpXzExb3d4Uk5aN0doVi1rRjRiMmtGcUlJRmM2TWRaR0ZmODlfTERoOFE2TXB6amlNbDJfbHFxUXI4bkJReUNzaGNXaE1Vd0cwekJNMGU4Smp6YmFhc0p0cEJkTlJ4TDhrU2ljZzVpRzcteHQxWVltMnNGQ0FhaVFscXU2MGtjRzdJOV9iQUJ6MFVsN3NhZVFIRDVlb0pybFM5eFlJOW1KYml0MmxoeWdUYjFpNDJ5bFY3NzBZR2libE9QMWI1WnRReUdDdVVWcTdlY21HOHRUdjhtd3ZfVGZ3Q291NFdzUVI3bElVWnZFTkpENUQzSnpZZE5odlIta2lGcWtWS3YwaGVDNlhzSTNtVFY5OEtCUXl6d3ZHLVducGpOaGFQUS44QzlLWDBadDRQZ0F3SDdNLnZLbHNjTFRtMXhGN09sOTJhUjU1OGpRcG4wN01aaWd2RE00b2dySUlFUmZIMDFrcFB1cHBRM2NQR1EycWpNYVlsZjJaYVJLVktBS0ZXVkQ1SjRJOFBKRzBqZkZwT0hhQTV0QlFjd0pqLW53WlhLZlRaNTY3Z0dUQTl6QTdXNTRiTDVPWTVmUzExY3lpdmJfU0N0RElZdGNYMy1ZWHc3RjlfUHM1RHVYUWV6eFFoMjNhRTZBQjhjVDJMYWlDbzAxMDBTVkNVUTlCZU04cG9GcVpTVDRta1ZJNHJOdE1remRsMDJuVzl0d3J2QUQyVklESWlSX1Zvdk5WUG0xOU5VQ1Z2b0x6U01ZUkR2YWVLZEMxX2cxVC12anJZZzZkamtGTXVkUGZjUUZuQnlMcng1eDMtM05nMzVtWEN4NGFBYThqQ2U2VEFkWHUxTzhoTm1BbzMzbUxTdk1BYXdWeG5iQ2ZuamhpQWY1MGd3cVdyY2hPQ1oyMmp6NVRwbERCZGFzLWdzeEJaY1dYZWZaS0ViS2lsdVhBd3U1NHV2eHhBdnFIZFlnS3QyWFhyejRfQVRoZHgxWmdPVkpXLXRWNG1SVThYUHhNNnJ5Z2VoUkZ1Um9sZy1OeVo2TXlqVlpBYi0tT2J6ZlBOdHhySUhtSzlRTjdxUWdaQ0IwQXFIbHR4MzRhXzA4YmljVkpYOWhaWGYtTDNiVWp3dHVOc1FBWmpGV1VTLVoteGJRamU0cmpVdmo2Z1VWcmdBcnpiZ0FSb0NGZlo2SG5UWGdIS25RaWE4ZDJ5VGZoSTlhVnYxak5hNlp6eG8zZ1BobllhQ1NoNWJrajZ5VGVwREJFZXdPTEE4MFdsakNVMzFuMVgxNm5YZG5QakxhV3o5S3o2UjdvU0ZZekRPYnlxZXI1MDVfenY0cWt4SVplck10c0J1bWc3N2k5ejFtTVM3QU12MS1UMHhWeGp0MVVyNXpjcHdmNDJkN25nanY2UC1Mb2VOTFZXUlNrZUVFTEF0Q2Z0QUNuRkdvZEVlYU9HTHBhWGdlSWNPQTNPN0hfLUEwcGV5SVZheWZ2SV82M050VDhZTnVKSWhFeFJXblkxX19kUFlUUV85TnhiMU9yaG0tTDliR1R0d0F2S1h1aEVvYjNjeVJ1NDVERzVJVUJQdk5OVkRRZkJPNGJuRklFUmV4ODVBXzdwa0M2aUwxeHRVUUloeVJSSlpLdnFUWllHVUlMWnRBZFNkaU1ZUWJDTkdEQ1hzRUljZ2lwLUJscXYxX3ctQk1DNzFTQVl3S2RYVTFfVFpGQlkxOGpROXNFS0ZWd3F3WGNVa1V4M3BGeWY4d2txUEFVelhTdzV0V0tEcnhDWXZZTXpYWFpQZmtOYkhEd3kyWnhwcVdqb0g4bjJJVldWZE5laHB0V3g3cjJweVFjNXYzbl9KWU5DU0xfbk1LUlBtZmNmLWZqMGhaOTF4bm5VZXdVaWxiaVRiMkF4aXJGSjlwcDhYdlNKcE9mTmphWlRLdmJvQjRfVHpEblRzdDZwcnFIVnJNX2lOZVVxZlp1Tm1GWlFHZUk2VDZSc3ZObmhyaWlMWHhZUm5SVHFGTFhjeUJEU08zOE1vaE84akdiYWpzdXdPLXNNNGxlV0Euc2hNMENPWVU3cDRaZ29BU0ludlN2USIsIm1hc2tlZENhcmQiOnsic3JjRGlnaXRhbENhcmRJZCI6ImE0MDYxOWFlYjVkNjdlMDhkOTMyMTNmYzIyZmU1YTAyIiwiZGF0ZU9mQ2FyZENyZWF0ZWQiOiIxOTcwLTAxLTAxVDAwOjAwOjAwLjQ0NloiLCJkYXRlT2ZDYXJkTGFzdFVzZWQiOiIxOTcwLTAxLTAxVDAwOjAwOjAwLjE5M1oiLCJkaWdpdGFsQ2FyZERhdGEiOnsic3RhdHVzIjoiQUNUSVZFIiwicHJlc2VudGF0aW9uTmFtZSI6IkFiaGlzaGVrIENob3JvdGl5YSIsImRlc2NyaXB0b3JOYW1lIjoiT0JOIiwiYXJ0VXJpIjoiaHR0cHM6Ly9zYW5kYm94LmFzc2V0cy52aW1zLnZpc2EuY29tL3ZpbXMvY2FyZGFydC81YWYzNzM0Y2NhNGU0MzllOTdmMDBlNDQ3NGQ4MjQ0N19pbWFnZUFAMngucG5nIiwiYXJ0SGVpZ2h0IjoiMjEwIiwiYXJ0V2lkdGgiOiIzMzQifSwibWFza2VkQmlsbGluZ0FkZHJlc3MiOnsiYWRkcmVzc0lkIjoiOGZkZGZhYWUtZTBkYS03ZDA0LWEyNmYtMTAzMjc2NjQxODAyIiwibGluZTEiOiI2NzMqKioqKiIsImNpdHkiOiIqKioqKiIsInN0YXRlIjoiQ0EiLCJ6aXAiOiIqKioqKiIsImNvdW50cnlDb2RlIjoiVVMifSwicGFuQmluIjoiNDM5NTg0IiwicGFuRXhwaXJhdGlvbk1vbnRoIjoiMTIiLCJwYW5FeHBpcmF0aW9uWWVhciI6IjIwMjUiLCJwYW5MYXN0Rm91ciI6IjAxMTAiLCJwYXltZW50QWNjb3VudFJlZmVyZW5jZSI6IlYwMDEwMDEzMDI0MzI0NTgyNjYwNDkyOTg5OTg2IiwicGF5bWVudENhcmRUeXBlIjoiREVCSVQiLCJ0b2tlbkJpblJhbmdlIjoiNDkwNjI0Njg2IiwidG9rZW5MYXN0Rm91ciI6IjM2NjYifSwibWFza2VkQ29uc3VtZXIiOnsiY291bnRyeUNvZGUiOiJVUyIsIm1hc2tlZENvbnN1bWVySWRlbnRpdHkiOnsiaWRlbnRpdHlUeXBlIjoiRU1BSUxfQUREUkVTUyIsIm1hc2tlZElkZW50aXR5VmFsdWUiOiJhYmgqKkBqdXNwYXkuaW4ifSwibWFza2VkRW1haWxBZGRyZXNzIjoiYWJoKipAanVzcGF5LmluIiwibWFza2VkRmlyc3ROYW1lIjoiQSoqKioqIiwibWFza2VkTGFzdE5hbWUiOiJDKioqKioiLCJtYXNrZWRGdWxsTmFtZSI6IkEqKioqKiBDKioqKioiLCJtYXNrZWRNb2JpbGVOdW1iZXIiOnsiY291bnRyeUNvZGUiOiI5MSIsInBob25lTnVtYmVyIjoiKioqKioqKioyMzY4In0sInNyY0NvbnN1bWVySWQiOiJBVnpuSW5Bb2pLUlgyVitQaVVXS09QeE5iQ3YxNkRDMWQyMlI3UGw0azMwPSIsInN0YXR1cyI6IkFDVElWRSJ9fQ.TDZGI-XbBO3DNkKUu5JIxPcjyqawSeOZWxzcI4K60dKnP-4tf4R1NDVYBkNXqgEuu22edE0Uv55CqqRh5TzqY9iSMrQFJz7ErQ7TVDEa8g3o9UfWvHy4L7Ips36taZR5XaMecaHS9dRH71lGI71Z2-m53AJ_Tcu8QXJaU5roFaKx130pM7NEjnG8wod1xjeL9STm96KfEyRf2Xk0a1SY4oVXIYol2WmTt9ZJhUbpmctZ5u-fxkpH1_-4Plx5g4tA5nZpL5VNFsyYAdUqb8XCAHGyO9buzYtLPI99too0BN_aLICfw8wJ0Jn_b0AMxk28SN9LZdS72aI7oWvVIU73cw",
"provider": "visa"
},
"browser_info": {
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"color_depth": 24,
"java_enabled":true,
"java_script_enabled": true,
"language": "en-GB",
"screen_height": 1440,
"screen_width": 2560,
"time_zone": -330,
"user_agent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Mobile Safari/537.36"
}
}'
```
Expected Response
```shell
{
"payment_id": "pay_Ft9Ke5Lun924OCJa7yll",
"merchant_id": "dqwdwljildwduoqwhduwqcqwjd",
"status": "failed",
"amount": 1130,
"net_amount": 1130,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": null,
"connector": "adyen",
"client_secret": "pay_Ft9Ke5Lun924OCJa7yll_secret_po1FVW5adQWFolWJUhMb",
"created": "2024-12-18T13:00:47.663Z",
"currency": "USD",
"customer_id": null,
"customer": 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": null,
"payment_method": "card",
"payment_method_data": null,
"payment_token": null,
"shipping": null,
"billing": null,
"order_details": null,
"email": null,
"name": null,
"phone": null,
"return_url": "https://hyperswitch.io/",
"authentication_type": "no_three_ds",
"statement_descriptor_name": null,
"statement_descriptor_suffix": null,
"next_action": null,
"cancellation_reason": null,
"error_code": "2",
"error_message": "Refused",
"unified_code": "UE_9000",
"unified_message": "Something went wrong",
"payment_experience": null,
"payment_method_type": "debit",
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": null,
"manual_retry_allowed": true,
"connector_transaction_id": "KN8X64SH6PRRVS65",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": null,
"payment_link": null,
"profile_id": "pro_KCTRv8sFQfC0r65CZxrn",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_L6N77PiH3BI2BTPwkZPL",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2024-12-18T13:15:47.663Z",
"fingerprint": null,
"browser_info": {
"language": "en-GB",
"time_zone": -330,
"ip_address": "::1",
"user_agent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Mobile Safari/537.36",
"color_depth": 24,
"java_enabled": true,
"screen_width": 2560,
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"screen_height": 1440,
"java_script_enabled": true
},
"payment_method_id": null,
"payment_method_status": null,
"updated": "2024-12-18T13:04:08.461Z",
"split_payments": null,
"frm_metadata": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": null
}
```
Reason for it being failed is ayden doesn't support click to pay in sandbox, but does support in production
check that no confirmation call is initiated
## 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
|
To implement this **payment** feature, you'll need to modify these architectural layers:
**1. API Request/Response Models**
- `crates/api_models/src/payments.rs`
**2. Core Business Logic**
- `crates/router/src/core/payments/helpers.rs`
- `crates/router/src/core/unified_authentication_service.rs`
**3. Other**
- `api-reference-v2/openapi_spec.json`
- `api-reference/openapi_spec.json`
**Code Patterns Applied:**
- Extend existing types with new fields (1 changes)
- Add conditional logic for feature flags or filtering (1 changes)
**Detailed Identifier Changes:**
Commit ab3dcea8:
Files to modify:
**crates/api_models/src/payments.rs**
Modify existing code
**crates/router/src/core/payments/helpers.rs**
Modify existing code
**crates/router/src/core/unified_authentication_service.rs**
Modify existing code
|
{"pr_number": 7705, "pr_title": "refactor(core): made provider field in ctp_service_details backward compatible", "merged_at": "2025-04-03T08:13:38Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs"], "core_business": ["crates/router/src/core/payments/helpers.rs", "crates/router/src/core/unified_authentication_service.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json"]}, "change_types": {"fields_added": 1, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
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/7832
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": "something@gmail.com",
"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": "something@gmail.com",
"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": "something@gmail.com",
"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": "something@gmail.com",
"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": "something@gmail.com",
"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": "something@gmail.com",
"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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Core Business Logic**
- `crates/router/src/core/errors/utils.rs`
**2. External Connector Integration**
- `crates/hyperswitch_connectors/src/connectors/bluesnap.rs`
- `crates/hyperswitch_connectors/src/connectors/bluesnap/transformers.rs`
- `crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs`
- ... and 13 more files
**3. Type Definitions**
- `crates/common_utils/src/types.rs`
**4. Utils**
- `crates/common_utils/src/validation.rs`
**5. Other**
- `crates/euclid/src/backend/vir_interpreter.rs`
- `crates/router/src/events/audit_events.rs`
**Code Patterns Applied:**
- Extend existing types with new fields (6 changes)
- Add conditional logic for feature flags or filtering (1 changes)
**Detailed Identifier Changes:**
Commit 716438ca:
Files to modify:
**crates/common_utils/src/types.rs**
Modify existing code
**crates/common_utils/src/validation.rs**
Modify existing code
**crates/euclid/src/backend/vir_interpreter.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/bluesnap.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/bluesnap/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/cryptopay/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/forte/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/noon.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/noon/transformers.rs**
Remove:
- function: private::try_from
- struct: pub::NoonPaypalResponse
- struct: pub::NoonPaypalResponseResult
- impl: impl TryFrom<ResponseRouterData<F, NoonPaypalResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData>
**crates/hyperswitch_connectors/src/connectors/paypal.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/square/transformers.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/volt.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/worldpay.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/zen/transformers.rs**
Modify existing code
**crates/router/src/connector/netcetera/netcetera_types.rs**
Modify existing code
**crates/router/src/connector/netcetera/transformers.rs**
Modify existing code
**crates/router/src/core/errors/utils.rs**
Modify existing code
**crates/router/src/events/audit_events.rs**
Modify existing code
**crates/router/tests/connectors/cashtocode.rs**
Modify existing code
|
{"pr_number": 7856, "pr_title": "fix(connector): [noon] address `next_action_url` being `null` for cards in 3ds payment", "merged_at": "2025-04-21T11:05:17Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/errors/utils.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/bluesnap.rs", "crates/hyperswitch_connectors/src/connectors/bluesnap/transformers.rs", "crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs", "crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs", "crates/hyperswitch_connectors/src/connectors/cryptopay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/forte/transformers.rs", "crates/hyperswitch_connectors/src/connectors/noon.rs", "crates/hyperswitch_connectors/src/connectors/noon/transformers.rs", "crates/hyperswitch_connectors/src/connectors/paypal.rs", "crates/hyperswitch_connectors/src/connectors/square/transformers.rs", "crates/hyperswitch_connectors/src/connectors/volt.rs", "crates/hyperswitch_connectors/src/connectors/worldpay.rs", "crates/hyperswitch_connectors/src/connectors/zen/transformers.rs", "crates/router/src/connector/netcetera/netcetera_types.rs", "crates/router/src/connector/netcetera/transformers.rs", "crates/router/tests/connectors/cashtocode.rs"], "types": ["crates/common_utils/src/types.rs"], "utils": ["crates/common_utils/src/validation.rs"], "other": ["crates/euclid/src/backend/vir_interpreter.rs", "crates/router/src/events/audit_events.rs"]}, "change_types": {"fields_added": 6, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
refactor(dynamic_routing): add support for shuffle on tie flag to success_based routing
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
This pull request introduces a new feature to the routing configuration: the ability to shuffle results on a tie during exploitation. This feature is implemented across multiple files, including API specifications, Rust models, and protocol buffer definitions. Below is a summary of the most important changes grouped by theme.
### Feature Addition: Shuffle on Tie During Exploitation
* **API Specification Update**: Added `shuffle_on_tie_during_exploitation` to the routing configuration in `api-reference/hyperswitch_intelligent_router_open_api_spec.yml`. This parameter enhances routing behavior during exploitation when multiple options have equal success rates.
* **Rust Model Updates**:
- Updated the `SuccessBasedRoutingConfig` default implementation in `crates/api_models/src/routing.rs` to include `shuffle_on_tie_during_exploitation` with a default value of `false`.
- Added `shuffle_on_tie_during_exploitation` as an optional field in the `SuccessBasedRoutingConfigBody` struct to allow API clients to configure this behavior.
- Modified the `update_from` method in `SuccessBasedRoutingConfigBody` to handle updates to the `shuffle_on_tie_during_exploitation` field.
* **Protocol Buffer Update**: Added `shuffle_on_tie_during_exploitation` as an optional field in the `CalSuccessRateConfig` message definition in `proto/success_rate.proto`. This ensures compatibility with external services using gRPC.
* **gRPC Client Update**: Incorporated the new `shuffle_on_tie_during_exploitation` field into the `ForeignTryFrom` implementation for `CalSuccessRateConfig` in `crates/external_services/src/grpc_client/dynamic_routing/success_rate_client.rs`.
### 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)?
-->
1. Create merchant_account, api_key.
2. Toggle SR for the default profile_created above
```
curl --location --request POST 'http://localhost:8080/account/merchant_1748681084/business_profile/pro_3gHXWoq1Xh3AKi6tNZV1/dynamic_routing/success_based/toggle?enable=dynamic_connector_selection' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: xyz'
```
Check the `routing_algorithm` table for `shuffle_on_tie_during_exploitation` field in `algorithm_data` column. By default it will be set to `false`
3. If you want to update it, hit below curl and activate that algorithm_id for profile.
```
curl --location --request PATCH 'http://localhost:8080/account/merchant_1749040696/business_profile/pro_IFPbNQgBfzPAsqXUSAll/dynamic_routing/success_based/config/routing_Vl1hWGUqg203J5WqeCtK' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: xyz' \
--data '{
"config": {
"shuffle_on_tie_during_exploitation": true
}
}
'
```
Check the `routing_algorithm` table for `shuffle_on_tie_during_exploitation` field in `algorithm_data` column for the newly created algorithm above after updating. It should be set to `true`
## 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
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced a new optional configuration parameter to control shuffle behavior during exploitation ties in success-based routing.
- Enhanced payment method information by indicating eligibility for recurring payments and added filtering options for payment methods.
- **Documentation**
- Updated API documentation and example requests to reflect the new configuration option and payment method changes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. API Request/Response Models**
- `crates/api_models/src/routing.rs`
**2. Configuration Files**
- `api-reference/hyperswitch_intelligent_router_open_api_spec.yml`
**3. Other**
- `api-reference-v2/openapi_spec.json`
- `api-reference/openapi_spec.json`
- `crates/external_services/src/grpc_client/dynamic_routing/success_rate_client.rs`
- ... and 1 more files
**Code Patterns Applied:**
- Extend existing types with new fields (4 changes)
- Add conditional logic for feature flags or filtering (1 changes)
**Detailed Identifier Changes:**
Commit c72d365f:
Files to modify:
**crates/api_models/src/routing.rs**
Modify existing code
**crates/external_services/src/grpc_client/dynamic_routing/success_rate_client.rs**
Modify existing code
|
{"pr_number": 8241, "pr_title": "refactor(dynamic_routing): add support for shuffle on tie flag to success_based routing", "merged_at": "2025-06-13T07:05:32Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "connector"]}, "hierarchy": {"api_models": ["crates/api_models/src/routing.rs"], "config": ["api-reference/hyperswitch_intelligent_router_open_api_spec.yml"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/external_services/src/grpc_client/dynamic_routing/success_rate_client.rs", "proto/success_rate.proto"]}, "change_types": {"enums_added": 1, "fields_added": 4, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
fix(routing): Fixed 5xx error logs in dynamic routing metrics
## 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 -->
A 5xx error log in DR metrics was spamming in alerts.
Have removed the log
Main PR - https://github.com/juspay/hyperswitch/pull/7335
### 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)?
-->
make a payment with dynamic routing enabled
5xx error log now converted to 4xx
<img width="1056" alt="image" src="https://github.com/user-attachments/assets/df763221-d26b-47a0-927a-83a5d38d0457" />
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Core Business Logic**
- `crates/router/src/core/routing/helpers.rs`
**Code Patterns Applied:**
- Extend existing types with new fields (32 changes)
- Add conditional logic for feature flags or filtering (6 changes)
**Detailed Identifier Changes:**
Commit 770a08ca:
Files to modify:
**crates/router/src/core/routing/helpers.rs**
Modify existing code
|
{"pr_number": 7356, "pr_title": "fix(routing): Fixed 5xx error logs in dynamic routing metrics", "merged_at": "2025-02-25T13:46:55Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user"]}, "hierarchy": {"core_business": ["crates/router/src/core/routing/helpers.rs"]}, "change_types": {"fields_added": 32, "conditionals_added": 6}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
fix(required_fields_v2): add `payment_required_fields` file in docker
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
## Description
<!-- Describe your changes in detail -->
This PR allows the required fields configuration to be provided by the configuration file in docker.
## 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).
-->
This is necessary since there is no other way to provide the configuration in 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)?
-->
This has been tested on the integ environment
- Create a payment method session
```bash
curl --location 'https://integ-api.hyperswitch.io/v2/payment-methods-session' \
--header 'x-profile-id: pro_KZvF738f3wnMWSIcLGSN' \
--header 'Authorization: api-key=<>' \
--header 'Content-Type: application/json' \
--data-raw '{
"customer_id": "12345_cus_01966c6b108072a1b9aac1e76f7d79f5",
"billing": {
"address": {
"first_name": "John",
"last_name": "Dough"
},
"email": "example@example.com"
}
}'
```
- Call payment method list, check for the required fields
```json
{
"payment_methods_enabled": [
{
"payment_method_type": "card",
"payment_method_subtype": "credit",
"required_fields": [
{
"required_field": "payment_method_data.card.card_number",
"display_name": "card_number",
"field_type": "user_card_number",
"value": null
},
{
"required_field": "payment_method_data.card.card_exp_year",
"display_name": "card_exp_year",
"field_type": "user_card_expiry_year",
"value": null
},
{
"required_field": "payment_method_data.card.card_cvc",
"display_name": "card_cvc",
"field_type": "user_card_cvc",
"value": null
},
{
"required_field": "payment_method_data.card.card_exp_month",
"display_name": "card_exp_month",
"field_type": "user_card_expiry_month",
"value": null
}
]
},
{
"payment_method_type": "card",
"payment_method_subtype": "debit",
"required_fields": []
}
],
"customer_payment_methods": []
}
```
|
To implement this **payment** feature, you'll need to modify these architectural layers:
**1. Other**
- `Dockerfile`
|
{"pr_number": 7720, "pr_title": "fix(required_fields_v2): add `payment_required_fields` file in docker ", "merged_at": "2025-04-30T11:34:53Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["customer", "payment", "user"]}, "hierarchy": {"other": ["Dockerfile"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
|
feat(connector): [AIRWALLEX] Add refferer data to whitelist hyperswitch
## 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 referrer data in Airwallex's Create Payment Intent request in order to whitelist Hyperswitch for processing raw card details.
### 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).
-->
https://github.com/juspay/hyperswitch/issues/6807
## 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)?
-->
Testing can be done by verifying payment logs for Airwallex payments
<img width="1276" alt="Screenshot 2024-12-11 at 5 28 08 PM" src="https://github.com/user-attachments/assets/55f4ce53-6e38-46be-9055-d0ea50dd7b0c">
Payments Request:
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_cEY8PgIkrpv1Y8pe0oVj6izFmGmxSlhrtV78ead9czZGWd5vp4h2GK8iLtenibs7' \
--data '{
"amount": 8059,
"currency": "USD",
"confirm": true,
"capture_method": "automatic",
"authentication_type": "no_three_ds",
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4035 5010 0000 0008",
"card_exp_month": "10",
"card_exp_year": "25",
"card_holder_name": "Joseph Doe",
"card_cvc": "123"
}
}
}'
```
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. External Connector Integration**
- `crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs`
**Code Patterns Applied:**
- Define new data structures (1 changes)
- Extend existing types with new fields (5 changes)
**Detailed Identifier Changes:**
Commit ed276ecc:
Files to modify:
**crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs**
Add:
- struct: pub::ReferrerData
|
{"pr_number": 6806, "pr_title": "feat(connector): [AIRWALLEX] Add refferer data to whitelist hyperswitch", "merged_at": "2024-12-16T09:28:55Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "order"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs"]}, "change_types": {"structs_added": 1, "fields_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
fix(connector): [Adyen] Add MYR currency config
## 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 have following changes
- Add MYR to currency config for adyen
- change default error code as UE_9000 to UE_000
### 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`
-->
This PR has following changes
- Add MYR currency config
- Change default error code to UE_9000 to UE_000 (This needs data migrations in translation table to provide support for localization).
## 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 applepay via adyen connector with currency MYR. This is already tested with custom deployment.
<img width="955" alt="Screenshot 2024-10-28 at 11 33 06 AM" src="https://github.com/user-attachments/assets/4e5d6a8f-36a1-4cd3-b559-78ed0aeba50b">
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Tests**
- `config/deployments/integration_test.toml`
**2. Configuration Files**
- `config/deployments/production.toml`
- `config/deployments/sandbox.toml`
- `config/development.toml`
- ... and 1 more files
**3. Other**
- `crates/router/src/consts.rs`
**Detailed Identifier Changes:**
Commit 925e4240:
Files to modify:
**crates/router/src/consts.rs**
Modify existing code
|
{"pr_number": 6442, "pr_title": "fix(connector): [Adyen] Add MYR currency config ", "merged_at": "2024-10-28T14:16:48Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user", "connector"]}, "hierarchy": {"tests": ["config/deployments/integration_test.toml"], "config": ["config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"], "other": ["crates/router/src/consts.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(authentication): create api for update profile acquirer
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] New feature
## Description
<!-- Describe your changes in detail -->
create api for update profile acquirer, and provide list of profile acquirer in business profile response than Hashmap
## 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 a new profile_acquirer
```shell
curl --location 'localhost:8080/profile_acquirer' \
--header 'Content-Type: application/json' \
--header 'api-key: dev_AYvecwNzOtafts59Ge4y2y5umw8dtmn0QBXPsqiMXcE5ZN1Pv9FOHVXTvwxWgaTM' \
--data '{
"acquirer_assigned_merchant_id": "xwcqwcqcqwcqwqfdqwfqwfwfccawuchwfcqw",
"merchant_name": "Demo Merchant",
"merchant_country_code": "US",
"network": "AmericanExpress",
"acquirer_bin": "400000",
"acquirer_fraud_rate": 0.243255,
"profile_id": "pro_gSwzuodwRMA2mXrCYGrK"
}'
```
Do business profile retreive
```shell
curl --location 'localhost:8080/account/sahkal/business_profile/pro_gSwzuodwRMA2mXrCYGrK' \
--header 'api-key: dev_AYvecwNzOtafts59Ge4y2y5umw8dtmn0QBXPsqiMXcE5ZN1Pv9FOHVXTvwxWgaTM'
```
In response you should be able to see acquirer_details block, with the acquirer you have created
```shell
{
"merchant_id": "sahkal",
"profile_id": "pro_gSwzuodwRMA2mXrCYGrK",
"profile_name": "US_default",
"return_url": "https://google.com/success",
"enable_payment_response_hash": true,
"payment_response_hash_key": "fOfh5f67bOvfxYBg0UcrtJjfiDx8f5eKsnqAzFZOvOKpEMbik06n0YTV6QiwyIne",
"redirect_to_merchant_with_http_post": false,
"webhook_details": {
"webhook_version": "1.0.1",
"webhook_username": "ekart_retail",
"webhook_password": "password_ekart@123",
"webhook_url": null,
"payment_created_enabled": true,
"payment_succeeded_enabled": true,
"payment_failed_enabled": true
},
"metadata": null,
"routing_algorithm": null,
"intent_fulfillment_time": 900,
"frm_routing_algorithm": null,
"payout_routing_algorithm": null,
"applepay_verified_domains": null,
"session_expiry": 900,
"payment_link_config": null,
"authentication_connector_details": null,
"use_billing_as_payment_method_billing": true,
"extended_card_info_config": null,
"collect_shipping_details_from_wallet_connector": false,
"collect_billing_details_from_wallet_connector": false,
"always_collect_shipping_details_from_wallet_connector": false,
"always_collect_billing_details_from_wallet_connector": false,
"is_connector_agnostic_mit_enabled": false,
"payout_link_config": null,
"outgoing_webhook_custom_http_headers": null,
"tax_connector_id": null,
"is_tax_connector_enabled": false,
"is_network_tokenization_enabled": false,
"is_auto_retries_enabled": false,
"max_auto_retries_enabled": null,
"always_request_extended_authorization": null,
"is_click_to_pay_enabled": false,
"authentication_product_ids": null,
"card_testing_guard_config": {
"card_ip_blocking_status": "disabled",
"card_ip_blocking_threshold": 3,
"guest_user_card_blocking_status": "disabled",
"guest_user_card_blocking_threshold": 10,
"customer_id_blocking_status": "disabled",
"customer_id_blocking_threshold": 5,
"card_testing_guard_expiry": 3600
},
"is_clear_pan_retries_enabled": false,
"force_3ds_challenge": false,
"is_debit_routing_enabled": false,
"merchant_business_country": null,
"is_pre_network_tokenization_enabled": false,
"acquirer_configs": [
{
"profile_acquirer_id": "pro_acq_hloZJpjhbUl7jIOVYK1j",
"acquirer_assigned_merchant_id": "xwcqwhghyggcqcqwcqwqfdqwfqwfwfccawuchwfcqw",
"merchant_name": "Demo Merchant",
"merchant_country_code": "US",
"network": "AmericanExpress",
"acquirer_bin": "400000",
"acquirer_ica": null,
"acquirer_fraud_rate": 0.2765,
"profile_id": "pro_gSwzuodwRMA2mXrCYGrK"
},
{
"profile_acquirer_id": "pro_acq_oLCWaUxKlQ0ZbE7ZYQgB",
"acquirer_assigned_merchant_id": "xwcqwcqcqwcqwqfdqwfqwfwfccawuchwfcqw",
"merchant_name": "Demo Merchant",
"merchant_country_code": "US",
"network": "AmericanExpress",
"acquirer_bin": "400000",
"acquirer_ica": null,
"acquirer_fraud_rate": 0.243255,
"profile_id": "pro_gSwzuodwRMA2mXrCYGrK"
}
],
"is_iframe_redirection_enabled": null
}
```
Update Profile acquirer
```shell
curl --location 'localhost:8080/profile_acquirer/pro_gSwzuodwRMA2mXrCYGrK/pro_acq_oLCWaUxKlQ0ZbE7ZYQgB' \
--header 'Content-Type: application/json' \
--header 'api-key: dev_AYvecwNzOtafts59Ge4y2y5umw8dtmn0QBXPsqiMXcE5ZN1Pv9FOHVXTvwxWgaTM' \
--data '{
"acquirer_assigned_merchant_id": "xwcqwcxwqcwqdqwdqwdwqqwfcqw",
"merchant_name": "Demo Merchant",
"merchant_country_code": "US",
"network": "Visa",
"acquirer_bin": "400000",
"acquirer_fraud_rate": 0.15
}'
```
Now do business profile retrieve to check on the updated list
```shell
curl --location 'localhost:8080/account/sahkal/business_profile/pro_gSwzuodwRMA2mXrCYGrK' \
--header 'api-key: dev_AYvecwNzOtafts59Ge4y2y5umw8dtmn0QBXPsqiMXcE5ZN1Pv9FOHVXTvwxWgaTM'
```
Response
```shell
{
"merchant_id": "sahkal",
"profile_id": "pro_gSwzuodwRMA2mXrCYGrK",
"profile_name": "US_default",
"return_url": "https://google.com/success",
"enable_payment_response_hash": true,
"payment_response_hash_key": "fOfh5f67bOvfxYBg0UcrtJjfiDx8f5eKsnqAzFZOvOKpEMbik06n0YTV6QiwyIne",
"redirect_to_merchant_with_http_post": false,
"webhook_details": {
"webhook_version": "1.0.1",
"webhook_username": "ekart_retail",
"webhook_password": "password_ekart@123",
"webhook_url": null,
"payment_created_enabled": true,
"payment_succeeded_enabled": true,
"payment_failed_enabled": true
},
"metadata": null,
"routing_algorithm": null,
"intent_fulfillment_time": 900,
"frm_routing_algorithm": null,
"payout_routing_algorithm": null,
"applepay_verified_domains": null,
"session_expiry": 900,
"payment_link_config": null,
"authentication_connector_details": null,
"use_billing_as_payment_method_billing": true,
"extended_card_info_config": null,
"collect_shipping_details_from_wallet_connector": false,
"collect_billing_details_from_wallet_connector": false,
"always_collect_shipping_details_from_wallet_connector": false,
"always_collect_billing_details_from_wallet_connector": false,
"is_connector_agnostic_mit_enabled": false,
"payout_link_config": null,
"outgoing_webhook_custom_http_headers": null,
"tax_connector_id": null,
"is_tax_connector_enabled": false,
"is_network_tokenization_enabled": false,
"is_auto_retries_enabled": false,
"max_auto_retries_enabled": null,
"always_request_extended_authorization": null,
"is_click_to_pay_enabled": false,
"authentication_product_ids": null,
"card_testing_guard_config": {
"card_ip_blocking_status": "disabled",
"card_ip_blocking_threshold": 3,
"guest_user_card_blocking_status": "disabled",
"guest_user_card_blocking_threshold": 10,
"customer_id_blocking_status": "disabled",
"customer_id_blocking_threshold": 5,
"card_testing_guard_expiry": 3600
},
"is_clear_pan_retries_enabled": false,
"force_3ds_challenge": false,
"is_debit_routing_enabled": false,
"merchant_business_country": null,
"is_pre_network_tokenization_enabled": false,
"acquirer_configs": [
{
"profile_acquirer_id": "pro_acq_hloZJpjhbUl7jIOVYK1j",
"acquirer_assigned_merchant_id": "xwcqwhghyggcqcqwcqwqfdqwfqwfwfccawuchwfcqw",
"merchant_name": "Demo Merchant",
"merchant_country_code": "US",
"network": "AmericanExpress",
"acquirer_bin": "400000",
"acquirer_ica": null,
"acquirer_fraud_rate": 0.2765,
"profile_id": "pro_gSwzuodwRMA2mXrCYGrK"
},
{
"profile_acquirer_id": "pro_acq_oLCWaUxKlQ0ZbE7ZYQgB",
"acquirer_assigned_merchant_id": "xwcqwcxwqcwqdqwdqwdwqqwfcqw",
"merchant_name": "Demo Merchant",
"merchant_country_code": "US",
"network": "Visa",
"acquirer_bin": "400000",
"acquirer_ica": null,
"acquirer_fraud_rate": 0.15,
"profile_id": "pro_gSwzuodwRMA2mXrCYGrK"
}
],
"is_iframe_redirection_enabled": 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
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit
- **New Features**
- Introduced API endpoints to create, list, and update Profile Acquirers, enabling users to manage acquirer configurations linked to business profiles.
- Enhanced profile creation to optionally include multiple acquirer configurations.
- **Bug Fixes**
- Added new error responses for cases when a profile acquirer is not found.
- **Documentation**
- Extended API documentation with new Profile Acquirer endpoints and schema components.
- **Database**
- Added a new JSONB field to store acquirer configuration data within business profiles.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
To implement this **payment** feature, you'll need to modify these architectural layers:
**1. API Request/Response Models**
- `crates/api_models/src/admin.rs`
- `crates/api_models/src/profile_acquirer.rs`
**2. Domain Models (Business Logic Types)**
- `crates/hyperswitch_domain_models/src/errors/api_error_response.rs`
**3. Core Business Logic**
- `crates/router/src/core/profile_acquirer.rs`
**4. Type Definitions**
- `crates/router/src/types/api/admin.rs`
- `crates/router_env/src/logger/types.rs`
**5. Utils**
- `crates/common_utils/src/id_type/profile_acquirer.rs`
- `crates/router/src/routes/lock_utils.rs`
**6. Other**
- `api-reference/openapi_spec.json`
- `crates/openapi/src/openapi.rs`
- `crates/openapi/src/routes/profile_acquirer.rs`
- ... and 3 more files
**Code Patterns Applied:**
- Define new data structures (2 changes)
- Implement new functions (7 changes)
- Extend existing types with new fields (43 changes)
**Detailed Identifier Changes:**
Commit d33e344f:
Files to modify:
**crates/api_models/src/admin.rs**
Modify existing code
**crates/api_models/src/profile_acquirer.rs**
Add:
- function: private::from
- struct: pub::ProfileAcquirerUpdate
- impl: impl From<(
common_utils::id_type::ProfileAcquirerId,
&common_utils::id_type::ProfileId,
&common_types::domain::AcquirerConfig,
)> for ProfileAcquirerResponse
- impl: impl common_utils::events::ApiEventMetric for ProfileAcquirerUpdate
**crates/common_utils/src/id_type/profile_acquirer.rs**
Add:
- function: private::cmp
- function: private::partial_cmp
- impl: impl Ord for ProfileAcquirerId
- impl: impl PartialOrd for ProfileAcquirerId
**crates/hyperswitch_domain_models/src/errors/api_error_response.rs**
Modify existing code
**crates/openapi/src/openapi.rs**
Modify existing code
**crates/openapi/src/routes/profile_acquirer.rs**
Add:
- function: pub::profile_acquirer_update
**crates/router/src/compatibility/stripe/errors.rs**
Modify existing code
**crates/router/src/core/profile_acquirer.rs**
Modify existing code
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/routes/lock_utils.rs**
Modify existing code
**crates/router/src/routes/profile_acquirer.rs**
Add:
- function: pub::profile_acquirer_update
**crates/router/src/types/api/admin.rs**
Add:
- function: private::from
- struct: pub::ProfileAcquirerConfigs
- impl: impl From<ProfileAcquirerConfigs> for Option<Vec<api_models::profile_acquirer::ProfileAcquirerResponse>>
**crates/router_env/src/logger/types.rs**
Modify existing code
|
{"pr_number": 8307, "pr_title": "feat(authentication): create api for update profile acquirer", "merged_at": "2025-06-12T12:41:02Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/admin.rs", "crates/api_models/src/profile_acquirer.rs"], "domain": ["crates/hyperswitch_domain_models/src/errors/api_error_response.rs"], "core_business": ["crates/router/src/core/profile_acquirer.rs"], "types": ["crates/router/src/types/api/admin.rs", "crates/router_env/src/logger/types.rs"], "utils": ["crates/common_utils/src/id_type/profile_acquirer.rs", "crates/router/src/routes/lock_utils.rs"], "other": ["api-reference/openapi_spec.json", "crates/openapi/src/openapi.rs", "crates/openapi/src/routes/profile_acquirer.rs", "crates/router/src/compatibility/stripe/errors.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/profile_acquirer.rs"]}, "change_types": {"structs_added": 2, "functions_added": 7, "fields_added": 43, "imports_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(router): add api models and openapi changes for payments submit eligibility api
## 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 api models and openapi changes for payments submit eligibility api
### 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).
-->
Introduce a /eligibility POST API that the SDK can call before payments confirm to decide the course of action for that particular payment. This can include the next action block, extended payment method information, payment method eligibility, temp payment method data, etc.
## 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)?
-->
Testing is not required as this PR contains only api model changes, core flow to be added
Run `mintlify dev` locally to test api-reference changes
<img width="3086" height="1970" alt="image" src="https://github.com/user-attachments/assets/c4f2372f-eb28-428d-a1cd-66d9578f55b5" />
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. API Request/Response Models**
- `crates/api_models/src/payments.rs`
**2. Other**
- `api-reference/docs.json`
- `api-reference/v1/openapi_spec_v1.json`
- `api-reference/v1/payments/payments--submit-eligibility-data.mdx`
- ... and 3 more files
**Code Patterns Applied:**
- Define new data structures (2 changes)
- Implement new functions (1 changes)
- Extend existing types with new fields (5 changes)
**Detailed Identifier Changes:**
Commit dea34c45:
Files to modify:
**crates/api_models/src/payments.rs**
Add:
- struct: pub::PaymentsEligibilityRequest
- struct: pub::PaymentsEligibilityResponse
**crates/openapi/src/openapi.rs**
Modify existing code
**crates/openapi/src/routes/payments.rs**
Add:
- function: pub::payments_submit_eligibility
|
{"pr_number": 9568, "pr_title": "feat(router): add api models and openapi changes for payments submit eligibility api", "merged_at": "2025-10-01T13:15:54Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs"], "other": ["api-reference/docs.json", "api-reference/v1/openapi_spec_v1.json", "api-reference/v1/payments/payments--submit-eligibility-data.mdx", "api-reference/v2/openapi_spec_v2.json", "crates/openapi/src/openapi.rs", "crates/openapi/src/routes/payments.rs"]}, "change_types": {"structs_added": 2, "functions_added": 1, "fields_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
fix: Fixed Contract Updation in Dynamic Routing flow
## 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 -->
Fixed the contract updation when contract is not set in dynamo. If contract is not set, we'll set in the same flow.
This fixes an issue.
### 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)?
-->
Same as https://github.com/juspay/hyperswitch/pull/6761
New error log -

## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Core Business Logic**
- `crates/router/src/core/errors.rs`
- `crates/router/src/core/payments/routing.rs`
- `crates/router/src/core/routing/helpers.rs`
**2. Other**
- `crates/external_services/src/grpc_client/dynamic_routing.rs`
- `crates/external_services/src/grpc_client/dynamic_routing/contract_routing_client.rs`
**Code Patterns Applied:**
- Extend existing types with new fields (7 changes)
**Detailed Identifier Changes:**
Commit 0aa526b8:
Files to modify:
**crates/external_services/src/grpc_client/dynamic_routing.rs**
Modify existing code
**crates/external_services/src/grpc_client/dynamic_routing/contract_routing_client.rs**
Modify existing code
**crates/router/src/core/errors.rs**
Modify existing code
**crates/router/src/core/payments/routing.rs**
Modify existing code
**crates/router/src/core/routing/helpers.rs**
Modify existing code
|
{"pr_number": 7272, "pr_title": "fix: Fixed Contract Updation in Dynamic Routing flow", "merged_at": "2025-02-25T18:55:45Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"core_business": ["crates/router/src/core/errors.rs", "crates/router/src/core/payments/routing.rs", "crates/router/src/core/routing/helpers.rs"], "other": ["crates/external_services/src/grpc_client/dynamic_routing.rs", "crates/external_services/src/grpc_client/dynamic_routing/contract_routing_client.rs"]}, "change_types": {"fields_added": 7, "imports_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
fix(routing): update_gateway_score_condition
## 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 updates the dynamic routing logic to ensure that update_gateway_score_helper_with_open_router is invoked only when the payment_attempt.routing_approach is either:
SuccessRateExploitation or SuccessRateExploration.
This updates the routing logic and the payment response tracker to improve how routing approaches are interpreted and when gateway scores are updated. The main changes clarify the mapping of routing approaches and ensure that gateway score updates are only triggered for specific routing strategies.
Routing approach mapping improvements:
* Added support for `"DEFAULT"` to map to `SuccessRateExploration` in `RoutingApproach::from_decision_engine_approach`, making the handling of default approaches more consistent. (`crates/common_enums/src/enums.rs`)
Payment response update logic:
* Changed the gateway score update condition in `payment_response_update_tracker` to require both dynamic routing to be enabled and the routing approach to be success-rate based, preventing updates for approaches that do not use success rate logic. (`crates/router/src/core/payments/operations/payment_response.rs`)
This pull request updates routing logic to ensure that gateway score updates via Open Router only occur for success rate-based routing approaches. It also refines the mapping from decision engine approaches to routing approaches, making the behavior for the `"DEFAULT"` case more consistent.
Routing logic improvements:
* In `payment_response_update_tracker`, gateway score updates using Open Router are now restricted to cases where the routing approach is either `SuccessRateExploitation` or `SuccessRateExploration`, instead of being applied for all dynamic routing.
Routing approach mapping changes:
* In `RoutingApproach::from_decision_engine_approach`, the `"DEFAULT"` case is now mapped to `SuccessRateExploration` (alongside `"SR_V3_HEDGING"`), and is no longer mapped to `StraightThroughRouting`, improving consistency in approach selection.
<!--
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`
-->
## How did you test it?
sr_based
```
curl --location 'http://localhost:8080/account/merchant_1758275545/business_profile/pro_RiCX7Rsxbd4WReAR9TEh/dynamic_routing/success_based/create?enable=dynamic_connector_selection' \
--header 'Content-Type: application/json' \
--header 'api-key: *****' \
--data '{
"decision_engine_configs": {
"defaultBucketSize": 200,
"defaultHedgingPercent": 5
}
}'
```
```
{
"id": "routing_S27CKCr6Mp8e3VmUnGf0",
"profile_id": "pro_RiCX7Rsxbd4WReAR9TEh",
"name": "Success rate based dynamic routing algorithm",
"kind": "dynamic",
"description": "",
"created_at": 1758275557,
"modified_at": 1758275557,
"algorithm_for": "payment",
"decision_engine_routing_id": null
}
```
activate
```
curl --location 'http://localhost:8080/routing/routing_S27CKCr6Mp8e3VmUnGf0/activate' \
--header 'Content-Type: application/json' \
--header 'api-key: *****' \
--data '{}'
```
```
{
"id": "routing_S27CKCr6Mp8e3VmUnGf0",
"profile_id": "pro_RiCX7Rsxbd4WReAR9TEh",
"name": "Success rate based dynamic routing algorithm",
"kind": "dynamic",
"description": "",
"created_at": 1758275557,
"modified_at": 1758275557,
"algorithm_for": "payment",
"decision_engine_routing_id": null
}
```
volume split
```
curl --location --request POST 'http://localhost:8080/account/merchant_1758275545/business_profile/pro_RiCX7Rsxbd4WReAR9TEh/dynamic_routing/set_volume_split?split=20' \
--header 'api-key: *****'
```
```
{
"routing_type": "dynamic",
"split": 20
}
```
payment
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: *****' \
--data-raw '{
"amount": 6540,
"currency": "USD",
"amount_to_capture": 6540,
"confirm": true,
"profile_id": "pro_RiCX7Rsxbd4WReAR9TEh",
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"authentication_type": "no_three_ds",
"setup_future_usage": "on_session",
"customer": {
"id": "customer123",
"name": "John Doe",
"email": "customer@gmail.com",
"phone": "9999999999",
"phone_country_code": "+1"
},
"customer_id": "customer123",
"phone_country_code": "+1",
"description": "Its my first payment request",
"return_url": "https://google.com",
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4242424242424242",
"card_exp_month": "10",
"card_exp_year": "25",
"card_holder_name": "joseph Doe",
"card_cvc": "123"
}
},
"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": "8056594427",
"country_code": "+91"
},
"email": "guest@example.com"
},
"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"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": "guest@example.com"
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"order_details": [
{
"product_name": "Apple iphone 15",
"quantity": 1,
"amount": 6540,
"account_name": "transaction_processing"
}
],
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
},
"browser_info": {
"user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
"accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
"language": "nl-NL",
"color_depth": 24,
"screen_height": 723,
"screen_width": 1536,
"time_zone": 0,
"java_enabled": true,
"java_script_enabled": true,
"ip_address": "128.0.0.1"
},
"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"
}
},
"connector_metadata": {
"noon": {
"order_category": "pay"
}
},
"payment_link": false,
"payment_link_config": {
"theme": "",
"logo": "",
"seller_name": "",
"sdk_layout": "",
"display_sdk_only": false,
"enabled_saved_payment_method": false
},
"payment_type": "normal",
"request_incremental_authorization": false,
"merchant_order_reference_id": "test_ord",
"session_expiry": 900
}'
```
```
{
"payment_id": "pay_QifEdH91f7xnl124ICdD",
"merchant_id": "merchant_1758275545",
"status": "succeeded",
"amount": 6540,
"net_amount": 6540,
"shipping_cost": null,
"amount_capturable": 6540,
"amount_received": 6540,
"connector": "stripe",
"client_secret": "pay_QifEdH91f7xnl124ICdD",
"created": "2025-09-19T10:16:18.704Z",
"currency": "USD",
"customer_id": "customer123",
"customer": {
"id": "customer123",
"name": "John Doe",
"email": "customer@gmail.com",
"phone": "9999999999",
"phone_country_code": "+1"
},
"description": "Its my first payment request",
"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": null,
"card_network": null,
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "424242",
"card_extended_bin": null,
"card_exp_month": "10",
"card_exp_year": "25",
"card_holder_name": "joseph Doe",
"payment_checks": {
"cvc_check": "pass",
"address_line1_check": "pass",
"address_postal_code_check": "pass"
},
"authentication_data": null
},
"billing": null
},
"payment_token": null,
"shipping": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe",
"origin_zip": null
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": "guest@example.com"
},
"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",
"origin_zip": null
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": "guest@example.com"
},
"order_details": [
{
"sku": null,
"upc": null,
"brand": null,
"amount": 6540,
"category": null,
"quantity": 1,
"tax_rate": null,
"product_id": null,
"description": null,
"product_name": "Apple iphone 15",
"product_type": null,
"sub_category": null,
"total_amount": null,
"commodity_code": null,
"unit_of_measure": null,
"product_img_link": null,
"product_tax_code": null,
"total_tax_amount": null,
"requires_shipping": null,
"unit_discount_amount": null
}
],
"email": "customer@gmail.com",
"name": "John Doe",
"phone": "9999999999",
"return_url": "https://google.com/",
"authentication_type": "no_three_ds",
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"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": "customer123",
"created_at": 1758276978,
"expires": 1758280578,
"secret": "epk_721a0329318e4cb4bc8075b73c371a07"
},
"manual_retry_allowed": null,
"connector_transaction_id": "pi_3S91MVD5R7gDAGff06OHFTNL",
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": {
"apple_pay": null,
"airwallex": null,
"noon": {
"order_category": "pay"
},
"braintree": null,
"adyen": null
},
"feature_metadata": {
"redirect_response": null,
"search_tags": null,
"apple_pay_recurring_details": null,
"gateway_system": "direct"
},
"reference_id": "pi_3S91MVD5R7gDAGff06OHFTNL",
"payment_link": null,
"profile_id": "pro_RiCX7Rsxbd4WReAR9TEh",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_4NgqlrfFxugpnylD8XPF",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-09-19T10:31:18.704Z",
"fingerprint": null,
"browser_info": {
"language": "nl-NL",
"time_zone": 0,
"ip_address": "128.0.0.1",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
"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_channel": null,
"payment_method_id": null,
"network_transaction_id": "104557651805572",
"payment_method_status": null,
"updated": "2025-09-19T10:16:20.099Z",
"split_payments": null,
"frm_metadata": null,
"extended_authorization_applied": false,
"capture_before": null,
"merchant_order_reference_id": "test_ord",
"order_tax_amount": null,
"connector_mandate_id": null,
"card_discovery": "manual",
"force_3ds_challenge": false,
"force_3ds_challenge_trigger": false,
"issuer_error_code": null,
"issuer_error_message": null,
"is_iframe_redirection_enabled": null,
"whole_connector_response": null,
"enable_partial_authorization": null,
"enable_overcapture": null,
"is_overcapture_enabled": false,
"network_details": null
}
```
## Screenshot
<img width="1319" height="326" alt="Screenshot 2025-09-19 at 7 09 13 PM" src="https://github.com/user-attachments/assets/d0c17cc5-f3cb-41bf-af65-212f9e36af41" />
<img width="1326" height="311" alt="Screenshot 2025-09-19 at 7 06 13 PM" src="https://github.com/user-attachments/assets/2ef8bd31-fd08-4441-9a80-2c201d008b35" />
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Core Business Logic**
- `crates/router/src/core/payments/operations/payment_response.rs`
**2. Other**
- `crates/common_enums/src/enums.rs`
**Code Patterns Applied:**
- Add conditional logic for feature flags or filtering (1 changes)
- Modify database queries (1 changes)
**Detailed Identifier Changes:**
Commit 31f1cd77:
Files to modify:
**crates/common_enums/src/enums.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_response.rs**
Modify existing code
|
{"pr_number": 9452, "pr_title": "fix(routing): update_gateway_score_condition", "merged_at": "2025-09-25T18:03:31Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/operations/payment_response.rs"], "other": ["crates/common_enums/src/enums.rs"]}, "change_types": {"conditionals_added": 1, "database_queries": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
refactor(connector): [Rapyd] fix amount conversion framework
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
fix amount conversion framework for Rapyd
According to doc - https://docs.rapyd.net/en/create-payment.html , amount should be of FloatType (BaseUnit).
### 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?
We can not test it, as we dont have credentials for Rapyd connector
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. External Connector Integration**
- `crates/hyperswitch_connectors/src/connectors/rapyd.rs`
- `crates/hyperswitch_connectors/src/connectors/rapyd/transformers.rs`
**Code Patterns Applied:**
- Implement new functions (1 changes)
- Extend existing types with new fields (6 changes)
**Detailed Identifier Changes:**
Commit 8f1bab62:
Files to modify:
**crates/hyperswitch_connectors/src/connectors/rapyd.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/rapyd/transformers.rs**
Modify existing code
|
{"pr_number": 7466, "pr_title": "refactor(connector): [Rapyd] fix amount conversion framework", "merged_at": "2025-03-10T17:54:07Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "connector"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/rapyd.rs", "crates/hyperswitch_connectors/src/connectors/rapyd/transformers.rs"]}, "change_types": {"functions_added": 1, "fields_added": 6, "imports_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(payments): [Payment links] add showCardFormByDefault config for payment links
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [X] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Add showCardFormByDefault config for payment links.
https://docs.hyperswitch.io/explore-hyperswitch/merchant-controls/integration-guide/web/customization#show-card-form-by-default
Functionality:
(By default showCardFormByDefault is true.)
When in PML card is not present + showCardFormByDefault=false, then card form is hidden from the UI. In all other cases card form is shown in UI.
### 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)?
-->
<details>
<summary>1. Create a connector with only wallets in `payment_methods_enabled` (Expand to see details) </summary>
```
"payment_methods_enabled": [
{
"payment_method": "wallet",
"payment_method_types": [
{
"payment_method_type": "paypal",
"payment_experience": "redirect_to_url",
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "google_pay",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
},
{
"payment_method_type": "apple_pay",
"payment_experience": "invoke_sdk_client",
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
}
]
```
</details>
<details>
<summary>2. Update `allowed_domains` in business profile (Expand to see details)</summary>
```
curl --location 'http://localhost:8080/account/merchant_1721984694/business_profile/pro_oXHnmgfZSnfe92PvodqP' \
--header 'Content-Type: application/json' \
--header 'api-key: test_admin' \
--data '{
"payment_link_config": {
"allowed_domains": [
"*"
],
"enabled_saved_payment_method": true,
"hide_card_nickname_field" : true
}
}'
```
</details>
<details>
<summary>3. Create a payment link with `show_card_form_by_default = false` (Expand to see details)</summary>
```
curl --location --request POST 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_pSNneiwGWnPCMmVN3DgFWEKnQsirXbr4HDO5xkNSidBhPg3MnEa3wHyXyhngDsbS' \
--data-raw '{
"amount": 100,
"currency": "USD",
"payment_link": true,
"connector": [
"novalnet"
],
"session_expiry": 1000000,
"return_url": "http://127.0.0.1:5500/src/pl_iframe.html",
"payment_link_config": {
"theme": "#14356f",
"logo": "https://logosandtypes.com/wp-content/uploads/2020/08/zurich.svg",
"seller_name": "Zurich Inc.",
"show_card_form_by_default": false
}
}'
```
Response of /payments
`{
"payment_id": "pay_FmjZdNGEcf4Vkttj9wgF",
"merchant_id": "merchant_1732539663",
"status": "requires_payment_method",
"amount": 100,
"net_amount": 100,
"shipping_cost": null,
"amount_capturable": 100,
"amount_received": null,
"connector": null,
"client_secret": "pay_FmjZdNGEcf4Vkttj9wgF_secret_rMdkJoz3AqMb9E7lD3JC",
"created": "2024-11-26T09:52:37.464Z",
"currency": "USD",
"customer_id": null,
"customer": 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": null,
"payment_method": null,
"payment_method_data": null,
"payment_token": null,
"shipping": null,
"billing": null,
"order_details": null,
"email": null,
"name": null,
"phone": null,
"return_url": "http://127.0.0.1:5500/src/pl_iframe.html",
"authentication_type": null,
"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": null,
"connector_transaction_id": null,
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": null,
"payment_link": {
"link": "http://localhost:8080/payment_link/merchant_1732539663/pay_FmjZdNGEcf4Vkttj9wgF?locale=en",
"secure_link": "http://localhost:8080/payment_link/s/merchant_1732539663/pay_FmjZdNGEcf4Vkttj9wgF?locale=en",
"payment_link_id": "plink_EYi1uYFwZ0TBAQcJKVDH"
},
"profile_id": "pro_WY0cgeQScEEXmVNzGWqV",
"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": "2024-12-07T23:39:17.336Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2024-11-26T09:52:37.572Z",
"charges": null,
"frm_metadata": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": null
}`
</details>
<details><summary>4. Screenshots (Expand to see details)</summary>
Open the secure payment link (`secure_link` in API response) in an iframe for validating the functionality. For checking payment_link simply click on the payment_link (`payment_link` in API response)
**Screenshot for payment link**
<img width="1505" alt="Screenshot 2024-11-26 at 15 36 03" src="https://github.com/user-attachments/assets/3be48130-24ad-497e-913e-845cff652b96">
**Screenshot for secured payment link**
<img width="1187" alt="Screenshot 2024-11-26 at 15 34 49" src="https://github.com/user-attachments/assets/78939335-197f-4c75-844e-6bc85dad06ba">
**Expected Behavior:** Since PML consists of only wallets and not cards, and `show_card_form_by_default` is `false` the card form is not shown by default
</details>
<details>
<summary>5. Create a payment link with `show_card_form_by_default = true` (Expand to see details)</summary>
```
curl --location --request POST 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_pSNneiwGWnPCMmVN3DgFWEKnQsirXbr4HDO5xkNSidBhPg3MnEa3wHyXyhngDsbS' \
--data-raw '{
"amount": 100,
"currency": "USD",
"payment_link": true,
"connector": [
"novalnet"
],
"session_expiry": 1000000,
"return_url": "http://127.0.0.1:5500/src/pl_iframe.html",
"payment_link_config": {
"theme": "#14356f",
"logo": "https://logosandtypes.com/wp-content/uploads/2020/08/zurich.svg",
"seller_name": "Zurich Inc.",
"show_card_form_by_default": true
}
}'
```
Response of /payments
`{
"payment_id": "pay_t5OgMwdSEHCg0JEgaKyM",
"merchant_id": "merchant_1732616040",
"status": "requires_payment_method",
"amount": 100,
"net_amount": 100,
"shipping_cost": null,
"amount_capturable": 100,
"amount_received": null,
"connector": null,
"client_secret": "pay_t5OgMwdSEHCg0JEgaKyM_secret_36NNyT20Ol3HOs9qLghA",
"created": "2024-11-26T10:14:46.689Z",
"currency": "USD",
"customer_id": null,
"customer": 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": null,
"payment_method": null,
"payment_method_data": null,
"payment_token": null,
"shipping": null,
"billing": null,
"order_details": null,
"email": null,
"name": null,
"phone": null,
"return_url": "http://127.0.0.1:5500/src/pl_iframe.html",
"authentication_type": null,
"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": null,
"connector_transaction_id": null,
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": null,
"payment_link": {
"link": "http://localhost:8080/payment_link/merchant_1732616040/pay_t5OgMwdSEHCg0JEgaKyM?locale=en",
"secure_link": "http://localhost:8080/payment_link/s/merchant_1732616040/pay_t5OgMwdSEHCg0JEgaKyM?locale=en",
"payment_link_id": "plink_py51CKCnCY4qvK98SDMu"
},
"profile_id": "pro_ElaKfgKnFwT7Eo348xeM",
"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": "2024-12-08T00:01:26.671Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2024-11-26T10:14:46.743Z",
"charges": null,
"frm_metadata": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": null
}`
</details>
<details><summary>6. Screenshots (Expand to see details)</summary>
Open the secure payment link (`secure_link` in API response) in an iframe for validating the functionality. For checking payment_link simply click on the payment_link (`payment_link` in API response)
**Screenshot for payment link**
<img width="1508" alt="Screenshot 2024-11-26 at 15 45 06" src="https://github.com/user-attachments/assets/5d9221ba-359f-4736-84b0-67e80474b69a">
**Screenshot for secured payment link**
<img width="1508" alt="Screenshot 2024-11-26 at 15 48 32" src="https://github.com/user-attachments/assets/d77fc127-4d95-4936-958f-490f52fb6121">
**Expected Behavior:** Since PML consists of only wallets and not cards, and `show_card_form_by_default` is `true` the card form is shown by default
</details>
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. API Request/Response Models**
- `crates/api_models/src/admin.rs`
- `crates/api_models/src/payments.rs`
**2. Database Layer (Queries & Schema)**
- `crates/diesel_models/src/business_profile.rs`
- `crates/diesel_models/src/payment_intent.rs`
**3. Domain Models (Business Logic Types)**
- `crates/hyperswitch_domain_models/src/lib.rs`
**4. Core Business Logic**
- `crates/router/src/core/payment_link.rs`
- `crates/router/src/core/payment_link/payment_link_initiate/payment_link_initiator.js`
- `crates/router/src/core/payment_link/payment_link_initiate/secure_payment_link_initiator.js`
- ... and 1 more files
**5. Type Definitions**
- `crates/router/src/types/transformers.rs`
**6. Other**
- `api-reference-v2/openapi_spec.json`
- `api-reference/openapi_spec.json`
- `crates/router/src/consts.rs`
**Code Patterns Applied:**
- Extend existing types with new fields (17 changes)
**Detailed Identifier Changes:**
Commit b1d10733:
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/consts.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/types/transformers.rs**
Modify existing code
|
{"pr_number": 6663, "pr_title": "feat(payments): [Payment links] add showCardFormByDefault config for payment links", "merged_at": "2024-11-29T10:48:09Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/admin.rs", "crates/api_models/src/payments.rs"], "database": ["crates/diesel_models/src/business_profile.rs", "crates/diesel_models/src/payment_intent.rs"], "domain": ["crates/hyperswitch_domain_models/src/lib.rs"], "core_business": ["crates/router/src/core/payment_link.rs", "crates/router/src/core/payment_link/payment_link_initiate/payment_link_initiator.js", "crates/router/src/core/payment_link/payment_link_initiate/secure_payment_link_initiator.js", "crates/router/src/core/payments/transformers.rs"], "types": ["crates/router/src/types/transformers.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/router/src/consts.rs"]}, "change_types": {"fields_added": 17}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
fix: payment link styling for dynamic classes
## 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 introduces
- modification of the behavior of appending the `payment_link_ui_rules` to the CSS instead of selecting and applying it to the retrieved elements at runtime.
- expose `color_icon_card_cvc_error` via API for SDK variables
### 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
This change allows for styling the payment link UI elements using CSS rules.
## How did you test it?
Steps for testing -
<details>
<summary>1. Create a payment link with dynamic selectors in `payment_link_ui_rules`</summary>
cURL
curl --location --request POST 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_mCD2MU1TfvKQkyMLkTKg6aeNkN8JHVGSllEqGrC0wbSnWNMtGmzrgYPFMwlx8Atl' \
--data-raw '{"authentication_type":"three_ds","customer_id":"cus_Qy5sr7VpE3tRoUh7M1W1","profile_id":"pro_A69LEikrut4ROWAXoTnm","customer_acceptance":{"acceptance_type":"online","accepted_at":"1963-05-03T04:07:52.723Z","online":{"ip_address":"127.0.0.1","user_agent":"amet irure esse"}},"amount":0,"currency":"USD","confirm":false,"payment_link":true,"session_expiry":12600,"billing":{"address":{},"email":"random@juspay.in"},"return_url":"https://www.example.com","payment_link_config":{"logo":"https://hyperswitch.io/favicon.ico","display_sdk_only":true,"payment_button_text":"Save Card","enable_button_only_on_form_ready":true,"color_icon_card_cvc_error":"#CB4B40","payment_link_ui_rules":{"#submit":{"color":"#ffffff !important","border":"1px solid #b2b2b2 !important","borderRadius":"0 !important","fontSize":"13px !important","backgroundColor":"#b2b2b2 !important","height":"25px !important","width":"max-content !important","padding":"0 8px","margin":"0 4px 0 auto"},"#submit.not-ready":{"color":"#b2b2b2 !important","border":"1px solid #b2b2b2 !important","backgroundColor":"#ffffff !important"},"#submit-spinner":{"width":"20px !important","height":"20px !important","border":"2px solid #fff !important","borderBottomColor":"#c2c2c2 !important"}},"background_image":{"url":"https://img.freepik.com/free-photo/abstract-blue-geometric-shapes-background_24972-1841.jpg","position":"bottom","size":"cover"}}}'
</details>
<details>
<summary>2. Open the payment link and fill in the form (Save Card button's color should update)</summary>
<img width="589" alt="Screenshot 2025-06-06 at 1 49 47 PM" src="https://github.com/user-attachments/assets/918e152b-0ac0-4a81-860f-2a7740ef8d6b" />
<img width="605" alt="Screenshot 2025-06-06 at 1 49 53 PM" src="https://github.com/user-attachments/assets/e243b8a0-3be8-45b7-ae40-dd37dbacf15a" />
</details>
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. API Request/Response Models**
- `crates/api_models/src/admin.rs`
- `crates/api_models/src/payments.rs`
**2. Database Layer (Queries & Schema)**
- `crates/diesel_models/src/business_profile.rs`
- `crates/diesel_models/src/payment_intent.rs`
**3. Domain Models (Business Logic Types)**
- `crates/hyperswitch_domain_models/src/lib.rs`
**4. Core Business Logic**
- `crates/router/src/core/payment_link.rs`
- `crates/router/src/core/payment_link/payment_link_initiate/payment_link.css`
- `crates/router/src/core/payment_link/payment_link_initiate/payment_link.js`
- ... and 3 more files
**5. Type Definitions**
- `crates/router/src/types/transformers.rs`
**6. Other**
- `api-reference-v2/openapi_spec.json`
- `api-reference/openapi_spec.json`
**Code Patterns Applied:**
- Implement new functions (4 changes)
- Extend existing types with new fields (18 changes)
- Add conditional logic for feature flags or filtering (8 changes)
**Detailed Identifier Changes:**
Commit be3fc6c7:
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**
Add:
- function: private::camel_to_kebab
- function: private::generate_dynamic_css
- function: private::get_payment_link_css_script
**crates/router/src/core/payments/transformers.rs**
Modify existing code
**crates/router/src/types/transformers.rs**
Modify existing code
|
{"pr_number": 8273, "pr_title": "fix: payment link styling for dynamic classes", "merged_at": "2025-06-10T11:08:21Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "user"]}, "hierarchy": {"api_models": ["crates/api_models/src/admin.rs", "crates/api_models/src/payments.rs"], "database": ["crates/diesel_models/src/business_profile.rs", "crates/diesel_models/src/payment_intent.rs"], "domain": ["crates/hyperswitch_domain_models/src/lib.rs"], "core_business": ["crates/router/src/core/payment_link.rs", "crates/router/src/core/payment_link/payment_link_initiate/payment_link.css", "crates/router/src/core/payment_link/payment_link_initiate/payment_link.js", "crates/router/src/core/payment_link/payment_link_initiate/payment_link_initiator.js", "crates/router/src/core/payment_link/payment_link_initiate/secure_payment_link_initiator.js", "crates/router/src/core/payments/transformers.rs"], "types": ["crates/router/src/types/transformers.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json"]}, "change_types": {"functions_added": 4, "fields_added": 18, "imports_added": 2, "conditionals_added": 8}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(users): store and retrieve lineage_context from DB instead of Redis
## 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 -->
Previously, the user's `lineage_context` (userid, org_id, merchant_id, profile_id, role_id, tenant_id) was cached in Redis.
This PR moves the storage and retrieval of `lineage_context` to the PostgreSQL `users` table instead of Redis.
This ensures permanent persistence of lineage_context in DB, as opposed to the 7 days TTL when stored in Redis.
### Key Changes
- **Schema Change:**
- Added `lineage_context` as a `JSONB` column in the `users` table.
- **During Login:**
- Attempt to fetch `lineage_context` from DB (`users.lineage_context`).
- If present:
- Validate the context by checking if a matching user role exists (checks both v1 and v2 user roles).
- If valid → use it for JWT generation.
- If not → fallback to default DB-based role resolution.
- If not present → fallback directly to default role resolution.
- DB update for the new lineage context is now done via `tokio::spawn` to avoid blocking response.
- **During Org/Merchant/Profile Switch:**
- After switching, the new `lineage_context` is serialized and persisted in the `users` table.
- This enables restoring the last used context during the next login.
- The update is done in the background using `tokio::spawn` with success and failure logs.
- **Error Handling:**
- All DB failures or deserialization errors are logged.
- Failures do not interrupt the login/switch flow — safe fallback ensures continuity.
### Additional Changes
- [ ] 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
<!--
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).
-->
By moving the `lineage_context` to the `users` table in DB:
- We ensure the context is consistently available regardless of deployment environment.
- The last used account context becomes part of the user's persistent record.
- It simplifies logic and avoids prefix mismatches across tenants.
## 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)?
-->
<img width="1732" alt="Screenshot 2025-04-29 at 11 45 43 PM" src="https://github.com/user-attachments/assets/77a3ab50-add4-4091-b291-0bbe178bf617" />

#### Test Case 1: Lineage Context Caching on Login
1. Log in as a user with an assigned role.
2. Check that `lineage_context` is stored in the `users` table (PostgreSQL).
3. Log out and log back in → verify that the JWT reflects the same org/merchant/profile context without role fallback.
#### Test Case 2: Lineage Context Update on Org/Profile Switch
1. Log in as a user and switch to another org/merchant/profile.
2. Confirm that the updated context is persisted in the `lineage_context` field in the DB.
3. Log out and log in again → JWT should reflect the newly switched context.
#### Test Case 3: Fallback to Role Resolution upon clearing lineage_context in db (Tested on local)
1. Manually removed `lineage_context` from the DB for a user.
2. Logged in again → verified that the system correctly falls back to the default role resolution logic.
3. Confirm that the context is repopulated in the DB after login.
#### Test Case 4: Fallback to Role Resolution upon deleting user_role (Tested on local)
1. Manually deleted `user_role` from the DB for a user (user_role corresponds to user invited to another account)
2. Tried to log in again → verified that the system correctly falls back to the default role resolution logic.
3. Confirm that the context is repopulated in the DB after login.
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. API Request/Response Models**
- `crates/api_models/src/user/theme.rs`
**2. Database Layer (Queries & Schema)**
- `crates/diesel_models/src/query/user/theme.rs`
- `crates/diesel_models/src/schema.rs`
- `crates/diesel_models/src/schema_v2.rs`
- ... and 2 more files
**3. Core Business Logic**
- `crates/common_utils/src/types/user/core.rs`
- `crates/router/src/core/recon.rs`
- `crates/router/src/core/user.rs`
- ... and 1 more files
**4. Type Definitions**
- `crates/common_utils/src/types.rs`
- `crates/common_utils/src/types/user.rs`
- `crates/common_utils/src/types/theme.rs`
- ... and 3 more files
**5. Utils**
- `crates/router/src/utils/user.rs`
- `crates/router/src/utils/user/theme.rs`
**6. Configuration Files**
- `crates/router/src/configs/settings.rs`
**7. Other**
- `crates/router/src/consts/user.rs`
- `crates/router/src/db/kafka_store.rs`
- `crates/router/src/db/user.rs`
- ... and 5 more files
**Code Patterns Applied:**
- Define new data structures (1 changes)
- Implement new functions (1 changes)
- Extend existing types with new fields (26 changes)
- Add conditional logic for feature flags or filtering (2 changes)
- Modify database queries (1 changes)
**Detailed Identifier Changes:**
Commit 6f22a930:
Files to modify:
**crates/api_models/src/user/theme.rs**
Modify existing code
**crates/common_utils/src/types.rs**
Remove:
- mod: pub::theme
Add:
- mod: pub::user
**crates/common_utils/src/types/user.rs**
Add:
- mod: pub::core
- mod: pub::theme
**crates/common_utils/src/types/user/core.rs**
Add:
- struct: pub::LineageContext
**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.rs**
Modify existing code
**crates/diesel_models/src/user/theme.rs**
Modify existing code
**crates/router/src/configs/settings.rs**
Modify existing code
**crates/router/src/consts/user.rs**
Modify existing code
**crates/router/src/core/recon.rs**
Modify existing code
**crates/router/src/core/user.rs**
Modify existing code
**crates/router/src/core/user/theme.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/db/user/theme.rs**
Modify existing code
**crates/router/src/routes/user/theme.rs**
Modify existing code
**crates/router/src/services/email/types.rs**
Modify existing code
**crates/router/src/types/domain/user.rs**
Remove:
- function: pub::try_get_lineage_context_from_cache
- function: pub::try_set_lineage_context_in_cache
- struct: pub::LineageContext
- impl: impl LineageContext
**crates/router/src/types/domain/user/decision_manager.rs**
Modify existing code
**crates/router/src/utils/user.rs**
Remove:
- function: pub::get_lineage_context_from_cache
**crates/router/src/utils/user/theme.rs**
Modify existing code
**crates/router/src/workflows/api_key_expiry.rs**
Modify existing code
|
{"pr_number": 7940, "pr_title": "feat(users): store and retrieve lineage_context from DB instead of Redis", "merged_at": "2025-05-13T08:13:43Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant", "user"]}, "hierarchy": {"api_models": ["crates/api_models/src/user/theme.rs"], "database": ["crates/diesel_models/src/query/user/theme.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs", "crates/diesel_models/src/user.rs", "crates/diesel_models/src/user/theme.rs"], "core_business": ["crates/common_utils/src/types/user/core.rs", "crates/router/src/core/recon.rs", "crates/router/src/core/user.rs", "crates/router/src/core/user/theme.rs"], "types": ["crates/common_utils/src/types.rs", "crates/common_utils/src/types/user.rs", "crates/common_utils/src/types/theme.rs", "crates/router/src/services/email/types.rs", "crates/router/src/types/domain/user.rs", "crates/router/src/types/domain/user/decision_manager.rs"], "utils": ["crates/router/src/utils/user.rs", "crates/router/src/utils/user/theme.rs"], "config": ["crates/router/src/configs/settings.rs"], "other": ["crates/router/src/consts/user.rs", "crates/router/src/db/kafka_store.rs", "crates/router/src/db/user.rs", "crates/router/src/db/user/theme.rs", "crates/router/src/routes/user/theme.rs", "crates/router/src/workflows/api_key_expiry.rs", "migrations/2025-04-29-144409_add_lineage_context_to_users/down.sql", "migrations/2025-04-29-144409_add_lineage_context_to_users/up.sql"]}, "change_types": {"structs_added": 1, "functions_added": 1, "fields_added": 26, "imports_added": 15, "conditionals_added": 2, "database_queries": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(connector): [Tokenex]Add external vault insert and retrieve flows
## 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 external vault insert - tokenize and retrieve - detokenize flows for tokenex vault connector
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
<!--
Provide links to the files with corresponding changes.
Following are the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->
## Motivation and Context
<!--
Why is this change required? What problem does it solve?
If it fixes an open issue, please link to the issue here.
If you don't have an issue, we'd recommend starting with one first so the PR
can focus on the implementation (unless it is an obvious bug or documentation fix
that will have little conversation).
-->
## How did you test it?
<!--
Did you write an integration/unit/API test to verify the code changes?
Or did you test this change manually (provide relevant screenshots)?
-->
Currently this cannot be tested.
since external vault support is added in this pr - https://github.com/juspay/hyperswitch/pull/9274
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. API Request/Response Models**
- `crates/api_models/src/enums.rs`
**2. Core Business Logic**
- `crates/router/src/core/connector_validation.rs`
- `crates/router/src/core/unified_connector_service.rs`
**3. External Connector Integration**
- `crates/common_enums/src/connector_enums.rs`
- `crates/connector_configs/src/connector.rs`
- `crates/connector_configs/toml/development.toml`
- ... and 7 more files
**4. Type Definitions**
- `crates/router/src/types/api/feature_matrix.rs`
**5. Other**
- `api-reference/v1/openapi_spec_v1.json`
- `api-reference/v2/openapi_spec_v2.json`
**Code Patterns Applied:**
- Define new data structures (5 changes)
- Implement new functions (3 changes)
- Extend existing types with new fields (34 changes)
**Detailed Identifier Changes:**
Commit 62b64d84:
Files to modify:
**crates/api_models/src/enums.rs**
Modify existing code
**crates/common_enums/src/connector_enums.rs**
Modify existing code
**crates/connector_configs/src/connector.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/tokenex.rs**
Remove:
- function: pub::new
- function: private::validate_mandate_payment
- function: private::validate_psync_reference_id
- 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::Tokenex
- impl: impl Tokenex
- impl: impl ConnectorValidation for Tokenex
- impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Tokenex
- impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Tokenex
- impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Tokenex
- impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Tokenex
Add:
- struct: pub::Tokenex
- impl: impl api::ExternalVaultInsert for Tokenex
- impl: impl api::ExternalVault for Tokenex
- impl: impl api::ExternalVaultRetrieve for Tokenex
- impl: impl ConnectorValidation for Tokenex
- impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Tokenex
- impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Tokenex
- impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Tokenex
- impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Tokenex
- impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Tokenex
- impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Tokenex
- impl: impl ConnectorIntegration<ExternalVaultInsertFlow, VaultRequestData, VaultResponseData> for tokenex::TokenexInsertRequest::try_from(req)
- mod: pub::auth_headers
**crates/hyperswitch_connectors/src/connectors/tokenex/transformers.rs**
Remove:
- struct: pub::TokenexPaymentsRequest
Add:
- struct: pub::TokenexInsertRequest
**crates/hyperswitch_connectors/src/default_implementations.rs**
Modify existing code
**crates/router/src/core/connector_validation.rs**
Modify existing code
**crates/router/src/core/unified_connector_service.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/src/types/connector_transformers.rs**
Modify existing code
**crates/router/tests/connectors/tokenex.rs**
Modify existing code
**crates/test_utils/src/connector_auth.rs**
Modify existing code
|
{"pr_number": 9470, "pr_title": "feat(connector): [Tokenex]Add external vault insert and retrieve flows ", "merged_at": "2025-09-23T08:38:56Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["connector", "token"]}, "hierarchy": {"api_models": ["crates/api_models/src/enums.rs"], "core_business": ["crates/router/src/core/connector_validation.rs", "crates/router/src/core/unified_connector_service.rs"], "connectors": ["crates/common_enums/src/connector_enums.rs", "crates/connector_configs/src/connector.rs", "crates/connector_configs/toml/development.toml", "crates/hyperswitch_connectors/src/connectors/tokenex.rs", "crates/hyperswitch_connectors/src/connectors/tokenex/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/router/src/types/api/connector_mapping.rs", "crates/router/src/types/connector_transformers.rs", "crates/router/tests/connectors/tokenex.rs", "crates/test_utils/src/connector_auth.rs"], "types": ["crates/router/src/types/api/feature_matrix.rs"], "other": ["api-reference/v1/openapi_spec_v1.json", "api-reference/v2/openapi_spec_v2.json"]}, "change_types": {"structs_added": 5, "functions_added": 3, "fields_added": 34, "imports_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(framework): Added diff-checker required code and running ucs in shadow mode
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Added a fork using tokio::spawn and sent the cloned router data to UCS,
Added some headers for identification of connector, flow, req-id
called the validation service to send both router data for comparison.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [x] 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Domain Models (Business Logic Types)**
- `crates/hyperswitch_domain_models/src/mandates.rs`
- `crates/hyperswitch_domain_models/src/payment_address.rs`
- `crates/hyperswitch_domain_models/src/payment_method_data.rs`
- ... and 4 more files
**2. Core Business Logic**
- `crates/router/src/core/payments.rs`
- `crates/router/src/core/payments/flows.rs`
- `crates/router/src/core/payments/flows/authorize_flow.rs`
- ... and 5 more files
**3. External Connector Integration**
- `crates/external_services/src/grpc_client/unified_connector_service.rs`
**4. Type Definitions**
- `crates/hyperswitch_interfaces/src/types.rs`
**5. Utils**
- `crates/common_utils/src/consts.rs`
- `crates/common_utils/src/errors.rs`
**6. Configuration Files**
- `crates/router/src/configs/secrets_transformers.rs`
- `crates/router/src/configs/settings.rs`
**7. Other**
- `crates/common_enums/src/enums.rs`
- `crates/external_services/src/grpc_client.rs`
- `crates/external_services/src/http_client/client.rs`
- ... and 2 more files
**Code Patterns Applied:**
- Define new data structures (2 changes)
- Implement new functions (14 changes)
- Extend existing types with new fields (123 changes)
- Add conditional logic for feature flags or filtering (12 changes)
**Detailed Identifier Changes:**
Commit 115ef10a:
Files to modify:
**crates/common_enums/src/enums.rs**
Add:
- enum: pub::ExecutionMode
**crates/common_utils/src/consts.rs**
Modify existing code
**crates/common_utils/src/errors.rs**
Modify existing code
**crates/external_services/src/grpc_client.rs**
Modify existing code
**crates/external_services/src/grpc_client/unified_connector_service.rs**
Modify existing code
**crates/external_services/src/http_client/client.rs**
Add:
- function: private::apply_mitm_certificate
**crates/hyperswitch_domain_models/src/mandates.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/payment_address.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/payment_method_data.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/payments.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/router_data.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/router_request_types.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/router_response_types.rs**
Modify existing code
**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**
Add:
- struct: pub::ComparisonServiceConfig
**crates/router/src/core/payments.rs**
Add:
- function: private::process_through_ucs
- function: private::process_through_direct
- function: private::process_through_direct_with_shadow_unified_connector_service
- function: private::execute_shadow_unified_connector_service_call
**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/external_proxy_flow.rs**
Modify existing code
**crates/router/src/core/payments/flows/psync_flow.rs**
Modify existing code
**crates/router/src/core/payments/flows/setup_mandate_flow.rs**
Modify existing code
**crates/router/src/core/payments/retry.rs**
Modify existing code
**crates/router/src/core/unified_connector_service.rs**
Modify existing code
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/services/api.rs**
Modify existing code
|
{"pr_number": 9684, "pr_title": "feat(framework): Added diff-checker required code and running ucs in shadow mode", "merged_at": "2025-10-10T12:36:56Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["connector"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/mandates.rs", "crates/hyperswitch_domain_models/src/payment_address.rs", "crates/hyperswitch_domain_models/src/payment_method_data.rs", "crates/hyperswitch_domain_models/src/payments.rs", "crates/hyperswitch_domain_models/src/router_data.rs", "crates/hyperswitch_domain_models/src/router_request_types.rs", "crates/hyperswitch_domain_models/src/router_response_types.rs"], "core_business": ["crates/router/src/core/payments.rs", "crates/router/src/core/payments/flows.rs", "crates/router/src/core/payments/flows/authorize_flow.rs", "crates/router/src/core/payments/flows/external_proxy_flow.rs", "crates/router/src/core/payments/flows/psync_flow.rs", "crates/router/src/core/payments/flows/setup_mandate_flow.rs", "crates/router/src/core/payments/retry.rs", "crates/router/src/core/unified_connector_service.rs"], "connectors": ["crates/external_services/src/grpc_client/unified_connector_service.rs"], "types": ["crates/hyperswitch_interfaces/src/types.rs"], "utils": ["crates/common_utils/src/consts.rs", "crates/common_utils/src/errors.rs"], "config": ["crates/router/src/configs/secrets_transformers.rs", "crates/router/src/configs/settings.rs"], "other": ["crates/common_enums/src/enums.rs", "crates/external_services/src/grpc_client.rs", "crates/external_services/src/http_client/client.rs", "crates/router/src/routes/app.rs", "crates/router/src/services/api.rs"]}, "change_types": {"structs_added": 2, "functions_added": 14, "enums_added": 1, "fields_added": 123, "imports_added": 12, "conditionals_added": 12}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(coingate): Add Crypto Pay 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 -->
Added CryptoPay Flow
Only Two flows Payments Create and Sync
### 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)?
-->
Connector Create Curl
```
curl --location 'http://localhost:8080/account/merchant_1739268599/connectors' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: test_admin' \
--data '{
"connector_type": "payment_processor",
"connector_name": "coingate",
"connector_account_details": {
"auth_type": "HeaderKey",
"api_key": ""
},
"test_mode": false,
"disabled": false,
"payment_methods_enabled": [
{
"payment_method": "crypto",
"payment_method_types": [
{
"payment_method_type": "crypto_currency",
"payment_experience": "redirect_to_url",
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 0,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": false
}
]
}
],
"business_country": "US",
"business_label": "default"
}'
```
Request
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_isF11oplPFfEvTVcAICY47B3W9N7Xip4UF5ppPhM7g9N5lvDrcZUSB2hxUPxisHN' \
--data-raw '{
"amount": 300,
"currency": "EUR",
"confirm": true,
"email": "guest@example.com",
"return_url": "https://google.com",
"payment_method": "crypto",
"payment_method_type": "crypto_currency",
"payment_experience": "redirect_to_url",
"payment_method_data": {
"crypto": {
}
}
}'
```
Response
```
{
"payment_id": "pay_dmsfeC8clkLz2kTJ8Qs4",
"merchant_id": "merchant_1739268599",
"status": "requires_customer_action",
"amount": 300,
"net_amount": 300,
"shipping_cost": null,
"amount_capturable": 300,
"amount_received": null,
"connector": "coingate",
"client_secret": "pay_dmsfeC8clkLz2kTJ8Qs4_secret_8mweYn4Gu9YxNPaSzz2f",
"created": "2025-02-12T06:20:09.284Z",
"currency": "EUR",
"customer_id": null,
"customer": {
"id": null,
"name": null,
"email": "guest@example.com",
"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": null,
"payment_method": "crypto",
"payment_method_data": {
"crypto": {
"pay_currency": null,
"network": null
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": null,
"order_details": null,
"email": null,
"name": null,
"phone": null,
"return_url": "https://google.com/",
"authentication_type": "no_three_ds",
"statement_descriptor_name": null,
"statement_descriptor_suffix": null,
"next_action": {
"type": "redirect_to_url",
"redirect_to_url": "http://localhost:8080/payments/redirect/pay_dmsfeC8clkLz2kTJ8Qs4/merchant_1739268599/pay_dmsfeC8clkLz2kTJ8Qs4_1"
},
"cancellation_reason": null,
"error_code": null,
"error_message": null,
"unified_code": null,
"unified_message": null,
"payment_experience": "redirect_to_url",
"payment_method_type": "crypto_currency",
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": null,
"manual_retry_allowed": null,
"connector_transaction_id": "206246",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": "",
"payment_link": null,
"profile_id": "pro_CTnbxCVt74LIw4DF8QKg",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_3UnJt6gF5ysJgXcsRl8o",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-02-12T06:35:09.284Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2025-02-12T06:20:10.730Z",
"split_payments": null,
"frm_metadata": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": null
}
```
Psync
```
{
"payment_id": "pay_dmsfeC8clkLz2kTJ8Qs4",
"merchant_id": "merchant_1739268599",
"status": "succeeded",
"amount": 300,
"net_amount": 300,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": 300,
"connector": "coingate",
"client_secret": "pay_dmsfeC8clkLz2kTJ8Qs4_secret_8mweYn4Gu9YxNPaSzz2f",
"created": "2025-02-12T06:20:09.284Z",
"currency": "EUR",
"customer_id": null,
"customer": {
"id": null,
"name": null,
"email": "guest@example.com",
"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": null,
"payment_method": "crypto",
"payment_method_data": {
"crypto": {
"pay_currency": null,
"network": null
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": null,
"order_details": null,
"email": null,
"name": null,
"phone": null,
"return_url": "https://google.com/",
"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": "redirect_to_url",
"payment_method_type": "crypto_currency",
"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": "206246",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": "",
"payment_link": null,
"profile_id": "pro_CTnbxCVt74LIw4DF8QKg",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_3UnJt6gF5ysJgXcsRl8o",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-02-12T06:35:09.284Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2025-02-12T06:21:04.392Z",
"split_payments": null,
"frm_metadata": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": null
}
```
<img width="1212" alt="Screenshot 2025-02-12 at 11 50 54 AM" src="https://github.com/user-attachments/assets/82f9dbf8-4bdd-4c2d-a69b-388b5e024afd" />
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Core Business Logic**
- `crates/router/src/core/admin.rs`
**2. External Connector Integration**
- `crates/common_enums/src/connector_enums.rs`
- `crates/connector_configs/src/connector.rs`
- `crates/connector_configs/toml/development.toml`
- ... and 4 more files
**3. Type Definitions**
- `crates/router/src/types/api.rs`
- `crates/router/src/types/transformers.rs`
**4. Tests**
- `config/deployments/integration_test.toml`
- `loadtest/config/development.toml`
**5. Configuration Files**
- `config/config.example.toml`
- `config/deployments/production.toml`
- `config/deployments/sandbox.toml`
- ... and 2 more files
**6. Other**
- `api-reference-v2/openapi_spec.json`
- `api-reference/openapi_spec.json`
**Code Patterns Applied:**
- Implement new functions (5 changes)
- Extend existing types with new fields (47 changes)
**Detailed Identifier Changes:**
Commit c868ff38:
Files to modify:
**crates/common_enums/src/connector_enums.rs**
Modify existing code
**crates/connector_configs/src/connector.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/coingate.rs**
Remove:
- function: private::get_url
- function: private::get_request_body
- function: private::handle_response
- function: private::get_headers
- function: private::get_content_type
- function: private::get_url
- function: private::get_request_body
- impl: impl ConnectorValidation for Coingate
- impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Coingate
Add:
- function: private::build_request
- impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Err(errors::ConnectorError::FlowNotSupported {
flow: "Void".to_string(),
connector: "Coingate".to_string(),
}
.into())
fn build_request(
Err(errors::ConnectorError::FlowNotSupported {
flow: "RefundSync".to_string(),
connector: "Coingate".to_string(),
}
.into())
fn build_request(
Err(errors::ConnectorError::FlowNotSupported {
flow: "Refund".to_string(),
connector: "Coingate".to_string(),
}
.into())
}
impl ConnectorValidation for Coingate {
fn validate_connector_against_payment_request(
&self,
capture_method: Option<CaptureMethod>,
_payment_method: PaymentMethod,
_pmt: Option<PaymentMethodType>,
) -> CustomResult<(), errors::ConnectorError>
**crates/hyperswitch_connectors/src/connectors/coingate/transformers.rs**
Remove:
- function: private::from
- function: private::try_from
- function: private::from
- function: private::try_from
- function: private::try_from
- struct: pub::CoingateCard
- struct: pub::CoingateRefundRequest
- struct: pub::RefundResponse
- enum: pub::RefundStatus
- impl: impl From<(StringMinorUnit, T)> for CoingateRouterData<T>
- impl: impl TryFrom<&CoingateRouterData<&RefundsRouterData<F>>> for CoingateRefundRequest
- impl: impl From<RefundStatus> for enums::RefundStatus
- impl: impl TryFrom<RefundsResponseRouterData<Execute, RefundResponse>> for RefundsRouterData<Execute>
- impl: impl TryFrom<RefundsResponseRouterData<RSync, RefundResponse>> for RefundsRouterData<RSync>
**crates/router/src/core/admin.rs**
Modify existing code
**crates/router/src/types/api.rs**
Modify existing code
**crates/router/src/types/transformers.rs**
Modify existing code
|
{"pr_number": 7247, "pr_title": "feat(coingate): Add Crypto Pay Flow", "merged_at": "2025-02-17T11:06:42Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/admin.rs"], "connectors": ["crates/common_enums/src/connector_enums.rs", "crates/connector_configs/src/connector.rs", "crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/hyperswitch_connectors/src/connectors/coingate.rs", "crates/hyperswitch_connectors/src/connectors/coingate/transformers.rs"], "types": ["crates/router/src/types/api.rs", "crates/router/src/types/transformers.rs"], "tests": ["config/deployments/integration_test.toml", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json"]}, "change_types": {"functions_added": 5, "fields_added": 47, "imports_added": 6}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(checkbook_io): connector integrate ACH
## 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 -->
### 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`
-->
Integrate CHECKBOOK_IO
DOCS
- https://docs.checkbook.io/docs/concepts/environments/
- https://sandbox.app.checkbook.io/account/dashboard
Implement BANKTRANSFER/ACH
** NOTE : payment link will only be sent via email
## How did you test it?
### ACH
<details>
<summary>
PAYMENT CREATION
</summary>
```json
{
"confirm": true,
"billing": {
"address": {
"zip": "560095",
"country": "US",
"first_name": "akshakaya N",
"last_name": "sss",
"line1": "Fasdf",
"line2": "Fasdf",
"city": "Fasdf"
},
"email": "nithingowdan77@gmail.com"
},
"email": "hyperswitch_sdk_demo_id@gmail.com",
"amount": 333,
"currency": "USD",
"capture_method": "automatic",
"payment_method": "bank_transfer",
"payment_method_type": "ach",
"description": "hellow world",
"payment_method_data": {
"bank_transfer": {
"ach_bank_transfer": {}
}
}
}
```
</summary>
</details>
<details>
<summary>payment response </summary>
```json
{
"payment_id": "pay_iY6zT9EeXtCC6FWDNJcX",
"merchant_id": "merchant_1753248277",
"status": "requires_customer_action",
"amount": 333,
"net_amount": 333,
"shipping_cost": null,
"amount_capturable": 333,
"amount_received": null,
"connector": "checkbook",
"client_secret": "pay_iY6zT9EeXtCC6FWDNJcX_secret_8UkJCDq38T6itlYKhvfh",
"created": "2025-07-23T10:53:11.390Z",
"currency": "USD",
"customer_id": null,
"customer": {
"id": null,
"name": null,
"email": "hyperswitch_sdk_demo_id@gmail.com",
"phone": null,
"phone_country_code": null
},
"description": "hellow world",
"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": "bank_transfer",
"payment_method_data": {
"bank_transfer": {
"ach": {}
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": {
"address": {
"city": "Fasdf",
"country": "US",
"line1": "Fasdf",
"line2": "Fasdf",
"line3": null,
"zip": "560095",
"state": null,
"first_name": "akshakaya N",
"last_name": "sss"
},
"phone": null,
"email": "nithingowdan77@gmail.com"
},
"order_details": null,
"email": null,
"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": "ach",
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": null,
"manual_retry_allowed": null,
"connector_transaction_id": "1b3e42f27214433ca90a9b791806aa4b",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": null,
"reference_id": null,
"payment_link": null,
"profile_id": "pro_0osoWZTgnVYIc9tHhKTu",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_eqxZAe2nz9gsBmMYb1xP",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-07-23T11:08:11.390Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2025-07-23T10:53:12.389Z",
"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,
"is_iframe_redirection_enabled": null,
"whole_connector_response": null
}
```
</details>
<details>
<summary>Check MAIL FOR link</summary>
<img width="1040" height="705" alt="Screenshot 2025-07-23 at 4 22 37 PM" src="https://github.com/user-attachments/assets/a04ef1cd-c0c2-4d93-b6dc-464bbcf2474d" />
<img width="1079" height="639" alt="Screenshot 2025-07-23 at 4 26 07 PM" src="https://github.com/user-attachments/assets/e5adcdd1-cba4-4f5c-a9a9-0e44a164a220" />
<img width="885" height="441" alt="Screenshot 2025-07-23 at 4 27 28 PM" src="https://github.com/user-attachments/assets/f6473fa9-cf4c-4e18-a776-9d941a3c79ef" />
</details>
** NOTE : UNABLE TO VERIFY SUCCESS IN SANDBOX FOR INVOICE
### cypress test attachment
<img width="648" height="843" alt="Screenshot 2025-07-24 at 10 16 26 AM" src="https://github.com/user-attachments/assets/b0c36856-ca2b-4034-979c-3f44dca3ceba" />
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [x] 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Core Business Logic**
- `crates/router/src/core/connector_validation.rs`
**2. External Connector Integration**
- `crates/common_enums/src/connector_enums.rs`
- `crates/connector_configs/src/connector.rs`
- `crates/connector_configs/toml/development.toml`
- ... and 8 more files
**3. Tests**
- `config/deployments/integration_test.toml`
- `cypress-tests/cypress/e2e/configs/Payment/Checkbook.js`
- `cypress-tests/cypress/e2e/configs/Payment/Commons.js`
- ... and 5 more files
**4. Configuration Files**
- `config/deployments/production.toml`
- `config/deployments/sandbox.toml`
- `config/development.toml`
**5. Other**
- `api-reference/v1/openapi_spec_v1.json`
- `api-reference/v2/openapi_spec_v2.json`
**Code Patterns Applied:**
- Implement new functions (7 changes)
- Extend existing types with new fields (147 changes)
- Add conditional logic for feature flags or filtering (5 changes)
**Detailed Identifier Changes:**
Commit bee4aed4:
Files to modify:
**crates/common_enums/src/connector_enums.rs**
Modify existing code
**crates/connector_configs/src/connector.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/checkbook.rs**
Remove:
- function: private::get_content_type
- impl: impl ConnectorValidation for Checkbook
- impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Checkbook
- impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Checkbook
Add:
- function: private::get_webhook_source_verification_algorithm
- function: private::get_webhook_source_verification_signature
- function: private::get_connector_about
- function: private::get_supported_payment_methods
- function: private::get_supported_webhook_flows
- impl: impl ConnectorValidation for Checkbook
- impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Checkbook
- impl: impl ConnectorSpecifications for Checkbook
**crates/hyperswitch_connectors/src/connectors/checkbook/transformers.rs**
Remove:
- function: private::from
- struct: pub::CheckbookRouterData
- struct: pub::CheckbookCard
- impl: impl From<(FloatMajorUnit, T)> for CheckbookRouterData<T>
- impl: impl TryFrom<&CheckbookRouterData<&PaymentsAuthorizeRouterData>> for (req_card)
Add:
- impl: impl TryFrom<(FloatMajorUnit, &PaymentsAuthorizeRouterData)> for CheckbookPaymentsRequest
**crates/payment_methods/src/configs/payment_connector_required_fields.rs**
Modify existing code
**crates/router/src/core/connector_validation.rs**
Modify existing code
**crates/router/src/types/api/connector_mapping.rs**
Modify existing code
**crates/router/src/types/connector_transformers.rs**
Modify existing code
**crates/router/tests/connectors/checkbook.rs**
Remove:
- function: private::should_capture_authorized_payment
- function: private::should_partially_capture_authorized_payment
- function: private::should_refund_manually_captured_payment
- function: private::should_partially_refund_manually_captured_payment
- function: private::should_sync_manually_captured_refund
- function: private::should_make_payment
- function: private::should_sync_auto_captured_payment
- function: private::should_refund_auto_captured_payment
- function: private::should_partially_refund_succeeded_payment
- function: private::should_refund_succeeded_payment_multiple_times
- function: private::should_sync_refund
- function: private::should_fail_payment_for_incorrect_cvc
- function: private::should_fail_payment_for_invalid_exp_month
- function: private::should_fail_payment_for_incorrect_expiry_year
- function: private::should_fail_void_payment_for_auto_capture
- function: private::should_fail_capture_for_invalid_payment
|
{"pr_number": 8730, "pr_title": "feat(checkbook_io): connector integrate ACH", "merged_at": "2025-08-08T13:06:37Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/connector_validation.rs"], "connectors": ["crates/common_enums/src/connector_enums.rs", "crates/connector_configs/src/connector.rs", "crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/hyperswitch_connectors/src/connectors/checkbook.rs", "crates/hyperswitch_connectors/src/connectors/checkbook/transformers.rs", "crates/payment_methods/src/configs/payment_connector_required_fields.rs", "crates/router/src/types/api/connector_mapping.rs", "crates/router/src/types/connector_transformers.rs", "crates/router/tests/connectors/checkbook.rs"], "tests": ["config/deployments/integration_test.toml", "cypress-tests/cypress/e2e/configs/Payment/Checkbook.js", "cypress-tests/cypress/e2e/configs/Payment/Commons.js", "cypress-tests/cypress/e2e/configs/Payment/Stripe.js", "cypress-tests/cypress/e2e/configs/Payment/Utils.js", "cypress-tests/cypress/e2e/spec/Payment/00017-BankTransfers.cy.js", "cypress-tests/cypress/support/commands.js", "cypress-tests/cypress/support/redirectionHandler.js"], "config": ["config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml"], "other": ["api-reference/v1/openapi_spec_v1.json", "api-reference/v2/openapi_spec_v2.json"]}, "change_types": {"functions_added": 7, "fields_added": 147, "imports_added": 10, "conditionals_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(payments): Add audit events for PaymentCreate update
## Type of Change
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
This PR adds an Audit event for the PaymentCreate operation.
### Additional Changes
- [x] This PR modifies the files below
- `crates/router/src/core/payments/operations/payment_create.rs`
- `crates/router/src/events/audit_events.rs`
## Motivation and Context
This PR fixes #4672
## How did you test it
Hit the `Payments - Create` endpoint with `"confirm": false`
- Curl:
```bash
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_LZcIA7XeMpnK5satp4CDvjcnHCaeKTBcosyuBBJaknZu1odhFo96cwS0nSdfzuJF' \
--data-raw '{
"amount": 6540,
"currency": "USD",
"confirm": false,
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"amount_to_capture": 6540,
"customer_id": "StripeCustomer",
"email": "guest@example.com",
"name": "John Doe",
"phone": "999999999",
"phone_country_code": "+65",
"description": "Its my first payment request",
"authentication_type": "no_three_ds",
"return_url": "https://google.com",
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4242424242424242",
"card_exp_month": "10",
"card_exp_year": "25",
"card_holder_name": "joseph Doe",
"card_cvc": "123"
}
},
"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": "8056594427",
"country_code": "+91"
}
},
"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"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
}
},
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
},
"profile_id": "pro_v5sFoHe80OeiUlIonocM"
}'
```
- Response:
```json
{
"payment_id": "pay_pvLYaf7aejhEVszi9OnZ",
"merchant_id": "merchant_1726046328",
"status": "requires_confirmation",
"amount": 6540,
"net_amount": 6540,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": null,
"connector": null,
"client_secret": "pay_pvLYaf7aejhEVszi9OnZ_secret_a9hynS88hC0oz7LNRjFc",
"created": "2024-11-06T18:21:43.625Z",
"currency": "USD",
"customer_id": "StripeCustomer",
"customer": {
"id": "StripeCustomer",
"name": "John Doe",
"email": "guest@example.com",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Its my first payment request",
"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": "10",
"card_exp_year": "25",
"card_holder_name": null,
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": "token_btocKPXDGHw1UKcvTpMW",
"shipping": {
"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": "8056594427",
"country_code": "+91"
},
"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": "8056594427",
"country_code": "+91"
},
"email": null
},
"order_details": null,
"email": "guest@example.com",
"name": "John Doe",
"phone": "999999999",
"return_url": "https://google.com/",
"authentication_type": "no_three_ds",
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"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": "StripeCustomer",
"created_at": 1730917303,
"expires": 1730920903,
"secret": "epk_11b7865dffb2468e8d16f29afcf8677f"
},
"manual_retry_allowed": null,
"connector_transaction_id": null,
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": null,
"feature_metadata": null,
"reference_id": null,
"payment_link": null,
"profile_id": "pro_v5sFoHe80OeiUlIonocM",
"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": "2024-11-06T18:36:43.625Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2024-11-06T18:21:43.669Z",
"charges": null,
"frm_metadata": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": null
}
```
Audit log will get generated and can be viewed in hyperswitch-audit-events topic in kafka with `PaymentCreate` event-type.
<img width="1298" alt="Screenshot 2024-11-06 at 11 52 00 PM" src="https://github.com/user-attachments/assets/efc6ff47-3a6e-411a-a539-3b4d13f71967">
Now hit the `Payments - Confirm` endpoint, and audit log will get generated with `PaymentConfirm` event-type.
<img width="1350" alt="image" src="https://github.com/user-attachments/assets/20afd6ca-7c84-4a77-885b-e235ef5cd98c">
## Checklist
- [x] I formatted the code `cargo +nightly fmt --all`
- [x] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
|
To implement this **payment** feature, you'll need to modify these architectural layers:
**1. Core Business Logic**
- `crates/router/src/core/payments/operations/payment_create.rs`
**2. Other**
- `crates/router/src/events/audit_events.rs`
**Code Patterns Applied:**
- Extend existing types with new fields (1 changes)
**Detailed Identifier Changes:**
Commit 063fe904:
Files to modify:
**crates/router/src/core/payments/operations/payment_create.rs**
Modify existing code
**crates/router/src/events/audit_events.rs**
Modify existing code
|
{"pr_number": 6427, "pr_title": "feat(payments): Add audit events for PaymentCreate update", "merged_at": "2024-11-07T13:39:25Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/operations/payment_create.rs"], "other": ["crates/router/src/events/audit_events.rs"]}, "change_types": {"fields_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(core): allow setting up status across payments, refunds and payouts for triggering webhooks in core resource flows
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
This pull request introduces validation for webhook status configurations at the business profile level.
Specifically, the following changes have been made:
1. **WebhookDetails Validation:**
* Added a `validate()` method to the `WebhookDetails` struct in `crates/api_models/src/admin.rs`.
* This method ensures that any statuses provided in `payment_statuses_enabled`, `refund_statuses_enabled`, and `payout_statuses_enabled` are valid and correspond to triggerable event types.
2. **API Handler Integration:**
* Updated the API route handlers in `crates/router/src/routes/profiles.rs` for merchant account creation, merchant account updates, profile creation and profile updates.
* These handlers now invoke the `WebhookDetails::validate()` method if `webhook_details` are present in the request payload.
* If validation fails (i.e., an invalid status is provided), the API will return an `ApiErrorResponse::InvalidRequestData` with a descriptive message.
3. **Core flows - payments, refunds and payouts**
* Added logic for checking if the resource status is eligible for triggering an outgoing webhook in the payment, refund and payout flows.
* If statuses configured are empty in profile, it uses a default list for checking the eligibility.
4. **WASM functionalities**
* Added functionality in WASM crate for fetching a list of valid webhook statuses which can be used to render on HyperSwitch dashboard for configurations.
This ensures that only valid webhook configurations are accepted and stored, improving the robustness of the outgoing webhook system.
### 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
Allows merchants to configure different statuses for triggering outgoing webhooks.
## How did you test it?
I. New behavior
<details>
<summary>1. Create Merchant Account with custom `webhook_details`</summary>
cURL
curl --location --request POST 'http://localhost:8080/accounts' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: test_admin' \
--data-raw '{"merchant_id":"merchant_1750673206","locker_id":"m0010","merchant_name":"NewAge Retailer","merchant_details":{"primary_contact_person":"John Test","primary_email":"JohnTest@test.com","primary_phone":"sunt laborum","secondary_contact_person":"John Test2","secondary_email":"JohnTest2@test.com","secondary_phone":"cillum do dolor id","website":"https://www.example.com","about_business":"Online Retail with a wide selection of organic products for North America","address":{"line2":"Harrison Street","line3":"Harrison Street","city":"San Fransico","state":"California","zip":"94122","country":"US"}},"return_url":"https://google.com/success","webhook_details":{"webhook_url":"https://webhook.site/ede0ddc6-5583-4a92-80e3-d513028c4fe2","webhook_version":"1.0.1","webhook_username":"random","webhook_password":"pass","payment_statuses_enabled":["requires_customer_action","failed"],"payout_statuses_enabled":["failed"],"refund_statuses_enabled":["success"]},"sub_merchants_enabled":false,"metadata":{"city":"NY","unit":"245"},"primary_business_details":[{"country":"IN","business":"default"}]}'
Response
{"merchant_id":"merchant_1750673203","merchant_name":"NewAge Retailer","return_url":"https://google.com/success","enable_payment_response_hash":true,"payment_response_hash_key":"pv3MWoTzwpOnCUWo8rkeBATn5QiaJ2MKtpKe9anxnqC2dt53I0pK6lH0yy50j1zT","redirect_to_merchant_with_http_post":false,"merchant_details":{"primary_contact_person":"John Test","primary_phone":"sunt laborum","primary_email":"JohnTest@test.com","secondary_contact_person":"John Test2","secondary_phone":"cillum do dolor id","secondary_email":"JohnTest2@test.com","website":"https://www.example.com","about_business":"Online Retail with a wide selection of organic products for North America","address":{"city":"San Fransico","country":"US","line1":null,"line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":null,"last_name":null}},"webhook_details":{"webhook_version":"1.0.1","webhook_username":"random","webhook_password":"pass","webhook_url":"https://webhook.site/ede0ddc6-5583-4a92-80e3-d513028c4fe2","payment_statuses_enabled":["requires_customer_action","failed"],"refund_statuses_enabled":["success"],"payout_statuses_enabled":["failed"]},"payout_routing_algorithm":null,"sub_merchants_enabled":false,"parent_merchant_id":null,"publishable_key":"pk_dev_fdfb25c3c2294cf49aa1bb361afb1100","metadata":{"city":"NY","unit":"245","compatible_connector":null},"locker_id":"m0010","primary_business_details":[{"country":"IN","business":"default"}],"frm_routing_algorithm":null,"organization_id":"org_II9RJV4U9ZcIloWWrNbR","is_recon_enabled":false,"default_profile":"pro_65qra6NQYjw2UP9vperw","recon_status":"not_requested","pm_collect_link_config":null,"product_type":"orchestration","merchant_account_type":"standard"}
Expectation
- Only valid status can be specified for triggering webhooks across payments, refunds and payouts
</details>
<details>
<summary>2. Create a payment</summary>
cURL
curl --location --request POST 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_1MDGBqiM9KD4GY0mu6QfjecN40bJrnJWFDyGxxTdaGKKXt6xH3Jbrr59B0Ua4NPK' \
--data-raw '{"amount":4500,"currency":"EUR","confirm":true,"profile_id":"pro_pNXZoICIkiLUZEYSrKfX","capture_method":"manual","capture_on":"2022-09-10T10:11:12Z","authentication_type":"three_ds","setup_future_usage":"off_session","connector":["adyen"],"customer_id":"cus_zhY6PdgnyRlXLVGzqkvM","email":"abc@example.com","return_url":"https://google.com","payment_method":"card","payment_method_type":"debit","payment_method_data":{"card":{"card_number":"4111112014267661","card_exp_month":"12","card_exp_year":"2030","card_cvc":"737"}},"billing":{"address":{"line1":"1467","line2":"Harrison Street","line3":"Harrison Street","city":"San Fransico","state":"California","zip":"94122","country":"IT","first_name":"joseph","last_name":"Doe"},"phone":{"number":"8056594427","country_code":"+91"},"email":"guest@example.com"},"metadata":{"Force-PSP":"Adyen","udf1":"value1","new_customer":"true","login_date":"2019-09-10T10:11:12Z"},"browser_info":{"user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.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-US","color_depth":32,"screen_height":1117,"screen_width":1728,"time_zone":-330,"java_enabled":true,"java_script_enabled":true,"ip_address":"127.0.0.1"},"customer_acceptance":{"acceptance_type":"online","accepted_at":"1963-05-03T04:07:52.723Z","online":{"ip_address":"127.0.0.1","user_agent":"amet irure esse"}},"connector_metadata":{"adyen":{"testing":{}}},"session_expiry":60}'
Response
{"payment_id":"pay_iApiXN3tqc2yW1XBP0Ua","merchant_id":"merchant_1750673324","status":"requires_capture","amount":4500,"net_amount":4500,"shipping_cost":null,"amount_capturable":4500,"amount_received":null,"connector":"adyen","client_secret":"pay_iApiXN3tqc2yW1XBP0Ua_secret_AgBcvgc6zoSu2Qr2sq96","created":"2025-06-23T10:08:56.548Z","currency":"EUR","customer_id":"cus_zhY6PdgnyRlXLVGzqkvM","customer":{"id":"cus_zhY6PdgnyRlXLVGzqkvM","name":"John Nether","email":"abc@example.com","phone":"6168205362","phone_country_code":"+1"},"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":"off_session","off_session":null,"capture_on":null,"capture_method":"manual","payment_method":"card","payment_method_data":{"card":{"last4":"7661","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"2030","card_holder_name":null,"payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"IT","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":"guest@example.com"},"order_details":null,"email":"abc@example.com","name":"John Nether","phone":"6168205362","return_url":"https://google.com/","authentication_type":"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":"debit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"cus_zhY6PdgnyRlXLVGzqkvM","created_at":1750673336,"expires":1750676936,"secret":"epk_0e045ee6e8b3409da23d14233314639d"},"manual_retry_allowed":false,"connector_transaction_id":"GZD3LFQ2BDDHL975","frm_message":null,"metadata":{"udf1":"value1","Force-PSP":"Adyen","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":{"apple_pay":null,"airwallex":null,"noon":null,"braintree":null,"adyen":{"testing":{"holder_name":null}}},"feature_metadata":null,"reference_id":"pay_iApiXN3tqc2yW1XBP0Ua_1","payment_link":null,"profile_id":"pro_pNXZoICIkiLUZEYSrKfX","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_9dLJtXqFTDdVt4fwwLL4","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-23T10:09:56.548Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"127.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","color_depth":32,"java_enabled":true,"screen_width":1728,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":1117,"java_script_enabled":true},"payment_method_id":"pm_4eqrT6kM50j4XdLyX6YK","payment_method_status":"active","updated":"2025-06-23T10:08:57.185Z","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":"JVZJSSRZPLSMC375","card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null}
Expectation
- A payment webhook must be triggered since the status reaches `requires_capture` which was configured for triggering webhooks
</details>
<details>
<summary>3. Update an existing profile</summary>
cURL
curl --location --request POST 'http://localhost:8080/account/merchant_1750673423/business_profile/pro_vjiSMmVIZdLWNbPBnGXP' \
--header 'Content-Type: application/json' \
--header 'api-key: dev_WWRksDrZIVkWppHEPz4MWFccxq9ZMEoGHTWRw1euMjstZC3XD51mGBc5NjMLVAwx' \
--data '{"webhook_details":{"webhook_url":"https://webhook.site/ede0ddc6-5583-4a92-80e3-d513028c4fe2","webhook_version":"1.0.1","webhook_username":"random","webhook_password":"pass","payment_statuses_enabled":["requires_capture","failed"],"payout_statuses_enabled":["failed"],"refund_statuses_enabled":["success"]}}'
Response
{"merchant_id":"merchant_1750673423","profile_id":"pro_vjiSMmVIZdLWNbPBnGXP","profile_name":"IN_default","return_url":"https://google.com/success","enable_payment_response_hash":true,"payment_response_hash_key":"EPy4DzeilG41Sz0g2krFOfbz9jI49AnrsljEPFkIqRhHn96Hh70NcvvrsXMsuiR9","redirect_to_merchant_with_http_post":false,"webhook_details":{"webhook_version":"1.0.1","webhook_username":"random","webhook_password":"pass","webhook_url":"https://webhook.site/ede0ddc6-5583-4a92-80e3-d513028c4fe2","payment_statuses_enabled":["requires_capture","failed"],"refund_statuses_enabled":["success"],"payout_statuses_enabled":["failed"]},"metadata":null,"routing_algorithm":null,"intent_fulfillment_time":900,"frm_routing_algorithm":null,"payout_routing_algorithm":null,"applepay_verified_domains":["gdpp-dev.zurich.com"],"session_expiry":900,"payment_link_config":{"domain_name":null,"theme":"#E1E1E1","logo":"https://hyperswitch.io/favicon.ico","seller_name":null,"sdk_layout":null,"display_sdk_only":null,"enabled_saved_payment_method":true,"hide_card_nickname_field":null,"show_card_form_by_default":null,"transaction_details":null,"background_image":null,"details_layout":null,"payment_button_text":null,"custom_message_for_card_terms":"","payment_button_colour":null,"skip_status_screen":null,"payment_button_text_colour":null,"background_colour":null,"sdk_ui_rules":null,"payment_link_ui_rules":null,"enable_button_only_on_form_ready":null,"payment_form_header_text":null,"payment_form_label_type":null,"show_card_terms":"always","is_setup_mandate_flow":null,"color_icon_card_cvc_error":null,"business_specific_configs":{"mendix":{"theme":null,"logo":"https://hyperswitch.io/favicon.ico","seller_name":null,"sdk_layout":null,"display_sdk_only":true,"enabled_saved_payment_method":null,"hide_card_nickname_field":null,"show_card_form_by_default":null,"transaction_details":null,"background_image":null,"details_layout":null,"payment_button_text":"Validate Card","custom_message_for_card_terms":null,"payment_button_colour":null,"skip_status_screen":null,"payment_button_text_colour":null,"background_colour":null,"sdk_ui_rules":{".Input--invalid":{"color":"#545454"},".w-full.relative.flex.flex-row.my-4":{"display":"none"},".Tab":{"display":"none"},".InputLogo":{"color":"#545454"},".Error":{"paddingLeft":"0px","opacity":"1","color":"#CB4B40","display":"block","fontSize":"12px","marginTop":"4px"},".Label":{"left":"0px","fontWeight":"300","color":"#2167AE","fontSize":"12px","bottom":"5px","marginLeft":"0px","opacity":"1","fontFamily":"'zurich-sans-Medium', sans-serif"},".InputLogo--empty":{"color":"#979797"},".flex.flex-col.gap-2.h-auto.w-full":{"display":"none"},".Input":{"paddingBottom":"2px","fontWeight":"400","boxSizing":"border-box","height":"56px","width":"100%","paddingLeft":"0px","backgroundColor":"white","display":"block","border":"none","fontSize":"18px","color":"#23366F","borderRadius":"0px","boxShadow":"none","borderBottom":"1px solid #2167AE","fontFamily":"'zurich-sans-Medium', sans-serif"},".Input:focus":{"outline":"none","borderBottom":"1px solid #2167AE","backgroundColor":"white"},".Label--floating":{"opacity":"1"},".Input:focus + .Label":{"opacity":"0 !important"},".PaymentLabel":{"color":"#545454","fontSize":"24px"},".Input--empty":{"backgroundColor":"white","boxShadow":"none","borderBottom":"1px solid #2167AE"},".TabHeader":{"display":"none"},".InputLogo--invalid":{"color":"#CB4B40"},".Input::placeholder":{"fontFamily":"'zurich-sans-light', sans-serif","fontSize":"18px","paddingLeft":"0px","color":"#C0C0C0"}},"payment_link_ui_rules":{"#submit.processing":{"paddingLeft":"50px !important","paddingRight":"50px !important"},"#submit":{"padding":"13px 20px","marginTop":"24px","width":"max-content !important","borderRadius":"50px !important","backgroundColor":"#2167AE !important","height":"max-content !important","fontSize":"14px !important"}},"enable_button_only_on_form_ready":true,"payment_form_header_text":null,"payment_form_label_type":null,"show_card_terms":null,"is_setup_mandate_flow":null,"color_icon_card_cvc_error":"#CB4B40"},"omnium":{"theme":null,"logo":"https://hyperswitch.io/favicon.ico","seller_name":null,"sdk_layout":null,"display_sdk_only":true,"enabled_saved_payment_method":true,"hide_card_nickname_field":null,"show_card_form_by_default":null,"transaction_details":null,"background_image":null,"details_layout":null,"payment_button_text":"Save Card","custom_message_for_card_terms":null,"payment_button_colour":"#c2c2c2","skip_status_screen":null,"payment_button_text_colour":null,"background_colour":null,"sdk_ui_rules":{".Input:not(.Input--empty) + .Label":{"opacity":"0 !important"},".Error":{"marginTop":"4px","display":"block","opacity":"1","fontSize":"12px","paddingLeft":"0px","color":"#CB4B40"},".Label--invalid":{"color":"#CB4B40 !important","opacity":"1 !important"},".InputLogo--empty":{"color":"#979797"},".Tab":{"display":"none"},".TabHeader":{"display":"none"},".InputLogo":{"color":"#545454"},".w-full.relative.flex.flex-row.my-4":{"display":"none"},".Input:focus":{"border":"none !important","outline":"none","borderBottom":"1px solid #C2C2C2 !important","backgroundColor":"white","color":"#C2C2C2"},".Label":{"marginLeft":"0px","bottom":"5px","pointerEvents":"none","left":"0px","color":"#C2C2C2","opacity":"1","fontSize":"14px"},".Input--invalid":{"color":"#CB4B40"},".Input::placeholder":{"color":"#C2C2C2","paddingLeft":"0px"},".Input":{"width":"100%","fontSize":"14px","fontFamily":"'Open Sans', sans-serif","padding":"0","boxSizing":"border-box","borderRadius":"0px","backgroundColor":"white","display":"block","borderBottom":"1px solid #C2C2C2 !important","border":"none !important","boxShadow":"none","color":"#C2C2C2"},".PaymentLabel":{"fontSize":"24px","color":"#545454"},".InputLogo--invalid":{"color":"#CB4B40"},".flex.flex-col.gap-2.h-auto.w-full":{"display":"none"},".Input--empty":{"color":"#C2C2C2","backgroundColor":"white"},".Input:focus + .Label":{"color":"transparent"}},"payment_link_ui_rules":{"#submit":{"height":"25px !important","width":"max-content !important","backgroundColour":"#c2c2c2 !important","padding":"0 8px","color":"#ffffff !important","margin":"0 0 4px auto","fontSize":"13px !important","border":"1px solid #c2c2c2 !important","borderRadius":"0 !important"},"#submit.not-ready":{"border":"1px solid #c2c2c2 !important","backgroundColor":"#ffffff !important","color":"#c2c2c2 !important"},"#submit-spinner":{"borderBottomColor":"#c2c2c2 !important","width":"20px !important","border":"2px solid #fff !important","height":"20px !important"}},"enable_button_only_on_form_ready":true,"payment_form_header_text":null,"payment_form_label_type":"floating","show_card_terms":null,"is_setup_mandate_flow":null,"color_icon_card_cvc_error":"#CB4B40"},"zproject":{"theme":null,"logo":"https://hyperswitch.io/favicon.ico","seller_name":null,"sdk_layout":null,"display_sdk_only":true,"enabled_saved_payment_method":null,"hide_card_nickname_field":null,"show_card_form_by_default":null,"transaction_details":null,"background_image":null,"details_layout":null,"payment_button_text":"Validate Card","custom_message_for_card_terms":null,"payment_button_colour":null,"skip_status_screen":null,"payment_button_text_colour":null,"background_colour":null,"sdk_ui_rules":{".Label":{"marginLeft":"0px","left":"0px","color":"#5495CF !important","fontFamily":"'zurich-sans-light', sans-serif","fontWeight":"400","fontSize":"14px","bottom":"5px","opacity":"1 !important"},".InputLogo":{"color":"#545454"},".PaymentLabel":{"fontSize":"24px","color":"#545454 !important"},".w-full.relative.flex.flex-row.my-4":{"display":"none"},".Input, .Input:focus, .Input--invalid, .Input--empty":{"height":"56px","fontSize":"18px","paddingLeft":"0px !important","borderBottom":"1px solid #5495CF","boxShadow":"none","width":"100%","display":"block","borderRadius":"0px","border":"none","boxSizing":"border-box","color":"#000000","paddingBottom":"2px !important","backgroundColor":"white !important","fontFamily":"'zurich-sans-Medium', sans-serif","fontWeight":"400"},".Input::placeholder":{"color":"#C0C0C0","fontSize":"14px","paddingLeft":"0px !important","fontFamily":"'zurich-sans-light', sans-serif"},".Tab":{"display":"none"},".InputLogo--invalid":{"color":"#CB4B40"},".Input--invalid":{"color":"#545454 !important"},".InputLogo--empty":{"color":"#979797"},".Error":{"fontSize":"12px","color":"#CB4B40 !important","marginTop":"4px","opacity":"1 !important","paddingLeft":"0px","display":"block"},".TabHeader":{"display":"none"},".Input:focus + .Label":{"opacity":"0 !important"},".flex.flex-col.gap-2.h-auto.w-full":{"display":"none"},".Label--floating":{"opacity":"1 !important"}},"payment_link_ui_rules":{"#submit":{"padding":"13px 20px","fontSize":"14px !important","borderRadius":"50px !important","height":"max-content !important","backgroundColor":"#5495CF !important","marginTop":"24px","width":"max-content !important"},"#submit.processing":{"paddingRight":"50px !important","paddingLeft":"50px !important"}},"enable_button_only_on_form_ready":true,"payment_form_header_text":null,"payment_form_label_type":null,"show_card_terms":null,"is_setup_mandate_flow":null,"color_icon_card_cvc_error":"#CB4B40"},"illustrator":{"theme":null,"logo":"https://hyperswitch.io/favicon.ico","seller_name":null,"sdk_layout":null,"display_sdk_only":true,"enabled_saved_payment_method":null,"hide_card_nickname_field":null,"show_card_form_by_default":null,"transaction_details":null,"background_image":null,"details_layout":null,"payment_button_text":"Save Card","custom_message_for_card_terms":null,"payment_button_colour":null,"skip_status_screen":null,"payment_button_text_colour":null,"background_colour":null,"sdk_ui_rules":{".Label--floating,":{"opacity":"1 !important"},".Label--invalid, .Error":{"opacity":"1 !important","color":"#f00 !important"},".InputLogo--empty":{"color":"#979797"},".TabHeader":{"display":"none"},".Input, .Input:focus, .Input--invalid, .Input--empty":{"width":"100%","fontFamily":"'Open Sans', sans-serif","paddingBottom":"2px !important","paddingLeft":"0px !important","height":"56px","fontWeight":"400","boxSizing":"border-box","color":"#494949","borderBottom":"1px solid #C2C2C2","borderRadius":"0px","backgroundColor":"white !important","display":"block","border":"none","fontSize":"14px","boxShadow":"none"},".InputLogo":{"color":"#545454"},".flex.flex-col.gap-2.h-auto.w-full":{"display":"none"},".Input::placeholder":{"color":"#979797","paddingLeft":"0px !important"},".Input--invalid":{"color":"#545454 !important","borderBottom":"1px solid #f00 !important"},".PaymentLabel":{"color":"#545454 !important","fontSize":"24px"},".w-full.relative.flex.flex-row.my-4":{"display":"none"},".Input:focus + .Label":{"opacity":"0 !important"},".Error":{"marginTop":"4px","fontSize":"12px","paddingLeft":"0px","color":"#f00 !important","display":"block","opacity":"1 !important"},".InputLogo--invalid":{"color":"#CB4B40"},".Tab":{"display":"none"},".Label":{"color":"#FF0022","left":"0px","opacity":"1 !important","marginLeft":"0px","bottom":"5px"}},"payment_link_ui_rules":{"#submit":{"margin":"0 4px 0 auto","fontSize":"13px !important","width":"max-content !important","borderRadius":"0 !important","border":"1px solid #b2b2b2 !important","backgroundColor":"#b2b2b2 !important","height":"25px !important","padding":"0 8px","color":"#ffffff !important"},"#submit.not-ready":{"color":"#b2b2b2 !important","border":"1px solid #b2b2b2 !important","backgroundColor":"#ffffff !important"},"#submit-spinner":{"height":"20px !important","width":"20px !important","borderBottomColor":"#c2c2c2 !important","border":"2px solid #fff !important"}},"enable_button_only_on_form_ready":true,"payment_form_header_text":null,"payment_form_label_type":null,"show_card_terms":null,"is_setup_mandate_flow":null,"color_icon_card_cvc_error":"#CB4B40"},"spain":{"theme":"#2167AE","logo":null,"seller_name":null,"sdk_layout":null,"display_sdk_only":true,"enabled_saved_payment_method":null,"hide_card_nickname_field":true,"show_card_form_by_default":null,"transaction_details":null,"background_image":null,"details_layout":null,"payment_button_text":null,"custom_message_for_card_terms":null,"payment_button_colour":null,"skip_status_screen":null,"payment_button_text_colour":null,"background_colour":null,"sdk_ui_rules":{".InputLogo":{"color":"#23366F"},".InputLogo--invalid":{"color":"#CB4B40"},".Input, .Input:focus, .Input--empty":{"color":"#23366F"},".Label--floating":{"opacity":"1 !important"},".Input, .Input:focus, .Input--invalid, .Input--empty":{"backgroundColor":"rgb(231, 234, 235) !important","paddingLeft":"22px !important","border":"none","boxShadow":"none","borderRadius":"28px","fontSize":"20px","height":"56px","paddingBottom":"2px !important"},".Label":{"color":"#2167AE","opacity":"1 !important","bottom":"5px","marginLeft":"22px"},".Label--invalid, .Input--invalid, .Error":{"color":"#CB4B40 !important","opacity":"1 !important"},".PaymentLabel":{"color":"#23366F !important","fontSize":"24px"},".InputLogo--empty":{"color":"#979797"},".Input--invalid":{"border":"2px solid #CB4B40 !important"}},"payment_link_ui_rules":{"#submit":{"height":"max-content","padding":"14px 20px","fontSize":"20px","marginTop":"48px","borderRadius":"50px"},"#submit.not-ready":{"backgroundColor":"#A6ADAF !important"},"#submit.processing":{"paddingRight":"50px !important","paddingLeft":"50px !important"}},"enable_button_only_on_form_ready":true,"payment_form_header_text":null,"payment_form_label_type":"floating","show_card_terms":"never","is_setup_mandate_flow":null,"color_icon_card_cvc_error":null}},"allowed_domains":["http://localhost:5500","localhost:5500","*","localhost:5501","http://localhost:5501"],"branding_visibility":false},"authentication_connector_details":null,"use_billing_as_payment_method_billing":true,"extended_card_info_config":null,"collect_shipping_details_from_wallet_connector":false,"collect_billing_details_from_wallet_connector":false,"always_collect_shipping_details_from_wallet_connector":false,"always_collect_billing_details_from_wallet_connector":false,"is_connector_agnostic_mit_enabled":true,"payout_link_config":null,"outgoing_webhook_custom_http_headers":null,"tax_connector_id":null,"is_tax_connector_enabled":false,"is_network_tokenization_enabled":true,"is_auto_retries_enabled":false,"max_auto_retries_enabled":null,"always_request_extended_authorization":null,"is_click_to_pay_enabled":false,"authentication_product_ids":null,"card_testing_guard_config":{"card_ip_blocking_status":"disabled","card_ip_blocking_threshold":3,"guest_user_card_blocking_status":"disabled","guest_user_card_blocking_threshold":10,"customer_id_blocking_status":"disabled","customer_id_blocking_threshold":5,"card_testing_guard_expiry":3600},"is_clear_pan_retries_enabled":false,"force_3ds_challenge":false,"is_debit_routing_enabled":false,"merchant_business_country":null,"is_pre_network_tokenization_enabled":false,"acquirer_configs":null,"is_iframe_redirection_enabled":null,"merchant_category_code":null}
Expectation
- Only valid status can be specified for triggering webhooks across payments, refunds and payouts
</details>
II. Existing behavior
<details>
<summary>1. Create Merchant account without specifying custom status list for triggering webhooks</summary>
cURL
curl --location --request POST 'http://localhost:8080/accounts' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: test_admin' \
--data-raw '{"merchant_id":"merchant_1750673427","locker_id":"m0010","merchant_name":"NewAge Retailer","merchant_details":{"primary_contact_person":"John Test","primary_email":"JohnTest@test.com","primary_phone":"sunt laborum","secondary_contact_person":"John Test2","secondary_email":"JohnTest2@test.com","secondary_phone":"cillum do dolor id","website":"https://www.example.com","about_business":"Online Retail with a wide selection of organic products for North America","address":{"line2":"Harrison Street","line3":"Harrison Street","city":"San Fransico","state":"California","zip":"94122","country":"US"}},"return_url":"https://google.com/success","webhook_details":{"webhook_url":"https://webhook.site/ede0ddc6-5583-4a92-80e3-d513028c4fe2","webhook_version":"1.0.1","webhook_username":"random","webhook_password":"pass"},"sub_merchants_enabled":false,"metadata":{"city":"NY","unit":"245"},"primary_business_details":[{"country":"IN","business":"default"}]}'
Response
{"merchant_id":"merchant_1750673423","merchant_name":"NewAge Retailer","return_url":"https://google.com/success","enable_payment_response_hash":true,"payment_response_hash_key":"EPy4DzeilG41Sz0g2krFOfbz9jI49AnrsljEPFkIqRhHn96Hh70NcvvrsXMsuiR9","redirect_to_merchant_with_http_post":false,"merchant_details":{"primary_contact_person":"John Test","primary_phone":"sunt laborum","primary_email":"JohnTest@test.com","secondary_contact_person":"John Test2","secondary_phone":"cillum do dolor id","secondary_email":"JohnTest2@test.com","website":"https://www.example.com","about_business":"Online Retail with a wide selection of organic products for North America","address":{"city":"San Fransico","country":"US","line1":null,"line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":null,"last_name":null}},"webhook_details":{"webhook_version":"1.0.1","webhook_username":"random","webhook_password":"pass","webhook_url":"https://webhook.site/ede0ddc6-5583-4a92-80e3-d513028c4fe2","payment_statuses_enabled":null,"refund_statuses_enabled":null,"payout_statuses_enabled":null},"payout_routing_algorithm":null,"sub_merchants_enabled":false,"parent_merchant_id":null,"publishable_key":"pk_dev_429522d9b95049bb9f077fdbbf270d2c","metadata":{"city":"NY","unit":"245","compatible_connector":null},"locker_id":"m0010","primary_business_details":[{"country":"IN","business":"default"}],"frm_routing_algorithm":null,"organization_id":"org_wpDh2xmA3WgSWCi8Lzik","is_recon_enabled":false,"default_profile":"pro_vjiSMmVIZdLWNbPBnGXP","recon_status":"not_requested","pm_collect_link_config":null,"product_type":"orchestration","merchant_account_type":"standard"}
</details>
<details>
<summary>2. Create a payment</summary>
cURL
curl --location --request POST 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_WWRksDrZIVkWppHEPz4MWFccxq9ZMEoGHTWRw1euMjstZC3XD51mGBc5NjMLVAwx' \
--data-raw '{"amount":4500,"currency":"EUR","confirm":true,"profile_id":"pro_vjiSMmVIZdLWNbPBnGXP","capture_method":"manual","capture_on":"2022-09-10T10:11:12Z","authentication_type":"three_ds","setup_future_usage":"off_session","connector":["adyen"],"customer_id":"cus_zhY6PdgnyRlXLVGzqkvM","email":"abc@example.com","return_url":"https://google.com","payment_method":"card","payment_method_type":"debit","payment_method_data":{"card":{"card_number":"4111112014267661","card_exp_month":"12","card_exp_year":"2030","card_cvc":"737"}},"billing":{"address":{"line1":"1467","line2":"Harrison Street","line3":"Harrison Street","city":"San Fransico","state":"California","zip":"94122","country":"IT","first_name":"joseph","last_name":"Doe"},"phone":{"number":"8056594427","country_code":"+91"},"email":"guest@example.com"},"metadata":{"Force-PSP":"Adyen","udf1":"value1","new_customer":"true","login_date":"2019-09-10T10:11:12Z"},"browser_info":{"user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.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-US","color_depth":32,"screen_height":1117,"screen_width":1728,"time_zone":-330,"java_enabled":true,"java_script_enabled":true,"ip_address":"127.0.0.1"},"customer_acceptance":{"acceptance_type":"online","accepted_at":"1963-05-03T04:07:52.723Z","online":{"ip_address":"127.0.0.1","user_agent":"amet irure esse"}},"connector_metadata":{"adyen":{"testing":{}}},"session_expiry":60}'
Response
{"payment_id":"pay_g0OJdggJBGyoEzizQvs5","merchant_id":"merchant_1750673423","status":"requires_capture","amount":4500,"net_amount":4500,"shipping_cost":null,"amount_capturable":4500,"amount_received":null,"connector":"adyen","client_secret":"pay_g0OJdggJBGyoEzizQvs5_secret_hfNsAK9g7dE6py1TIyMV","created":"2025-06-23T10:11:45.123Z","currency":"EUR","customer_id":"cus_zhY6PdgnyRlXLVGzqkvM","customer":{"id":"cus_zhY6PdgnyRlXLVGzqkvM","name":null,"email":"abc@example.com","phone":null,"phone_country_code":null},"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":"off_session","off_session":null,"capture_on":null,"capture_method":"manual","payment_method":"card","payment_method_data":{"card":{"last4":"7661","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"411111","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"2030","card_holder_name":null,"payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"IT","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":"guest@example.com"},"order_details":null,"email":"abc@example.com","name":null,"phone":null,"return_url":"https://google.com/","authentication_type":"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":"debit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"cus_zhY6PdgnyRlXLVGzqkvM","created_at":1750673505,"expires":1750677105,"secret":"epk_f3de069957be49b9b927d52fd2c01192"},"manual_retry_allowed":false,"connector_transaction_id":"NJHLXGQ2BDDHL975","frm_message":null,"metadata":{"udf1":"value1","Force-PSP":"Adyen","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":{"apple_pay":null,"airwallex":null,"noon":null,"braintree":null,"adyen":{"testing":{"holder_name":null}}},"feature_metadata":null,"reference_id":"pay_g0OJdggJBGyoEzizQvs5_1","payment_link":null,"profile_id":"pro_vjiSMmVIZdLWNbPBnGXP","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_q5cJJsbcZBqqwUZURC49","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-06-23T10:12:45.123Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"127.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","color_depth":32,"java_enabled":true,"screen_width":1728,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":1117,"java_script_enabled":true},"payment_method_id":"pm_kWp3mS4JxBegRLBnls36","payment_method_status":"active","updated":"2025-06-23T10:11:46.750Z","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":"WCLS4TMLJZ545G75","card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null}
Expectation
- Webhook must not be triggered as payment status `requires_capture` is not configured for triggering webhooks by default
</details>
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. API Request/Response Models**
- `crates/api_models/src/admin.rs`
**2. Database Layer (Queries & Schema)**
- `crates/diesel_models/src/business_profile.rs`
**3. Domain Models (Business Logic Types)**
- `crates/hyperswitch_domain_models/src/business_profile.rs`
**4. Core Business Logic**
- `crates/router/src/core/payouts.rs`
- `crates/router/src/core/webhooks/incoming.rs`
- `crates/router/src/core/webhooks/incoming_v2.rs`
**5. Type Definitions**
- `crates/common_types/src/consts.rs`
- `crates/router/src/types/transformers.rs`
**6. Utils**
- `crates/router/src/utils.rs`
- `crates/router/tests/utils.rs`
**7. Tests**
- `loadtest/k6/helper/setup.js`
**8. Configuration Files**
- `crates/euclid_wasm/Cargo.toml`
**9. Other**
- `api-reference/v1/openapi_spec_v1.json`
- `api-reference/v2/openapi_spec_v2.json`
- `crates/common_enums/src/enums.rs`
- ... and 5 more files
**Code Patterns Applied:**
- Implement new functions (15 changes)
- Extend existing types with new fields (27 changes)
- Add conditional logic for feature flags or filtering (13 changes)
- Modify database queries (8 changes)
**Detailed Identifier Changes:**
Commit d305fad2:
Files to modify:
**crates/api_models/src/admin.rs**
Add:
- function: private::validate_statuses
- function: pub::validate
- impl: impl WebhookDetails
**crates/common_enums/src/enums.rs**
Modify existing code
**crates/common_enums/src/transformers.rs**
Add:
- function: private::from
- function: private::from
- function: private::from
- function: private::from
- function: private::from
- impl: impl From<IntentStatus> for Option<EventType>
- impl: impl From<RefundStatus> for Option<EventType>
- impl: impl From<PayoutStatus> for Option<EventType>
- impl: impl From<DisputeStatus> for EventType
- impl: impl From<MandateStatus> for Option<EventType>
**crates/common_types/src/consts.rs**
Modify existing code
**crates/diesel_models/src/business_profile.rs**
Modify existing code
**crates/euclid_wasm/src/lib.rs**
Add:
- function: pub::get_valid_webhook_status
**crates/hyperswitch_domain_models/src/business_profile.rs**
Add:
- function: pub::get_payment_webhook_statuses
- function: pub::get_refund_webhook_statuses
- function: pub::get_payout_webhook_statuses
**crates/router/src/core/payouts.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/routes/admin.rs**
Modify existing code
**crates/router/src/routes/profiles.rs**
Modify existing code
**crates/router/src/types/transformers.rs**
Remove:
- function: private::foreign_from
- function: private::foreign_from
- function: private::foreign_from
- function: private::foreign_from
- function: private::foreign_from
- impl: impl ForeignFrom<api_enums::IntentStatus> for Option<storage_enums::EventType>
- impl: impl ForeignFrom<storage_enums::RefundStatus> for Option<storage_enums::EventType>
- impl: impl ForeignFrom<storage_enums::PayoutStatus> for Option<storage_enums::EventType>
- impl: impl ForeignFrom<storage_enums::DisputeStatus> for storage_enums::EventType
- impl: impl ForeignFrom<storage_enums::MandateStatus> for Option<storage_enums::EventType>
**crates/router/src/utils.rs**
Add:
- function: pub::trigger_payouts_webhook
- function: pub::trigger_payouts_webhook
**crates/router/src/workflows/outgoing_webhook_retry.rs**
Modify existing code
**crates/router/tests/utils.rs**
Modify existing code
|
{"pr_number": 8433, "pr_title": "feat(core): allow setting up status across payments, refunds and payouts for triggering webhooks in core resource flows", "merged_at": "2025-06-30T07:41:26Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/admin.rs"], "database": ["crates/diesel_models/src/business_profile.rs"], "domain": ["crates/hyperswitch_domain_models/src/business_profile.rs"], "core_business": ["crates/router/src/core/payouts.rs", "crates/router/src/core/webhooks/incoming.rs", "crates/router/src/core/webhooks/incoming_v2.rs"], "types": ["crates/common_types/src/consts.rs", "crates/router/src/types/transformers.rs"], "utils": ["crates/router/src/utils.rs", "crates/router/tests/utils.rs"], "tests": ["loadtest/k6/helper/setup.js"], "config": ["crates/euclid_wasm/Cargo.toml"], "other": ["api-reference/v1/openapi_spec_v1.json", "api-reference/v2/openapi_spec_v2.json", "crates/common_enums/src/enums.rs", "crates/common_enums/src/transformers.rs", "crates/euclid_wasm/src/lib.rs", "crates/router/src/routes/admin.rs", "crates/router/src/routes/profiles.rs", "crates/router/src/workflows/outgoing_webhook_retry.rs"]}, "change_types": {"functions_added": 15, "fields_added": 27, "imports_added": 5, "conditionals_added": 13, "database_queries": 8}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(routing): add support to pass fallback connectors to decision engine
## 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 -->
Decision engine does not have the concept of fallback connectors, so we recently added support to handle the default connectors by allowing them to be passed in the evaluate request. As part of this PR we are making the necessary changes to pass fallback connectors to decision engine
### 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)?
-->
On making a payment from hyperswitch, with the routing rules defined and activated already. We will be passing the fallback_output to the decision engine
<img width="1038" height="379" alt="Screenshot 2025-07-14 at 6 51 45 PM" src="https://github.com/user-attachments/assets/59540f64-00e6-475f-b528-a19ea0f71411" />
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Core Business Logic**
- `crates/router/src/core/payments/routing.rs`
- `crates/router/src/core/payments/routing/utils.rs`
**Code Patterns Applied:**
- Extend existing types with new fields (5 changes)
**Detailed Identifier Changes:**
Commit d9e1d881:
Files to modify:
**crates/router/src/core/payments/routing.rs**
Modify existing code
**crates/router/src/core/payments/routing/utils.rs**
Modify existing code
|
{"pr_number": 8615, "pr_title": "feat(routing): add support to pass fallback connectors to decision engine", "merged_at": "2025-07-15T08:03:29Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "connector"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/routing.rs", "crates/router/src/core/payments/routing/utils.rs"]}, "change_types": {"fields_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
fix(payments): populate payment_method_type in payment_attempt for cards
## 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 the paths where you can find config files:
1. `config`
2. `crates/router/src/configs`
3. `loadtest/config`
-->
## Motivation and Context
This helps us attach payment_method_type for card BINs present in cards_info table
## How did you test it?
Locally.
<details>
<summary>1. Create a card payment without payment_method_type</summary>
cURL
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_DDq72QAk6IpUy0tf6kjmjpC78VaaeI2YnbSwJwnhcTp4KQvDkSkswTbo6b3nm9cJ' \
--data-raw '{"amount":6500,"currency":"USD","confirm":true,"capture_method":"automatic","capture_on":"2022-09-10T10:11:12Z","customer_id":"cus_sH6s3hf1uukqvYlAGkj5_4","email":"guest@example.com","name":"John Doe","phone":"999999999","profile_id":"pro_OLl8NlVXBaGHHE51KdLc","phone_country_code":"+65","description":"Its my first payment request","authentication_type":"no_three_ds","return_url":"https://hyperswitch.io","setup_future_usage":"on_session","customer_acceptance":{"acceptance_type":"offline","accepted_at":"1963-05-03T04:07:52.723Z","online":{"ip_address":"127.0.0.1","user_agent":"amet irure esse"}},"connector":["stripe"],"payment_method":"card","payment_method_data":{"card":{"card_number":"5555555555554444","card_exp_month":"08","card_exp_year":"2025","card_holder_name":"John Doe","card_cvc":"123"}},"billing":{"address":{"line1":"1467","line2":"Harrison Street","line3":"Harrison Street","city":"San Fransico","state":"California","zip":"94122","country":"US","first_name":"John"}},"statement_descriptor_name":"joseph","statement_descriptor_suffix":"JS","metadata":{"udf1":"value1","new_customer":"true","login_date":"2019-09-10T10:11:12Z"},"browser_info":{"ip_address":"129.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.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-US","color_depth":30,"screen_height":1117,"screen_width":1728,"time_zone":-330,"java_enabled":true,"java_script_enabled":true}}'
Response (it should have payment_method_type in response)
{"payment_id":"pay_zqseTAFEnWA0ULs52UQf","merchant_id":"merchant_1731047637","status":"succeeded","amount":6500,"net_amount":6500,"shipping_cost":null,"amount_capturable":0,"amount_received":6500,"connector":"stripe","client_secret":"pay_zqseTAFEnWA0ULs52UQf_secret_34nMjYSlYfGLXfXT2Rcw","created":"2024-11-08T09:17:11.158Z","currency":"USD","customer_id":"cus_sH6s3hf1uukqvYlAGkj5_4","customer":{"id":"cus_sH6s3hf1uukqvYlAGkj5_4","name":"John Doe","email":"guest@example.com","phone":"999999999","phone_country_code":"+65"},"description":"Its my first payment request","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":"4444","card_type":"CREDIT","card_network":"Mastercard","card_issuer":"MASTERCARD INTERNATIONAL","card_issuing_country":"BRAZIL","card_isin":"555555","card_extended_bin":null,"card_exp_month":"08","card_exp_year":"2025","card_holder_name":null,"payment_checks":{"cvc_check":"pass","address_line1_check":"pass","address_postal_code_check":"pass"},"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"John","last_name":null},"phone":null,"email":null},"order_details":null,"email":"guest@example.com","name":"John Doe","phone":"999999999","return_url":"https://hyperswitch.io/","authentication_type":"no_three_ds","statement_descriptor_name":"joseph","statement_descriptor_suffix":"JS","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":"cus_sH6s3hf1uukqvYlAGkj5_4","created_at":1731057431,"expires":1731061031,"secret":"epk_1c7b82eafc41493ea4614cd4d2355551"},"manual_retry_allowed":false,"connector_transaction_id":"pi_3QIoJXD5R7gDAGff0XBhiGcW","frm_message":null,"metadata":{"udf1":"value1","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":null,"feature_metadata":null,"reference_id":"pi_3QIoJXD5R7gDAGff0XBhiGcW","payment_link":null,"profile_id":"pro_OLl8NlVXBaGHHE51KdLc","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_IN8H4cI4P0upvMUfgoLq","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2024-11-08T09:32:11.158Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"129.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","color_depth":30,"java_enabled":true,"screen_width":1728,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":1117,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2024-11-08T09:17:12.667Z","charges":null,"frm_metadata":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null}
</details>
<details>
<summary>2. Create a card payment with incorrect payment_method_type</summary>
cURL
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_DDq72QAk6IpUy0tf6kjmjpC78VaaeI2YnbSwJwnhcTp4KQvDkSkswTbo6b3nm9cJ' \
--data-raw '{"amount":6500,"currency":"USD","confirm":true,"capture_method":"automatic","capture_on":"2022-09-10T10:11:12Z","customer_id":"cus_sH6s3hf1uukqvYlAGkj5_4","email":"guest@example.com","name":"John Doe","phone":"999999999","profile_id":"pro_OLl8NlVXBaGHHE51KdLc","phone_country_code":"+65","description":"Its my first payment request","authentication_type":"no_three_ds","return_url":"https://hyperswitch.io","setup_future_usage":"on_session","customer_acceptance":{"acceptance_type":"offline","accepted_at":"1963-05-03T04:07:52.723Z","online":{"ip_address":"127.0.0.1","user_agent":"amet irure esse"}},"connector":["stripe"],"payment_method":"card","payment_method_type":"debit","payment_method_data":{"card":{"card_number":"5555555555554444","card_exp_month":"08","card_exp_year":"2025","card_holder_name":"John Doe","card_cvc":"123"}},"billing":{"address":{"line1":"1467","line2":"Harrison Street","line3":"Harrison Street","city":"San Fransico","state":"California","zip":"94122","country":"US","first_name":"John"}},"statement_descriptor_name":"joseph","statement_descriptor_suffix":"JS","metadata":{"udf1":"value1","new_customer":"true","login_date":"2019-09-10T10:11:12Z"},"browser_info":{"ip_address":"129.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.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-US","color_depth":30,"screen_height":1117,"screen_width":1728,"time_zone":-330,"java_enabled":true,"java_script_enabled":true}}'
Response (to have correct payment_method_type in response)
{"payment_id":"pay_zqseTAFEnWA0ULs52UQf","merchant_id":"merchant_1731047637","status":"succeeded","amount":6500,"net_amount":6500,"shipping_cost":null,"amount_capturable":0,"amount_received":6500,"connector":"stripe","client_secret":"pay_zqseTAFEnWA0ULs52UQf_secret_34nMjYSlYfGLXfXT2Rcw","created":"2024-11-08T09:17:11.158Z","currency":"USD","customer_id":"cus_sH6s3hf1uukqvYlAGkj5_4","customer":{"id":"cus_sH6s3hf1uukqvYlAGkj5_4","name":"John Doe","email":"guest@example.com","phone":"999999999","phone_country_code":"+65"},"description":"Its my first payment request","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":"4444","card_type":"CREDIT","card_network":"Mastercard","card_issuer":"MASTERCARD INTERNATIONAL","card_issuing_country":"BRAZIL","card_isin":"555555","card_extended_bin":null,"card_exp_month":"08","card_exp_year":"2025","card_holder_name":null,"payment_checks":{"cvc_check":"pass","address_line1_check":"pass","address_postal_code_check":"pass"},"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"John","last_name":null},"phone":null,"email":null},"order_details":null,"email":"guest@example.com","name":"John Doe","phone":"999999999","return_url":"https://hyperswitch.io/","authentication_type":"no_three_ds","statement_descriptor_name":"joseph","statement_descriptor_suffix":"JS","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":"cus_sH6s3hf1uukqvYlAGkj5_4","created_at":1731057431,"expires":1731061031,"secret":"epk_1c7b82eafc41493ea4614cd4d2355551"},"manual_retry_allowed":false,"connector_transaction_id":"pi_3QIoJXD5R7gDAGff0XBhiGcW","frm_message":null,"metadata":{"udf1":"value1","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":null,"feature_metadata":null,"reference_id":"pi_3QIoJXD5R7gDAGff0XBhiGcW","payment_link":null,"profile_id":"pro_OLl8NlVXBaGHHE51KdLc","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_IN8H4cI4P0upvMUfgoLq","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2024-11-08T09:32:11.158Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"129.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","color_depth":30,"java_enabled":true,"screen_width":1728,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":1117,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2024-11-08T09:17:12.667Z","charges":null,"frm_metadata":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null}
</details>
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Core Business Logic**
- `crates/router/src/core/payments/operations/payment_confirm.rs`
- `crates/router/src/core/payments/operations/payment_create.rs`
- `crates/router/src/core/payments/transformers.rs`
**Code Patterns Applied:**
- Implement new functions (1 changes)
- Add conditional logic for feature flags or filtering (3 changes)
**Detailed Identifier Changes:**
Commit 574170a3:
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>
|
{"pr_number": 6519, "pr_title": "fix(payments): populate payment_method_type in payment_attempt for cards", "merged_at": "2024-11-13T10:04:00Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/operations/payment_confirm.rs", "crates/router/src/core/payments/operations/payment_create.rs", "crates/router/src/core/payments/transformers.rs"]}, "change_types": {"functions_added": 1, "conditionals_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
ci(cypress): add tests for mit payment without billing
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [x] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Added tests for payments made using CIT with billing address and MIT without a billing address.
### 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
Test cases Enhancement
## How did you test it?
<img width="873" alt="image" src="https://github.com/user-attachments/assets/0e89c6b7-d5d5-47ad-9981-cd46cc3f6888" />
<img width="708" alt="image" src="https://github.com/user-attachments/assets/9adf070e-a5c9-4f57-a65f-488fd6bc24d3" />
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Tests**
- `cypress-tests/cypress/e2e/configs/Payment/Commons.js`
- `cypress-tests/cypress/e2e/configs/Payment/Fiuu.js`
- `cypress-tests/cypress/e2e/spec/Payment/00019-MandatesUsingPMID.cy.js`
**Code Patterns Applied:**
- Extend existing types with new fields (16 changes)
- Add conditional logic for feature flags or filtering (3 changes)
|
{"pr_number": 7326, "pr_title": "ci(cypress): add tests for mit payment without billing", "merged_at": "2025-03-03T11:12:56Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/configs/Payment/Commons.js", "cypress-tests/cypress/e2e/configs/Payment/Fiuu.js", "cypress-tests/cypress/e2e/spec/Payment/00019-MandatesUsingPMID.cy.js"]}, "change_types": {"fields_added": 16, "conditionals_added": 3}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
|
fix(wasm): [BLUECODE] Added metadata configs for dashboard
## 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 -->
Added `shop_name` in mca metadata
### 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. External Connector Integration**
- `crates/connector_configs/src/connector.rs`
**Code Patterns Applied:**
- Extend existing types with new fields (1 changes)
**Detailed Identifier Changes:**
Commit 5ac15cd4:
Files to modify:
**crates/connector_configs/src/connector.rs**
Modify existing code
|
{"pr_number": 8824, "pr_title": "fix(wasm): [BLUECODE] Added metadata configs for dashboard", "merged_at": "2025-08-04T07:23:54Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"connectors": ["crates/connector_configs/src/connector.rs"]}, "change_types": {"fields_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(connectors): [Redsys] add Psync and Rsync support
## 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 -->
1. Redsys Psync and Rsync implementation.
API type: SOAP XML API
_Note: Connector doesn't support Psync call, when the next action is `threeds_invoke` (just after the preprocessing call). If triggeredRedsys will throw an error with error_code: `xml0024`._
2. Status mapping change
a) "9999" is mapped to Authentication pending as this status specifies - "Operation that has been redirected to the issuer to authenticate" and "9998" maps to failed status
## 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)?
-->
Cannot be tested as processing status cannot be stimulated during sandbox testing
<details>
<summary> Local Testing (manually mark the payment as pending and do a Psync) </summary>
```curl
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_S8QiRuQPjHGG1szVbgNxJVhTwTRF9ydj9APuvTeXCsp79NmRGNctIyPsvMAZL3Hg' \
--data-raw '{
"amount": 10,
"currency": "EUR",
"return_url": "https://hyperswitch.io",
"confirm": true,
"customer_acceptance": null,
"customer_id" :"asbh",
"capture_method": "automatic",
"authentication_type": "three_ds",
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "Ceuta",
"zip": "94122",
"country": "ES",
"first_name": "joseph",
"last_name": "Doe"
},
"email": "mauro.morandi@nexi.it",
"phone": {
"number": "9123456789",
"country_code": "+91"
}
},
"email": "hyperswitch_sdk_demo_id@gmail.com",
"browser_info": {
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.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-US",
"color_depth": 32,
"screen_height": 1117,
"screen_width": 1728,
"time_zone": -330,
"java_enabled": true,
"java_script_enabled": true,
"ip_address": "127.0.0.1"
},
"payment_method": "card",
"payment_method_data": {
"card": {
"card_number": "4548814479727229",
"card_exp_month": "12",
"card_exp_year": "49",
"card_holder_name": "Joseph",
"card_cvc": "123"
}
},
"setup_future_usage": "on_session",
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "Ceuta",
"zip": "94122",
"country": "ES",
"first_name": "joseph",
"last_name": "Doe"
},
"email": "mauro.morandi@nexi.it",
"phone": {
"number": "9123456789",
"country_code": "+91"
}
}
}'
```
Response
```json
{"payment_id":"pay_sJAE201oybS9Nom6njE0","merchant_id":"postman_merchant_GHAction_20dc3fc4-9c75-4224-9113-f1a66dc1d515","status":"processing","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"redsys","client_secret":"pay_sJAE201oybS9Nom6njE0_secret_1Krj7K16Sbb8Jys68BQn","created":"2025-03-21T06:29:43.144Z","currency":"EUR","customer_id":"asbh","customer":{"id":"asbh","name":null,"email":"hyperswitch_sdk_demo_id@gmail.com","phone":null,"phone_country_code":null},"description":null,"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":"7229","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"454881","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"49","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":"token_PGJePKDPhz6Q0RyBeRap","shipping":{"address":{"city":"San Fransico","country":"ES","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceuta","first_name":"joseph","last_name":"Doe"},"phone":{"number":"9123456789","country_code":"+91"},"email":"mauro.morandi@nexi.it"},"billing":{"address":{"city":"San Fransico","country":"ES","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceuta","first_name":"joseph","last_name":"Doe"},"phone":{"number":"9123456789","country_code":"+91"},"email":"mauro.morandi@nexi.it"},"order_details":null,"email":"hyperswitch_sdk_demo_id@gmail.com","name":null,"phone":null,"return_url":"https://hyperswitch.io/","authentication_type":"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":"asbh","created_at":1742538583,"expires":1742542183,"secret":"epk_ab1283dd0d4042c88994d81e0163ea30"},"manual_retry_allowed":false,"connector_transaction_id":"206678482225","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"206678482225","payment_link":null,"profile_id":"pro_501tEJX8ANb93eYoVAeO","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_TUNS4WRo8qUaNApH0dtb","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-03-21T06:44:43.144Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"127.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","color_depth":32,"java_enabled":true,"screen_width":1728,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":1117,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2025-03-21T06:29:48.812Z","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","issuer_error_code":null,"issuer_error_message":null}
```
Psync
```curl
curl --location 'http://localhost:8080/payments/pay_sJAE201oybS9Nom6njE0?force_sync=true' \
--header 'Accept: application/json' \
--header 'api-key: dev_S8QiRuQPjHGG1szVbgNxJVhTwTRF9ydj9APuvTeXCsp79NmRGNctIyPsvMAZL3Hg'
```
Response
```json
{"payment_id":"pay_sJAE201oybS9Nom6njE0","merchant_id":"postman_merchant_GHAction_20dc3fc4-9c75-4224-9113-f1a66dc1d515","status":"succeeded","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":0,"amount_received":10,"connector":"redsys","client_secret":"pay_sJAE201oybS9Nom6njE0_secret_1Krj7K16Sbb8Jys68BQn","created":"2025-03-21T06:29:43.144Z","currency":"EUR","customer_id":"asbh","customer":{"id":"asbh","name":null,"email":"hyperswitch_sdk_demo_id@gmail.com","phone":null,"phone_country_code":null},"description":null,"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":"7229","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"454881","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"49","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":"token_PGJePKDPhz6Q0RyBeRap","shipping":{"address":{"city":"San Fransico","country":"ES","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceuta","first_name":"joseph","last_name":"Doe"},"phone":{"number":"9123456789","country_code":"+91"},"email":"mauro.morandi@nexi.it"},"billing":{"address":{"city":"San Fransico","country":"ES","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceuta","first_name":"joseph","last_name":"Doe"},"phone":{"number":"9123456789","country_code":"+91"},"email":"mauro.morandi@nexi.it"},"order_details":null,"email":"hyperswitch_sdk_demo_id@gmail.com","name":null,"phone":null,"return_url":"https://hyperswitch.io/","authentication_type":"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":"206678482225","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"206678482225","payment_link":null,"profile_id":"pro_501tEJX8ANb93eYoVAeO","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_TUNS4WRo8qUaNApH0dtb","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-03-21T06:44:43.144Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"127.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","color_depth":32,"java_enabled":true,"screen_width":1728,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":1117,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2025-03-21T06:30:31.189Z","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","issuer_error_code":null,"issuer_error_message":null}
```
</details>
<details>
<summary> Psync after and before redirection </summary>
Create a 3ds payment
```curl
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_eYTBjERYvLMQg36q5VL8J3bwcWX9TONkgOB8E1wbOaQ38InTXnDJHrYQDQWoRu2b' \
--data-raw '{
"amount": 10,
"currency": "EUR",
"return_url": "https://hyperswitch.io",
"confirm": true,
"customer_acceptance": null,
"customer_id" :"asbh",
"capture_method": "automatic",
"authentication_type": "three_ds",
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "Ceutâ",
"zip": "94122",
"country": "ES",
"first_name": "joseph",
"last_name": "Doe"
},
"email": "mauro.morandi@nexi.it",
"phone": {
"number": "9123456789",
"country_code": "+91"
}
},
"email": "hyperswitch_sdk_demo_id@gmail.com",
"browser_info": {
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.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-US",
"color_depth": 32,
"screen_height": 1117,
"screen_width": 1728,
"time_zone": -330,
"java_enabled": true,
"java_script_enabled": true,
"ip_address": "127.0.0.1"
},
"payment_method": "card",
"payment_method_data": {
"card": {
"card_number": "4548817212493017",
"card_exp_month": "12",
"card_exp_year": "49",
"card_holder_name": "Joseph",
"card_cvc": "123"
}
},
"setup_future_usage": "on_session",
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "Ceuta",
"zip": "94122",
"country": "ES",
"first_name": "joseph",
"last_name": "Doe"
},
"email": "mauro.morandi@nexi.it",
"phone": {
"number": "9123456789",
"country_code": "+91"
}
}
}'
```
Response
```json
{"payment_id":"pay_W2nrSGTtg0T5gxvc9W20","merchant_id":"postman_merchant_GHAction_cfbbe59e-3f32-4dc5-a43f-6cb0dd952d10","status":"requires_customer_action","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":10,"amount_received":null,"connector":"redsys","client_secret":"pay_W2nrSGTtg0T5gxvc9W20_secret_vbXSeTVqLKxCS4WLKP5O","created":"2025-03-21T12:53:47.232Z","currency":"EUR","customer_id":"asbh","customer":{"id":"asbh","name":null,"email":"hyperswitch_sdk_demo_id@gmail.com","phone":null,"phone_country_code":null},"description":null,"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":"3017","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"454881","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"49","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":"token_ZnViWQzmhFBJ2I9Nt2fK","shipping":{"address":{"city":"San Fransico","country":"ES","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceuta","first_name":"joseph","last_name":"Doe"},"phone":{"number":"9123456789","country_code":"+91"},"email":"mauro.morandi@nexi.it"},"billing":{"address":{"city":"San Fransico","country":"ES","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"phone":{"number":"9123456789","country_code":"+91"},"email":"mauro.morandi@nexi.it"},"order_details":null,"email":"hyperswitch_sdk_demo_id@gmail.com","name":null,"phone":null,"return_url":"https://hyperswitch.io/","authentication_type":"three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":{"type":"redirect_to_url","redirect_to_url":"http://localhost:8080/payments/redirect/pay_W2nrSGTtg0T5gxvc9W20/postman_merchant_GHAction_cfbbe59e-3f32-4dc5-a43f-6cb0dd952d10/pay_W2nrSGTtg0T5gxvc9W20_1"},"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":"asbh","created_at":1742561627,"expires":1742565227,"secret":"epk_6f43b57c9b1f4199a874280094988181"},"manual_retry_allowed":null,"connector_transaction_id":"511143349445","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"511143349445","payment_link":null,"profile_id":"pro_YFj3piUG8tJyeIjrH3PJ","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_X7xy9kmBfdRs0l8kjOlo","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-03-21T13:08:47.232Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"127.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","color_depth":32,"java_enabled":true,"screen_width":1728,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":1117,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2025-03-21T12:53:52.795Z","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","issuer_error_code":null,"issuer_error_message":null}
```
Before processing the the redirection, do a psync
```curl
curl --location 'http://localhost:8080/payments/pay_W2nrSGTtg0T5gxvc9W20?force_sync=true' \
--header 'Accept: application/json' \
--header 'api-key: dev_eYTBjERYvLMQg36q5VL8J3bwcWX9TONkgOB8E1wbOaQ38InTXnDJHrYQDQWoRu2b'
```
Response
```json
{"payment_id":"pay_W2nrSGTtg0T5gxvc9W20","merchant_id":"postman_merchant_GHAction_cfbbe59e-3f32-4dc5-a43f-6cb0dd952d10","status":"requires_customer_action","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":10,"amount_received":null,"connector":"redsys","client_secret":"pay_W2nrSGTtg0T5gxvc9W20_secret_vbXSeTVqLKxCS4WLKP5O","created":"2025-03-21T12:53:47.232Z","currency":"EUR","customer_id":"asbh","customer":{"id":"asbh","name":null,"email":"hyperswitch_sdk_demo_id@gmail.com","phone":null,"phone_country_code":null},"description":null,"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":"3017","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"454881","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"49","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":"token_ZnViWQzmhFBJ2I9Nt2fK","shipping":{"address":{"city":"San Fransico","country":"ES","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceuta","first_name":"joseph","last_name":"Doe"},"phone":{"number":"9123456789","country_code":"+91"},"email":"mauro.morandi@nexi.it"},"billing":{"address":{"city":"San Fransico","country":"ES","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"phone":{"number":"9123456789","country_code":"+91"},"email":"mauro.morandi@nexi.it"},"order_details":null,"email":"hyperswitch_sdk_demo_id@gmail.com","name":null,"phone":null,"return_url":"https://hyperswitch.io/","authentication_type":"three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":{"type":"redirect_to_url","redirect_to_url":"http://localhost:8080/payments/redirect/pay_W2nrSGTtg0T5gxvc9W20/postman_merchant_GHAction_cfbbe59e-3f32-4dc5-a43f-6cb0dd952d10/pay_W2nrSGTtg0T5gxvc9W20_1"},"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":null,"connector_transaction_id":"511143349445","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"511143349445","payment_link":null,"profile_id":"pro_YFj3piUG8tJyeIjrH3PJ","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_X7xy9kmBfdRs0l8kjOlo","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-03-21T13:08:47.232Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"127.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","color_depth":32,"java_enabled":true,"screen_width":1728,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":1117,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2025-03-21T12:57:13.053Z","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","issuer_error_code":null,"issuer_error_message":null}
```
After redirection completion, do a Psync
```curl
curl --location 'http://localhost:8080/payments/pay_W2nrSGTtg0T5gxvc9W20?force_sync=true' \
--header 'Accept: application/json' \
--header 'api-key: dev_eYTBjERYvLMQg36q5VL8J3bwcWX9TONkgOB8E1wbOaQ38InTXnDJHrYQDQWoRu2b'
```
Response
```json
{"payment_id":"pay_W2nrSGTtg0T5gxvc9W20","merchant_id":"postman_merchant_GHAction_cfbbe59e-3f32-4dc5-a43f-6cb0dd952d10","status":"succeeded","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":0,"amount_received":10,"connector":"redsys","client_secret":"pay_W2nrSGTtg0T5gxvc9W20_secret_vbXSeTVqLKxCS4WLKP5O","created":"2025-03-21T12:53:47.232Z","currency":"EUR","customer_id":"asbh","customer":{"id":"asbh","name":null,"email":"hyperswitch_sdk_demo_id@gmail.com","phone":null,"phone_country_code":null},"description":null,"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":"3017","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"454881","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"49","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":"token_ZnViWQzmhFBJ2I9Nt2fK","shipping":{"address":{"city":"San Fransico","country":"ES","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceuta","first_name":"joseph","last_name":"Doe"},"phone":{"number":"9123456789","country_code":"+91"},"email":"mauro.morandi@nexi.it"},"billing":{"address":{"city":"San Fransico","country":"ES","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"phone":{"number":"9123456789","country_code":"+91"},"email":"mauro.morandi@nexi.it"},"order_details":null,"email":"hyperswitch_sdk_demo_id@gmail.com","name":null,"phone":null,"return_url":"https://hyperswitch.io/","authentication_type":"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":"511143349445","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"511143349445","payment_link":null,"profile_id":"pro_YFj3piUG8tJyeIjrH3PJ","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_X7xy9kmBfdRs0l8kjOlo","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-03-21T13:08:47.232Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"127.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","color_depth":32,"java_enabled":true,"screen_width":1728,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":1117,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2025-03-21T12:57:53.568Z","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","issuer_error_code":null,"issuer_error_message":null}
```
</details>
<details>
<summary>Test Rsync by updating the refund status to pending locally </summary>
Create a refund
```curl
curl --location 'http://localhost:8080/refunds' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_eYTBjERYvLMQg36q5VL8J3bwcWX9TONkgOB8E1wbOaQ38InTXnDJHrYQDQWoRu2b' \
--data '{
"payment_id": "pay_W2nrSGTtg0T5gxvc9W20",
"amount": 5,
"reason": "Customer returned product",
"refund_type": "instant",
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
}
}'
```
Response
```json
{"refund_id":"ref_5Oc5arvl7rYO2GK8pZFX","payment_id":"pay_W2nrSGTtg0T5gxvc9W20","amount":5,"currency":"EUR","status":"pending","reason":"Customer returned product","metadata":{"udf1":"value1","new_customer":"true","login_date":"2019-09-10T10:11:12Z"},"error_message":null,"error_code":null,"unified_code":null,"unified_message":null,"created_at":"2025-03-21T13:00:21.670Z","updated_at":"2025-03-21T13:00:22.652Z","connector":"redsys","profile_id":"pro_YFj3piUG8tJyeIjrH3PJ","merchant_connector_id":"mca_X7xy9kmBfdRs0l8kjOlo","split_refunds":null,"issuer_error_code":null,"issuer_error_message":null}
```
Trigger a Rsync call
```curl
curl --location 'http://localhost:8080/refunds/ref_5Oc5arvl7rYO2GK8pZFX' \
--header 'Accept: application/json' \
--header 'api-key: dev_eYTBjERYvLMQg36q5VL8J3bwcWX9TONkgOB8E1wbOaQ38InTXnDJHrYQDQWoRu2b'
```
Response
```json
{"refund_id":"ref_5Oc5arvl7rYO2GK8pZFX","payment_id":"pay_W2nrSGTtg0T5gxvc9W20","amount":5,"currency":"EUR","status":"succeeded","reason":"Customer returned product","metadata":{"udf1":"value1","new_customer":"true","login_date":"2019-09-10T10:11:12Z"},"error_message":null,"error_code":null,"unified_code":null,"unified_message":null,"created_at":"2025-03-21T13:00:21.670Z","updated_at":"2025-03-21T13:01:23.315Z","connector":"redsys","profile_id":"pro_YFj3piUG8tJyeIjrH3PJ","merchant_connector_id":"mca_X7xy9kmBfdRs0l8kjOlo","split_refunds":null,"issuer_error_code":null,"issuer_error_message":null}
```
</details>
## 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
|
To implement this **payment** feature, you'll need to modify these architectural layers:
**1. External Connector Integration**
- `crates/hyperswitch_connectors/Cargo.toml`
- `crates/hyperswitch_connectors/src/connectors/redsys.rs`
- `crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs`
- ... and 2 more files
**2. Utils**
- `crates/common_utils/src/consts.rs`
**3. Other**
- `Cargo.lock`
**Code Patterns Applied:**
- Define new data structures (15 changes)
- Implement new functions (21 changes)
- Extend existing types with new fields (138 changes)
- Add conditional logic for feature flags or filtering (4 changes)
**Detailed Identifier Changes:**
Commit 3f18c944:
Files to modify:
**crates/common_utils/src/consts.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors/redsys.rs**
Remove:
- impl: impl ConnectorCommonExt<Flow, Request, Response> for Redsys
- impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Redsys
- impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Redsys
Add:
- function: private::build_headers
- function: private::get_headers
- function: private::get_url
- 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_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
- impl: impl ConnectorCommonExt<Flow, Request, Response> for Redsys
- impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Redsys
- impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Redsys
**crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs**
Add:
- function: private::get_transaction_type
- function: private::construct_sync_request
- function: pub::build_payment_sync_request
- function: private::try_from
- function: pub::build_refund_sync_request
- function: private::try_from
- struct: pub::Messages
- struct: pub::VersionData
- struct: pub::Message
- struct: pub::RedsysSyncRequest
- struct: pub::RedsysSyncResponse
- struct: pub::SoapHeader
- struct: pub::SyncResponseBody
- struct: pub::ConsultaOperacionesResponse
- struct: pub::ConsultaOperacionesReturn
- struct: pub::MessagesResponseData
- struct: pub::VersionResponseData
- struct: pub::MessageResponseType
- struct: pub::SyncErrorCode
- struct: pub::RedsysSyncResponseData
- impl: impl TryFrom<ResponseRouterData<F, RedsysSyncResponse, PaymentsSyncData, PaymentsResponseData>> for RouterData<F, PaymentsSyncData, PaymentsResponseData>
- impl: impl TryFrom<RefundsResponseRouterData<RSync, RedsysSyncResponse>> for RefundsRouterData<RSync>
- mod: pub::transaction_type
**crates/hyperswitch_connectors/src/constants.rs**
Modify existing code
**crates/hyperswitch_connectors/src/utils.rs**
Modify existing code
|
{"pr_number": 7586, "pr_title": "feat(connectors): [Redsys] add Psync and Rsync support", "merged_at": "2025-03-22T06:06:34Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/Cargo.toml", "crates/hyperswitch_connectors/src/connectors/redsys.rs", "crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs", "crates/hyperswitch_connectors/src/constants.rs", "crates/hyperswitch_connectors/src/utils.rs"], "utils": ["crates/common_utils/src/consts.rs"], "other": ["Cargo.lock"]}, "change_types": {"structs_added": 15, "functions_added": 21, "fields_added": 138, "imports_added": 2, "conditionals_added": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
fix(connector): [AUTHORIZEDOTNET] Remove country PM filters
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
<!-- Describe your changes in detail -->
Removed country PM filters for payment processor authorizedotnet.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [x] 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).
-->
https://github.com/juspay/hyperswitch/issues/8277
## 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 Any Payment on Authorizedotnet with Billing Country other than US/Canada
Request:
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: API_KEY_HERE' \
--data '{
"amount": 1234,
"currency": "USD",
"confirm": true,
"customer_id": "Strustomewwr",
"payment_method": "card",
"payment_method_type": "credit",
"payment_method_data": {
"card": {
"card_number": "4111111111111111",
"card_exp_month": "02",
"card_exp_year": "35",
"card_holder_name": "John Doe",
"card_cvc": "123"
}
},
"billing": {
"address": {
"first_name": "John",
"last_name": "Doe",
"line1": "Harrison Street",
"city": "San Francisco",
"state": "California",
"zip": "94016",
"country": "ID"
}
},
"metadata": {
"count_tickets": 1,
"transaction_number": "5590045"
}
}'
```
Response:
```
{
"payment_id": "pay_WWS00coZ3l0Ka60YIRnR",
"merchant_id": "merchant_1749276137",
"status": "succeeded",
"amount": 1234,
"net_amount": 1234,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": 1234,
"connector": "authorizedotnet",
"client_secret": "pay_WWS00coZ3l0Ka60YIRnR_secret_wFydMj0boNTbiTmq839R",
"created": "2025-06-07T06:16:14.824Z",
"currency": "USD",
"customer_id": "Strustomewwr",
"customer": {
"id": "Strustomewwr",
"name": null,
"email": null,
"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": null,
"payment_method": "card",
"payment_method_data": {
"card": {
"last4": "1111",
"card_type": null,
"card_network": null,
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "411111",
"card_extended_bin": null,
"card_exp_month": "02",
"card_exp_year": "35",
"card_holder_name": "John Doe",
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": {
"address": {
"city": "San Francisco",
"country": "ID",
"line1": "Harrison Street",
"line2": null,
"line3": null,
"zip": "94016",
"state": "California",
"first_name": "John",
"last_name": "Doe"
},
"phone": null,
"email": null
},
"order_details": null,
"email": null,
"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": "Strustomewwr",
"created_at": 1749276974,
"expires": 1749280574,
"secret": "epk_715cd374b7e8409fba550e3866c9dbc6"
},
"manual_retry_allowed": false,
"connector_transaction_id": "120064688104",
"frm_message": null,
"metadata": {
"count_tickets": 1,
"transaction_number": "5590045"
},
"connector_metadata": null,
"feature_metadata": null,
"reference_id": "120064688104",
"payment_link": null,
"profile_id": "pro_lZhF6us28eQOE1icJuYF",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_iQgBrM8isie20kKlZGth",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-06-07T06:31:14.824Z",
"fingerprint": null,
"browser_info": null,
"payment_method_id": null,
"payment_method_status": null,
"updated": "2025-06-07T06:16:15.357Z",
"split_payments": null,
"frm_metadata": null,
"extended_authorization_applied": null,
"capture_before": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": null,
"card_discovery": "manual",
"force_3ds_challenge": false,
"force_3ds_challenge_trigger": false,
"issuer_error_code": null,
"issuer_error_message": null,
"is_iframe_redirection_enabled": null,
"whole_connector_response": null
}
```
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Tests**
- `config/deployments/integration_test.toml`
- `loadtest/config/development.toml`
**2. Configuration Files**
- `config/deployments/production.toml`
- `config/deployments/sandbox.toml`
- `config/development.toml`
- ... and 1 more files
|
{"pr_number": 8278, "pr_title": "fix(connector): [AUTHORIZEDOTNET] Remove country PM filters", "merged_at": "2025-06-07T07:17:38Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"tests": ["config/deployments/integration_test.toml", "loadtest/config/development.toml"], "config": ["config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
|
fix(connector): [STRIPE] fix stripe mandate
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [x] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
- hotfix for - https://github.com/juspay/hyperswitch/pull/6899
- Revert this [PR](https://github.com/juspay/hyperswitch/pull/6855)
- Pass `setup_future_usage = None` for ConnectorMandateId and NetworkMandateId.
### 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?
1. Create Merchant
2. Create API KEY
3. Create Stripe connector
```
curl --location 'http://localhost:8080/account/postman_merchant_GHAction_1734681965/connectors' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: test_admin' \
--data '{
"connector_type": "payment_processor",
"profile_id": "pro_iprJnfcIANK2ws8xnWhI",
"connector_name": "stripe",
"connector_account_details": {
"auth_type": "HeaderKey",
"api_key": "__"
},
"test_mode": false,
"disabled": false,
"payment_methods_enabled": [
{
"payment_method": "pay_later",
"payment_method_types": [
{
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true,
"payment_experience": "redirect_to_url",
"payment_method_type": "affirm"
}
]
},
{
"payment_method": "pay_later",
"payment_method_types": [
{
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true,
"payment_experience": "redirect_to_url",
"payment_method_type": "afterpay_clearpay"
}
]
},
{
"payment_method": "pay_later",
"payment_method_types": [
{
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true,
"payment_experience": "redirect_to_url",
"payment_method_type": "klarna"
}
]
},
{
"payment_method": "pay_later",
"payment_method_types": [
{
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true,
"payment_experience": "invoke_sdk_client",
"payment_method_type": "klarna"
}
]
},
{
"payment_method": "bank_redirect",
"payment_method_types": [
{
"payment_method_type": "ideal",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_type": "giropay",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_type": "sofort",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_type": "eps",
"payment_experience": null,
"card_networks": null,
"accepted_currencies": null,
"accepted_countries": null,
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
},
{
"payment_method": "bank_debit",
"payment_method_types": [
{
"payment_method_type": "ach",
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_type": "becs",
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_type": "sepa",
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
},
{
"payment_method": "bank_transfer",
"payment_method_types": [
{
"payment_method_type": "ach",
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_type": "bacs",
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_type": "sepa",
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
},
{
"payment_method": "card",
"payment_method_types": [
{
"payment_method_type": "credit",
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true,
"card_networks": [
"AmericanExpress",
"Discover",
"Interac",
"JCB",
"Mastercard",
"Visa",
"DinersClub",
"UnionPay",
"RuPay"
]
}
]
},
{
"payment_method": "card",
"payment_method_types": [
{
"payment_method_type": "debit",
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true,
"card_networks": [
"AmericanExpress",
"Discover",
"Interac",
"JCB",
"Mastercard",
"Visa",
"DinersClub",
"UnionPay",
"RuPay"
]
}
]
},
{
"payment_method": "wallet",
"payment_method_types": [
{
"payment_method_type": "apple_pay",
"payment_experience": "invoke_sdk_client",
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
},
{
"payment_method": "wallet",
"payment_method_types": [
{
"payment_method_type": "google_pay",
"payment_experience": "invoke_sdk_client",
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
},
{
"payment_method_type": "we_chat_pay",
"payment_experience": "invoke_sdk_client",
"minimum_amount": 1,
"maximum_amount": 68607706,
"recurring_enabled": true,
"installment_payment_enabled": true
}
]
}
],
"metadata": {
"google_pay": {
"allowed_payment_methods": [
{
"type": "CARD",
"parameters": {
"allowed_auth_methods": [
"PAN_ONLY",
"CRYPTOGRAM_3DS"
],
"allowed_card_networks": [
"AMEX",
"DISCOVER",
"INTERAC",
"JCB",
"MASTERCARD",
"VISA"
]
},
"tokenization_specification": {
"type": "PAYMENT_GATEWAY",
"parameters": {
"gateway": "example",
"gateway_merchant_id": "pk_test_51Msk2GAGHc77EJXX78h549SX2uaOnEkUYqBfjcoD05PIpAnDkYxMn8nQ4d19im85NQuX4Z6WDyHaUw2fFTPBWsIY00Wa7oNerO"
}
}
}
],
"merchant_info": {
"merchant_name": "Narayan Bhat"
}
},
"apple_pay": {
"session_token_data": {
"initiative": "web",
"certificate": "",
"display_name": "applepay",
"certificate_keys": "",
"initiative_context": "sdk-test-app.netlify.app",
"merchant_identifier": "merchant.com.stripe.sang"
},
"payment_request_data": {
"label": "applepay pvt.ltd",
"supported_networks": [
"visa",
"masterCard",
"amex",
"discover"
],
"merchant_capabilities": [
"supports3DS"
]
}
}
}
}'
```
4. Create Customer
5. Enable NTID
```
curl --location 'http://localhost:8080/account/postman_merchant_GHAction_1734681965/business_profile/pro_iprJnfcIANK2ws8xnWhI' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: test_admin' \
--data '{
"is_connector_agnostic_mit_enabled": true
}'
```
6. Payment Create
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Accept-Language: ja' \
--header 'api-key: dev_qILOUpgjqH3hbdxrwstzlnFJD0L14SSdNzGOrKDbtOZFEqRpvJzg7TiggleMHOnz' \
--data-raw '{
"customer_acceptance": null,
"setup_future_usage": "off_session",
"currency": "USD",
"amount": 6500,
"authentication_type": "no_three_ds",
"customer_id": "cus_1WMNEGiqjuLCQXJL64BK",
"capture_method": "automatic",
"description": "Joseph First Crypto",
"email": "hyperswitch_sdk_demo_id@gmail.com",
"profile_id": "pro_iprJnfcIANK2ws8xnWhI",
"connector_metadata": {
"noon": {
"order_category": "applepay"
}
},
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
}
}'
```
7.list PM for a customer
```
curl --location 'http://localhost:8080/customers/payment_methods?client_secret=pay_Pot19w2IWklIY8Zdci9e_secret_msckr4O1BLNGkOY7EAjQ' \
--header 'Accept: application/json' \
--header 'api-key: pk_dev_0139f3ccb0494e959a4df8ceb8b07fbc'
```
Response
```
{
"customer_payment_methods": [
{
"payment_token": "token_gaP8kf82RteJe7iNyyzs",
"payment_method_id": "pm_wE02Lr7fNXwUGaXQ1BiC",
"customer_id": "cus_1WMNEGiqjuLCQXJL64BK",
"payment_method": "card",
"payment_method_type": "debit",
"payment_method_issuer": null,
"payment_method_issuer_code": null,
"recurring_enabled": true,
"installment_payment_enabled": false,
"payment_experience": [
"redirect_to_url"
],
"card": {
"scheme": null,
"issuer_country": null,
"last4_digits": "4242",
"expiry_month": "10",
"expiry_year": "50",
"card_token": null,
"card_holder_name": "morino",
"card_fingerprint": null,
"nick_name": null,
"card_network": null,
"card_isin": "424242",
"card_issuer": null,
"card_type": null,
"saved_to_locker": true
},
"metadata": null,
"created": "2024-12-20T08:06:07.307Z",
"bank": null,
"surcharge_details": null,
"requires_cvv": false,
"last_used_at": "2024-12-20T08:06:11.041Z",
"default_payment_method_set": true,
"billing": {
"address": {
"city": "New York",
"country": "US",
"line1": "123 Main Street Apt 4B",
"line2": "123 Main Street Apt 4B",
"line3": "123 Main Street Apt 4B",
"zip": "10001",
"state": "New York",
"first_name": "morino",
"last_name": null
},
"phone": null,
"email": null
}
}
],
"is_guest_customer": false
}
```
8. paymnet confirm (MIT-PMID)
```
curl --location 'http://localhost:8080/payments/pay_Pot19w2IWklIY8Zdci9e/confirm' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_qILOUpgjqH3hbdxrwstzlnFJD0L14SSdNzGOrKDbtOZFEqRpvJzg7TiggleMHOnz' \
--data '{
"profile_id": "pro_iprJnfcIANK2ws8xnWhI",
"amount": 7000,
"currency": "USD",
"confirm": true,
"capture_method": "automatic",
"customer_id": "cus_1WMNEGiqjuLCQXJL64BK",
"return_url": "https://hyperswitch.io",
"recurring_details": {
"type": "payment_method_id",
"data": "pm_wE02Lr7fNXwUGaXQ1BiC"
},
"off_session": true,
"billing": {
"address": {
"first_name": "John",
"last_name": "Doe",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US"
},
"phone": {
"number": "9123456789",
"country_code": "+91"
}
},
"browser_info": {
"ip_address": "129.0.0.1",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.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-US",
"color_depth": 32,
"screen_height": 1117,
"screen_width": 1728,
"time_zone": -330,
"java_enabled": true,
"java_script_enabled": true
}
}'
```
Response
```
{
"payment_id": "pay_Pot19w2IWklIY8Zdci9e",
"merchant_id": "postman_merchant_GHAction_1734681965",
"status": "succeeded",
"amount": 6500,
"net_amount": 6500,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": 6500,
"connector": "stripe",
"client_secret": "pay_Pot19w2IWklIY8Zdci9e_secret_msckr4O1BLNGkOY7EAjQ",
"created": "2024-12-20T08:12:00.298Z",
"currency": "USD",
"customer_id": "cus_1WMNEGiqjuLCQXJL64BK",
"customer": {
"id": "cus_1WMNEGiqjuLCQXJL64BK",
"name": "John Doe",
"email": "hyperswitch_sdk_demo_id@gmail.com",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Joseph First Crypto",
"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": "4242",
"card_type": null,
"card_network": null,
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "424242",
"card_extended_bin": null,
"card_exp_month": "10",
"card_exp_year": "50",
"card_holder_name": "morino",
"payment_checks": {
"cvc_check": null,
"address_line1_check": "pass",
"address_postal_code_check": "pass"
},
"authentication_data": null
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "John",
"last_name": "Doe"
},
"phone": {
"number": "9123456789",
"country_code": "+91"
},
"email": null
},
"order_details": null,
"email": "hyperswitch_sdk_demo_id@gmail.com",
"name": "John Doe",
"phone": "999999999",
"return_url": "https://hyperswitch.io/",
"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": "debit",
"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": "pi_3QY1JdEOqOywnAIx1WuFU78T",
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": {
"apple_pay": null,
"airwallex": null,
"noon": {
"order_category": "applepay"
}
},
"feature_metadata": null,
"reference_id": "pi_3QY1JdEOqOywnAIx1WuFU78T",
"payment_link": null,
"profile_id": "pro_iprJnfcIANK2ws8xnWhI",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_K3vxJ0wdLtkya4PMCoCy",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2024-12-20T08:27:00.298Z",
"fingerprint": null,
"browser_info": {
"language": "en-US",
"time_zone": -330,
"ip_address": "129.0.0.1",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
"color_depth": 32,
"java_enabled": true,
"screen_width": 1728,
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"screen_height": 1117,
"java_script_enabled": true
},
"payment_method_id": "pm_wE02Lr7fNXwUGaXQ1BiC",
"payment_method_status": "active",
"updated": "2024-12-20T08:12:10.416Z",
"split_payments": null,
"frm_metadata": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": null
}
```
9. Payment create
```
curl --location 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Accept-Language: ja' \
--header 'api-key: dev_tPRMqr7DaBlAPnluXjLw4Y7aA3A6ylsrS7ZuTAxPQNwwyr5ocp0NwzYKmPGGPJho' \
--data-raw '{
"customer_acceptance": null,
"setup_future_usage": "off_session",
"currency": "USD",
"amount": 6500,
"authentication_type": "no_three_ds",
"customer_id": "cus_1WMNEGiqjuLCQXJL64BK",
"capture_method": "automatic",
"description": "Joseph First Crypto",
"email": "hyperswitch_sdk_demo_id@gmail.com",
"profile_id": "pro_iprJnfcIANK2ws8xnWhI",
"connector_metadata": {
"noon": {
"order_category": "applepay"
}
},
"metadata": {
"udf1": "value1",
"new_customer": "true",
"login_date": "2019-09-10T10:11:12Z"
}
}'
```
10. List payment method for a customer
```
curl --location 'http://localhost:8080/customers/payment_methods?client_secret=pay_URniJoADP0OxGr3uMFB5_secret_N1h6iyWVlCkxbbWS73oQ' \
--header 'Accept: application/json' \
--header 'api-key: pk_dev_b1f42086801d4d08bfd3f504ad818c86'
```
11.Payment confirm (MIT-token)
```
curl --location 'http://localhost:8080/payments/pay_Pot19w2IWklIY8Zdci9e/confirm' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: pk_dev_b1f42086801d4d08bfd3f504ad818c86' \
--data '{
"client_secret": "_",
"profile_id": "pro_iprJnfcIANK2ws8xnWhI",
"payment_method": "card",
"payment_token": "token_gaP8kf82RteJe7iNyyzs",
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "john",
"last_name": "doe"
}
},
"shipping": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "john",
"last_name": "doe"
}
},
"browser_info": {
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.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-US",
"color_depth": 32,
"screen_height": 1117,
"screen_width": 1728,
"time_zone": -330,
"java_enabled": true,
"java_script_enabled": true,
"ip_address": "127.0.0.1"
}
}'
```
response
```
{
"payment_id": "pay_RjY0jXFE8Xar83PI8Chi",
"merchant_id": "postman_merchant_GHAction_1734606213",
"status": "succeeded",
"amount": 6500,
"net_amount": 6500,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": 6500,
"connector": "stripe",
"client_secret": "pay_RjY0jXFE8Xar83PI8Chi_secret_mEVWBGUNPRq86unP86by",
"created": "2024-12-19T13:42:38.281Z",
"currency": "USD",
"customer_id": "cus_qvJuiZpsZp0tyO91SzVu",
"customer": {
"id": "cus_qvJuiZpsZp0tyO91SzVu",
"name": "John Doe",
"email": "hyperswitch_sdk_demo_id@gmail.com",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Joseph First Crypto",
"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": "4242",
"card_type": null,
"card_network": null,
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "424242",
"card_extended_bin": null,
"card_exp_month": "10",
"card_exp_year": "50",
"card_holder_name": "morino",
"payment_checks": null,
"authentication_data": null
},
"billing": null
},
"payment_token": "token_4kowz49reGMiVCsl7RtO",
"shipping": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "john",
"last_name": "doe"
},
"phone": null,
"email": null
},
"billing": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "john",
"last_name": "doe"
},
"phone": null,
"email": null
},
"order_details": null,
"email": "hyperswitch_sdk_demo_id@gmail.com",
"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": "debit",
"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": "pi_3QXk01EOqOywnAIx15jAcdAC",
"frm_message": null,
"metadata": {
"udf1": "value1",
"login_date": "2019-09-10T10:11:12Z",
"new_customer": "true"
},
"connector_metadata": {
"apple_pay": null,
"airwallex": null,
"noon": {
"order_category": "applepay"
}
},
"feature_metadata": null,
"reference_id": "pi_3QXk01EOqOywnAIx15jAcdAC",
"payment_link": null,
"profile_id": "pro_keF9gI6O2yVuvWUaqQNW",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_p2LE8wJaSteDl2w5GUx7",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2024-12-19T13:57:38.281Z",
"fingerprint": null,
"browser_info": {
"language": "en-US",
"time_zone": -330,
"ip_address": "127.0.0.1",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
"color_depth": 32,
"java_enabled": true,
"screen_width": 1728,
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"screen_height": 1117,
"java_script_enabled": true
},
"payment_method_id": "pm_lkBZNj9fkhdg8DunXWUn",
"payment_method_status": "active",
"updated": "2024-12-19T13:42:46.314Z",
"split_payments": null,
"frm_metadata": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": null
}
```
Adyen cypress test
1. Connector Agnostic NTID
<img width="670" alt="image" src="https://github.com/user-attachments/assets/daeb4ede-a4fe-4a64-8e62-638349347dec" />
2. Save card flow
<img width="643" alt="image" src="https://github.com/user-attachments/assets/63b1e32d-d82a-4ab1-ba71-e0755f55d953" />
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Core Business Logic**
- `crates/router/src/core/payments/transformers.rs`
**2. External Connector Integration**
- `crates/router/src/connector/stripe/transformers.rs`
**Code Patterns Applied:**
- Extend existing types with new fields (3 changes)
**Detailed Identifier Changes:**
Commit f31e448f:
Files to modify:
**crates/router/src/connector/stripe/transformers.rs**
Modify existing code
**crates/router/src/core/payments/transformers.rs**
Modify existing code
|
{"pr_number": 6909, "pr_title": "fix(connector): [STRIPE] fix stripe mandate", "merged_at": "2024-12-20T13:35:14Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/transformers.rs"], "connectors": ["crates/router/src/connector/stripe/transformers.rs"]}, "change_types": {"fields_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(core): add is_click_to_pay_enabled in business profile
## 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_profile' \
--header 'Content-Type: application/json' \
--header 'api-key: test_admin' \
--data '{
"profile_name": "foodddijiqw",
"payment_link_config": {
"business_specific_configs": {
"key1": {
"theme": "#3B845E",
"logo": "https://i.pinimg.com/736x/4d/83/5c/4d835ca8aafbbb15f84d07d926fda473.jpg",
"seller_name": "sahkal",
"display_sdk_only": true
},
"key2": {
"theme": "#B202FF",
"logo": "https://i.pinimg.com/736x/4d/83/5c/4d835ca8aafbbb15f84d07d926fda473.jpg",
"seller_name": "sahkal",
"enable_saved_payment_method":true
}
}
},
"is_click_to_pay_enabled": true
}'
```
Response
```shell
{
"merchant_id": "merchant_1733299712",
"profile_id": "pro_MnOa7c9LwpFVDtKPJecF",
"profile_name": "foodddijiqw",
"return_url": null,
"enable_payment_response_hash": true,
"payment_response_hash_key": "ZLPxx97IcjNPXXJZ5GVHSwGQoV7sWspuQ00LI0SQgcVBoK38rWoCMIqELCyvCV9G",
"redirect_to_merchant_with_http_post": false,
"webhook_details": null,
"metadata": null,
"routing_algorithm": null,
"intent_fulfillment_time": 900,
"frm_routing_algorithm": null,
"payout_routing_algorithm": null,
"applepay_verified_domains": null,
"session_expiry": 900,
"payment_link_config": {
"domain_name": null,
"theme": null,
"logo": null,
"seller_name": null,
"sdk_layout": null,
"display_sdk_only": null,
"enabled_saved_payment_method": null,
"hide_card_nickname_field": null,
"show_card_form_by_default": null,
"transaction_details": null,
"business_specific_configs": {
"key1": {
"theme": "#3B845E",
"logo": "https://i.pinimg.com/736x/4d/83/5c/4d835ca8aafbbb15f84d07d926fda473.jpg",
"seller_name": "sahkal",
"sdk_layout": null,
"display_sdk_only": true,
"enabled_saved_payment_method": null,
"hide_card_nickname_field": null,
"show_card_form_by_default": null,
"transaction_details": null
},
"key2": {
"theme": "#B202FF",
"logo": "https://i.pinimg.com/736x/4d/83/5c/4d835ca8aafbbb15f84d07d926fda473.jpg",
"seller_name": "sahkal",
"sdk_layout": null,
"display_sdk_only": null,
"enabled_saved_payment_method": null,
"hide_card_nickname_field": null,
"show_card_form_by_default": null,
"transaction_details": null
}
},
"allowed_domains": null
},
"authentication_connector_details": null,
"use_billing_as_payment_method_billing": true,
"extended_card_info_config": null,
"collect_shipping_details_from_wallet_connector": false,
"collect_billing_details_from_wallet_connector": false,
"always_collect_shipping_details_from_wallet_connector": false,
"always_collect_billing_details_from_wallet_connector": false,
"is_connector_agnostic_mit_enabled": false,
"payout_link_config": null,
"outgoing_webhook_custom_http_headers": null,
"tax_connector_id": null,
"is_tax_connector_enabled": false,
"is_network_tokenization_enabled": false,
"is_auto_retries_enabled": false,
"max_auto_retries_enabled": null,
"is_click_to_pay_enabled": true
}
```
## 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
|
To implement this **payment** feature, you'll need to modify these architectural layers:
**1. API Request/Response Models**
- `crates/api_models/src/admin.rs`
**2. Database Layer (Queries & Schema)**
- `crates/diesel_models/src/business_profile.rs`
- `crates/diesel_models/src/schema.rs`
- `crates/diesel_models/src/schema_v2.rs`
**3. Domain Models (Business Logic Types)**
- `crates/hyperswitch_domain_models/src/business_profile.rs`
**4. Core Business Logic**
- `crates/router/src/core/admin.rs`
**5. Type Definitions**
- `crates/router/src/types/api/admin.rs`
**6. Other**
- `api-reference-v2/openapi_spec.json`
- `api-reference/openapi_spec.json`
- `migrations/2024-12-04-072648_add_is_click_to_pay_enabled/down.sql`
- ... and 1 more files
**Code Patterns Applied:**
- Extend existing types with new fields (46 changes)
**Detailed Identifier Changes:**
Commit 4bfabdfa:
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
|
{"pr_number": 6736, "pr_title": "feat(core): add is_click_to_pay_enabled in business profile", "merged_at": "2024-12-05T13:04:29Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["payment", "merchant", "connector"]}, "hierarchy": {"api_models": ["crates/api_models/src/admin.rs"], "database": ["crates/diesel_models/src/business_profile.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs"], "domain": ["crates/hyperswitch_domain_models/src/business_profile.rs"], "core_business": ["crates/router/src/core/admin.rs"], "types": ["crates/router/src/types/api/admin.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "migrations/2024-12-04-072648_add_is_click_to_pay_enabled/down.sql", "migrations/2024-12-04-072648_add_is_click_to_pay_enabled/up.sql"]}, "change_types": {"fields_added": 46}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
refactor(middleware): add middleware to record metrics for request count and duration
## 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 the metrics that record incoming request count, status code and duration to the middleware, so that all requests that the server receives would be accounted for. As part of this change, the following two metrics are recorded as part of the middleware rather than within `server_wrap()`:
- `REQUESTS_RECEIVED`: Records the number of requests that the server received. Has request path and HTTP method as attributes.
- `REQUEST_TIME`: Records the time it took to respond to the request. Also helps us obtain a count of the number of requests to which the server responded successfully. Has request path, HTTP method and HTTP status code as attributes.
Additionally, this PR removes the `REQUEST_STATUS` metric, since it becomes redundant with the `REQUEST_TIME` metric helping us obtain a count of requests that the server responded to, along with tracking the status code. This PR also removes some duplicate code from a couple of places.
## 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).
-->
This change is being as part of a bigger change to improve the metrics emitted by the application. This change would help account for all the requests that the server received, record the complete time taken by the server when responding to requests, and possibly help with monitoring the server better.
## 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)?
-->
Locally, by running the OpenTelemetry Collector, Prometheus and Grafana with our Docker Compose setup.
1. Using `REQUESTS_RECEIVED` to count the number of requests received by the server:

The graph can be obtained by running a query like:
```text
sum by(method, path) (increase(REQUESTS_RECEIVED_total[$__rate_interval]))
```
Notice that the metric has `method` and `path` as attributes.
2. Using `REQUEST_TIME` to count the number of requests that the server responded to:

The graph can be obtained by running a query like:
```text
sum by(method, path, status_code) (increase(REQUEST_TIME_count[$__rate_interval]))
```
Notice that the metric has `method`, `path` and `status_code` as attributes. We are able to use `REQUEST_TIME` to count requests (even though it is a histogram metric) because `REQUEST_TIME_count` is automatically generated which functions like a counter.
Ideally, the number recorded by `REQUESTS_RECEIVED` and `REQUEST_TIME` should be the same but in case of application restarts mid-request, the number recorded by `REQUEST_TIME` may be slightly lesser.
3. Using `REQUEST_TIME` to record the request duration:
The 99th, 90th and 50th percentile values can be plotted:

The graph can be obtained by running a query like:
```text
histogram_quantile(0.99, sum by(le, method, path, status_code) (rate(REQUEST_TIME_bucket{path=~"/payments.*"}[$__rate_interval])))
```
This would provide us the 99th percentile values. The 90th and 50th percentile values can be obtained by replacing `0.99` in the above query with `0.9` and `0.5`, respectively.
The same data can be plotted as a heatmap:

The heatmap can be obtained by running a query like:
```text
sum by(le) (rate(REQUEST_TIME_bucket{path=~"/payments.*"}[$__rate_interval]))
```
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Utils**
- `crates/router/src/routes/metrics/utils.rs`
**2. Other**
- `crates/analytics/src/metrics/request.rs`
- `crates/router/src/compatibility/wrap.rs`
- `crates/router/src/lib.rs`
- ... and 4 more files
**Code Patterns Applied:**
- Define new data structures (2 changes)
- Implement new functions (3 changes)
- Extend existing types with new fields (6 changes)
**Detailed Identifier Changes:**
Commit 54a1719f:
Files to modify:
**crates/analytics/src/metrics/request.rs**
Remove:
- function: pub::time_future
**crates/router/src/compatibility/wrap.rs**
Modify existing code
**crates/router/src/lib.rs**
Modify existing code
**crates/router/src/middleware.rs**
Add:
- function: private::new_transform
- function: private::call
- struct: pub::RequestResponseMetrics
- struct: pub::RequestResponseMetricsMiddleware
- impl: impl actix_web::dev::Transform<S, actix_web::dev::ServiceRequest> for RequestResponseMetrics
- impl: impl actix_web::dev::Service<actix_web::dev::ServiceRequest> for RequestResponseMetricsMiddleware<S>
**crates/router/src/routes/metrics.rs**
Remove:
- mod: pub::utils
**crates/router/src/routes/metrics/request.rs**
Remove:
- function: pub::record_request_time_metric
- function: pub::status_code_metrics
**crates/router/src/routes/metrics/utils.rs**
Remove:
- function: pub::time_future
**crates/router/src/services/api.rs**
Modify existing code
|
{"pr_number": 7803, "pr_title": "refactor(middleware): add middleware to record metrics for request count and duration", "merged_at": "2025-04-21T08:19:08Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user"]}, "hierarchy": {"utils": ["crates/router/src/routes/metrics/utils.rs"], "other": ["crates/analytics/src/metrics/request.rs", "crates/router/src/compatibility/wrap.rs", "crates/router/src/lib.rs", "crates/router/src/middleware.rs", "crates/router/src/routes/metrics.rs", "crates/router/src/routes/metrics/request.rs", "crates/router/src/services/api.rs"]}, "change_types": {"structs_added": 2, "functions_added": 3, "fields_added": 6, "imports_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
refactor(connector): Move connector mappings and endpoints to dedicated modules
## 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 -->
1)Renamed configs.rs → connector_endpoints.rs in hyperswitch_domain_models
2)Moved connector mapping logic from types/api.rs to new types/api/connector_mapping.rs
3)Created new types/connector_transformers.rs for connector transformation logic
4)Extracted connector transformer implementations from types/transformers.rs
### 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)?
-->
No testing was required here; only code refactoring was done.
Cypress checks should cover this
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Domain Models (Business Logic Types)**
- `crates/hyperswitch_domain_models/src/configs.rs`
- `crates/hyperswitch_domain_models/src/lib.rs`
- `crates/hyperswitch_domain_models/src/router_request_types/revenue_recovery.rs`
**2. Core Business Logic**
- `crates/router/src/core/revenue_recovery/types.rs`
- `crates/router/src/core/webhooks/recovery_incoming.rs`
**3. External Connector Integration**
- `crates/hyperswitch_connectors/src/connectors/coinbase.rs`
- `crates/hyperswitch_interfaces/src/connector_integration_interface.rs`
- `crates/router/src/types/api/connector_mapping.rs`
- ... and 2 more files
**4. Type Definitions**
- `crates/router/src/types.rs`
- `crates/router/src/types/api.rs`
- `crates/router/src/types/transformers.rs`
**5. Configuration Files**
- `crates/hyperswitch_interfaces/src/configs.rs`
**6. Other**
- `.github/CODEOWNERS`
- `crates/hyperswitch_interfaces/src/api.rs`
**Code Patterns Applied:**
- Define new data structures (1 changes)
- Implement new functions (5 changes)
- Extend existing types with new fields (39 changes)
**Detailed Identifier Changes:**
Commit 99885b69:
Files to modify:
**crates/hyperswitch_connectors/src/connectors/coinbase.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/lib.rs**
Remove:
- mod: pub::configs
Add:
- mod: pub::connector_endpoints
**crates/hyperswitch_domain_models/src/router_request_types/revenue_recovery.rs**
Modify existing code
**crates/hyperswitch_interfaces/src/api.rs**
Modify existing code
**crates/hyperswitch_interfaces/src/configs.rs**
Modify existing code
**crates/hyperswitch_interfaces/src/connector_integration_interface.rs**
Modify existing code
**crates/router/src/core/revenue_recovery/types.rs**
Modify existing code
**crates/router/src/core/webhooks/recovery_incoming.rs**
Modify existing code
**crates/router/src/types.rs**
Add:
- mod: pub::connector_transformers
**crates/router/src/types/api.rs**
Remove:
- function: pub::get_connector_by_name
- function: pub::get_payout_connector_by_name
- function: pub::get_external_vault_connector_by_name
- function: pub::convert_connector
- struct: pub::ConnectorData
- enum: pub::GetToken
- impl: impl ConnectorData
Add:
- mod: pub::connector_mapping
**crates/router/src/types/api/connector_mapping.rs**
Add:
- function: pub::get_connector_by_name
- function: pub::get_payout_connector_by_name
- function: pub::get_external_vault_connector_by_name
- function: pub::convert_connector
- struct: pub::ConnectorData
- enum: pub::GetToken
- impl: impl ConnectorData
**crates/router/src/types/connector_transformers.rs**
Add:
- function: private::foreign_try_from
- impl: impl ForeignTryFrom<api_enums::Connector> for common_enums::RoutableConnectors
**crates/router/src/types/transformers.rs**
Remove:
- function: private::foreign_try_from
- impl: impl ForeignTryFrom<api_enums::Connector> for common_enums::RoutableConnectors
|
{"pr_number": 8562, "pr_title": "refactor(connector): Move connector mappings and endpoints to dedicated modules", "merged_at": "2025-07-09T08:09:08Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["connector"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/configs.rs", "crates/hyperswitch_domain_models/src/lib.rs", "crates/hyperswitch_domain_models/src/router_request_types/revenue_recovery.rs"], "core_business": ["crates/router/src/core/revenue_recovery/types.rs", "crates/router/src/core/webhooks/recovery_incoming.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/coinbase.rs", "crates/hyperswitch_interfaces/src/connector_integration_interface.rs", "crates/router/src/types/api/connector_mapping.rs", "crates/router/src/types/connector_transformers.rs", "scripts/add_connector.sh"], "types": ["crates/router/src/types.rs", "crates/router/src/types/api.rs", "crates/router/src/types/transformers.rs"], "config": ["crates/hyperswitch_interfaces/src/configs.rs"], "other": [".github/CODEOWNERS", "crates/hyperswitch_interfaces/src/api.rs"]}, "change_types": {"structs_added": 1, "functions_added": 5, "enums_added": 1, "fields_added": 39, "imports_added": 7}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(connector): [AIRWALLEX, ELAVON, NOVALNET, XENDIT] add in feature API
## 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 Airwallex, Elavon, Novalnet, Xendit supported payment methods, currencies and countries in feature matrix
### 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)?
-->
Postman Test
Feature API curl:
```
curl --location 'http://localhost:8080/feature_matrix' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: ***'
```
Response -
```
{
"connector_count": 4,
"connectors": [
{
"name": "AIRWALLEX",
"display_name": "Airwallex",
"description": "Airwallex is a multinational financial technology company offering financial services and software as a service (SaaS)",
"category": "payment_gateway",
"supported_payment_methods": [
{
"payment_method": "card",
"payment_method_type": "debit",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": ["automatic","manual","sequential_automatic"],
"three_ds": "supported",
"no_three_ds": "supported",
"supported_card_networks": ["Visa","Mastercard","AmericanExpress","JCB","DinersClub","UnionPay","Discover"],
"supported_countries": ["AU","SG","HK","NZ","US"],
"supported_currencies": ["QAR", "NIO", "STN", "UGX", "VUV", "LKR", "PAB", "FJD", "PLN", "ZWL", "HKD", "AMD", "BHD", "CZK", "EUR", "ERN", "MUR", "TRY", "XPF", "BIF", "AED", "DZD", "SZL", "JPY", "SAR", "CVE", "AFN", "LYD", "BZD", "MOP", "UZS", "BTN", "KES", "NPR", "NAD", "TWD", "FKP", "LSL", "HRK", "ALL", "LBP", "IQD", "HNL", "KGS", "MWK", "PEN", "SEK", "GBP", "SSP", "LAK", "SCR", "SYP", "BYN", "BGN", "BMD", "CUP", "KPW", "KMF", "LRD", "SLL", "CAD", "SLE", "EGP", "BAM", "GNF", "ETB", "NOK", "JOD", "KWD", "MNT", "BDT", "MXN", "UAH", "WST", "TJS", "VND", "XAF", "BND", "ARS", "NGN", "BSD", "CNY", "KZT", "ILS", "MYR", "GYD", "GTQ", "TMT", "TOP", "SVC", "BBD", "MDL", "COP", "GEL", "AWG", "OMR", "SBD", "MKD", "CRC", "MVR", "XOF", "IRR", "MMK", "PHP", "AZN", "DKK", "SGD", "NZD", "IDR", "KRW", "HUF", "RSD", "YER", "BOB", "HTG", "XCD", "BWP", "DJF", "MGA", "USD", "AOA", "DOP", "TZS", "MAD", "CDF", "JMD", "GMD", "PKR", "KHR", "MRU", "SRD", "BRL", "INR", "THB", "VES", "RWF", "CHF", "ISK", "UYU", "ZMW", "CLP", "SDG", "TND", "KYD", "ZAR", "GIP", "RUB", "GHS", "TTD", "RON", "SHP", "PYG", "PGK", "AUD", "MZN", "SOS", "ANG"]
},
{
"payment_method": "card",
"payment_method_type": "credit",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": ["automatic","manual","sequential_automatic"],
"three_ds": "supported",
"no_three_ds": "supported",
"supported_card_networks": ["Visa","Mastercard","AmericanExpress","JCB","DinersClub","UnionPay","Discover"],
"supported_countries": ["AU","SG","HK","NZ","US"],
"supported_currencies": ["QAR", "NIO", "STN", "UGX", "VUV", "LKR", "PAB", "FJD", "PLN", "ZWL", "HKD", "AMD", "BHD", "CZK", "EUR", "ERN", "MUR", "TRY", "XPF", "BIF", "AED", "DZD", "SZL", "JPY", "SAR", "CVE", "AFN", "LYD", "BZD", "MOP", "UZS", "BTN", "KES", "NPR", "NAD", "TWD", "FKP", "LSL", "HRK", "ALL", "LBP", "IQD", "HNL", "KGS", "MWK", "PEN", "SEK", "GBP", "SSP", "LAK", "SCR", "SYP", "BYN", "BGN", "BMD", "CUP", "KPW", "KMF", "LRD", "SLL", "CAD", "SLE", "EGP", "BAM", "GNF", "ETB", "NOK", "JOD", "KWD", "MNT", "BDT", "MXN", "UAH", "WST", "TJS", "VND", "XAF", "BND", "ARS", "NGN", "BSD", "CNY", "KZT", "ILS", "MYR", "GYD", "GTQ", "TMT", "TOP", "SVC", "BBD", "MDL", "COP", "GEL", "AWG", "OMR", "SBD", "MKD", "CRC", "MVR", "XOF", "IRR", "MMK", "PHP", "AZN", "DKK", "SGD", "NZD", "IDR", "KRW", "HUF", "RSD", "YER", "BOB", "HTG", "XCD", "BWP", "DJF", "MGA", "USD", "AOA", "DOP", "TZS", "MAD", "CDF", "JMD", "GMD", "PKR", "KHR", "MRU", "SRD", "BRL", "INR", "THB", "VES", "RWF", "CHF", "ISK", "UYU", "ZMW", "CLP", "SDG", "TND", "KYD", "ZAR", "GIP", "RUB", "GHS", "TTD", "RON", "SHP", "PYG", "PGK", "AUD", "MZN", "SOS", "ANG"]
},
{
"payment_method": "wallet",
"payment_method_type": "google_pay",
"mandates": "not_supported",
"refunds": "supported",
"supported_capture_methods": ["automatic","manual","sequential_automatic"],
"supported_countries": ["AU","SG","HK","NZ","US"],
"supported_currencies": ["QAR", "NIO", "STN", "UGX", "VUV", "LKR", "PAB", "FJD", "PLN", "ZWL", "HKD", "AMD", "BHD", "CZK", "EUR", "ERN", "MUR", "TRY", "XPF", "BIF", "AED", "DZD", "SZL", "JPY", "SAR", "CVE", "AFN", "LYD", "BZD", "MOP", "UZS", "BTN", "KES", "NPR", "NAD", "TWD", "FKP", "LSL", "HRK", "ALL", "LBP", "IQD", "HNL", "KGS", "MWK", "PEN", "SEK", "GBP", "SSP", "LAK", "SCR", "SYP", "BYN", "BGN", "BMD", "CUP", "KPW", "KMF", "LRD", "SLL", "CAD", "SLE", "EGP", "BAM", "GNF", "ETB", "NOK", "JOD", "KWD", "MNT", "BDT", "MXN", "UAH", "WST", "TJS", "VND", "XAF", "BND", "ARS", "NGN", "BSD", "CNY", "KZT", "ILS", "MYR", "GYD", "GTQ", "TMT", "TOP", "SVC", "BBD", "MDL", "COP", "GEL", "AWG", "OMR", "SBD", "MKD", "CRC", "MVR", "XOF", "IRR", "MMK", "PHP", "AZN", "DKK", "SGD", "NZD", "IDR", "KRW", "HUF", "RSD", "YER", "BOB", "HTG", "XCD", "BWP", "DJF", "MGA", "USD", "AOA", "DOP", "TZS", "MAD", "CDF", "JMD", "GMD", "PKR", "KHR", "MRU", "SRD", "BRL", "INR", "THB", "VES", "RWF", "CHF", "ISK", "UYU", "ZMW", "CLP", "SDG", "TND", "KYD", "ZAR", "GIP", "RUB", "GHS", "TTD", "RON", "SHP", "PYG", "PGK", "AUD", "MZN", "SOS", "ANG"]
}
],
"supported_webhook_flows": ["payments","refunds","disputes"]
},
{
"name": "ELAVON",
"display_name": "Elavon",
"description": "Elavon, a wholly owned subsidiary of U.S. Bank, has been a global leader in payment processing for more than 30 years.",
"category": "payment_gateway",
"supported_payment_methods": [
{
"payment_method": "card",
"payment_method_type": "debit",
"mandates": "supported",
"refunds": "supported",
"supported_capture_methods": ["automatic","manual","sequential_automatic"],
"three_ds": "not_supported",
"no_three_ds": "supported",
"supported_card_networks": ["Visa","Mastercard","AmericanExpress","JCB","DinersClub","UnionPay","Discover","CartesBancaires","Interac"],
"supported_countries": ["US"],
"supported_currencies": ["QAR", "NIO", "STN", "UGX", "VUV", "LKR", "PAB", "FJD", "PLN", "ZWL", "HKD", "AMD", "BHD", "CZK", "EUR", "ERN", "MUR", "TRY", "XPF", "BIF", "AED", "DZD", "SZL", "JPY", "SAR", "CVE", "AFN", "LYD", "BZD", "MOP", "UZS", "BTN", "KES", "NPR", "NAD", "TWD", "FKP", "LSL", "HRK", "ALL", "LBP", "IQD", "HNL", "KGS", "MWK", "PEN", "SEK", "GBP", "SSP", "LAK", "SCR", "SYP", "BYN", "BGN", "BMD", "CUP", "KPW", "KMF", "LRD", "SLL", "CAD", "SLE", "EGP", "BAM", "GNF", "ETB", "NOK", "JOD", "KWD", "MNT", "BDT", "MXN", "UAH", "WST", "TJS", "VND", "XAF", "BND", "ARS", "NGN", "BSD", "CNY", "KZT", "ILS", "MYR", "GYD", "GTQ", "TMT", "TOP", "SVC", "BBD", "MDL", "COP", "GEL", "AWG", "OMR", "SBD", "MKD", "CRC", "MVR", "XOF", "IRR", "MMK", "PHP", "AZN", "DKK", "SGD", "NZD", "IDR", "KRW", "HUF", "RSD", "YER", "BOB", "HTG", "XCD", "BWP", "DJF", "MGA", "USD", "AOA", "DOP", "TZS", "MAD", "CDF", "JMD", "GMD", "PKR", "KHR", "MRU", "SRD", "BRL", "INR", "THB", "VES", "RWF", "CHF", "ISK", "UYU", "ZMW", "CLP", "SDG", "TND", "KYD", "ZAR", "GIP", "RUB", "GHS", "TTD", "RON", "SHP", "PYG", "PGK", "AUD", "MZN", "SOS", "ANG"]
},
{
"payment_method": "card",
"payment_method_type": "credit",
"mandates": "supported",
"refunds": "supported",
"supported_capture_methods": ["automatic","manual","sequential_automatic"],
"three_ds": "not_supported",
"no_three_ds": "supported",
"supported_card_networks": ["Visa","Mastercard","AmericanExpress","JCB","DinersClub","UnionPay","Discover","CartesBancaires","Interac"],
"supported_countries": ["US"],
"supported_currencies": ["QAR", "NIO", "STN", "UGX", "VUV", "LKR", "PAB", "FJD", "PLN", "ZWL", "HKD", "AMD", "BHD", "CZK", "EUR", "ERN", "MUR", "TRY", "XPF", "BIF", "AED", "DZD", "SZL", "JPY", "SAR", "CVE", "AFN", "LYD", "BZD", "MOP", "UZS", "BTN", "KES", "NPR", "NAD", "TWD", "FKP", "LSL", "HRK", "ALL", "LBP", "IQD", "HNL", "KGS", "MWK", "PEN", "SEK", "GBP", "SSP", "LAK", "SCR", "SYP", "BYN", "BGN", "BMD", "CUP", "KPW", "KMF", "LRD", "SLL", "CAD", "SLE", "EGP", "BAM", "GNF", "ETB", "NOK", "JOD", "KWD", "MNT", "BDT", "MXN", "UAH", "WST", "TJS", "VND", "XAF", "BND", "ARS", "NGN", "BSD", "CNY", "KZT", "ILS", "MYR", "GYD", "GTQ", "TMT", "TOP", "SVC", "BBD", "MDL", "COP", "GEL", "AWG", "OMR", "SBD", "MKD", "CRC", "MVR", "XOF", "IRR", "MMK", "PHP", "AZN", "DKK", "SGD", "NZD", "IDR", "KRW", "HUF", "RSD", "YER", "BOB", "HTG", "XCD", "BWP", "DJF", "MGA", "USD", "AOA", "DOP", "TZS", "MAD", "CDF", "JMD", "GMD", "PKR", "KHR", "MRU", "SRD", "BRL", "INR", "THB", "VES", "RWF", "CHF", "ISK", "UYU", "ZMW", "CLP", "SDG", "TND", "KYD", "ZAR", "GIP", "RUB", "GHS", "TTD", "RON", "SHP", "PYG", "PGK", "AUD", "MZN", "SOS", "ANG"]
}
],
"supported_webhook_flows": []
},
{
"name": "NOVALNET",
"display_name": "Novalnet",
"description": "Novalnet provides tailored, data-driven payment solutions that maximize acceptance, boost conversions, and deliver seamless customer experiences worldwide.",
"category": "payment_gateway",
"supported_payment_methods": [
{
"payment_method": "card",
"payment_method_type": "credit",
"mandates": "supported",
"refunds": "supported",
"supported_capture_methods": ["automatic","manual","sequential_automatic"],
"three_ds": "supported",
"no_three_ds": "supported",
"supported_card_networks": ["Visa","Mastercard","AmericanExpress","JCB","DinersClub","UnionPay","Discover","CartesBancaires","Interac"],
"supported_countries": [
"JP",
"PL",
"TW",
"MD",
"IL",
"MX",
"PT",
"ET",
"SG",
"AT",
"DZ",
"IT",
"SI",
"WS",
"PG",
"BM",
"KE",
"GY",
"US",
"AU",
"AM",
"GE",
"CH",
"AL",
"NL",
"AG",
"BZ",
"GB",
"SB",
"AE",
"ES",
"KW",
"BD",
"DE",
"KH",
"NI",
"BA",
"SC",
"CN",
"KR",
"KZ",
"BR",
"VN",
"TR",
"DM",
"BG",
"CZ",
"RU",
"LB",
"ST",
"PY",
"NP",
"SR",
"BO",
"CO",
"MY",
"AD",
"SH",
"BY",
"SK",
"TO",
"MW",
"KN",
"LT",
"UG",
"FI",
"VE",
"DJ",
"AZ",
"FR",
"IN",
"LK",
"MK",
"MO",
"IE",
"ID",
"BB",
"RW",
"CY",
"JO",
"VU",
"ZA",
"BW",
"MA",
"MG",
"ZM",
"CA",
"KY",
"EG",
"PK",
"SO",
"JM",
"UY",
"IS",
"NG",
"TZ",
"MV",
"FJ",
"GT",
"NZ",
"SY",
"PE",
"SL",
"HR",
"SM",
"CF",
"NO",
"CL",
"DK",
"TH",
"HK",
"PH",
"QA",
"BE",
"VA",
"GR",
"LY",
"RO",
"SA",
"SV",
"CD",
"YE",
"LC",
"LV",
"MT",
"EE",
"GI",
"OM",
"GD",
"RS",
"BN",
"ME",
"AR",
"HU",
"UZ",
"BI",
"MN",
"PA",
"GH",
"BH",
"CR",
"UA",
"VC",
"SE",
"MC",
"DO",
"TJ",
"GM",
"CU",
"BS",
"TN",
"HN"
],
"supported_currencies": [
"HUF",
"ILS",
"GEL",
"MVR",
"AZN",
"BBD",
"NOK",
"NPR",
"BYN",
"PLN",
"VND",
"HNL",
"TWD",
"XCD",
"SRD",
"EGP",
"OMR",
"DOP",
"UZS",
"MYR",
"UGX",
"BZD",
"SCR",
"CHF",
"KHR",
"RUB",
"KYD",
"BOB",
"MNT",
"SLL",
"CZK",
"BSD",
"BMD",
"CLP",
"KES",
"MOP",
"LBP",
"ISK",
"COP",
"AMD",
"ARS",
"VUV",
"HRK",
"NGN",
"CRC",
"MAD",
"ZMW",
"TND",
"STN",
"JMD",
"ALL",
"GHS",
"MXN",
"PYG",
"QAR",
"MKD",
"AED",
"JPY",
"SYP",
"GMD",
"BRL",
"TJS",
"WST",
"LKR",
"GIP",
"CNY",
"HKD",
"CUP",
"PGK",
"BWP",
"DZD",
"BGN",
"PEN",
"LYD",
"RWF",
"NIO",
"TZS",
"INR",
"EUR",
"RON",
"VES",
"PHP",
"TRY",
"ETB",
"JOD",
"USD",
"UAH",
"TOP",
"BDT",
"GTQ",
"AUD",
"YER",
"CDF",
"IDR",
"KRW",
"FJD",
"GBP",
"KWD",
"MDL",
"KZT",
"MWK",
"DKK",
"BAM",
"GYD",
"MGA",
"NZD",
"UYU",
"PKR",
"PAB",
"SHP",
"SVC",
"DJF",
"XAF",
"THB",
"BIF",
"SGD",
"SOS",
"RSD",
"ZAR",
"SEK",
"BHD",
"SAR",
"BND",
"SBD",
"CAD"
]
},
{
"payment_method": "card",
"payment_method_type": "debit",
"mandates": "supported",
"refunds": "supported",
"supported_capture_methods": ["automatic","manual","sequential_automatic"],
"three_ds": "supported",
"no_three_ds": "supported",
"supported_card_networks": ["Visa","Mastercard","AmericanExpress","JCB","DinersClub","UnionPay","Discover","CartesBancaires","Interac"],
"supported_countries": [
"TZ",
"BM",
"TO",
"LY",
"JP",
"TJ",
"KY",
"BN",
"MN",
"AD",
"TN",
"UA",
"SI",
"LV",
"BE",
"BB",
"MT",
"SV",
"VC",
"BO",
"MO",
"RS",
"SA",
"DJ",
"UY",
"VA",
"FR",
"RO",
"LC",
"FJ",
"ST",
"GH",
"LK",
"BY",
"LB",
"AM",
"BI",
"HK",
"CA",
"KZ",
"CH",
"MW",
"VN",
"CY",
"PY",
"BR",
"GD",
"SK",
"AU",
"GB",
"BH",
"IL",
"JO",
"ID",
"PH",
"UZ",
"JM",
"SO",
"BD",
"KN",
"DO",
"FI",
"BZ",
"CU",
"SG",
"GM",
"ZA",
"ES",
"AG",
"VU",
"DE",
"ME",
"MX",
"HN",
"MY",
"TR",
"EE",
"PE",
"HR",
"CO",
"TH",
"PG",
"CF",
"KW",
"DZ",
"CN",
"IS",
"NI",
"AE",
"GY",
"IE",
"VE",
"DM",
"NO",
"QA",
"EG",
"CZ",
"RU",
"CL",
"AL",
"CD",
"GE",
"MK",
"NG",
"TW",
"BW",
"KE",
"BA",
"AZ",
"DK",
"AR",
"NP",
"AT",
"NZ",
"GI",
"SR",
"YE",
"KR",
"MV",
"SE",
"US",
"OM",
"BS",
"PK",
"SB",
"NL",
"ET",
"GT",
"KH",
"SH",
"RW",
"CR",
"MG",
"LT",
"PT",
"SC",
"SM",
"SY",
"MA",
"PA",
"GR",
"UG",
"WS",
"ZM",
"PL",
"IT",
"MC",
"IN",
"SL",
"BG",
"HU",
"MD"
],
"supported_currencies": [
"MWK",
"SRD",
"ZMW",
"NZD",
"JOD",
"OMR",
"MNT",
"EGP",
"STN",
"HNL",
"CAD",
"ISK",
"MDL",
"COP",
"BMD",
"KRW",
"AED",
"XCD",
"RSD",
"RUB",
"BBD",
"TND",
"HUF",
"DOP",
"BZD",
"LBP",
"BSD",
"BWP",
"TZS",
"MKD",
"VUV",
"SOS",
"PHP",
"NOK",
"CZK",
"NGN",
"THB",
"SAR",
"CNY",
"USD",
"ARS",
"MAD",
"CDF",
"ILS",
"MXN",
"BHD",
"VES",
"FJD",
"NIO",
"GBP",
"HKD",
"SCR",
"TRY",
"KES",
"KZT",
"CUP",
"MGA",
"BAM",
"AZN",
"GIP",
"GTQ",
"IDR",
"PAB",
"BRL",
"GYD",
"TJS",
"UAH",
"BOB",
"UGX",
"MOP",
"SLL",
"BGN",
"CRC",
"MVR",
"GEL",
"WST",
"PLN",
"KWD",
"JMD",
"PKR",
"TOP",
"YER",
"DKK",
"BDT",
"GMD",
"BIF",
"SHP",
"QAR",
"DJF",
"DZD",
"ALL",
"ETB",
"AUD",
"SBD",
"SYP",
"HRK",
"CHF",
"PYG",
"BND",
"NPR",
"INR",
"MYR",
"GHS",
"SVC",
"UZS",
"JPY",
"RON",
"LKR",
"XAF",
"KYD",
"BYN",
"EUR",
"LYD",
"CLP",
"SEK",
"TWD",
"PGK",
"UYU",
"SGD",
"PEN",
"VND",
"KHR",
"ZAR",
"AMD",
"RWF"
]
},
{
"payment_method": "wallet",
"payment_method_type": "apple_pay",
"mandates": "supported",
"refunds": "supported",
"supported_capture_methods": ["automatic","manual","sequential_automatic"],
"supported_countries": [
"RU",
"GD",
"ID",
"SE",
"NO",
"TW",
"LY",
"GR",
"PT",
"AU",
"US",
"SV",
"CN",
"DZ",
"JM",
"KE",
"AM",
"GM",
"BD",
"MW",
"UY",
"WS",
"MN",
"MT",
"AR",
"GI",
"SG",
"HN",
"SL",
"PY",
"OM",
"TJ",
"CL",
"SK",
"AD",
"LK",
"GH",
"MK",
"SY",
"PE",
"KZ",
"TZ",
"NP",
"KR",
"SA",
"CR",
"ET",
"MD",
"HU",
"NI",
"JP",
"BE",
"CO",
"KH",
"MA",
"BN",
"IT",
"DJ",
"QA",
"MO",
"MX",
"MY",
"UZ",
"RO",
"PG",
"JO",
"AE",
"RS",
"CD",
"MV",
"CA",
"MC",
"TN",
"AG",
"BA",
"KN",
"BZ",
"EE",
"VE",
"ZM",
"CZ",
"FI",
"GE",
"RW",
"VC",
"BO",
"PA",
"KW",
"VN",
"SR",
"CF",
"FJ",
"NG",
"IE",
"VU",
"UG",
"IN",
"CH",
"SO",
"CY",
"PL",
"PK",
"BS",
"BY",
"BR",
"TO",
"SM",
"GB",
"TR",
"DE",
"BW",
"GT",
"AT",
"MG",
"EG",
"AL",
"DK",
"FR",
"LT",
"TH",
"UA",
"YE",
"DM",
"HR",
"BB",
"BI",
"HK",
"LB",
"NZ",
"PH",
"SH",
"LV",
"AZ",
"GY",
"BH",
"BG",
"ZA",
"ME",
"SB",
"ES",
"IS",
"KY",
"SC",
"SI",
"ST",
"NL",
"VA",
"LC",
"CU",
"IL",
"DO",
"BM"
],
"supported_currencies": [
"CLP",
"MKD",
"GTQ",
"VUV",
"YER",
"MYR",
"PAB",
"THB",
"USD",
"PLN",
"ILS",
"KHR",
"ISK",
"CZK",
"LBP",
"MWK",
"TOP",
"AMD",
"SVC",
"XAF",
"TJS",
"VES",
"NGN",
"UGX",
"DZD",
"PHP",
"BMD",
"IDR",
"CUP",
"CDF",
"GYD",
"EUR",
"PGK",
"BAM",
"BDT",
"AUD",
"GMD",
"GIP",
"CNY",
"DJF",
"INR",
"KZT",
"TRY",
"BHD",
"AED",
"GEL",
"AZN",
"RSD",
"BOB",
"GHS",
"HUF",
"KYD",
"PYG",
"RON",
"SCR",
"EGP",
"BND",
"MVR",
"COP",
"TWD",
"CRC",
"BZD",
"MNT",
"OMR",
"TZS",
"JPY",
"ZMW",
"BWP",
"NOK",
"KRW",
"HNL",
"SYP",
"MOP",
"SAR",
"RUB",
"SRD",
"ALL",
"NIO",
"MAD",
"BIF",
"MDL",
"SLL",
"BYN",
"STN",
"ZAR",
"RWF",
"TND",
"DKK",
"QAR",
"UAH",
"NPR",
"UYU",
"DOP",
"LKR",
"NZD",
"KES",
"WST",
"MXN",
"BSD",
"PEN",
"PKR",
"BGN",
"ARS",
"SEK",
"VND",
"SOS",
"HRK",
"LYD",
"CHF",
"SGD",
"XCD",
"MGA",
"ETB",
"CAD",
"JOD",
"GBP",
"JMD",
"BRL",
"FJD",
"BBD",
"SHP",
"KWD",
"SBD",
"HKD",
"UZS"
]
},
{
"payment_method": "wallet",
"payment_method_type": "paypal",
"mandates": "supported",
"refunds": "supported",
"supported_capture_methods": ["automatic","manual","sequential_automatic"],
"supported_countries": [
"BY",
"ET",
"MV",
"SM",
"AL",
"DZ",
"PG",
"AT",
"DO",
"MD",
"PL",
"TW",
"KN",
"CU",
"BR",
"PT",
"NP",
"BW",
"KR",
"LT",
"MG",
"PK",
"CN",
"TZ",
"VN",
"GD",
"IN",
"SL",
"GB",
"ES",
"ME",
"BN",
"GH",
"SO",
"SR",
"TR",
"UA",
"LV",
"OM",
"LC",
"NL",
"HR",
"PH",
"LK",
"PY",
"IE",
"TJ",
"DE",
"SA",
"CO",
"BB",
"JM",
"NZ",
"DK",
"AG",
"MX",
"GE",
"AE",
"ID",
"MT",
"CD",
"UZ",
"MW",
"GT",
"BG",
"NO",
"CL",
"GY",
"ST",
"ZA",
"BA",
"EE",
"AD",
"JO",
"VE",
"GI",
"NG",
"WS",
"PE",
"SB",
"FR",
"GM",
"NI",
"IS",
"KE",
"MO",
"CZ",
"SK",
"SG",
"SI",
"KY",
"TH",
"DJ",
"BO",
"FJ",
"MA",
"FI",
"AU",
"SC",
"VU",
"BH",
"IT",
"CR",
"UG",
"LY",
"SV",
"SY",
"MC",
"US",
"MY",
"QA",
"GR",
"MN",
"MK",
"TN",
"VA",
"JP",
"AM",
"TO",
"AR",
"IL",
"VC",
"BS",
"CY",
"KZ",
"RO",
"BE",
"KW",
"RU",
"ZM",
"SH",
"HU",
"BM",
"HN",
"SE",
"LB",
"BZ",
"EG",
"RW",
"BD",
"BI",
"CH",
"HK",
"CA",
"CF",
"PA",
"UY",
"RS",
"DM",
"KH",
"YE",
"AZ"
],
"supported_currencies": [
"SHP",
"CAD",
"NPR",
"RON",
"SLL",
"GIP",
"ALL",
"ZMW",
"BMD",
"NOK",
"AMD",
"BYN",
"GEL",
"GHS",
"AUD",
"ZAR",
"CZK",
"UAH",
"EUR",
"KWD",
"RWF",
"BBD",
"XAF",
"CNY",
"MVR",
"GBP",
"BHD",
"HUF",
"TOP",
"SCR",
"HKD",
"MDL",
"IDR",
"TJS",
"BZD",
"RUB",
"NIO",
"EGP",
"ARS",
"SGD",
"COP",
"AZN",
"MNT",
"UGX",
"MGA",
"NGN",
"LKR",
"SVC",
"CDF",
"PHP",
"VUV",
"PGK",
"BDT",
"LYD",
"MYR",
"CRC",
"SEK",
"TWD",
"JOD",
"BSD",
"PKR",
"LBP",
"INR",
"JPY",
"HNL",
"THB",
"TZS",
"DKK",
"JMD",
"PEN",
"BGN",
"PAB",
"GTQ",
"CLP",
"KYD",
"BAM",
"KZT",
"TND",
"MOP",
"MWK",
"STN",
"UZS",
"PLN",
"KES",
"BRL",
"BOB",
"NZD",
"SOS",
"USD",
"TRY",
"GYD",
"BIF",
"GMD",
"HRK",
"UYU",
"DOP",
"VND",
"SYP",
"XCD",
"ISK",
"YER",
"CHF",
"BWP",
"QAR",
"SAR",
"DZD",
"VES",
"KHR",
"KRW",
"WST",
"ETB",
"SRD",
"BND",
"DJF",
"CUP",
"FJD",
"MAD",
"MXN",
"ILS",
"PYG",
"AED",
"SBD",
"OMR",
"MKD",
"RSD"
]
},
{
"payment_method": "wallet",
"payment_method_type": "google_pay",
"mandates": "supported",
"refunds": "supported",
"supported_capture_methods": ["automatic","manual","sequential_automatic"],
"supported_countries": [
"MX",
"DE",
"CD",
"BM",
"KY",
"MD",
"BI",
"LV",
"MA",
"SE",
"SC",
"FI",
"BO",
"KE",
"JM",
"FR",
"MT",
"PT",
"BW",
"CY",
"PK",
"GB",
"HN",
"JO",
"SY",
"HR",
"YE",
"TR",
"UG",
"AZ",
"SR",
"RW",
"DZ",
"FJ",
"LT",
"PH",
"MW",
"KN",
"AD",
"CZ",
"VU",
"MY",
"HU",
"CH",
"SM",
"AR",
"SL",
"IN",
"EE",
"DK",
"CA",
"GI",
"BH",
"MN",
"BR",
"NL",
"SO",
"UY",
"CR",
"TZ",
"IT",
"MC",
"BA",
"KW",
"DO",
"SI",
"PA",
"PL",
"BN",
"KH",
"TO",
"GE",
"QA",
"BZ",
"CU",
"ET",
"EG",
"NG",
"GD",
"GY",
"PG",
"BY",
"JP",
"BG",
"RS",
"DJ",
"LB",
"AL",
"BB",
"TH",
"TJ",
"PE",
"DM",
"GM",
"MK",
"SG",
"UZ",
"US",
"AT",
"GT",
"AU",
"MO",
"VN",
"VC",
"WS",
"CL",
"PY",
"CF",
"IL",
"OM",
"GH",
"HK",
"IS",
"MV",
"NP",
"SB",
"GR",
"SK",
"NO",
"RU",
"ZA",
"LY",
"ES",
"MG",
"KR",
"BE",
"BD",
"IE",
"RO",
"TN",
"VA",
"NZ",
"AG",
"ZM",
"SH",
"LK",
"TW",
"VE",
"BS",
"AE",
"ST",
"UA",
"KZ",
"SA",
"CN",
"ID",
"NI",
"ME",
"AM",
"LC",
"CO",
"SV"
],
"supported_currencies": [
"BYN",
"JOD",
"KZT",
"SHP",
"MVR",
"SCR",
"TWD",
"LKR",
"GHS",
"RUB",
"BND",
"MDL",
"TRY",
"CNY",
"EGP",
"TOP",
"XCD",
"CHF",
"MOP",
"BDT",
"DKK",
"ETB",
"NIO",
"BAM",
"SBD",
"JMD",
"BIF",
"HKD",
"GEL",
"TND",
"KHR",
"JPY",
"MXN",
"PGK",
"MAD",
"UZS",
"GYD",
"AED",
"KRW",
"RSD",
"RWF",
"GBP",
"LBP",
"TJS",
"SOS",
"KES",
"CZK",
"DJF",
"HNL",
"RON",
"SLL",
"BWP",
"NGN",
"UYU",
"WST",
"BGN",
"ZAR",
"INR",
"BSD",
"BHD",
"ILS",
"HRK",
"CRC",
"DOP",
"GMD",
"CLP",
"FJD",
"MGA",
"USD",
"VND",
"SEK",
"SVC",
"LYD",
"CDF",
"GIP",
"PAB",
"CAD",
"HUF",
"SGD",
"MKD",
"PYG",
"YER",
"BZD",
"COP",
"DZD",
"BRL",
"EUR",
"PHP",
"SRD",
"SYP",
"ARS",
"TZS",
"NZD",
"PKR",
"ALL",
"VES",
"ZMW",
"BBD",
"UGX",
"MYR",
"PLN",
"UAH",
"VUV",
"MWK",
"IDR",
"NOK",
"PEN",
"AUD",
"NPR",
"BMD",
"AZN",
"GTQ",
"OMR",
"QAR",
"SAR",
"ISK",
"KWD",
"KYD",
"MNT",
"XAF",
"THB",
"STN",
"CUP",
"BOB",
"AMD"
]
}
],
"supported_webhook_flows": ["payments","refunds","disputes","mandates"]
},
{
"name": "XENDIT",
"display_name": "Xendit",
"description": "Xendit is a financial technology company that provides payment solutions and simplifies the payment process for businesses in Indonesia, the Philippines and Southeast Asia, from SMEs and e-commerce startups to large enterprises.",
"category": "payment_gateway",
"supported_payment_methods": [
{
"payment_method": "card",
"payment_method_type": "credit",
"mandates": "supported",
"refunds": "supported",
"supported_capture_methods": ["automatic","manual"],
"three_ds": "supported",
"no_three_ds": "supported",
"supported_card_networks": ["Visa","Mastercard","AmericanExpress","JCB","DinersClub","UnionPay","Discover"],
"supported_countries": ["PH","ID"],
"supported_currencies": ["SGD","IDR","USD","PHP","MYR"]
},
{
"payment_method": "card",
"payment_method_type": "debit",
"mandates": "supported",
"refunds": "supported",
"supported_capture_methods": ["automatic","manual"],
"three_ds": "supported",
"no_three_ds": "supported",
"supported_card_networks": ["Visa","Mastercard","AmericanExpress","JCB","DinersClub","UnionPay","Discover","CartesBancaires","Interac"],
"supported_countries": ["ID","PH"],
"supported_currencies": ["SGD","PHP","MYR","IDR","USD"]
}
],
"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`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. External Connector Integration**
- `crates/hyperswitch_connectors/src/connectors/airwallex.rs`
- `crates/hyperswitch_connectors/src/connectors/elavon.rs`
- `crates/hyperswitch_connectors/src/connectors/novalnet.rs`
- ... and 1 more files
**2. Tests**
- `config/deployments/integration_test.toml`
- `loadtest/config/development.toml`
**3. Configuration Files**
- `config/config.example.toml`
- `config/deployments/production.toml`
- `config/deployments/sandbox.toml`
- ... and 2 more files
**Code Patterns Applied:**
- Implement new functions (12 changes)
- Extend existing types with new fields (84 changes)
**Detailed Identifier Changes:**
Commit 98738d0b:
Files to modify:
**crates/hyperswitch_connectors/src/connectors/airwallex.rs**
Remove:
- function: private::validate_connector_against_payment_request
- impl: impl ConnectorValidation for Airwallex
- impl: impl ConnectorSpecifications for Airwallex
Add:
- function: private::get_connector_about
- function: private::get_supported_payment_methods
- function: private::get_supported_webhook_flows
- impl: impl ConnectorValidation for Airwallex
- impl: impl ConnectorSpecifications for Airwallex
**crates/hyperswitch_connectors/src/connectors/elavon.rs**
Remove:
- function: private::validate_mandate_payment
- impl: impl ConnectorSpecifications for Elavon
Add:
- function: private::get_supported_payment_methods
- function: private::get_supported_webhook_flows
- impl: impl ConnectorValidation for Elavon
**crates/hyperswitch_connectors/src/connectors/novalnet.rs**
Remove:
- function: private::validate_connector_against_payment_request
- impl: impl ConnectorSpecifications for Novalnet
Add:
- function: private::get_connector_about
- function: private::get_supported_payment_methods
- function: private::get_supported_webhook_flows
- impl: impl ConnectorSpecifications for Novalnet
**crates/hyperswitch_connectors/src/connectors/xendit.rs**
Remove:
- function: private::validate_connector_against_payment_request
- impl: impl ConnectorSpecifications for Xendit
Add:
- function: private::get_connector_about
- function: private::get_supported_payment_methods
- function: private::get_supported_webhook_flows
- impl: impl ConnectorSpecifications for Xendit
|
{"pr_number": 7163, "pr_title": "feat(connector): [AIRWALLEX, ELAVON, NOVALNET, XENDIT] add in feature API", "merged_at": "2025-04-08T13:35:32Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "refund"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/airwallex.rs", "crates/hyperswitch_connectors/src/connectors/elavon.rs", "crates/hyperswitch_connectors/src/connectors/novalnet.rs", "crates/hyperswitch_connectors/src/connectors/xendit.rs"], "tests": ["config/deployments/integration_test.toml", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"]}, "change_types": {"functions_added": 12, "fields_added": 84, "imports_added": 7}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(connector): [BANKOFAMERICA] Enable SamsungPay In Dashboard
## 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 -->
Enable Samsung Pay in BankOfAmerica in dashboard. Added WASM changes for it.
Also added WASM changes for Samsung Pay in Cybersource in sandbox.
### 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)?
-->
Only WASM changes, hence no testing required.
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. External Connector Integration**
- `crates/connector_configs/toml/development.toml`
- `crates/connector_configs/toml/sandbox.toml`
**2. Tests**
- `config/deployments/integration_test.toml`
**3. Configuration Files**
- `config/config.example.toml`
- `config/deployments/production.toml`
- `config/deployments/sandbox.toml`
- ... and 2 more files
|
{"pr_number": 7677, "pr_title": "feat(connector): [BANKOFAMERICA] Enable SamsungPay In Dashboard", "merged_at": "2025-04-04T09:41:14Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"connectors": ["crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/sandbox.toml"], "tests": ["config/deployments/integration_test.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
|
fix(connector): [Novalnet] allow debit card MITs
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Hotfix for https://github.com/juspay/hyperswitch/pull/7956
Issue - https://github.com/juspay/hyperswitch/issues/7955
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [ ] This PR modifies application configuration/environment variables
## Motivation and Context
Fixes the bug which allows debit card mandate creation, but does not allow MITs for the same payment method entry.
## How did you test it?
Same as described in https://github.com/juspay/hyperswitch/pull/7956
## 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
|
To implement this **payment** feature, you'll need to modify these architectural layers:
**1. External Connector Integration**
- `crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs`
**Detailed Identifier Changes:**
Commit 1b678e49:
Files to modify:
**crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs**
Modify existing code
|
{"pr_number": 7964, "pr_title": "fix(connector): [Novalnet] allow debit card MITs", "merged_at": "2025-05-06T07:37:19Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["payment", "card"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
fix(payout): send latest status in outgoing webhook notifications during IncomingWebhook flow
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Hotfix for https://github.com/juspay/hyperswitch/pull/9283
### 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Core Business Logic**
- `crates/router/src/core/webhooks/incoming.rs`
**Code Patterns Applied:**
- Extend existing types with new fields (2 changes)
**Detailed Identifier Changes:**
Commit 2d5ae968:
Files to modify:
**crates/router/src/core/webhooks/incoming.rs**
Modify existing code
|
{"pr_number": 9312, "pr_title": "fix(payout): send latest status in outgoing webhook notifications during IncomingWebhook flow", "merged_at": "2025-09-09T11:52:57Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"core_business": ["crates/router/src/core/webhooks/incoming.rs"]}, "change_types": {"fields_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(core): add three_ds_requestor_app_url in business_profile
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
Hotfix for [PR 7589](https://github.com/juspay/hyperswitch/pull/7589)
`cargo clippy` output ✅ (Ignore the warnings, they are not coming from the current commit)
https://github.com/user-attachments/assets/6667b2c9-45c7-4b42-a575-6b69260c448c
### 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. API Request/Response Models**
- `crates/api_models/src/admin.rs`
- `crates/api_models/src/payments.rs`
**2. Database Layer (Queries & Schema)**
- `crates/diesel_models/src/business_profile.rs`
**3. Core Business Logic**
- `crates/router/src/core/payments.rs`
**4. Type Definitions**
- `crates/router/src/types/transformers.rs`
**5. Other**
- `api-reference-v2/openapi_spec.json`
- `api-reference/openapi_spec.json`
**Code Patterns Applied:**
- Extend existing types with new fields (6 changes)
**Detailed Identifier Changes:**
Commit 2cba455a:
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/router/src/core/payments.rs**
Modify existing code
**crates/router/src/types/transformers.rs**
Modify existing code
|
{"pr_number": 7594, "pr_title": "feat(core): add three_ds_requestor_app_url in business_profile", "merged_at": "2025-03-21T13:12:06Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"api_models": ["crates/api_models/src/admin.rs", "crates/api_models/src/payments.rs"], "database": ["crates/diesel_models/src/business_profile.rs"], "core_business": ["crates/router/src/core/payments.rs"], "types": ["crates/router/src/types/transformers.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json"]}, "change_types": {"fields_added": 6}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(connector): Add Peachpayments Template Code
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
Closes this [issue](https://github.com/juspay/hyperswitch/issues/9362)
## Description
<!-- Describe your changes in detail -->
Added Peachpayments Template Code
### 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Domain Models (Business Logic Types)**
- `crates/hyperswitch_domain_models/src/connector_endpoints.rs`
**2. Core Business Logic**
- `crates/router/src/core/connector_validation.rs`
**3. External Connector Integration**
- `crates/common_enums/src/connector_enums.rs`
- `crates/connector_configs/src/connector.rs`
- `crates/connector_configs/toml/development.toml`
- ... and 15 more files
**4. Type Definitions**
- `crates/router/src/types/api/feature_matrix.rs`
**5. Utils**
- `crates/test_utils/tests/sample_auth.toml`
**6. Tests**
- `config/deployments/integration_test.toml`
- `loadtest/config/development.toml`
**7. Configuration Files**
- `config/config.example.toml`
- `config/deployments/production.toml`
- `config/deployments/sandbox.toml`
- ... and 2 more files
**Code Patterns Applied:**
- Define new data structures (10 changes)
- Implement new functions (83 changes)
- Extend existing types with new fields (166 changes)
**Detailed Identifier Changes:**
Commit 0873d930:
Files to modify:
**crates/common_enums/src/connector_enums.rs**
Modify existing code
**crates/connector_configs/src/connector.rs**
Modify existing code
**crates/hyperswitch_connectors/src/connectors.rs**
Add:
- mod: pub::peachpayments
**crates/hyperswitch_connectors/src/connectors/peachpayments.rs**
Add:
- function: pub::new
- function: private::build_headers
- function: private::id
- function: private::get_currency_unit
- function: private::common_get_content_type
- function: private::base_url
- function: private::get_auth_header
- function: private::build_error_response
- function: private::validate_mandate_payment
- function: private::validate_psync_reference_id
- function: private::get_headers
- function: private::get_content_type
- function: private::get_url
- function: private::get_request_body
- function: private::build_request
- function: private::handle_response
- function: private::get_error_response
- function: private::get_headers
- function: private::get_content_type
- function: private::get_url
- function: private::build_request
- function: private::handle_response
- function: private::get_error_response
- function: private::get_headers
- function: private::get_content_type
- function: private::get_url
- function: private::get_request_body
- function: private::build_request
- function: private::handle_response
- function: private::get_error_response
- function: private::get_headers
- function: private::get_content_type
- function: private::get_url
- function: private::get_request_body
- function: private::build_request
- function: private::handle_response
- function: private::get_error_response
- function: private::get_headers
- function: private::get_content_type
- function: private::get_url
- function: private::build_request
- function: private::handle_response
- function: private::get_error_response
- function: private::get_webhook_object_reference_id
- function: private::get_webhook_event_type
- function: private::get_webhook_resource_object
- function: private::get_connector_about
- function: private::get_supported_payment_methods
- function: private::get_supported_webhook_flows
- struct: pub::Peachpayments
- impl: impl Peachpayments
- impl: impl api::Payment for Peachpayments
- impl: impl api::PaymentSession for Peachpayments
- impl: impl api::ConnectorAccessToken for Peachpayments
- impl: impl api::MandateSetup for Peachpayments
- impl: impl api::PaymentAuthorize for Peachpayments
- impl: impl api::PaymentSync for Peachpayments
- impl: impl api::PaymentCapture for Peachpayments
- impl: impl api::PaymentVoid for Peachpayments
- impl: impl api::Refund for Peachpayments
- impl: impl api::RefundExecute for Peachpayments
- impl: impl api::RefundSync for Peachpayments
- impl: impl api::PaymentToken for Peachpayments
- impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for Peachpayments
- impl: impl ConnectorCommonExt<Flow, Request, Response> for Peachpayments
- impl: impl ConnectorCommon for Peachpayments
- impl: impl ConnectorValidation for Peachpayments
- impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Peachpayments
- impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Peachpayments
- impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Peachpayments
- impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Peachpayments
- impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Peachpayments
- impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Peachpayments
- impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Peachpayments
- impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Peachpayments
- impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Peachpayments
- impl: impl webhooks::IncomingWebhook for Peachpayments
- impl: impl ConnectorSpecifications for Peachpayments
- mod: pub::transformers
**crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs**
Add:
- function: private::from
- function: private::try_from
- function: private::try_from
- function: private::from
- function: private::try_from
- function: private::try_from
- function: private::from
- function: private::try_from
- function: private::try_from
- struct: pub::PeachpaymentsRouterData
- struct: pub::PeachpaymentsPaymentsRequest
- struct: pub::PeachpaymentsCard
- struct: pub::PeachpaymentsAuthType
- struct: pub::PeachpaymentsPaymentsResponse
- struct: pub::PeachpaymentsRefundRequest
- struct: pub::RefundResponse
- struct: pub::PeachpaymentsErrorResponse
- enum: pub::PeachpaymentsPaymentStatus
- enum: pub::RefundStatus
- impl: impl From<(MinorUnit, T)> for PeachpaymentsRouterData<T>
- impl: impl TryFrom<&PeachpaymentsRouterData<&PaymentsAuthorizeRouterData>> for PeachpaymentsPaymentsRequest
- impl: impl TryFrom<&ConnectorAuthType> for PeachpaymentsAuthType
- impl: impl From<PeachpaymentsPaymentStatus> for common_enums::AttemptStatus
- impl: impl TryFrom<ResponseRouterData<F, PeachpaymentsPaymentsResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData>
- impl: impl TryFrom<&PeachpaymentsRouterData<&RefundsRouterData<F>>> for PeachpaymentsRefundRequest
- impl: impl From<RefundStatus> for enums::RefundStatus
- impl: impl TryFrom<RefundsResponseRouterData<Execute, RefundResponse>> for RefundsRouterData<Execute>
- impl: impl TryFrom<RefundsResponseRouterData<RSync, RefundResponse>> for RefundsRouterData<RSync>
**crates/hyperswitch_connectors/src/default_implementations.rs**
Modify existing code
**crates/hyperswitch_connectors/src/default_implementations_v2.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/connector_endpoints.rs**
Modify existing code
**crates/router/src/connector.rs**
Modify existing code
**crates/router/src/core/connector_validation.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/src/types/connector_transformers.rs**
Modify existing code
**crates/router/tests/connectors/main.rs**
Add:
- mod: private::peachpayments
**crates/router/tests/connectors/peachpayments.rs**
Add:
- function: private::get_data
- function: private::get_auth_token
- function: private::get_name
- function: private::get_default_payment_info
- function: private::payment_method_details
- function: private::should_only_authorize_payment
- function: private::should_capture_authorized_payment
- function: private::should_partially_capture_authorized_payment
- function: private::should_sync_authorized_payment
- function: private::should_void_authorized_payment
- function: private::should_refund_manually_captured_payment
- function: private::should_partially_refund_manually_captured_payment
- function: private::should_sync_manually_captured_refund
- function: private::should_make_payment
- function: private::should_sync_auto_captured_payment
- function: private::should_refund_auto_captured_payment
- function: private::should_partially_refund_succeeded_payment
- function: private::should_refund_succeeded_payment_multiple_times
- function: private::should_sync_refund
- function: private::should_fail_payment_for_incorrect_cvc
- function: private::should_fail_payment_for_invalid_exp_month
- function: private::should_fail_payment_for_incorrect_expiry_year
- function: private::should_fail_void_payment_for_auto_capture
- function: private::should_fail_capture_for_invalid_payment
- function: private::should_fail_for_refund_amount_higher_than_payment_amount
- struct: private::PeachpaymentsTest
- impl: impl ConnectorActions for PeachpaymentsTest
- impl: impl utils::Connector for PeachpaymentsTest
**crates/test_utils/src/connector_auth.rs**
Modify existing code
|
{"pr_number": 9363, "pr_title": "feat(connector): Add Peachpayments Template Code", "merged_at": "2025-09-11T16:22:51Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/connector_endpoints.rs"], "core_business": ["crates/router/src/core/connector_validation.rs"], "connectors": ["crates/common_enums/src/connector_enums.rs", "crates/connector_configs/src/connector.rs", "crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/hyperswitch_connectors/src/connectors.rs", "crates/hyperswitch_connectors/src/connectors/peachpayments.rs", "crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/hyperswitch_connectors/src/default_implementations_v2.rs", "crates/router/src/connector.rs", "crates/router/src/types/api/connector_mapping.rs", "crates/router/src/types/connector_transformers.rs", "crates/router/tests/connectors/main.rs", "crates/router/tests/connectors/peachpayments.rs", "crates/router/tests/connectors/sample_auth.toml", "crates/test_utils/src/connector_auth.rs", "scripts/add_connector.sh"], "types": ["crates/router/src/types/api/feature_matrix.rs"], "utils": ["crates/test_utils/tests/sample_auth.toml"], "tests": ["config/deployments/integration_test.toml", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"]}, "change_types": {"structs_added": 10, "functions_added": 83, "enums_added": 2, "fields_added": 166, "imports_added": 22}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
fix(api_locking): add delay between api-locking retries
## 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 -->
added delay between api-locking retries for HoldMultiple locking mechanism.
This was missed during development before.
This is already available for Single id locking.
Main pr: https://github.com/juspay/hyperswitch/pull/9308
### 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)?
-->
<img width="2410" height="400" alt="image" src="https://github.com/user-attachments/assets/97b60c38-37bc-468f-bba7-e35dba4c920e" />
<img width="2404" height="1894" alt="image" src="https://github.com/user-attachments/assets/bbef8f77-e965-49ef-9260-4cacc87ce6cc" />
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Core Business Logic**
- `crates/router/src/core/api_locking.rs`
**Detailed Identifier Changes:**
Commit 8ded9d11:
Files to modify:
**crates/router/src/core/api_locking.rs**
Modify existing code
|
{"pr_number": 9325, "pr_title": "fix(api_locking): add delay between api-locking retries", "merged_at": "2025-09-09T13:10:04Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"core_business": ["crates/router/src/core/api_locking.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
refactor(router): modify `net_amount` to be a struct in the domain model of payment_attempt and handle amount changes across all flows
## 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 -->
modify `net_amount` to be a struct in the domain model of payment_attempt and handle amount changes across all flows
Main PR - https://github.com/juspay/hyperswitch/pull/6252
### 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 in main PR
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. API Request/Response Models**
- `crates/api_models/src/payment_methods.rs`
- `crates/api_models/src/payments.rs`
**2. Database Layer (Queries & Schema)**
- `crates/diesel_models/src/payment_attempt.rs`
- `crates/diesel_models/src/query/payment_attempt.rs`
**3. Domain Models (Business Logic Types)**
- `crates/hyperswitch_domain_models/src/payments/payment_attempt.rs`
- `crates/hyperswitch_domain_models/src/router_request_types.rs`
**4. Core Business Logic**
- `crates/router/src/core/fraud_check/flows/checkout_flow.rs`
- `crates/router/src/core/fraud_check/flows/fulfillment_flow.rs`
- `crates/router/src/core/fraud_check/flows/record_return.rs`
- ... and 18 more files
**5. Type Definitions**
- `crates/router/src/types.rs`
- `crates/router/src/types/storage/payment_attempt.rs`
- `crates/router/src/types/transformers.rs`
**6. Other**
- `api-reference-v2/openapi_spec.json`
- `api-reference/openapi_spec.json`
- `crates/router/src/services/kafka/payment_attempt.rs`
- ... and 3 more files
**Code Patterns Applied:**
- Define new data structures (1 changes)
- Implement new functions (18 changes)
- Extend existing types with new fields (100 changes)
- Add conditional logic for feature flags or filtering (4 changes)
**Detailed Identifier Changes:**
Commit 6eb86e73:
Files to modify:
**crates/api_models/src/payment_methods.rs**
Modify existing code
**crates/api_models/src/payments.rs**
Add:
- function: pub::get_surcharge_amount
- function: pub::get_tax_amount
**crates/diesel_models/src/payment_attempt.rs**
Remove:
- function: pub::get_or_calculate_net_amount
- function: pub::calculate_net_amount
- function: pub::get_or_calculate_net_amount
- function: pub::populate_derived_fields
- function: pub::calculate_net_amount
- function: pub::get_or_calculate_net_amount
- function: pub::populate_derived_fields
- impl: impl PaymentAttempt
- impl: impl PaymentAttemptNew
- impl: impl PaymentAttemptNew
**crates/diesel_models/src/query/payment_attempt.rs**
Modify existing code
**crates/hyperswitch_domain_models/src/payments/payment_attempt.rs**
Add:
- function: pub::new
- function: pub::get_order_amount
- function: pub::get_shipping_cost
- function: pub::get_order_tax_amount
- function: pub::get_surcharge_amount
- function: pub::get_tax_on_surcharge
- function: pub::get_total_surcharge_amount
- function: pub::get_total_amount
- function: pub::set_order_amount
- function: pub::set_order_tax_amount
- function: pub::set_surcharge_details
- function: pub::from_payments_request
- function: pub::from_payments_request_and_payment_attempt
- function: pub::to_storage_model
- struct: pub::NetAmount
- impl: impl PaymentAttemptUpdate
**crates/hyperswitch_domain_models/src/router_request_types.rs**
Modify existing code
**crates/router/src/core/fraud_check/flows/checkout_flow.rs**
Modify existing code
**crates/router/src/core/fraud_check/flows/fulfillment_flow.rs**
Modify existing code
**crates/router/src/core/fraud_check/flows/record_return.rs**
Modify existing code
**crates/router/src/core/fraud_check/flows/sale_flow.rs**
Modify existing code
**crates/router/src/core/fraud_check/flows/transaction_flow.rs**
Modify existing code
**crates/router/src/core/payment_link.rs**
Modify existing code
**crates/router/src/core/payment_methods/cards.rs**
Modify existing code
**crates/router/src/core/payment_methods/surcharge_decision_configs.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/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_response.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_update.rs**
Modify existing code
**crates/router/src/core/payments/operations/payments_incremental_authorization.rs**
Modify existing code
**crates/router/src/core/payments/retry.rs**
Modify existing code
**crates/router/src/core/payments/routing.rs**
Modify existing code
**crates/router/src/core/payments/transformers.rs**
Modify existing code
**crates/router/src/core/payments/types.rs**
Modify existing code
**crates/router/src/core/refunds.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.rs**
Modify existing code
**crates/router/src/types/storage/payment_attempt.rs**
Modify existing code
**crates/router/src/types/transformers.rs**
Modify existing code
**crates/storage_impl/src/mock_db/payment_attempt.rs**
Modify existing code
**crates/storage_impl/src/payments/payment_attempt.rs**
Remove:
- function: private::to_storage_model
|
{"pr_number": 6323, "pr_title": "refactor(router): modify `net_amount` to be a struct in the domain model of payment_attempt and handle amount changes across all flows", "merged_at": "2024-10-15T15:59:18Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment"]}, "hierarchy": {"api_models": ["crates/api_models/src/payment_methods.rs", "crates/api_models/src/payments.rs"], "database": ["crates/diesel_models/src/payment_attempt.rs", "crates/diesel_models/src/query/payment_attempt.rs"], "domain": ["crates/hyperswitch_domain_models/src/payments/payment_attempt.rs", "crates/hyperswitch_domain_models/src/router_request_types.rs"], "core_business": ["crates/router/src/core/fraud_check/flows/checkout_flow.rs", "crates/router/src/core/fraud_check/flows/fulfillment_flow.rs", "crates/router/src/core/fraud_check/flows/record_return.rs", "crates/router/src/core/fraud_check/flows/sale_flow.rs", "crates/router/src/core/fraud_check/flows/transaction_flow.rs", "crates/router/src/core/payment_link.rs", "crates/router/src/core/payment_methods/cards.rs", "crates/router/src/core/payment_methods/surcharge_decision_configs.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/operations/payment_complete_authorize.rs", "crates/router/src/core/payments/operations/payment_confirm.rs", "crates/router/src/core/payments/operations/payment_create.rs", "crates/router/src/core/payments/operations/payment_response.rs", "crates/router/src/core/payments/operations/payment_update.rs", "crates/router/src/core/payments/operations/payments_incremental_authorization.rs", "crates/router/src/core/payments/retry.rs", "crates/router/src/core/payments/routing.rs", "crates/router/src/core/payments/transformers.rs", "crates/router/src/core/payments/types.rs", "crates/router/src/core/refunds.rs"], "types": ["crates/router/src/types.rs", "crates/router/src/types/storage/payment_attempt.rs", "crates/router/src/types/transformers.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/router/src/services/kafka/payment_attempt.rs", "crates/router/src/services/kafka/payment_attempt_event.rs", "crates/storage_impl/src/mock_db/payment_attempt.rs", "crates/storage_impl/src/payments/payment_attempt.rs"]}, "change_types": {"structs_added": 1, "functions_added": 18, "fields_added": 100, "conditionals_added": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
fix(router): update nick_name only if card_token.card_holder_name is non empty and populate additional card_details from payment_attempt if not present in the locker
## 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 -->
Main PR - https://github.com/juspay/hyperswitch/pull/6308
### 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 in main PR
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Core Business Logic**
- `crates/router/src/core/payment_methods.rs`
- `crates/router/src/core/payments/helpers.rs`
**Code Patterns Applied:**
- Extend existing types with new fields (3 changes)
- Add conditional logic for feature flags or filtering (5 changes)
**Detailed Identifier Changes:**
Commit 3f29209b:
Files to modify:
**crates/router/src/core/payment_methods.rs**
Modify existing code
**crates/router/src/core/payments/helpers.rs**
Modify existing code
|
{"pr_number": 6345, "pr_title": "fix(router): update nick_name only if card_token.card_holder_name is non empty and populate additional card_details from payment_attempt if not present in the locker", "merged_at": "2024-10-17T11:34:39Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"core_business": ["crates/router/src/core/payment_methods.rs", "crates/router/src/core/payments/helpers.rs"]}, "change_types": {"fields_added": 3, "conditionals_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(router): Add customer_list_saved_payment_methods endpoint to OLAP
## 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 -->
Add `customer_list_saved_payment_methods` to OLAP and allow JWT Auth
This endpoint allows retrieving saved payment methods for a customer
This PR enables the endpoint to be used from the dashboard
### 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)?
-->
- Request
```bash
curl --location 'http://localhost:8080/v2/customers/12345_cus_0195187353c47d438edd6044cadb0969/saved-payment-methods' \
--header 'api-key: dev_Z0aXn9A50mSviMWnWLC02YHDhCxoLdKawgHzVMRwErbyyYQ5O4XvqjNYMQoCCaT1' \
--header 'Content-Type: application/json' \
--header 'x-profile-id: pro_9glqJzp3eRd6XljDKDE9'
```
- Response
```json
{
"customer_payment_methods": [
{
"id": "12345_pm_019518761b3075e0a4da6035422ce961",
"customer_id": "12345_cus_0195187353c47d438edd6044cadb0969",
"payment_method_type": "card",
"payment_method_subtype": "credit",
"recurring_enabled": true,
"payment_method_data": {
"card": {
"issuer_country": null,
"last4_digits": "4242",
"expiry_month": "02",
"expiry_year": "2025",
"card_holder_name": "joseph Doe",
"card_fingerprint": null,
"nick_name": null,
"card_network": null,
"card_isin": null,
"card_issuer": null,
"card_type": null,
"saved_to_locker": true
}
},
"bank": null,
"created": "2025-02-18T09:49:08.273Z",
"requires_cvv": true,
"last_used_at": "2025-02-18T09:49:08.273Z",
"is_default": false,
"billing": 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`
- [ ] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Core Business Logic**
- `crates/router/src/core/payment_methods.rs`
**2. Other**
- `api-reference-v2/openapi_spec.json`
- `crates/openapi/src/openapi_v2.rs`
- `crates/openapi/src/routes/payment_method.rs`
- ... and 2 more files
**Code Patterns Applied:**
- Implement new functions (3 changes)
- Extend existing types with new fields (9 changes)
**Detailed Identifier Changes:**
Commit fdfcdcc7:
Files to modify:
**crates/openapi/src/openapi_v2.rs**
Modify existing code
**crates/openapi/src/routes/payment_method.rs**
Add:
- function: pub::list_customer_payment_method_api
**crates/router/src/core/payment_methods.rs**
Add:
- function: pub::list_saved_payment_methods_for_customer
**crates/router/src/routes/app.rs**
Modify existing code
**crates/router/src/routes/payment_methods.rs**
Add:
- function: pub::list_customer_payment_method_api
|
{"pr_number": 7241, "pr_title": "feat(router): Add customer_list_saved_payment_methods endpoint to OLAP", "merged_at": "2025-02-24T08:11:43Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "card"]}, "hierarchy": {"core_business": ["crates/router/src/core/payment_methods.rs"], "other": ["api-reference-v2/openapi_spec.json", "crates/openapi/src/openapi_v2.rs", "crates/openapi/src/routes/payment_method.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/payment_methods.rs"]}, "change_types": {"functions_added": 3, "fields_added": 9}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(core): add a procedural macro for validating schema attributes for a struct
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [x] New feature
- [ ] Enhancement
- [ ] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
This PR adds automatic validation for string length constraints defined in schema attributes. The validation prevents 5xx errors that occur when strings exceeding database column length limits are passed to the database.
The implementation:
1. Creates a proc macro `ValidateSchema` that reads `min_length` and `max_length` parameters from schema attributes
2. Generates validation code that is invoked at runtime
3. Returns appropriate 4xx errors with helpful messages when validation fails
### 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
When API requests contain fields that exceed database column length limits, the application currently returns 5xx errors when those values are stored. This is incorrect behavior - it should be a 4xx error (invalid request) since the client provided invalid data.
This change implements the correct behavior, and also uses the same schema attributes for both OpenAPI spec generation and validation giving us a single source of truth. It also improves error handling - returning 4xx instead of 5xx errors for invalid requests
## How did you test it?
<details>
<summary>1. Added unit test cases for the macro</summary>
<img width="1025" alt="Screenshot 2025-05-12 at 5 50 33 PM" src="https://github.com/user-attachments/assets/1659f4aa-6918-4db4-be3c-fd241dc0bf49" />
</details>
<details>
<summary>2. Pass invalid return_url (length exceeding 255 characters)</summary>
cURL
curl --location --request POST 'http://localhost:8080/payments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Accept-Language: es-ES' \
--header 'api-key: dev_tizBo0XFMZBNZ3jWBlkrc6C81CiCdliXrLXFoAg2fTgoTmKvOIk2oAP43Gwb3AGK' \
--data-raw '{"customer_id":"cus_Wz8ND2QMGUTQCZBgO4Jx_1","profile_id":"pro_DC4DZ899zblYKajNmd0K","customer_acceptance":{"acceptance_type":"online","accepted_at":"1963-05-03T04:07:52.723Z","online":{"ip_address":"127.0.0.1","user_agent":"amet irure esse"}},"amount":12,"currency":"SGD","confirm":false,"payment_link":true,"setup_future_usage":"off_session","capture_method":"automatic","billing":{"address":{},"email":"random@juspay.in"},"return_url":"https://example.com?q=example.com&q=example.com&q=example.com&q=example.com&q=example.com&q=example.com&q=example.com&q=example.com&q=example.com&q=example.com&q=example.com&q=example.com&q=example.com&q=example.com&q=example.com&q=example.com&q=example.abc","payment_link_config":{"theme":"#111111","is_setup_mandate_flow":true,"background_image":{"url":"https://img.freepik.com/free-photo/abstract-blue-geometric-shapes-background_24972-1841.jpg","position":"bottom","size":"cover"}}}'
Response
{
"error": {
"type": "invalid_request",
"message": "return_url must be at most 255 characters long. Received 258 characters",
"code": "IR_06"
}
}
</details>
<details>
<summary>3. Updated DocTest</summary>
<img width="458" alt="Screenshot 2025-05-17 at 1 27 14 AM" src="https://github.com/user-attachments/assets/374ed02a-776a-443a-87e4-fbb3287a420b" />
</details>
<details>
<summary>4. Added cypress test cases</summary>
<img width="457" alt="Screenshot 2025-05-20 at 5 14 54 PM" src="https://github.com/user-attachments/assets/b7a3951c-2145-473d-89ee-6cc0f059b726" />
</details>
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. API Request/Response Models**
- `crates/api_models/src/payments.rs`
**2. Database Layer (Queries & Schema)**
- `crates/router_derive/src/macros/schema.rs`
- `crates/router_derive/src/macros/schema/helpers.rs`
**3. Tests**
- `crates/router/tests/macros.rs`
- `cypress-tests/cypress/e2e/configs/Payment/Commons.js`
- `cypress-tests/cypress/e2e/spec/Payment/00022-Variations.cy.js`
**4. Configuration Files**
- `crates/router_derive/Cargo.toml`
**5. Other**
- `Cargo.lock`
- `api-reference/openapi_spec.json`
- `crates/router/src/routes/payments.rs`
- ... and 2 more files
**Code Patterns Applied:**
- Define new data structures (2 changes)
- Implement new functions (11 changes)
- Extend existing types with new fields (58 changes)
- Add conditional logic for feature flags or filtering (21 changes)
- Modify database queries (1 changes)
**Detailed Identifier Changes:**
Commit 4332299a:
Files to modify:
**crates/api_models/src/payments.rs**
Modify existing code
**crates/router/src/routes/payments.rs**
Modify existing code
**crates/router/tests/macros.rs**
Add:
- function: private::test_validate_schema
- struct: private::Payment
- mod: private::validate_schema_test
**crates/router_derive/src/lib.rs**
Add:
- function: pub::validate_schema
**crates/router_derive/src/macros.rs**
Add:
- mod: pub::schema
**crates/router_derive/src/macros/schema.rs**
Add:
- function: pub::validate_schema_derive
- mod: private::helpers
**crates/router_derive/src/macros/schema/helpers.rs**
Add:
- function: private::parse
- function: private::to_tokens
- function: private::get_schema_metadata
- function: private::get_schema_parameters
- function: private::from
- struct: pub::SchemaParameters
- enum: pub::SchemaParameterVariant
- enum: pub::IsSchemaFieldApplicableForValidation
- trait: pub::FieldExt
- trait: pub::HasSchemaParameters
- impl: impl Parse for SchemaParameterVariant
- impl: impl ToTokens for SchemaParameterVariant
- impl: impl FieldExt for Field
- impl: impl HasSchemaParameters for Field
- impl: impl From<&syn::Type> for IsSchemaFieldApplicableForValidation
- mod: private::keyword
|
{"pr_number": 8006, "pr_title": "feat(core): add a procedural macro for validating schema attributes for a struct", "merged_at": "2025-05-20T16:28:50Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "user"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs"], "database": ["crates/router_derive/src/macros/schema.rs", "crates/router_derive/src/macros/schema/helpers.rs"], "tests": ["crates/router/tests/macros.rs", "cypress-tests/cypress/e2e/configs/Payment/Commons.js", "cypress-tests/cypress/e2e/spec/Payment/00022-Variations.cy.js"], "config": ["crates/router_derive/Cargo.toml"], "other": ["Cargo.lock", "api-reference/openapi_spec.json", "crates/router/src/routes/payments.rs", "crates/router_derive/src/lib.rs", "crates/router_derive/src/macros.rs"]}, "change_types": {"structs_added": 2, "functions_added": 11, "enums_added": 2, "fields_added": 58, "imports_added": 9, "conditionals_added": 21, "database_queries": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
docs(README): Updated the icon and repositioned the hero image
TOC icon and reposition of the hero image in readme
## 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 -->
Updated the icon of CI Push and repositioned the hero image
closes #6449
### 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`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Other**
- `README.md`
|
{"pr_number": 6445, "pr_title": "docs(README): Updated the icon and repositioned the hero image", "merged_at": "2024-11-03T14:12:33Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"other": ["README.md"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
|
refactor(theme): extend theme structure
## Type of Change
<!-- Put an `x` in the boxes that apply -->
- [ ] Bugfix
- [ ] New feature
- [ ] Enhancement
- [x] Refactoring
- [ ] Dependency updates
- [ ] Documentation
- [ ] CI/CD
## Description
This PR updates the theme.json structure to support frontend enhancements while ensuring backward compatibility with the previous format.
- Expanded Colors Struct : Added optional fields `secondary` and `background` and removed `sidebar`
- Addition of Sidebar Struct
### 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
To support FE theme enhancements.
## How did you test it?
1. CREATE THEME
```curl --location 'http://localhost:8080/user/theme' \
--header 'Content-Type: application/json' \
--header 'api-key: test_admin' \
--data '{
"lineage": {
"entity_type": "merchant",
"tenant_id": "public",
"org_id": "o1",
"merchant_id": "m1",
"profile_id": "p1"
},
"theme_name": "test_theme",
"theme_data": {
"settings": {
"colors": {
"primary": "#2167AE",
"secondary": "#808080",
"background": "#0A0A0A"
},
"sidebar": {
"primary": "#27356B",
"textColor": "#cfcfd1",
"textColorPrimary": "#FFFFFF"
},
"buttons": {
"primary": {
"backgroundColor": "#2167AE",
"textColor": "#ffffff",
"hoverBackgroundColor": "#5495cf"
}
}
}
}
}'
```
RESPONSE :
``` {
"theme_id": "d49543a8-06a8-4243-b481-b8dfec676504",
"theme_name": "test_theme",
"entity_type": "merchant",
"tenant_id": "public",
"org_id": "o1",
"merchant_id": "m1",
"profile_id": null,
"email_config": {
"entity_name": "Hyperswitch",
"entity_logo_url": "https://example.com/logo.svg",
"primary_color": "#006DF9",
"foreground_color": "#000000",
"background_color": "#FFFFFF"
},
"theme_data": {
"settings": {
"colors": {
"primary": "#2167AE",
"secondary": "#808080",
"background": "#0A0A0A"
},
"sidebar": {
"primary": "#27356B",
"textColor": "#cfcfd1",
"textColorPrimary": "#FFFFFF"
},
"typography": null,
"buttons": {
"primary": {
"backgroundColor": "#2167AE",
"textColor": "#ffffff",
"hoverBackgroundColor": "#5495cf"
},
"secondary": null
},
"borders": null,
"spacing": null
},
"urls": null
}
}
```
3. DELETE THEME
```
curl --location --request DELETE 'http://localhost:8080/user/theme/d49543a8-06a8-4243-b481-b8dfec676504?entity_type=merchant&tenant_id=public&org_id=o1&merchant_id=m1&profile_id=null' \
--header 'api-key: ••••••'
```
RESPONSE
200 OK
4. Update theme
```
curl --location --request PUT 'http://localhost:8080/user/theme/56d003ef-a0b7-42c9-8b31-a4c90f799e1c' \
--header 'Content-Type: application/json' \
--header 'api-key: test_admin' \
--data '{
"lineage": {
"entity_type": "merchant",
"tenant_id": "public",
"org_id": "o1",
"merchant_id": "m1",
"profile_id": null
},
"theme_name": "test_theme",
"theme_data": {
"settings": {
"colors": {
"primary": "#2167AE",
"secondary": "#808080",
"background": "#0A0A0A"
},
"sidebar": {
"primary": "#27356B",
"textColor": "#cfcfd1",
"textColorPrimary": "#FFFFFF"
},
"buttons": {
"primary": {
"backgroundColor": "#FFFFFF",
"textColor": "#ffffff",
"hoverBackgroundColor": "#5495cf"
}
}
}
}
}'
```
Response
```
{
"theme_id": "56d003ef-a0b7-42c9-8b31-a4c90f799e1c",
"theme_name": "test_theme",
"entity_type": "merchant",
"tenant_id": "public",
"org_id": "o1",
"merchant_id": "m1",
"profile_id": null,
"email_config": {
"entity_name": "Hyperswitch",
"entity_logo_url": "https://example.com/logo.svg",
"primary_color": "#006DF9",
"foreground_color": "#000000",
"background_color": "#FFFFFF"
},
"theme_data": {
"settings": {
"colors": {
"primary": "#2167AE",
"secondary": "#808080",
"background": "#0A0A0A"
},
"sidebar": {
"primary": "#27356B",
"textColor": "#cfcfd1",
"textColorPrimary": "#FFFFFF"
},
"typography": null,
"buttons": {
"primary": {
"backgroundColor": "#FFFFFF",
"textColor": "#ffffff",
"hoverBackgroundColor": "#5495cf"
},
"secondary": null
},
"borders": null,
"spacing": null
},
"urls": null
}
}
```
5. GET THEME BY THEME ID
```
curl --location 'http://localhost:8080/user/theme/56d003ef-a0b7-42c9-8b31-a4c90f799e1c' \
--header 'api-key: test_admin'
```
Response :
200 OK
6. GET THEME BY LINEAGE
```
curl --location 'http://localhost:8080/user/theme?entity_type=merchant&tenant_id=public&org_id=o1&merchant_id=m1&profile_id=null' \
--header 'api-key: test_admin'
```
RESPONSE :
```
{
"theme_id": "56d003ef-a0b7-42c9-8b31-a4c90f799e1c",
"theme_name": "test_theme",
"entity_type": "merchant",
"tenant_id": "public",
"org_id": "o1",
"merchant_id": "m1",
"profile_id": null,
"email_config": {
"entity_name": "Hyperswitch",
"entity_logo_url": "https://example.com/logo.svg",
"primary_color": "#006DF9",
"foreground_color": "#000000",
"background_color": "#FFFFFF"
},
"theme_data": {
"settings": {
"colors": {
"primary": "#2167AE",
"secondary": "#808080",
"background": "#0A0A0A"
},
"sidebar": {
"primary": "#27356B",
"textColor": "#cfcfd1",
"textColorPrimary": "#FFFFFF"
},
"typography": null,
"buttons": {
"primary": {
"backgroundColor": "#FFFFFF",
"textColor": "#ffffff",
"hoverBackgroundColor": "#5495cf"
},
"secondary": null
},
"borders": null,
"spacing": null
},
"urls": null
}
}
```
Tested backward compatibility using an older theme.json structure, and it works as expected.
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. API Request/Response Models**
- `crates/api_models/src/user/theme.rs`
**Code Patterns Applied:**
- Define new data structures (1 changes)
- Extend existing types with new fields (6 changes)
**Detailed Identifier Changes:**
Commit 535c1541:
Files to modify:
**crates/api_models/src/user/theme.rs**
Add:
- struct: private::Sidebar
|
{"pr_number": 7307, "pr_title": "refactor(theme): extend theme structure", "merged_at": "2025-02-25T18:59:58Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant", "user", "order"]}, "hierarchy": {"api_models": ["crates/api_models/src/user/theme.rs"]}, "change_types": {"structs_added": 1, "fields_added": 6}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
ci: update ntid card expiry
## 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 -->
this pr increments expiry year to a later date
closes https://github.com/juspay/hyperswitch/issues/6713
### 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).
-->
4xx
## 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)?
-->
ci should pass
## Checklist
<!-- Put an `x` in the boxes that apply -->
- [ ] I formatted the code `cargo +nightly fmt --all`
- [ ] I addressed lints thrown by `cargo clippy`
- [x] I reviewed the submitted code
- [ ] I added unit tests for my changes where possible
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Tests**
- `cypress-tests/cypress/e2e/PaymentMethodListUtils/Stripe.js`
- `cypress-tests/cypress/e2e/PaymentUtils/BankOfAmerica.js`
- `cypress-tests/cypress/e2e/PaymentUtils/Checkout.js`
- ... and 17 more files
**Code Patterns Applied:**
- Extend existing types with new fields (32 changes)
|
{"pr_number": 6714, "pr_title": "ci: update ntid card expiry", "merged_at": "2024-12-02T10:29:10Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/PaymentMethodListUtils/Stripe.js", "cypress-tests/cypress/e2e/PaymentUtils/BankOfAmerica.js", "cypress-tests/cypress/e2e/PaymentUtils/Checkout.js", "cypress-tests/cypress/e2e/PaymentUtils/Commons.js", "cypress-tests/cypress/e2e/PaymentUtils/Cybersource.js", "cypress-tests/cypress/e2e/PaymentUtils/Datatrans.js", "cypress-tests/cypress/e2e/PaymentUtils/Elavon.js", "cypress-tests/cypress/e2e/PaymentUtils/Fiservemea.js", "cypress-tests/cypress/e2e/PaymentUtils/Nexixpay.js", "cypress-tests/cypress/e2e/PaymentUtils/Nmi.js", "cypress-tests/cypress/e2e/PaymentUtils/Novalnet.js", "cypress-tests/cypress/e2e/PaymentUtils/Paybox.js", "cypress-tests/cypress/e2e/PaymentUtils/Paypal.js", "cypress-tests/cypress/e2e/PaymentUtils/Stripe.js", "cypress-tests/cypress/e2e/PaymentUtils/Trustpay.js", "cypress-tests/cypress/e2e/PaymentUtils/WellsFargo.js", "cypress-tests/cypress/e2e/RoutingUtils/Stripe.js", "cypress-tests/cypress/fixtures/create-confirm-body.json", "cypress-tests/cypress/fixtures/create-mandate-cit.json", "cypress-tests/cypress/fixtures/create-ntid-mit.json"]}, "change_types": {"fields_added": 32}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
|
refactor(routing): add conditional check for invoking DE routing flows
## 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 introduces a conditional check for Decision Engine (DE) Euclid API integration within the static routing flow. Previously, the system always attempted to perform Euclid-based routing regardless of configuration. With this change, the Euclid routing flow is invoked only if the OpenRouter URL is configured.
Additionally, some unused or redundant code around logging and comments has been cleaned up in `utils.rs`.
## Outcomes
- Prevents unnecessary calls to the Euclid API when the OpenRouter URL is not configured, reducing overhead and potential timeouts.
- Ensures cleaner and more consistent logs by removing redundant debug statements and placeholders.
- Improves maintainability by scoping the Euclid integration behind a clear configuration flag.
## Diff Hunk Explanation
### `crates/router/src/core/payments/routing.rs`
- Wrapped the `perform_decision_euclid_routing` call with a check for `state.conf.open_router.url`.
- Added a fallback to return an empty connector list if OpenRouter is not configured.
### `crates/router/src/core/payments/routing/utils.rs`
- Removed a redundant placeholder comment about logging Euclid response events.
- Streamlined debug logs for Euclid responses.
This PR addresses an integration improvement for Euclid static routing checks in the decision engine.
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [x] 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)?
-->
Can be tested directly in prod as that is the only environment where this env in missing.
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Core Business Logic**
- `crates/router/src/core/admin.rs`
- `crates/router/src/core/debit_routing.rs`
- `crates/router/src/core/health_check.rs`
- ... and 6 more files
**2. Configuration Files**
- `config/config.example.toml`
- `config/development.toml`
- `crates/router/src/configs/settings.rs`
- ... and 1 more files
**Code Patterns Applied:**
- Implement new functions (1 changes)
- Extend existing types with new fields (2 changes)
- Add conditional logic for feature flags or filtering (12 changes)
**Detailed Identifier Changes:**
Commit 7508c801:
Files to modify:
**crates/router/src/configs/settings.rs**
Modify existing code
**crates/router/src/configs/validations.rs**
Add:
- function: pub::validate
- impl: impl super::settings::OpenRouter
**crates/router/src/core/admin.rs**
Modify existing code
**crates/router/src/core/debit_routing.rs**
Modify existing code
**crates/router/src/core/health_check.rs**
Modify existing code
**crates/router/src/core/payments.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_response.rs**
Modify existing code
**crates/router/src/core/payments/routing.rs**
Modify existing code
**crates/router/src/core/payments/routing/utils.rs**
Modify existing code
**crates/router/src/core/routing.rs**
Modify existing code
**crates/router/src/core/routing/helpers.rs**
Modify existing code
|
{"pr_number": 8559, "pr_title": "refactor(routing): add conditional check for invoking DE routing flows", "merged_at": "2025-07-08T13:35:02Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "connector"]}, "hierarchy": {"core_business": ["crates/router/src/core/admin.rs", "crates/router/src/core/debit_routing.rs", "crates/router/src/core/health_check.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/payments/operations/payment_response.rs", "crates/router/src/core/payments/routing.rs", "crates/router/src/core/payments/routing/utils.rs", "crates/router/src/core/routing.rs", "crates/router/src/core/routing/helpers.rs"], "config": ["config/config.example.toml", "config/development.toml", "crates/router/src/configs/settings.rs", "crates/router/src/configs/validations.rs"]}, "change_types": {"functions_added": 1, "fields_added": 2, "imports_added": 1, "conditionals_added": 12}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(core): add support to external 3ds authentication for co-badged cards
## 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 -->
1. send the entire card_data in pre-authentication request data to connector flows, this would allow connector flows to use card_number, card_network to send it forward
2. forward scheme_id to netcetera during pre-auth call for co-badged cards
### 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 Manually
1. Use co-badged card (4010061700000021) for performing external three ds payment, In confirm call (pre-authenticate) request to netcetera schemeId should be sent
CURL
```
curl --location '{{BASE_URL}}/payments/{{PAYMENT_ID}}/confirm' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: {{API_KEY}}' \
--header 'Accept-Language: da, en-GB;q=0.8, en;q=0.7' \
--data '{
"payment_method": "card",
"payment_method_data": {
"card": {
"card_number": "4010061700000021",
"card_exp_month": "01",
"card_exp_year": "2099",
"card_holder_name": "John Smith",
"card_cvc": "100",
"card_network": "Visa"
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "CA",
"zip": "94122",
"country": "US",
"first_name": "John",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
}
}
},
"browser_info": {
"user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
"accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
"language": "nl-NL",
"color_depth": 24,
"screen_height": 723,
"screen_width": 1536,
"time_zone": 0,
"java_enabled": true,
"java_script_enabled": true,
"ip_address": "125.0.0.1"
}
}'
```
Response
```
{
"payment_id": "pay_EDvFhaCDpRw4V5A3Y1Ef",
"merchant_id": "merchant_1740147344",
"status": "requires_customer_action",
"amount": 1040,
"net_amount": 1140,
"shipping_cost": 100,
"amount_capturable": 1140,
"amount_received": null,
"connector": "cybersource",
"client_secret": "pay_EDvFhaCDpRw4V5A3Y1Ef_secret_pA9o2rFGSRQyu46xKYnM",
"created": "2025-02-24T15:48:16.921Z",
"currency": "USD",
"customer_id": "test-sai1",
"customer": {
"id": "test-sai1",
"name": "John Doe",
"email": "guest@example.com",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Its my first payment request",
"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": "0021",
"card_type": null,
"card_network": "Visa",
"card_issuer": null,
"card_issuing_country": null,
"card_isin": "401006",
"card_extended_bin": null,
"card_exp_month": "01",
"card_exp_year": "2099",
"card_holder_name": "John Smith",
"payment_checks": null,
"authentication_data": null
},
"billing": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "CA",
"first_name": "John",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": null
}
},
"payment_token": "token_XFxK1XgDGkZSoXcLYwzS",
"shipping": null,
"billing": null,
"order_details": [
{
"brand": null,
"amount": 0,
"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": "guest@example.com",
"name": "John Doe",
"phone": "999999999",
"return_url": "https://google.com/",
"authentication_type": "three_ds",
"statement_descriptor_name": "joseph",
"statement_descriptor_suffix": "JS",
"next_action": {
"type": "three_ds_invoke",
"three_ds_data": {
"three_ds_authentication_url": "http://localhost:8080/payments/pay_EDvFhaCDpRw4V5A3Y1Ef/3ds/authentication",
"three_ds_authorize_url": "http://localhost:8080/payments/pay_EDvFhaCDpRw4V5A3Y1Ef/merchant_1740147344/authorize/cybersource",
"three_ds_method_details": {
"three_ds_method_key": "threeDSMethodData",
"three_ds_method_data_submission": true,
"three_ds_method_data": "eyJ0aHJlZURTTWV0aG9kTm90aWZpY2F0aW9uVVJMIjoiaHR0cHM6Ly9leGFtcGxlLmNvbS8zZHMtbWV0aG9kLW5vdGlmaWNhdGlvbi11cmwiLCJ0aHJlZURTU2VydmVyVHJhbnNJRCI6ImRkM2RlMGEwLTRjMWUtNDU4ZS05OTJhLTAxNTA4YjBhYTRhNSJ9",
"three_ds_method_url": "https://ndm-prev.3dss-non-prod.cloud.netcetera.com/acs/3ds-method"
},
"poll_config": {
"poll_id": "external_authentication_pay_EDvFhaCDpRw4V5A3Y1Ef",
"delay_in_secs": 2,
"frequency": 5
},
"message_version": "2.3.1",
"directory_server_id": "A000000003"
}
},
"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": null,
"connector_transaction_id": null,
"frm_message": null,
"metadata": {},
"connector_metadata": {
"apple_pay": null,
"airwallex": null,
"noon": {
"order_category": "pay"
}
},
"feature_metadata": null,
"reference_id": null,
"payment_link": null,
"profile_id": "pro_ztzdQ3yBJoa9tDcHWTlu",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_9WSwa3qBFtWAw2UshuwN",
"incremental_authorization_allowed": null,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": {
"authentication_flow": null,
"electronic_commerce_indicator": null,
"status": "pending",
"ds_transaction_id": "dd3de0a0-4c1e-458e-992a-01508b0aa4a5",
"version": "2.3.1",
"error_code": null,
"error_message": null
},
"external_3ds_authentication_attempted": true,
"expires_on": "2025-02-24T16:03:16.921Z",
"fingerprint": null,
"browser_info": {
"os_type": null,
"language": "nl-NL",
"time_zone": 0,
"ip_address": "125.0.0.1",
"os_version": null,
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36",
"color_depth": 24,
"device_model": null,
"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,
"accept_language": "da, en-GB;q=0.8, en;q=0.7",
"java_script_enabled": true
},
"payment_method_id": null,
"payment_method_status": null,
"updated": "2025-02-24T15:48:26.223Z",
"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"
}
```

2. Use non co-badged card (5306889942833340) for external 3ds payment
CURL
```
curl --location 'localhost:8080/payments/pay_i0EzkndDMybdDVnWQSa7/confirm' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'api-key: dev_efmJopOc2l8zVCdDRY3WF9DX1nFttmHghsVa9mNqHIjXynsWmmDTTv9eSYbuOGHt' \
--header 'Accept-Language: da, en-GB;q=0.8, en;q=0.7' \
--data '{
"payment_method": "card",
"payment_method_data": {
"card": {
"card_number": "5306889942833340",
"card_exp_month": "01",
"card_exp_year": "2099",
"card_holder_name": "John Smith",
"card_cvc": "100",
"card_network": "Visa"
},
"billing": {
"address": {
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "CA",
"zip": "94122",
"country": "US",
"first_name": "John",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
}
}
},
"browser_info": {
"user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36",
"accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8",
"language": "nl-NL",
"color_depth": 24,
"screen_height": 723,
"screen_width": 1536,
"time_zone": 0,
"java_enabled": true,
"java_script_enabled": true,
"ip_address": "125.0.0.1"
},
"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"
}
}
}'
```
<img width="1229" alt="image" src="https://github.com/user-attachments/assets/6b448d44-fb3f-415f-9361-71ebb363ba9e" />
## 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Domain Models (Business Logic Types)**
- `crates/hyperswitch_domain_models/src/router_request_types/authentication.rs`
**2. Core Business Logic**
- `crates/router/src/core/authentication.rs`
- `crates/router/src/core/authentication/transformers.rs`
- `crates/router/src/core/payments/helpers.rs`
- ... and 1 more files
**3. External Connector Integration**
- `crates/router/src/connector/gpayments/transformers.rs`
- `crates/router/src/connector/netcetera/transformers.rs`
- `crates/router/src/connector/threedsecureio/transformers.rs`
**Code Patterns Applied:**
- Implement new functions (1 changes)
- Extend existing types with new fields (11 changes)
- Add conditional logic for feature flags or filtering (1 changes)
**Detailed Identifier Changes:**
Commit 736ca446:
Files to modify:
**crates/hyperswitch_domain_models/src/router_request_types/authentication.rs**
Modify existing code
**crates/router/src/connector/gpayments/transformers.rs**
Modify existing code
**crates/router/src/connector/netcetera/transformers.rs**
Modify existing code
**crates/router/src/connector/threedsecureio/transformers.rs**
Modify existing code
**crates/router/src/core/authentication.rs**
Modify existing code
**crates/router/src/core/authentication/transformers.rs**
Modify existing code
**crates/router/src/core/payments/helpers.rs**
Modify existing code
**crates/router/src/core/payments/operations/payment_confirm.rs**
Modify existing code
|
{"pr_number": 7274, "pr_title": "feat(core): add support to external 3ds authentication for co-badged cards", "merged_at": "2025-02-25T19:03:59Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/router_request_types/authentication.rs"], "core_business": ["crates/router/src/core/authentication.rs", "crates/router/src/core/authentication/transformers.rs", "crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/operations/payment_confirm.rs"], "connectors": ["crates/router/src/connector/gpayments/transformers.rs", "crates/router/src/connector/netcetera/transformers.rs", "crates/router/src/connector/threedsecureio/transformers.rs"]}, "change_types": {"functions_added": 1, "fields_added": 11, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
fix(router): check payment_method_data before the decryption flow
## 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 a validation to check if payment method data passed in the request, if not passed decryption flow will be skipped
### 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)?
-->
### Hyperswitch decryption flow
#### CIT
request
```
{
"amount": 6500,
"currency": "USD",
"confirm": true,
"business_country": "US",
"business_label": "default",
"amount_to_capture": 6500,
"customer_id": "cu_{{$timestamp}}",
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"setup_future_usage": "off_session",
"authentication_type": "no_three_ds",
"return_url": "https://google.com",
"email": "something@gmail.com",
"name": "Joseph Doe",
"phone": "999999999",
"phone_country_code": "+65",
"description": "Its my first payment request",
"statement_descriptor_name": "Juspay",
"statement_descriptor_suffix": "Router",
"payment_method": "wallet",
"payment_method_type": "apple_pay",
"customer_acceptance": {
"acceptance_type": "offline",
"accepted_at": "1963-05-03T04:07:52.723Z",
"online": {
"ip_address": "in sit",
"user_agent": "amet irure esse"
}
},
"payment_method_data": {
"wallet": {
"apple_pay": {
"payment_data": "eyJkYXRhIjoiMTRnT3F1UjVtOVdoSmFQQ28vTUg0OXVQZDlza1NMajdVR0FpOVVnek9TeWJ5cWI5dXVaZTk3VGZJUCtaZjV6NzVk92UEVEajlMQT09IiwidHJhbnNhY3Rpb25JZCI6IjA1ZThiYjUzNjdjOWQzN2NkZGUyNTU3ODFhNGQzYjBjYWQ1ZTJmNTkzODAyNWQzZGVlMWQyYWNhN2JhMjA0NjkifSwidmVyc2lvbiI6IkVDX3YxIn0=",
"payment_method": {
"display_name": "Visa 0121",
"network": "Visa",
"type": "credit"
},
"transaction_identifier": "c91059b674937b377d7b0062878696509342"
}
}
}
}
```
response
```
{
"payment_id": "pay_QKxthnLdXlFDVsAoI3Eo",
"merchant_id": "merchant_1758632884",
"status": "succeeded",
"amount": 6500,
"net_amount": 6500,
"shipping_cost": null,
"amount_capturable": 6500,
"amount_received": 6500,
"connector": "stripe",
"client_secret": "pay_QKxthnLdXlFDVsAoI3Eo_secret_dfimraAm1H76cng9GMwL",
"created": "2025-09-23T16:10:43.333Z",
"currency": "USD",
"customer_id": "cu_1758643843",
"customer": {
"id": "cu_1758643843",
"name": "Joseph Doe",
"email": "something@gmail.com",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Its my first payment request",
"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": "wallet",
"payment_method_data": {
"wallet": {
"apple_pay": {
"last4": "0121",
"card_network": "Visa",
"type": "credit"
}
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": null,
"order_details": null,
"email": "something@gmail.com",
"name": "Joseph Doe",
"phone": "999999999",
"return_url": "https://google.com/",
"authentication_type": "no_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": "apple_pay",
"connector_label": "stripe_US_default",
"business_country": "US",
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "cu_1758643843",
"created_at": 1758643843,
"expires": 1758647443,
"secret": "epk_8dbac4154430478686dea71a24b5f08c"
},
"manual_retry_allowed": null,
"connector_transaction_id": "pi_3SAYnhEOqOywnAIx0F33RUS2",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": {
"redirect_response": null,
"search_tags": null,
"apple_pay_recurring_details": null,
"gateway_system": "direct"
},
"reference_id": "pi_3SAYnhEOqOywnAIx0F33RUS2",
"payment_link": null,
"profile_id": "pro_tDAPEkTZn0w9FBb1CJaB",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_s0qX20tZJUYlpSmdIyY7",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-09-23T16:25:43.333Z",
"fingerprint": null,
"browser_info": null,
"payment_channel": null,
"payment_method_id": "pm_gDWLZYRnzQ7JVSYBLZOk",
"network_transaction_id": "978911882105101",
"payment_method_status": "active",
"updated": "2025-09-23T16:10:46.459Z",
"split_payments": null,
"frm_metadata": null,
"extended_authorization_applied": false,
"capture_before": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": "pm_1SAYnhEOqOywnAIxO5W66wtL",
"card_discovery": null,
"force_3ds_challenge": false,
"force_3ds_challenge_trigger": false,
"issuer_error_code": null,
"issuer_error_message": null,
"is_iframe_redirection_enabled": null,
"whole_connector_response": null,
"enable_partial_authorization": null,
"enable_overcapture": null,
"is_overcapture_enabled": false,
"network_details": null
}
```
#### MIT
request
```
curl --location 'http://localhost:8080/payments' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'api-key: dev_HCk8bn8RudGtr9D686ITLBJzwrZB42LuwkjHHUS4eeb7wKAOmnEBco2ZQiWKORTr' \
--data-raw '{
"amount": 7000,
"currency": "USD",
"confirm": true,
"return_url": "https://hyperswitch.io",
"recurring_details": {
"type": "payment_method_id",
"data": "pm_gDWLZYRnzQ7JVSYBLZOk"
},
"customer_id": "cu_1758643843",
"off_session": true,
"email": "lol@gmail.com",
"billing": {
"address": {
"first_name": "John",
"last_name": "Doe",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US"
},
"phone": {
"number": "9123456789",
"country_code": "+91"
}
},
"browser_info": {
"ip_address": "129.0.0.1",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.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-US",
"color_depth": 30,
"screen_height": 1117,
"screen_width": 1728,
"time_zone": -330,
"java_enabled": true,
"java_script_enabled": true
},
"capture_method": "automatic"
}'
```
resposne
```
{
"payment_id": "pay_siSi0qevGJfkuJn2cJi8",
"merchant_id": "merchant_1758632884",
"status": "succeeded",
"amount": 7000,
"net_amount": 7000,
"shipping_cost": null,
"amount_capturable": 7000,
"amount_received": 7000,
"connector": "stripe",
"client_secret": "pay_siSi0qevGJfkuJn2cJi8_secret_HmSEbF9KcUCKPlIgPqVz",
"created": "2025-09-23T16:20:02.057Z",
"currency": "USD",
"customer_id": "cu_1758643843",
"customer": {
"id": "cu_1758643843",
"name": "Joseph Doe",
"email": "lol@gmail.com",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": null,
"refunds": null,
"disputes": null,
"mandate_id": null,
"mandate_data": null,
"setup_future_usage": null,
"off_session": true,
"capture_on": null,
"capture_method": "automatic",
"payment_method": "wallet",
"payment_method_data": {
"wallet": {
"apple_pay": {
"last4": "0121",
"card_network": "Visa",
"type": "credit"
}
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": "Harrison Street",
"line3": "Harrison Street",
"zip": "94122",
"state": "California",
"first_name": "John",
"last_name": "Doe",
"origin_zip": null
},
"phone": {
"number": "9123456789",
"country_code": "+91"
},
"email": null
},
"order_details": null,
"email": "lol@gmail.com",
"name": "Joseph Doe",
"phone": "999999999",
"return_url": "https://hyperswitch.io/",
"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": "apple_pay",
"connector_label": null,
"business_country": null,
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "cu_1758643843",
"created_at": 1758644402,
"expires": 1758648002,
"secret": "epk_afd96a04bae34ccf820dd7996f9fa48e"
},
"manual_retry_allowed": null,
"connector_transaction_id": "pi_3SAYwgEOqOywnAIx0L6LHPPK",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": {
"redirect_response": null,
"search_tags": null,
"apple_pay_recurring_details": null,
"gateway_system": "direct"
},
"reference_id": "pi_3SAYwgEOqOywnAIx0L6LHPPK",
"payment_link": null,
"profile_id": "pro_tDAPEkTZn0w9FBb1CJaB",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_s0qX20tZJUYlpSmdIyY7",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-09-23T16:35:02.057Z",
"fingerprint": null,
"browser_info": {
"language": "en-US",
"time_zone": -330,
"ip_address": "129.0.0.1",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
"color_depth": 30,
"java_enabled": true,
"screen_width": 1728,
"accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"screen_height": 1117,
"java_script_enabled": true
},
"payment_channel": null,
"payment_method_id": "pm_gDWLZYRnzQ7JVSYBLZOk",
"network_transaction_id": "978911882105101",
"payment_method_status": "active",
"updated": "2025-09-23T16:20:03.652Z",
"split_payments": null,
"frm_metadata": null,
"extended_authorization_applied": false,
"capture_before": null,
"merchant_order_reference_id": null,
"order_tax_amount": null,
"connector_mandate_id": "pm_1SAYnhEOqOywnAIxO5W66wtL",
"card_discovery": null,
"force_3ds_challenge": false,
"force_3ds_challenge_trigger": false,
"issuer_error_code": null,
"issuer_error_message": null,
"is_iframe_redirection_enabled": null,
"whole_connector_response": null,
"enable_partial_authorization": null,
"enable_overcapture": null,
"is_overcapture_enabled": false,
"network_details": null
}
```
### Connector decryption flow
```
{
"amount": 6500,
"currency": "USD",
"confirm": true,
"business_country": "US",
"business_label": "default",
"amount_to_capture": 6500,
"customer_id": "cu_{{$timestamp}}",
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"setup_future_usage": "off_session",
"authentication_type": "no_three_ds",
"return_url": "https://google.com",
"email": "something@gmail.com",
"name": "Joseph Doe",
"phone": "999999999",
"phone_country_code": "+65",
"description": "Its my first payment request",
"statement_descriptor_name": "Juspay",
"statement_descriptor_suffix": "Router",
"payment_method": "wallet",
"payment_method_type": "apple_pay",
"customer_acceptance": {
"acceptance_type": "offline",
"accepted_at": "1963-05-03T04:07:52.723Z",
"online": {
"ip_address": "in sit",
"user_agent": "amet irure esse"
}
},
"payment_method_data": {
"wallet": {
"apple_pay": {
"payment_data": "eyJkYXRhIjoiV0NtTk92OTQvRVQxUDE0ZVlsOUM0RHZnMkdXY3NyQUxHT2cyNUh5Z3cwSDIybVJTaGxja1JyZzU5TFFEMnRwQ09qbGJGQllzVEl0dmgxRGJ4cUlJWnBVcHlUNExiMlhjb25GaTR5aFBkcWlUdVBWWjlMamQxb2pEVVdDeGg5c2FrN0xjMWtIR1FWbnBqTElWVHN3MUNpRi8vSjJmajBGVFJDTVN1cmc3S0RGYy8zdi9YcFhKVExsNEJpRUJmd0lSTlB3cDcrOFh6MGdQem5STU9qU01uaFhCOXN2RTl0ei9oU0ZlQzV5RHRKdUh6elhWa1Z5aUM4Yld3Wjdrc2M3L1BBS29wNnNyc2NXZ3VwYlF6alVVRHJ1TTRSTjlvOVhZbFZDNUxPRWp1L0tob3lCM3RGSndxQldRNUkzblQ4TGMvZzFWVENGbWhTYXNocmltVDJMNlZzTmY1YjNYY3N0N002YlFTbWN3ZklXRlFGWDk0OUYvdy84dzFKWVhoTnRKMWZ6aXIyYlBQTGZ4a04rY2dRPT0iLCJzaWduYXR1cmUiOiJNSUFHQ1NxR1NJYjNEUUVIQXFDQU1JQUNBUUV4RFRBTEJnbGdoa2dCWlFNRUFnRXdnQVlKS29aSWh2Y05BUWNCQUFDZ2dEQ0NBK1F3Z2dPTG9BTUNBUUlDQ0ZuWW9ieXE5T1BOTUFvR0NDcUdTTTQ5QkFNQ01Ib3hMakFzQmdOVkJBTU1KVUZ3Y0d4bElFRndjR3hwWTJGMGFXOXVJRWx1ZEdWbmNtRjBhVzl1SUVOQklDMGdSek14SmpBa0JnTlZCQXNNSFVGd2NHeGxJRU5sY25ScFptbGpZWFJwYjI0Z1FYVjBhRzl5YVhSNU1STXdFUVlEVlFRS0RBcEJjSEJzWlNCSmJtTXVNUXN3Q1FZRFZRUUdFd0pWVXpBZUZ3MHlNVEEwTWpBeE9UTTNNREJhRncweU5qQTBNVGt4T1RNMk5UbGFNR0l4S0RBbUJnTlZCQU1NSDJWall5MXpiWEF0WW5KdmEyVnlMWE5wWjI1ZlZVTTBMVk5CVGtSQ1QxZ3hGREFTQmdOVkJBc01DMmxQVXlCVGVYTjBaVzF6TVJNd0VRWURWUVFLREFwQmNIQnNaU0JKYm1NdU1Rc3dDUVlEVlFRR0V3SlZVekJaTUJNR0J5cUdTTTQ5QWdFR0NDcUdTTTQ5QXdFSEEwSUFCSUl3L2F2RG5QZGVJQ3hRMlp0RkV1WTM0cWtCM1d5ejRMSE5TMUpubVBqUFRyM29HaVdvd2g1TU05M09qaXFXd3Zhdm9aTURSY1RvZWtRbXpwVWJFcFdqZ2dJUk1JSUNEVEFNQmdOVkhSTUJBZjhFQWpBQU1COEdBMVVkSXdRWU1CYUFGQ1B5U2NSUGsrVHZKK2JFOWloc1A2SzcvUzVMTUVVR0NDc0dBUVVGQndFQkJEa3dOekExQmdnckJnRUZCUWN3QVlZcGFIUjBjRG92TDI5amMzQXVZWEJ3YkdVdVkyOXRMMjlqYzNBd05DMWhjSEJzWldGcFkyRXpNREl3Z2dFZEJnTlZIU0FFZ2dFVU1JSUJFRENDQVF3R0NTcUdTSWIzWTJRRkFUQ0IvakNCd3dZSUt3WUJCUVVIQWdJd2diWU1nYk5TWld4cFlXNWpaU0J2YmlCMGFHbHpJR05sY25ScFptbGpZWFJsSUdKNUlHRnVlU0J3WVhKMGVTQmhjM04xYldWeklHRmpZMlZ3ZEdGdVkyVWdiMllnZEdobElIUm9aVzRnWVhCd2JHbGpZV0pzWlNCemRHRnVaR0Z5WkNCMFpYSnRjeUJoYm1RZ1kyOXVaR2wwYVc5dWN5QnZaaUIxYzJVc0lHTmxjblJwWm1sallYUmxJSEJ2YkdsamVTQmhibVFnWTJWeWRHbG1hV05oZEdsdmJpQndjbUZqZEdsalpTQnpkR0YwWlcxbGJuUnpMakEyQmdnckJnRUZCUWNDQVJZcWFIUjBjRG92TDNkM2R5NWhjSEJzWlM1amIyMHZZMlZ5ZEdsbWFXTmhkR1ZoZFhSb2IzSnBkSGt2TURRR0ExVWRId1F0TUNzd0thQW5vQ1dHSTJoMGRIQTZMeTlqY213dVlYQndiR1V1WTI5dEwyRndjR3hsWVdsallUTXVZM0pzTUIwR0ExVWREZ1FXQkJRQ0pEQUxtdTd0UmpHWHBLWmFLWjVDY1lJY1JUQU9CZ05WSFE4QkFmOEVCQU1DQjRBd0R3WUpLb1pJaHZkalpBWWRCQUlGQURBS0JnZ3Foa2pPUFFRREFnTkhBREJFQWlCMG9iTWsyMEpKUXczVEoweFFkTVNBalpvZlNBNDZoY1hCTmlWbU1sKzhvd0lnYVRhUVU2djFDMXBTK2ZZQVRjV0tyV3hRcDlZSWFEZVE0S2M2MEI1SzJZRXdnZ0x1TUlJQ2RhQURBZ0VDQWdoSmJTKy9PcGphbHpBS0JnZ3Foa2pPUFFRREFqQm5NUnN3R1FZRFZRUUREQkpCY0hCc1pTQlNiMjkwSUVOQklDMGdSek14SmpBa0JnTlZCQXNNSFVGd2NHeGxJRU5sY25ScFptbGpZWFJwYjI0Z1FYVjBhRzl5YVhSNU1STXdFUVlEVlFRS0RBcEJjSEJzWlNCSmJtTXVNUXN3Q1FZRFZRUUdFd0pWVXpBZUZ3MHhOREExTURZeU16UTJNekJhRncweU9UQTFNRFl5TXpRMk16QmFNSG94TGpBc0JnTlZCQU1NSlVGd2NHeGxJRUZ3Y0d4cFkyRjBhVzl1SUVsdWRHVm5jbUYwYVc5dUlFTkJJQzBnUnpNeEpqQWtCZ05WQkFzTUhVRndjR3hsSUVObGNuUnBabWxqWVhScGIyNGdRWFYwYUc5eWFYUjVNUk13RVFZRFZRUUtEQXBCY0hCc1pTQkpibU11TVFzd0NRWURWUVFHRXdKVlV6QlpNQk1HQnlxR1NNNDlBZ0VHQ0NxR1NNNDlBd0VIQTBJQUJQQVhFWVFaMTJTRjFScGVKWUVIZHVpQW91L2VlNjVONEkzOFM1UGhNMWJWWmxzMXJpTFFsM1lOSWs1N3VnajlkaGZPaU10MnUyWnd2c2pvS1lUL1ZFV2pnZmN3Z2ZRd1JnWUlLd1lCQlFVSEFRRUVPakE0TURZR0NDc0dBUVVGQnpBQmhpcG9kSFJ3T2k4dmIyTnpjQzVoY0hCc1pTNWpiMjB2YjJOemNEQTBMV0Z3Y0d4bGNtOXZkR05oWnpNd0hRWURWUjBPQkJZRUZDUHlTY1JQaytUdkorYkU5aWhzUDZLNy9TNUxNQThHQTFVZEV3RUIvd1FGTUFNQkFmOHdId1lEVlIwakJCZ3dGb0FVdTdEZW9WZ3ppSnFraXBuZXZyM3JyOXJMSktzd053WURWUjBmQkRBd0xqQXNvQ3FnS0lZbWFIUjBjRG92TDJOeWJDNWhjSEJzWlM1amIyMHZZWEJ3YkdWeWIyOTBZMkZuTXk1amNtd3dEZ1lEVlIwUEFRSC9CQVFEQWdFR01CQUdDaXFHU0liM1kyUUdBZzRFQWdVQU1Bb0dDQ3FHU000OUJBTUNBMmNBTUdRQ01EclBjb05SRnBteGh2czF3MWJLWXIvMEYrM1pEM1ZOb282KzhaeUJYa0szaWZpWTk1dFpuNWpWUVEyUG5lbkMvZ0l3TWkzVlJDR3dvd1YzYkYzek9EdVFaLzBYZkN3aGJaWlB4bkpwZ2hKdlZQaDZmUnVaeTVzSmlTRmhCcGtQQ1pJZEFBQXhnZ0dJTUlJQmhBSUJBVENCaGpCNk1TNHdMQVlEVlFRRERDVkJjSEJzWlNCQmNIQnNhV05oZEdsdmJpQkpiblJsWjNKaGRHbHZiaUJEUVNBdElFY3pNU1l3SkFZRFZRUUxEQjFCY0hCc1pTQkRaWEowYVdacFkyRjBhVzl1SUVGMWRHaHZjbWwwZVRFVE1CRUdBMVVFQ2d3S1FYQndiR1VnU1c1akxqRUxNQWtHQTFVRUJoTUNWVk1DQ0ZuWW9ieXE5T1BOTUFzR0NXQ0dTQUZsQXdRQ0FhQ0JrekFZQmdrcWhraUc5dzBCQ1FNeEN3WUpLb1pJaHZjTkFRY0JNQndHQ1NxR1NJYjNEUUVKQlRFUEZ3MHlOVEE1TVRreE1USTJNakJhTUNnR0NTcUdTSWIzRFFFSk5ERWJNQmt3Q3dZSllJWklBV1VEQkFJQm9Rb0dDQ3FHU000OUJBTUNNQzhHQ1NxR1NJYjNEUUVKQkRFaUJDQnU3YXJGTm8rTG1tOHYvejM3YTJBMDFJeGsrdFZlejlkRFFxSUJQSktxTXpBS0JnZ3Foa2pPUFFRREFnUkhNRVVDSUF1S2M0YzR5VUZROHVsUUtMeWRuWmZDYTR4QXY3dDFCdGt0NDMyOUZ6UXJBaUVBdUNoMTZJRmFDKy9GbldTUis1bG9vekwrZERFNW1HN0FWY1o2eEZHc1dpb0FBQUFBQUFBPSIsImhlYWRlciI6eyJwdWJsaWNLZXlIYXNoIjoidXd3VzM5ZGt2MjMyVFA1VTVLMjhFaWp4V0FBdmRzMDFrQ2hCY05hMzk4cz0iLCJlcGhlbWVyYWxQdWJsaWNLZXkiOiJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUUrR1pyWXY2R0c0Y0xnNm4rdmphVUx0TDN4WGNDMGhCbE9GWjlIY05QOWYrMzE0enVVRWw5c1Nkcyt5QUFRWCthRXFWUVBVZkZSOWorRGxLeHN3V3I2Zz09IiwidHJhbnNhY3Rpb25JZCI6IjhhNjM1YTRhMzRiMDFmM2Y4ZmQzZWRhZWY1YzY2ODJhMGRjNjUzNmRhNTlhZGE5NDZmZWRhNDNjMTY3YjA2MWEifSwidmVyc2lvbiI6IkVDX3YxIn0=",
"payment_method": {
"display_name": "MasterCard 0049",
"network": "MasterCard",
"type": "credit"
},
"transaction_identifier": "8a635a4a34b01f3f8fd3edaef5c6682a0dc6536da59ada946feda43c167b061a"
}
}
}
}
```
```
{
"payment_id": "pay_m5kXbC2hEbdrMFOmb1u5",
"merchant_id": "merchant_1758645561",
"status": "processing",
"amount": 6500,
"net_amount": 6500,
"shipping_cost": null,
"amount_capturable": 6500,
"amount_received": null,
"connector": "adyen",
"client_secret": "pay_m5kXbC2hEbdrMFOmb1u5_secret_XFNHlPwVhe4tcyUjOmvn",
"created": "2025-09-23T16:39:42.261Z",
"currency": "USD",
"customer_id": "cu_1758645582",
"customer": {
"id": "cu_1758645582",
"name": "Joseph Doe",
"email": "something@gmail.com",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Its my first payment request",
"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": "wallet",
"payment_method_data": {
"wallet": {
"apple_pay": {
"last4": "0049",
"card_network": "MasterCard",
"type": "credit"
}
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": null,
"order_details": null,
"email": "something@gmail.com",
"name": "Joseph Doe",
"phone": "999999999",
"return_url": "https://google.com/",
"authentication_type": "no_three_ds",
"statement_descriptor_name": "Juspay",
"statement_descriptor_suffix": "Router",
"next_action": null,
"cancellation_reason": null,
"error_code": "5_004",
"error_message": "Could not find Merchant Private Key",
"unified_code": "UE_9000",
"unified_message": "Something went wrong",
"payment_experience": null,
"payment_method_type": "apple_pay",
"connector_label": "adyen_US_default",
"business_country": "US",
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "cu_1758645582",
"created_at": 1758645582,
"expires": 1758649182,
"secret": "epk_345bf6ea5a8841818aef283236fc555b"
},
"manual_retry_allowed": null,
"connector_transaction_id": "LGX9FHPL4L6DCQV5",
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": {
"redirect_response": null,
"search_tags": null,
"apple_pay_recurring_details": null,
"gateway_system": "direct"
},
"reference_id": null,
"payment_link": null,
"profile_id": "pro_DEPa1tm6HCWaRDpKUhiw",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_DniO167JdDFagf728nCR",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-09-23T16:54:42.261Z",
"fingerprint": null,
"browser_info": null,
"payment_channel": null,
"payment_method_id": null,
"network_transaction_id": null,
"payment_method_status": null,
"updated": "2025-09-23T16:39:43.481Z",
"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,
"is_iframe_redirection_enabled": null,
"whole_connector_response": null,
"enable_partial_authorization": null,
"enable_overcapture": null,
"is_overcapture_enabled": null,
"network_details": {
"network_advice_code": null
}
}
```
### Pre-decryption flow
```
{
"amount": 7445,
"currency": "USD",
"confirm": true,
"business_country": "US",
"business_label": "default",
"amount_to_capture": 7445,
"customer_id": "cu_{{$timestamp}}",
"capture_method": "automatic",
"capture_on": "2022-09-10T10:11:12Z",
"setup_future_usage": "on_session",
"authentication_type": "no_three_ds",
"return_url": "https://google.com",
"email": "something@gmail.com",
"name": "Joseph Doe",
"phone": "999999999",
"phone_country_code": "+65",
"description": "Its my first payment request",
"statement_descriptor_name": "Juspay",
"statement_descriptor_suffix": "Router",
"payment_method": "wallet",
"payment_method_type": "apple_pay",
"billing": {
"address": {
"line1": "1467",
"city": "San Fransico",
"state": "California",
"zip": "94122",
"country": "US",
"first_name": "joseph",
"last_name": "Doe"
},
"phone": {
"number": "8056594427",
"country_code": "+91"
}
},
"customer_acceptance": {
"acceptance_type": "offline",
"accepted_at": "1963-05-03T04:07:52.723Z",
"online": {
"ip_address": "in sit",
"user_agent": "amet irure esse"
}
},
"payment_method_data": {
"wallet": {
"apple_pay": {
"payment_data": {
"application_primary_account_number": "4242424242424242",
"application_expiration_month": "09",
"application_expiration_year": "30",
"payment_data": {
"online_payment_cryptogram": "c635c5b3af900d7bd81fecd7028f1262f9d030754ee65ec7afd988a678194751",
"eci_indicator": "5"
}
},
"payment_method": {
"display_name": "Discover 9319",
"network": "Visa",
"type": "debit"
},
"transaction_identifier": "c635c5b3af900d7bd81fecd7028f1262f9d030754ee65ec7afd988a678194751"
}
}
}
}
```
```
{
"payment_id": "pay_vlBGIV4arCs324zqb245",
"merchant_id": "merchant_1758646116",
"status": "failed",
"amount": 7445,
"net_amount": 7445,
"shipping_cost": null,
"amount_capturable": 0,
"amount_received": null,
"connector": "worldpayvantiv",
"client_secret": "pay_vlBGIV4arCs324zqb245_secret_K6ZvvoCFwEGrAeNaEAsP",
"created": "2025-09-23T16:49:08.504Z",
"currency": "USD",
"customer_id": "cu_1758646148",
"customer": {
"id": "cu_1758646148",
"name": "Joseph Doe",
"email": "something@gmail.com",
"phone": "999999999",
"phone_country_code": "+65"
},
"description": "Its my first payment request",
"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": "wallet",
"payment_method_data": {
"wallet": {
"apple_pay": {
"last4": "9319",
"card_network": "Visa",
"type": "debit"
}
},
"billing": null
},
"payment_token": null,
"shipping": null,
"billing": {
"address": {
"city": "San Fransico",
"country": "US",
"line1": "1467",
"line2": null,
"line3": null,
"zip": "94122",
"state": "California",
"first_name": "joseph",
"last_name": "Doe",
"origin_zip": null
},
"phone": {
"number": "8056594427",
"country_code": "+91"
},
"email": null
},
"order_details": null,
"email": "something@gmail.com",
"name": "Joseph Doe",
"phone": "999999999",
"return_url": "https://google.com/",
"authentication_type": "no_three_ds",
"statement_descriptor_name": "Juspay",
"statement_descriptor_suffix": "Router",
"next_action": null,
"cancellation_reason": null,
"error_code": "1",
"error_message": "Invalid credentials. Contact eCommerceSupport@worldpay.com.",
"unified_code": "UE_9000",
"unified_message": "Something went wrong",
"payment_experience": null,
"payment_method_type": "apple_pay",
"connector_label": "worldpayvantiv_US_default",
"business_country": "US",
"business_label": "default",
"business_sub_label": null,
"allowed_payment_method_types": null,
"ephemeral_key": {
"customer_id": "cu_1758646148",
"created_at": 1758646148,
"expires": 1758649748,
"secret": "epk_c805578c79634db68981e99cefb0887d"
},
"manual_retry_allowed": null,
"connector_transaction_id": null,
"frm_message": null,
"metadata": null,
"connector_metadata": null,
"feature_metadata": {
"redirect_response": null,
"search_tags": null,
"apple_pay_recurring_details": null,
"gateway_system": "direct"
},
"reference_id": null,
"payment_link": null,
"profile_id": "pro_7L7CCetsppn2SFed8gDl",
"surcharge_details": null,
"attempt_count": 1,
"merchant_decision": null,
"merchant_connector_id": "mca_CfdihSpeGdbjdb3Azvct",
"incremental_authorization_allowed": false,
"authorization_count": null,
"incremental_authorizations": null,
"external_authentication_details": null,
"external_3ds_authentication_attempted": false,
"expires_on": "2025-09-23T17:04:08.504Z",
"fingerprint": null,
"browser_info": null,
"payment_channel": null,
"payment_method_id": null,
"network_transaction_id": null,
"payment_method_status": null,
"updated": "2025-09-23T16:49:12.077Z",
"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,
"is_iframe_redirection_enabled": null,
"whole_connector_response": null,
"enable_partial_authorization": null,
"enable_overcapture": null,
"is_overcapture_enabled": null,
"network_details": {
"network_advice_code": 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. Core Business Logic**
- `crates/router/src/core/payments.rs`
**Detailed Identifier Changes:**
Commit 36b05791:
Files to modify:
**crates/router/src/core/payments.rs**
Modify existing code
|
{"pr_number": 9521, "pr_title": "fix(router): check payment_method_data before the decryption flow", "merged_at": "2025-09-23T20:19:02Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
|
feat(connector): Fix Wasm Changes for Coinbase
## 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 -->
Added wasm changes for the coinbase
### Additional Changes
- [ ] This PR modifies the API contract
- [ ] This PR modifies the database schema
- [x] 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
|
To implement this **search_filter** feature, you'll need to modify these architectural layers:
**1. External Connector Integration**
- `crates/connector_configs/toml/development.toml`
- `crates/connector_configs/toml/production.toml`
- `crates/connector_configs/toml/sandbox.toml`
|
{"pr_number": 7941, "pr_title": "feat(connector): Fix Wasm Changes for Coinbase", "merged_at": "2025-05-07T07:07:18Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"connectors": ["crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.