prompt
stringlengths
83
247k
response
stringlengths
121
36.1k
metadata
stringlengths
314
42.3k
fix(connector): add Nomupay in payout_connector_list for all environment ## 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 --> Nomupay is not added in `connector_customer` for `payout_connector_list` for different environments, that's why payouts cypress test is failing for nomupay in integ. Nomupay added in `payout_connector_list` for all environment ### 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="768" alt="Screenshot 2025-03-19 at 6 46 48 PM" src="https://github.com/user-attachments/assets/c1b2e76c-8352-4ae1-a52d-a8522df51260" /> ## 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. Tests** - `config/deployments/integration_test.toml` - `loadtest/config/development.toml` **2. Configuration Files** - `config/config.example.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 1 more files
{"pr_number": 7521, "pr_title": "fix(connector): add Nomupay in payout_connector_list for all environment", "merged_at": "2025-03-25T07:19:52Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "user", "connector"]}, "hierarchy": {"tests": ["config/deployments/integration_test.toml", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/docker_compose.toml"]}, "change_types": {}, "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. ### 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_confirm.rs` - `crates/router/src/core/payments/operations/payment_create.rs` - ... and 5 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/storage_impl/src/mock_db/payment_attempt.rs` - `crates/storage_impl/src/payments/payment_attempt.rs` **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (5 changes) - Extend existing types with new fields (88 changes) - Add conditional logic for feature flags or filtering (6 changes) **Detailed Identifier Changes:** Commit e14a0fe8: 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_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/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/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/mock_db/payment_attempt.rs** Modify existing code **crates/storage_impl/src/payments/payment_attempt.rs** Modify existing code
{"pr_number": 6327, "pr_title": "fix(mandates): handle the connector_mandate creation once and only if the payment is charged", "merged_at": "2024-10-17T13:59:13Z", "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_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/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/storage_impl/src/mock_db/payment_attempt.rs", "crates/storage_impl/src/payments/payment_attempt.rs"]}, "change_types": {"structs_added": 1, "functions_added": 5, "enums_added": 1, "fields_added": 88, "imports_added": 4, "conditionals_added": 6}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [Coingate] Fix Wasm Changes ## 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 metadata fields should have currency_id and platform_id as numbers, not strings for coingate ### 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 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/src/common_config.rs` - `crates/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - ... and 1 more files **Detailed Identifier Changes:** Commit bd32dd4f: Files to modify: **crates/connector_configs/src/common_config.rs** Modify existing code
{"pr_number": 7716, "pr_title": "fix(connector): [Coingate] Fix Wasm Changes ", "merged_at": "2025-04-04T10:34:59Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"connectors": ["crates/connector_configs/src/common_config.rs", "crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
ci(cypress): verify mandate id to be `null` if payment id not `succeeded` ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> This PR adds a check to verify if the `payment_status` is not any of `succeeded`, `partially_captured` or `requires_capture` and if so, then the `connector_mandate_id` should be `null`. ### 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). --> Verifying PM status isn't enough. We also need to check the existence of connector mandate id. Closes #7748 ## 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. Also: CIT confirm, we should get `connector_mandate_id` <img width="510" alt="image" src="https://github.com/user-attachments/assets/41f74780-5b6e-404f-a9ec-2cf7619d9adf" /> MIT confirm, in NTID flow, `connector_mandate_id` will be `null` <img width="509" alt="image" src="https://github.com/user-attachments/assets/82c21ce9-261e-4457-9efc-c3e68398e555" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `npm run format` - [x] I addressed lints thrown by `npm run lint -- --fix` - [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/spec/Payment/00024-ConnectorAgnosticNTID.cy.js` - `cypress-tests/cypress/support/commands.js` **Code Patterns Applied:** - Add conditional logic for feature flags or filtering (4 changes)
{"pr_number": 7749, "pr_title": "ci(cypress): verify mandate id to be `null` if payment id not `succeeded`", "merged_at": "2025-04-16T10:47:24Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "connector"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/spec/Payment/00024-ConnectorAgnosticNTID.cy.js", "cypress-tests/cypress/support/commands.js"]}, "change_types": {"conditionals_added": 4}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(connector): [JPMORGAN, PAYU, DIGITALVIRGO, PAYBOX, BITPAY, HELCIM] added 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 Fixes juspay/hyperswitch-cloud#8276 ## Description Added details feature api details for Jpmorgan, Payu, Digital Virgo. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables ## Motivation and Context ## How did you test it? Request : `curl --location 'http://localhost:8080/feature_matrix' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_vE*****DCUv82mKkL'` Response : ``` { "connector_count": 9, "connectors": [ { "name": "BAMBORA", "display_name": "Bambora", "description": "Bambora is a leading online payment provider in Canada and United States.", "category": "payment_gateway", "supported_payment_methods": [ { "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", "Discover", "JCB", "DinersClub" ], "supported_countries": [ "US", "CA" ], "supported_currencies": [ "USD" ] } ], "supported_webhook_flows": [] }, { "name": "BITPAY", "display_name": "Bitpay", "description": "BitPay is a cryptocurrency payment processor that enables businesses to accept Bitcoin and other digital currencies ", "category": "alternative_payment_method", "supported_payment_methods": [ { "payment_method": "crypto", "payment_method_type": "crypto_currency", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic" ], "supported_countries": [ "BE", "GR", "US", "DE", "SE", "PL", "LV", "FI", "NL", "RO", "GB", "BG", "AT", "CA", "HR", "LT", "EE", "CZ", "FR", "DK", "PT", "HU", "LU", "SI", "MT", "IE", "CY", "IT", "ES", "SK" ], "supported_currencies": [ "CHF", "MXN", "USD", "GBP", "EUR", "NZD", "AUD", "CAD" ] } ], "supported_webhook_flows": [ "payments" ] }, { "name": "DEUTSCHEBANK", "display_name": "Deutsche Bank", "description": "Deutsche Bank is a German multinational investment bank and financial services company ", "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": "supported", "no_three_ds": "not_supported", "supported_card_networks": [ "Visa", "Mastercard" ], "supported_countries": null, "supported_currencies": null }, { "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": "not_supported", "supported_card_networks": [ "Visa", "Mastercard" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "bank_debit", "payment_method_type": "sepa", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null } ], "supported_webhook_flows": [] }, { "name": "DIGITALVIRGO", "display_name": "Digital Virgo", "description": "Digital Virgo is an alternative payment provider specializing in carrier billing and mobile payments ", "category": "alternative_payment_method", "supported_payment_methods": [ { "payment_method": "mobile_payment", "payment_method_type": "direct_carrier_billing", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "AE", "PS", "RU", "SD", "TR", "CM", "GN", "AZ", "NL", "BH", "IQ", "MA", "BW", "BR", "LY", "SA", "GH", "SG", "PL", "ML", "FR", "CG", "MG", "EG", "BE", "NG", "IE", "SK", "CH", "ID", "GR", "JO", "SN", "IT", "DE", "KW", "PT", "GB", "MX", "ZA", "QA", "AR", "OM", "GA", "DZ", "CL", "ES", "TN" ], "supported_currencies": [ "BHD", "ZAR", "EGP", "OMR", "GNF", "JOD", "IQD", "XAF", "CHF", "LYD", "MGA", "CLP", "BRL", "SDG", "EUR", "TRY", "ARS", "MAD", "SAR", "ILS", "TND", "IDR", "XOF", "MXN", "DZD", "AZN", "PLN", "QAR", "AED", "CDF", "RUB", "GHS", "BWP", "GBP", "NGN", "SGD", "KWD" ] } ], "supported_webhook_flows": [] }, { "name": "HELCIM", "display_name": "Helcim", "description": "Helcim is a payment processing company that offers transparent, affordable merchant services for businesses of all sizes", "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": "not_supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard", "Interac", "AmericanExpress", "JCB", "DinersClub", "Discover", "CartesBancaires", "UnionPay" ], "supported_countries": [ "CA", "US" ], "supported_currencies": [ "USD", "CAD" ] }, { "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", "Interac", "AmericanExpress", "JCB", "DinersClub", "Discover", "CartesBancaires", "UnionPay" ], "supported_countries": [ "CA", "US" ], "supported_currencies": [ "CAD", "USD" ] } ], "supported_webhook_flows": [] }, { "name": "JPMORGAN", "display_name": "Jpmorgan", "description": "J.P. Morgan is a global financial services firm and investment bank, offering banking, asset management, and payment processing solutions", "category": "bank_acquirer", "supported_payment_methods": [ { "payment_method": "card", "payment_method_type": "credit", "mandates": "not_supported", "refunds": "not_supported", "supported_capture_methods": [ "automatic", "manual" ], "three_ds": "not_supported", "no_three_ds": "supported", "supported_card_networks": [ "AmericanExpress", "DinersClub", "Discover", "JCB", "Mastercard", "UnionPay", "Visa" ], "supported_countries": [ "LT", "PL", "BG", "CA", "CZ", "FI", "NL", "CY", "EE", "DK", "ES", "IE", "RO", "GB", "SI", "HR", "GR", "HU", "FR", "BE", "SE", "LV", "US", "PT", "LU", "IT", "MT", "DE", "SK", "AT" ], "supported_currencies": [ "FJD", "PKR", "SHP", "CAD", "GHS", "PGK", "UGX", "RSD", "LSL", "HNL", "JPY", "MMK", "EGP", "GIP", "DKK", "LBP", "ALL", "CVE", "STN", "TTD", "CNY", "BND", "JMD", "MVR", "UYU", "KES", "KHR", "BBD", "HUF", "MNT", "AED", "CHF", "AWG", "TZS", "SEK", "ZAR", "AFN", "INR", "HKD", "LRD", "NAD", "MKD", "MYR", "HRK", "MOP", "NGN", "VUV", "GMD", "PHP", "SBD", "XCD", "DOP", "SCR", "SRD", "LAK", "SZL", "KZT", "KYD", "MZN", "CZK", "BWP", "BSD", "MGA", "WST", "MXN", "SLL", "MWK", "PYG", "NZD", "THB", "USD", "BTN", "ETB", "ISK", "QAR", "FKP", "CLP", "XPF", "XAF", "TJS", "PLN", "DZD", "PEN", "RWF", "COP", "BIF", "KMF", "NOK", "VND", "NPR", "GBP", "ZMW", "BDT", "TOP", "BAM", "CRC", "GEL", "TRY", "GYD", "XOF", "MAD", "ANG", "HTG", "UZS", "SAR", "CDF", "AZN", "GTQ", "SOS", "YER", "AUD", "MRU", "NIO", "IDR", "SGD", "RON", "BRL", "TWD", "AMD", "ARS", "BYN", "ILS", "MDL", "BMD", "PAB", "BOB", "UAH", "LKR", "KRW", "BZD", "MUR", "AOA", "BGN", "DJF", "EUR" ] }, { "payment_method": "card", "payment_method_type": "debit", "mandates": "not_supported", "refunds": "not_supported", "supported_capture_methods": [ "automatic", "manual" ], "three_ds": "not_supported", "no_three_ds": "supported", "supported_card_networks": [ "AmericanExpress", "DinersClub", "Discover", "JCB", "Mastercard", "UnionPay", "Visa" ], "supported_countries": [ "GB", "HR", "EE", "FR", "PL", "SE", "AT", "GR", "SI", "NL", "SK", "FI", "CA", "CZ", "HU", "CY", "IT", "BG", "DK", "RO", "LT", "LV", "US", "MT", "DE", "LU", "IE", "ES", "BE", "PT" ], "supported_currencies": [ "PYG", "TOP", "BIF", "VUV", "CVE", "JPY", "MXN", "KRW", "BRL", "KES", "PHP", "KMF", "BDT", "BND", "RSD", "PKR", "ZMW", "BOB", "LSL", "UAH", "NIO", "KZT", "KHR", "TJS", "CLP", "PAB", "UGX", "KYD", "RON", "COP", "CRC", "MMK", "TTD", "VND", "YER", "MNT", "AWG", "STN", "ETB", "SHP", "AUD", "DJF", "HTG", "HRK", "SZL", "AMD", "PGK", "MGA", "IDR", "TRY", "WST", "NAD", "CHF", "CNY", "UYU", "HUF", "THB", "AFN", "MRU", "DZD", "BGN", "GTQ", "EGP", "MAD", "JMD", "GIP", "NPR", "LBP", "MDL", "SCR", "BSD", "SBD", "ARS", "AOA", "XAF", "MKD", "TWD", "GBP", "BYN", "UZS", "MYR", "CAD", "LAK", "MZN", "AED", "SGD", "EUR", "SRD", "MUR", "GHS", "FJD", "GEL", "GMD", "XOF", "SLL", "SAR", "BAM", "NZD", "BWP", "GYD", "NGN", "FKP", "HNL", "SEK", "INR", "PEN", "BTN", "BBD", "ALL", "USD", "LRD", "XPF", "MVR", "XCD", "SOS", "BZD", "AZN", "MWK", "TZS", "DKK", "CZK", "ISK", "RWF", "DOP", "ZAR", "BMD", "LKR", "NOK", "HKD", "QAR", "CDF", "PLN", "MOP", "ANG", "ILS" ] } ], "supported_webhook_flows": [] }, { "name": "PAYBOX", "display_name": "Paybox", "description": "Paybox is a payment gateway that enables businesses to process online transactions securely ", "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": "supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard", "Interac", "AmericanExpress", "JCB", "DinersClub", "Discover", "CartesBancaires", "UnionPay" ], "supported_countries": [ "FR" ], "supported_currencies": [ "CAD", "EUR", "AUD", "USD" ] }, { "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", "Interac", "AmericanExpress", "JCB", "DinersClub", "Discover", "CartesBancaires", "UnionPay" ], "supported_countries": [ "FR" ], "supported_currencies": [ "USD", "CAD", "AUD", "EUR" ] } ], "supported_webhook_flows": [] }, { "name": "PAYU", "display_name": "Payu", "description": "PayU is a global fintech company providing online payment solutions, including card processing, UPI, wallets, and BNPL services across multiple markets ", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "wallet", "payment_method_type": "google_pay", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": [ "GY", "DZ", "SR", "CR", "NA", "TJ", "MK", "ET", "GH", "HK", "MG", "AL", "LR", "SO", "UG", "FJ", "AI", "DJ", "IL", "KH", "AS", "BM", "BR", "SV", "MN", "RO", "VE", "PA", "BW", "BH", "SZ", "PL", "SH", "FK", "CL", "CD", "TT", "JP", "TH", "AW", "PF", "BY", "MD", "TW", "AU", "GT", "KR", "AF", "BZ", "AZ", "GE", "MW", "MY", "TO", "MA", "VU", "SC", "LI", "MZ", "BV", "AE", "CN", "GG", "BB", "TN", "SA", "HN", "MR", "OM", "NG", "JO", "CO", "QA", "WS", "GN", "ZM", "AR", "KM", "BN", "RW", "CZ", "SE", "AO", "EG", "BS", "KZ", "UY", "CA", "HR", "ZA", "GI", "BI", "BJ", "PY", "UZ", "SB", "ZW", "VN", "CK", "BA", "AM", "BG", "YE", "IQ", "JM", "ID", "PE", "PG", "BO", "TR", "CM", "IS", "HT", "LS", "NI", "TM", "CW", "LA", "MO", "AD", "SG", "GM", "KG", "KW", "CV", "MV", "MX", "TZ", "KY", "RS", "DK", "HU", "LB", "DO" ], "supported_currencies": [ "KWD", "PEN", "NIO", "RSD", "BWP", "HKD", "MDL", "USD", "VND", "AMD", "ISK", "ILS", "TOP", "JOD", "ZMW", "TJS", "BSD", "DKK", "BAM", "MNT", "PYG", "HUF", "ALL", "GNF", "KZT", "MWK", "RON", "VUV", "XCD", "XAF", "CLP", "BOB", "KGS", "VES", "AWG", "BRL", "CNY", "IQD", "CZK", "SCR", "MGA", "MVR", "SZL", "WST", "TZS", "MYR", "ARS", "NZD", "LRD", "CAD", "BYN", "BIF", "HNL", "CVE", "GHS", "SVC", "BHD", "SEK", "AZN", "OMR", "SBD", "BBD", "BZD", "PAB", "SHP", "BGN", "GEL", "UYU", "ZAR", "CRC", "KYD", "HRK", "AED", "BND", "ETB", "MKD", "SOS", "LAK", "BMD", "MAD", "NOK", "TWD", "UGX", "LBP", "EUR", "GBP", "XPF", "YER", "RWF", "JPY", "TTD", "AUD", "KHR", "FKP", "TND", "PLN", "SAR", "MOP", "CDF", "AFN", "TRY", "GTQ", "HTG", "SRD", "LSL", "COP", "AOA", "JMD", "KRW", "DOP", "XOF", "ZWL", "GYD", "DJF", "SGD", "THB", "FJD", "GIP", "DZD", "EGP", "CHF", "GMD", "IDR", "MRU", "TMT", "KMF", "NGN", "QAR", "UZS", "MXN", "MZN", "ANG", "NAD", "PGK" ] }, { "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": [ "Visa", "Mastercard", "Interac", "AmericanExpress", "JCB", "DinersClub", "Discover", "CartesBancaires", "UnionPay" ], "supported_countries": [ "AM", "AE", "ZW", "WS", "DO", "UY", "HR", "AO", "MV", "QA", "TR", "NI", "GY", "VU", "MD", "GI", "SA", "UZ", "MA", "TH", "GN", "OM", "AS", "BA", "YE", "CK", "SV", "TT", "SZ", "AR", "BR", "BW", "JO", "BH", "LA", "SE", "BZ", "AZ", "HU", "MY", "CO", "KH", "AI", "TZ", "MK", "TM", "SR", "KR", "BN", "EG", "AU", "PY", "NG", "GH", "CN", "KZ", "NA", "ZM", "JP", "ID", "VN", "MZ", "SO", "BM", "CL", "ET", "MR", "LI", "KY", "AF", "BS", "MX", "RW", "CD", "TO", "RS", "DK", "GG", "PE", "PA", "CA", "LB", "CR", "MW", "FJ", "PG", "TN", "TW", "BO", "LR", "AD", "IS", "GM", "BG", "BV", "SG", "PF", "AL", "BI", "KM", "CM", "ZA", "AW", "RO", "TJ", "HK", "CW", "BB", "GT", "MO", "SH", "VE", "BJ", "IQ", "GE", "KG", "MG", "PL", "DZ", "BY", "HN", "MN", "FK", "LS", "UG", "CV", "HT", "CZ", "KW", "SB", "SC", "IL", "DJ", "JM" ], "supported_currencies": [ "COP", "GMD", "AOA", "AED", "HRK", "LBP", "BWP", "ILS", "TRY", "UYU", "XAF", "ZAR", "SZL", "MXN", "ANG", "BRL", "CLP", "MOP", "IDR", "MVR", "PYG", "NAD", "SOS", "VES", "KYD", "HKD", "SCR", "AWG", "THB", "GBP", "FJD", "ALL", "KZT", "BAM", "SHP", "BIF", "SVC", "ARS", "SGD", "BGN", "DZD", "JMD", "ETB", "AUD", "SBD", "BMD", "NOK", "CNY", "IQD", "BBD", "CDF", "HNL", "DOP", "MAD", "TJS", "YER", "UGX", "ZMW", "BYN", "MNT", "KMF", "PAB", "CZK", "BOB", "USD", "NGN", "KGS", "QAR", "MDL", "MRU", "SEK", "DJF", "EGP", "LSL", "GTQ", "SRD", "TND", "MZN", "WST", "JPY", "TTD", "KWD", "MKD", "OMR", "XOF", "MWK", "CVE", "NZD", "EUR", "RSD", "XCD", "AMD", "ISK", "LRD", "TZS", "BND", "PEN", "NIO", "DKK", "HUF", "TMT", "BZD", "VND", "BHD", "JOD", "MGA", "VUV", "GIP", "HTG", "KHR", "FKP", "CAD", "BSD", "TWD", "UZS", "ZWL", "PLN", "PGK", "KRW", "RWF", "AFN", "GEL", "CHF", "CRC", "AZN", "GYD", "XPF", "TOP", "GNF", "GHS", "RON", "SAR", "LAK", "MYR" ] }, { "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": [ "Visa", "Mastercard", "Interac", "AmericanExpress", "JCB", "DinersClub", "Discover", "CartesBancaires", "UnionPay" ], "supported_countries": [ "EG", "DZ", "OM", "BG", "GE", "MN", "BJ", "CZ", "ZM", "MA", "UG", "KR", "PF", "TH", "FK", "VE", "AL", "HR", "JP", "BO", "PL", "HN", "MZ", "ET", "BZ", "SO", "AI", "BN", "RO", "AS", "ID", "KW", "TT", "KZ", "AE", "SZ", "LI", "GM", "AD", "KM", "UZ", "TM", "WS", "DK", "MR", "LA", "CM", "BM", "CW", "MK", "KY", "KG", "DO", "TO", "BH", "PY", "AM", "CV", "MO", "RS", "BR", "GT", "ZA", "IL", "GY", "SB", "AR", "MV", "PE", "CK", "NG", "BB", "CO", "LS", "IS", "BV", "DJ", "SR", "HT", "YE", "AF", "AW", "QA", "MY", "ZW", "PG", "JM", "TZ", "GI", "IQ", "BW", "CN", "SE", "TJ", "CL", "GG", "PA", "HK", "AU", "MD", "JO", "CR", "TW", "FJ", "VU", "NA", "CD", "TN", "UY", "BS", "CA", "GH", "MG", "BA", "SA", "BY", "SH", "HU", "MX", "KH", "LR", "MW", "NI", "AZ", "LB", "RW", "SV", "GN", "SC", "BI", "VN", "TR", "SG", "AO" ], "supported_currencies": [ "KYD", "NOK", "CVE", "BBD", "MYR", "NGN", "IDR", "MKD", "RWF", "UZS", "GNF", "ZWL", "AMD", "BYN", "MDL", "CHF", "RON", "DKK", "KHR", "TWD", "VES", "NZD", "SHP", "SVC", "BGN", "BHD", "CLP", "SZL", "TRY", "SEK", "KRW", "SCR", "HNL", "LRD", "UYU", "NIO", "PYG", "SGD", "WST", "HRK", "USD", "AZN", "MZN", "RSD", "TTD", "VND", "FKP", "JMD", "PLN", "MRU", "AFN", "BWP", "SAR", "XOF", "CDF", "CAD", "JOD", "NAD", "SBD", "BZD", "GHS", "BAM", "TZS", "GIP", "LBP", "MNT", "FJD", "AWG", "ILS", "BIF", "TJS", "TOP", "SRD", "BND", "KZT", "CZK", "YER", "MWK", "BMD", "EUR", "HKD", "BRL", "MOP", "GTQ", "LSL", "JPY", "THB", "CNY", "GMD", "HTG", "BOB", "ZAR", "MVR", "ETB", "ALL", "GYD", "ARS", "AUD", "UGX", "DZD", "CRC", "XCD", "GBP", "KMF", "AOA", "DJF", "TND", "TMT", "AED", "COP", "KWD", "OMR", "PEN", "MAD", "XAF", "GEL", "ANG", "PAB", "ISK", "QAR", "MXN", "PGK", "XPF", "MGA", "LAK", "ZMW", "VUV", "SOS", "IQD", "BSD", "DOP", "EGP", "KGS", "HUF" ] } ], "supported_webhook_flows": [] }, { "name": "ZSL", "display_name": "ZSL", "description": "Zsl is a payment gateway operating in China, specializing in facilitating local bank transfers", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "bank_transfer", "payment_method_type": "local_bank_transfer", "mandates": "not_supported", "refunds": "not_supported", "supported_capture_methods": [ "automatic" ], "supported_countries": [ "CN" ], "supported_currencies": [ "CNY" ] } ], "supported_webhook_flows": [] } ] } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **payment** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/bitpay.rs` - `crates/hyperswitch_connectors/src/connectors/digitalvirgo.rs` - `crates/hyperswitch_connectors/src/connectors/helcim.rs` - ... and 3 more files **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 (18 changes) - Extend existing types with new fields (90 changes) - Modify database queries (4 changes) **Detailed Identifier Changes:** Commit c92b9661: Files to modify: **crates/hyperswitch_connectors/src/connectors/bitpay.rs** Remove: - impl: impl ConnectorSpecifications for Bitpay Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorSpecifications for Bitpay **crates/hyperswitch_connectors/src/connectors/digitalvirgo.rs** Remove: - function: private::validate_connector_against_payment_request - impl: impl ConnectorSpecifications for Digitalvirgo Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorSpecifications for Digitalvirgo **crates/hyperswitch_connectors/src/connectors/helcim.rs** Remove: - impl: impl ConnectorSpecifications for Helcim Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorSpecifications for Helcim **crates/hyperswitch_connectors/src/connectors/jpmorgan.rs** Remove: - function: private::validate_connector_against_payment_request - impl: impl ConnectorSpecifications for Jpmorgan Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorSpecifications for Jpmorgan **crates/hyperswitch_connectors/src/connectors/paybox.rs** Remove: - function: private::validate_connector_against_payment_request - impl: impl ConnectorSpecifications for Paybox Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorSpecifications for Paybox **crates/hyperswitch_connectors/src/connectors/payu.rs** Remove: - function: private::validate_connector_against_payment_request - impl: impl ConnectorValidation for Payu - impl: impl ConnectorSpecifications for Payu Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorValidation for Payu - impl: impl ConnectorSpecifications for Payu
{"pr_number": 7148, "pr_title": "feat(connector): [JPMORGAN, PAYU, DIGITALVIRGO, PAYBOX, BITPAY, HELCIM] added in feature matrix api", "merged_at": "2025-02-25T19:48:48Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["payment", "merchant", "refund"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/bitpay.rs", "crates/hyperswitch_connectors/src/connectors/digitalvirgo.rs", "crates/hyperswitch_connectors/src/connectors/helcim.rs", "crates/hyperswitch_connectors/src/connectors/jpmorgan.rs", "crates/hyperswitch_connectors/src/connectors/paybox.rs", "crates/hyperswitch_connectors/src/connectors/payu.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": 18, "fields_added": 90, "imports_added": 7, "database_queries": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(payment_methods_v2): Added Ephemeral auth for v2 ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR contains - - Ephemeral auth support for v2 (including resource type product identifier) - Minor Fixes for Payment methods v2 CRUD APIs - Removed Client secret auth from PaymentMethod CRUD APIs ### 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)? --> 1. Create Payment Method Intent ``` curl --location --request POST 'http://localhost:8080/v2/payment-methods/create-intent' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'X-Profile-Id: pro_DMmRBLpkNczeVDPd2EKd' \ --header 'api-key: dev_HVwdf7yWqJ9GGfw1CLDbAgjOFYHrPXoisK8pJcVPfdbc73238GROVpDhN3M9cPe2' \ --data-raw '{ "customer_id": "cus_0193ab7e6cc074939f389817610cd5b1" }' ``` Response ``` { "merchant_id": "cloth_seller_pcGA5SfzTmVUTBKvh2T3", "customer_id": "cus_0193ab7e6cc074939f389817610cd5b1", "payment_method_id": "12345_pm_0193b69ba645716086c0fe21c462cf2d", "payment_method_type": null, "payment_method_subtype": null, "recurring_enabled": false, "created": "2024-12-11T16:44:34.261Z", "last_used_at": "2024-12-11T16:44:34.261Z", "ephemeral_key": "epk_0c6ebab77f51446ab30467640a6f8f02", "payment_method_data": null } ``` 2. Use Ephemeral key to confirm intent ``` curl --location --request POST 'http://localhost:8080/v2/payment-methods/12345_pm_0193b69ba645716086c0fe21c462cf2d/confirm-intent' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'X-Profile-Id: pro_DMmRBLpkNczeVDPd2EKd' \ --header 'X-Resource-Type: payment_method' \ --header 'api-key: epk_0c6ebab77f51446ab30467640a6f8f02' \ --data-raw '{ "payment_method_type": "card", "payment_method_subtype": "credit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "12", "card_exp_year": "2025", "card_holder_name": "joseph Doe" } }, "customer_id": "cus_0193ab7e6cc074939f389817610cd5b1" }' ``` Response - ``` { "merchant_id": "cloth_seller_pcGA5SfzTmVUTBKvh2T3", "customer_id": "cus_0193ab7e6cc074939f389817610cd5b1", "payment_method_id": "12345_pm_0193b69ba645716086c0fe21c462cf2d", "payment_method_type": "card", "payment_method_subtype": "credit", "recurring_enabled": false, "created": "2024-12-11T16:44:34.261Z", "last_used_at": "2024-12-11T16:44:34.261Z", "ephemeral_key": null, "payment_method_data": { "card": { "issuer_country": null, "last4_digits": "4242", "expiry_month": "12", "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 } } } ``` 3. Retrieve a PM - ``` curl --location --request GET 'http://localhost:8080/v2/payment-methods/12345_pm_0193cec5b7637f33a36b1f9ce34137bd' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'X-Profile-Id: pro_OqoV7IKp695hRjM1zRfE' \ --header 'X-Resource-Type: payment_method' \ --header 'api-key: dev_qxDW3eUAAg8u1Yagzfzur089lWvt4ZwendCYibU4XBTV9Mo6tJ3wi0inMiO9gnTO' ``` Response - ``` { "merchant_id": "cloth_seller_R8JPuhk0GnkqHNDBzs7g", "customer_id": "cus_0193ce809d9e7411bd207c8f85eac45b", "payment_method_id": "12345_pm_0193cec5b7637f33a36b1f9ce34137bd", "payment_method_type": "card", "payment_method_subtype": "credit", "recurring_enabled": false, "created": "2024-12-16T09:21:24.377Z", "last_used_at": "2024-12-16T09:21:24.377Z", "ephemeral_key": null, "payment_method_data": { "card": { "issuer_country": null, "last4_digits": "4242", "expiry_month": "12", "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 } } } ``` 4. Update a PM - ``` curl --location --request PATCH 'http://localhost:8080/v2/payment-methods/12345_pm_0193b69ba645716086c0fe21c462cf2d/update-saved-payment-method' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'X-Profile-Id: pro_DMmRBLpkNczeVDPd2EKd' \ --header 'X-Resource-Type: payment_method' \ --header 'api-key: epk_0c6ebab77f51446ab30467640a6f8f02' \ --data-raw '{ "payment_method_data": { "card": { "card_holder_name": "joseph", "nick_name": "some_name11" } } }' ``` Response - ``` { "merchant_id": "cloth_seller_pcGA5SfzTmVUTBKvh2T3", "customer_id": "cus_0193ab7e6cc074939f389817610cd5b1", "payment_method_id": "12345_pm_0193b69ba645716086c0fe21c462cf2d", "payment_method_type": "card", "payment_method_subtype": "credit", "recurring_enabled": false, "created": "2024-12-11T16:44:34.261Z", "last_used_at": "2024-12-11T16:44:34.261Z", "ephemeral_key": null, "payment_method_data": { "card": { "issuer_country": null, "last4_digits": "4242", "expiry_month": "12", "expiry_year": "2025", "card_holder_name": "joseph", "card_fingerprint": null, "nick_name": "some_name11", "card_network": null, "card_isin": null, "card_issuer": null, "card_type": null, "saved_to_locker": true } } } ``` 5. Delete a PM - ``` curl --location --request DELETE 'http://localhost:8080/v2/payment-methods/12345_pm_0193cec5b7637f33a36b1f9ce34137bd' \ --header 'Accept: application/json' \ --header 'X-Profile-Id: pro_OqoV7IKp695hRjM1zRfE' \ --header 'X-Resource-Type: payment_method' \ --header 'api-key: dev_qxDW3eUAAg8u1Yagzfzur089lWvt4ZwendCYibU4XBTV9Mo6tJ3wi0inMiO9gnTO' ``` Response - ``` { "payment_method_id": "12345_pm_0193b69ba645716086c0fe21c462cf2d" } ``` 6. Standalone Ephemeral key create - ``` curl --location --request POST 'http://localhost:8080/v2/ephemeral-keys' \ --header 'Content-Type: application/json' \ --header 'X-Profile-Id: pro_CwrzjgurYtopm4AU4ckw' \ --header 'X-Resource-Type: payment_method' \ --header 'api-key: dev_XhFPyn6hxjHV0kwfx5TuqP01AACTenU00ioSS352L5uUFufVKqfWNAtI1reaYO3S' \ --data-raw '{ "customer_id": "12345_cus_0193d93f0f267882b5b843a648890ede" }' ``` Response - ``` { "id": "eki_TEEmZPBA0XL1jyQYaXVY", "customer_id": "12345_cus_0193d93f0f267882b5b843a648890ede", "created_at": "2024-12-19 12:17:01.909893", "expires": "2024-12-19 13:17:01.909893", "secret": "epk_0193ded995d57fd290ed0ce218e01cf9" } ``` Can use the ephemeral key obtained here to hit the above APIs ## 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. API Request/Response Models** - `crates/api_models/src/ephemeral_key.rs` - `crates/api_models/src/payment_methods.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/ephemeral_key.rs` - `crates/diesel_models/src/payment_method.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payments.rs` **4. Core Business Logic** - `crates/router/src/core/payment_methods.rs` - `crates/router/src/core/payment_methods/transformers.rs` - `crates/router/src/core/payment_methods/vault.rs` - ... and 1 more files **5. Type Definitions** - `crates/router/src/types/payment_methods.rs` - `crates/router/src/types/storage/ephemeral_key.rs` **6. Utils** - `crates/common_utils/src/events.rs` - `crates/common_utils/src/id_type.rs` - `crates/common_utils/src/id_type/ephemeral_key.rs` **7. Other** - `api-reference-v2/openapi_spec.json` - `crates/router/src/consts.rs` - `crates/router/src/db/ephemeral_key.rs` - ... and 6 more files **Code Patterns Applied:** - Define new data structures (6 changes) - Implement new functions (27 changes) - Extend existing types with new fields (89 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 24401bc1: Files to modify: **crates/api_models/src/ephemeral_key.rs** Add: - function: private::get_api_event_type - struct: pub::EphemeralKeyCreateRequest - struct: pub::EphemeralKeyResponse - impl: impl common_utils::events::ApiEventMetric for EphemeralKeyResponse **crates/api_models/src/payment_methods.rs** Modify existing code **crates/common_utils/src/events.rs** Modify existing code **crates/common_utils/src/id_type.rs** Add: - mod: private::ephemeral_key **crates/common_utils/src/id_type/ephemeral_key.rs** Add: - function: private::get_api_event_type - function: pub::generate_redis_key - impl: impl crate::events::ApiEventMetric for EphemeralKeyId - impl: impl EphemeralKeyId **crates/diesel_models/src/ephemeral_key.rs** Add: - function: pub::generate_secret_key - struct: pub::EphemeralKeyTypeNew - struct: pub::EphemeralKeyType - enum: pub::ResourceType - impl: impl EphemeralKeyType **crates/diesel_models/src/payment_method.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments.rs** Modify existing code **crates/router/src/consts.rs** Modify existing code **crates/router/src/core/payment_methods.rs** Modify existing code **crates/router/src/core/payment_methods/transformers.rs** Modify existing code **crates/router/src/core/payment_methods/vault.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Add: - function: pub::make_ephemeral_key - function: pub::create_ephemeral_key - function: pub::delete_ephemeral_key **crates/router/src/db/ephemeral_key.rs** Add: - function: private::create_ephemeral_key - function: private::get_ephemeral_key - function: private::delete_ephemeral_key - function: private::create_ephemeral_key - function: private::get_ephemeral_key - function: private::delete_ephemeral_key **crates/router/src/db/kafka_store.rs** Add: - function: private::create_ephemeral_key - function: private::get_ephemeral_key - function: private::delete_ephemeral_key **crates/router/src/lib.rs** Modify existing code **crates/router/src/routes/app.rs** Add: - function: pub::server - impl: impl EphemeralKey **crates/router/src/routes/ephemeral_key.rs** Add: - function: pub::ephemeral_key_create **crates/router/src/routes/payment_methods.rs** Modify existing code **crates/router/src/services/authentication.rs** Remove: - function: private::get_client_secret - impl: impl ClientSecretFetch for PaymentMethodIntentConfirm Add: - function: private::authenticate_and_fetch - function: pub::is_ephemeral_or_publishible_auth - impl: impl AuthenticateAndFetch<AuthenticationData, A> for EphemeralKeyAuth **crates/router/src/types/payment_methods.rs** Remove: - function: pub::generate - struct: pub::PaymentMethodClientSecret - impl: impl PaymentMethodClientSecret **crates/router/src/types/storage/ephemeral_key.rs** Add: - function: private::foreign_from - impl: impl ForeignFrom<EphemeralKeyType> for api_models::ephemeral_key::EphemeralKeyResponse
{"pr_number": 6813, "pr_title": "feat(payment_methods_v2): Added Ephemeral auth for v2", "merged_at": "2024-12-22T18:04:10Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/ephemeral_key.rs", "crates/api_models/src/payment_methods.rs"], "database": ["crates/diesel_models/src/ephemeral_key.rs", "crates/diesel_models/src/payment_method.rs"], "domain": ["crates/hyperswitch_domain_models/src/payments.rs"], "core_business": ["crates/router/src/core/payment_methods.rs", "crates/router/src/core/payment_methods/transformers.rs", "crates/router/src/core/payment_methods/vault.rs", "crates/router/src/core/payments/helpers.rs"], "types": ["crates/router/src/types/payment_methods.rs", "crates/router/src/types/storage/ephemeral_key.rs"], "utils": ["crates/common_utils/src/events.rs", "crates/common_utils/src/id_type.rs", "crates/common_utils/src/id_type/ephemeral_key.rs"], "other": ["api-reference-v2/openapi_spec.json", "crates/router/src/consts.rs", "crates/router/src/db/ephemeral_key.rs", "crates/router/src/db/kafka_store.rs", "crates/router/src/lib.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/ephemeral_key.rs", "crates/router/src/routes/payment_methods.rs", "crates/router/src/services/authentication.rs"]}, "change_types": {"structs_added": 6, "functions_added": 27, "enums_added": 1, "fields_added": 89, "imports_added": 20, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(router): Return payment_experience in PML for payment (v2) ## 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 `payment_experience` in Payment Method List for Payments Response ### 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 #8254 ## 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_019740919d6a72c2b6984f9b99be203f/payment-methods' \ --header 'Content-Type: application/json' \ --header 'x-profile-id: pro_GKx8bxieFB51Nk5FMCi6' \ --header 'Authorization: publishable-key=pk_dev_e2eec08c40444d8e862c444d3df67cd2,client-secret=cs_019740919d817810ad313fce9534793e' \ --header 'api-key: pk_dev_e2eec08c40444d8e862c444d3df67cd2' ``` Response: ```json { "payment_methods_enabled": [ { "payment_method_type": "card_redirect", "payment_method_subtype": "card_redirect", "payment_experience": "redirect_to_url", "required_fields": null, "surcharge_details": null }, { "payment_method_type": "card", "payment_method_subtype": "card", "payment_experience": null, "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": "apple_pay", "payment_experience": null, "required_fields": null, "surcharge_details": null }, { "payment_method_type": "wallet", "payment_method_subtype": "we_chat_pay", "payment_experience": null, "required_fields": null, "surcharge_details": null }, { "payment_method_type": "wallet", "payment_method_subtype": "ali_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": "wallet", "payment_method_subtype": "mb_way", "payment_experience": null, "required_fields": null, "surcharge_details": null }, { "payment_method_type": "pay_later", "payment_method_subtype": "klarna", "payment_experience": "redirect_to_url", "required_fields": null, "surcharge_details": null }, { "payment_method_type": "pay_later", "payment_method_subtype": "affirm", "payment_experience": "redirect_to_url", "required_fields": null, "surcharge_details": null }, { "payment_method_type": "pay_later", "payment_method_subtype": "afterpay_clearpay", "payment_experience": "redirect_to_url", "required_fields": null, "surcharge_details": null }, { "payment_method_type": "pay_later", "payment_method_subtype": "walley", "payment_experience": "redirect_to_url", "required_fields": null, "surcharge_details": null }, { "payment_method_type": "bank_redirect", "payment_method_subtype": "giropay", "payment_experience": "redirect_to_url", "required_fields": null, "surcharge_details": null }, { "payment_method_type": "bank_redirect", "payment_method_subtype": "ideal", "payment_experience": "redirect_to_url", "required_fields": null, "surcharge_details": null }, { "payment_method_type": "bank_redirect", "payment_method_subtype": "eps", "payment_experience": "redirect_to_url", "required_fields": null, "surcharge_details": null }, { "payment_method_type": "bank_redirect", "payment_method_subtype": "bancontact_card", "payment_experience": "redirect_to_url", "required_fields": null, "surcharge_details": null }, { "payment_method_type": "bank_redirect", "payment_method_subtype": "przelewy24", "payment_experience": "redirect_to_url", "required_fields": null, "surcharge_details": null }, { "payment_method_type": "bank_redirect", "payment_method_subtype": "sofort", "payment_experience": "redirect_to_url", "required_fields": null, "surcharge_details": null }, { "payment_method_type": "bank_redirect", "payment_method_subtype": "blik", "payment_experience": "redirect_to_url", "required_fields": null, "surcharge_details": null }, { "payment_method_type": "bank_redirect", "payment_method_subtype": "trustly", "payment_experience": "redirect_to_url", "required_fields": null, "surcharge_details": null }, { "payment_method_type": "bank_redirect", "payment_method_subtype": "online_banking_finland", "payment_experience": "redirect_to_url", "required_fields": null, "surcharge_details": null }, { "payment_method_type": "bank_redirect", "payment_method_subtype": "online_banking_poland", "payment_experience": "redirect_to_url", "required_fields": null, "surcharge_details": null }, { "payment_method_type": "bank_transfer", "payment_method_subtype": "ach", "payment_experience": "redirect_to_url", "required_fields": null, "surcharge_details": null }, { "payment_method_type": "bank_transfer", "payment_method_subtype": "sepa", "payment_experience": "redirect_to_url", "required_fields": null, "surcharge_details": null }, { "payment_method_type": "bank_transfer", "payment_method_subtype": "bacs", "payment_experience": "redirect_to_url", "required_fields": null, "surcharge_details": null }, { "payment_method_type": "bank_debit", "payment_method_subtype": "ach", "payment_experience": null, "required_fields": null, "surcharge_details": null }, { "payment_method_type": "bank_debit", "payment_method_subtype": "sepa", "payment_experience": null, "required_fields": null, "surcharge_details": null }, { "payment_method_type": "bank_debit", "payment_method_subtype": "bacs", "payment_experience": null, "required_fields": null, "surcharge_details": null }, { "payment_method_type": "bank_debit", "payment_method_subtype": "becs", "payment_experience": null, "required_fields": null, "surcharge_details": null }, { "payment_method_type": "pay_later", "payment_method_subtype": "klarna", "payment_experience": "invoke_sdk_client", "required_fields": null, "surcharge_details": null }, { "payment_method_type": "pay_later", "payment_method_subtype": "klarna", "payment_experience": "redirect_to_url", "required_fields": null, "surcharge_details": null } ], "customer_payment_methods": 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. API Request/Response Models** - `crates/api_models/src/payments.rs` **2. Core Business Logic** - `crates/router/src/core/payments/payment_methods.rs` **3. Other** - `api-reference-v2/openapi_spec.json` **Code Patterns Applied:** - Extend existing types with new fields (6 changes) **Detailed Identifier Changes:** Commit 9ce3d73e: Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/router/src/core/payments/payment_methods.rs** Modify existing code
{"pr_number": 8255, "pr_title": "feat(router): Return payment_experience in PML for payment (v2)", "merged_at": "2025-06-05T16:40:31Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "card"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs"], "core_business": ["crates/router/src/core/payments/payment_methods.rs"], "other": ["api-reference-v2/openapi_spec.json"]}, "change_types": {"fields_added": 6}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(router): validate each field for migration request body ## 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 --> #6300 has inconsistent response due to no validations for each field in migration api request body. ### 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 case - test migration api with empty fields. req - ``` curl --location 'http://localhost:8080/payment_methods/migrate' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: api-key' \ --data '{ "merchant_id": "merchant_id", "card": { "card_number": "card_number", "card_exp_month": "12", "card_exp_year": "21", "card_holder_name": "joseph Doe" }, "customer_id": "customer_id", "network_transaction_id": "", "payment_method": "card", "connector_mandate_details": {}, "network_token": { "network_token_data": { "network_token_number": " ", "network_token_exp_month": "12", "network_token_exp_year": "21" }, "network_token_requestor_ref_id": "" } }' ``` <img width="880" alt="Screenshot 2024-11-11 at 11 43 58 AM" src="https://github.com/user-attachments/assets/27b1f3b6-cfe9-4917-b3e5-db44342df845"> ## 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/cards.rs` **Code Patterns Applied:** - Extend existing types with new fields (2 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit b5d3d49c: Files to modify: **crates/router/src/core/payment_methods/cards.rs** Modify existing code
{"pr_number": 6525, "pr_title": "fix(router): validate each field for migration request body", "merged_at": "2024-12-06T11:44:36Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payment_methods/cards.rs"]}, "change_types": {"fields_added": 2, "imports_added": 1, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(docs): Fix broken pages in API reference ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [x] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Fixed broken API reference for the following endpoints: - `API Key - Create` - `API Key - Revoke` - `Routing - Retrieve` - `Routing - Activate Config` ### 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. Configuration Files** - `api-reference/api-reference/routing/routing--activate-config.mdx` **2. Other** - `api-reference/api-reference/api-key/api-key--create.mdx` - `api-reference/api-reference/api-key/api-key--revoke.mdx` - `api-reference/api-reference/routing/routing--retrieve.mdx`
{"pr_number": 6507, "pr_title": "fix(docs): Fix broken pages in API reference", "merged_at": "2024-11-08T13:05:27Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"config": ["api-reference/api-reference/routing/routing--activate-config.mdx"], "other": ["api-reference/api-reference/api-key/api-key--create.mdx", "api-reference/api-reference/api-key/api-key--revoke.mdx", "api-reference/api-reference/routing/routing--retrieve.mdx"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(connector): [Adyen]fix error code and message for webhooks 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 --> For adyen incase of reponse update with webhooks, we are hardcoding error code and message to none and while propagating checking whether error code & message is some, This pr fixes this bug . ### 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 3ds payment via adyen and cancel it in adyen simulator. block the redirect response in the browser so that payment is updated via webhook. Do a retrieve call error code & error message should be updated as per below response ``` { "payment_id": "pay_xaWbqtvgCc8CuBKaMXmp", "merchant_id": "merchant_1731937042", "status": "failed", "amount": 2957000, "net_amount": 2957000, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "adyen", "client_secret": "pay_xaWbqtvgCc8CuBKaMXmp_secret_WZ701MiltGrC0FjAoOEB", "created": "2024-11-18T19:11:13.043Z", "currency": "AUD", "customer_id": null, "customer": { "id": null, "name": "John Doe", "email": "example@gmail.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": null, "payment_method": "card", "payment_method_data": { "card": { "last4": "0000", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "491761", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "30", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "CA", "line3": null, "zip": "94122", "state": "California", "first_name": null, "last_name": null }, "phone": null, "email": null } }, "payment_token": null, "shipping": null, "billing": null, "order_details": [ { "brand": null, "amount": 110, "category": null, "quantity": 1, "product_id": null, "product_name": "Tea", "product_type": null, "sub_category": null, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg", "product_tax_code": null, "requires_shipping": null }, { "brand": null, "amount": 110, "category": null, "quantity": 1, "product_id": null, "product_name": "Tea", "product_type": null, "sub_category": null, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg", "product_tax_code": null, "requires_shipping": null }, { "brand": null, "amount": 110, "category": null, "quantity": 1, "product_id": null, "product_name": "Tea", "product_type": null, "sub_category": null, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg", "product_tax_code": null, "requires_shipping": 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": "No error code", "error_message": "3D Not Authenticated", "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": true, "connector_transaction_id": "D254SLB5MMXNK375", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "D254SLB5MMXNK375", "payment_link": null, "profile_id": "pro_dLWAHRDzKNSc5ukPbEJS", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_yMtIhWzBgAVAL8coVpvK", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-11-18T19:26:13.043Z", "fingerprint": null, "browser_info": { "language": "en-GB", "time_zone": -330, "ip_address": "208.127.127.193", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0", "color_depth": 24, "java_enabled": true, "screen_width": 1280, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 720, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2024-11-18T19:12:55.108Z", "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/adyen/transformers.rs` **Detailed Identifier Changes:** Commit 8b31a7bb: Files to modify: **crates/router/src/connector/adyen/transformers.rs** Modify existing code
{"pr_number": 6602, "pr_title": "fix(connector): [Adyen]fix error code and message for webhooks response", "merged_at": "2024-11-19T19:36:03Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/router/src/connector/adyen/transformers.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(routing): remove payment_id from dynamic_routing metrics ## 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 will remove payment_id from being pushed to dynamic_routing metrics ### 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)? --> This can be tested on SBX in the dynamic_routing Dashboard present on grafana dashboard, There shouldn't be payment_id and the merchant_id should be merged with profile_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` - [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/routing/helpers.rs` **Detailed Identifier Changes:** Commit c484beb0: Files to modify: **crates/router/src/core/routing/helpers.rs** Modify existing code
{"pr_number": 6535, "pr_title": "refactor(routing): remove payment_id from dynamic_routing metrics", "merged_at": "2024-11-12T15:03:43Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/routing/helpers.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [Unifiedauthenticationservice] add Connector Template Code ## 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 --> template for unified_authentication_service ### 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` - [ ] 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/connector_enums.rs` **2. Core Business Logic** - `crates/router/src/core/payments/connector_integration_v2_impls.rs` - `crates/router/src/core/payments/flows.rs` **3. External Connector Integration** - `crates/common_enums/src/connector_enums.rs` - `crates/hyperswitch_connectors/src/connectors.rs` - `crates/hyperswitch_connectors/src/connectors/unified_authentication_service.rs` - ... and 9 more files **4. Type Definitions** - `crates/router/src/types/api.rs` - `crates/router/src/types/transformers.rs` **5. Tests** - `config/deployments/integration_test.toml` - `loadtest/config/development.toml` **6. Configuration Files** - `config/config.example.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 3 more files **Code Patterns Applied:** - Define new data structures (10 changes) - Implement new functions (78 changes) - Extend existing types with new fields (154 changes) **Detailed Identifier Changes:** Commit 8777f415: Files to modify: **crates/api_models/src/connector_enums.rs** Modify existing code **crates/common_enums/src/connector_enums.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors.rs** Add: - mod: pub::unified_authentication_service **crates/hyperswitch_connectors/src/connectors/unified_authentication_service.rs** Add: - function: pub::new - function: private::build_headers - function: private::id - function: private::get_currency_unit - function: private::common_get_content_type - function: private::base_url - function: private::get_auth_header - function: private::build_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_webhook_object_reference_id - function: private::get_webhook_event_type - function: private::get_webhook_resource_object - struct: pub::UnifiedAuthenticationService - impl: impl UnifiedAuthenticationService - impl: impl api::Payment for UnifiedAuthenticationService - impl: impl api::PaymentSession for UnifiedAuthenticationService - impl: impl api::ConnectorAccessToken for UnifiedAuthenticationService - impl: impl api::MandateSetup for UnifiedAuthenticationService - impl: impl api::PaymentAuthorize for UnifiedAuthenticationService - impl: impl api::PaymentSync for UnifiedAuthenticationService - impl: impl api::PaymentCapture for UnifiedAuthenticationService - impl: impl api::PaymentVoid for UnifiedAuthenticationService - impl: impl api::Refund for UnifiedAuthenticationService - impl: impl api::RefundExecute for UnifiedAuthenticationService - impl: impl api::RefundSync for UnifiedAuthenticationService - impl: impl api::PaymentToken for UnifiedAuthenticationService - impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for UnifiedAuthenticationService - impl: impl ConnectorCommonExt<Flow, Request, Response> for UnifiedAuthenticationService - impl: impl ConnectorCommon for UnifiedAuthenticationService - impl: impl ConnectorValidation for UnifiedAuthenticationService - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for UnifiedAuthenticationService - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for UnifiedAuthenticationService - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for UnifiedAuthenticationService - impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for UnifiedAuthenticationService - impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for UnifiedAuthenticationService - impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for UnifiedAuthenticationService - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for UnifiedAuthenticationService - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for UnifiedAuthenticationService - impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for UnifiedAuthenticationService - impl: impl webhooks::IncomingWebhook for UnifiedAuthenticationService - mod: pub::transformers **crates/hyperswitch_connectors/src/connectors/unified_authentication_service/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::UnifiedAuthenticationServiceRouterData - struct: pub::UnifiedAuthenticationServicePaymentsRequest - struct: pub::UnifiedAuthenticationServiceCard - struct: pub::UnifiedAuthenticationServiceAuthType - struct: pub::UnifiedAuthenticationServicePaymentsResponse - struct: pub::UnifiedAuthenticationServiceRefundRequest - struct: pub::RefundResponse - struct: pub::UnifiedAuthenticationServiceErrorResponse - enum: pub::UnifiedAuthenticationServicePaymentStatus - enum: pub::RefundStatus - impl: impl From<(StringMinorUnit, T)> for UnifiedAuthenticationServiceRouterData<T> - impl: impl TryFrom<&UnifiedAuthenticationServiceRouterData<&PaymentsAuthorizeRouterData>> for UnifiedAuthenticationServicePaymentsRequest - impl: impl TryFrom<&ConnectorAuthType> for UnifiedAuthenticationServiceAuthType - impl: impl From<UnifiedAuthenticationServicePaymentStatus> for common_enums::AttemptStatus - impl: impl TryFrom< ResponseRouterData< F, UnifiedAuthenticationServicePaymentsResponse, T, PaymentsResponseData, >, > for RouterData<F, T, PaymentsResponseData> - impl: impl TryFrom<&UnifiedAuthenticationServiceRouterData<&RefundsRouterData<F>>> for UnifiedAuthenticationServiceRefundRequest - impl: impl From<RefundStatus> for enums::RefundStatus - impl: impl TryFrom<RefundsResponseRouterData<Execute, RefundResponse>> for RefundsRouterData<Execute> - impl: impl TryFrom<RefundsResponseRouterData<RSync, RefundResponse>> for RefundsRouterData<RSync> **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code **crates/hyperswitch_connectors/src/default_implementations_v2.rs** Modify existing code **crates/hyperswitch_interfaces/src/configs.rs** Modify existing code **crates/router/src/connector.rs** Modify existing code **crates/router/src/core/payments/connector_integration_v2_impls.rs** Modify existing code **crates/router/src/core/payments/flows.rs** Modify existing code **crates/router/src/types/api.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code **crates/router/tests/connectors/main.rs** Add: - mod: private::unified_authentication_service **crates/router/tests/connectors/unified_authentication_service.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::UnifiedAuthenticationServiceTest - impl: impl ConnectorActions for UnifiedAuthenticationServiceTest - impl: impl utils::Connector for UnifiedAuthenticationServiceTest **crates/test_utils/src/connector_auth.rs** Modify existing code
{"pr_number": 6732, "pr_title": "feat(connector): [Unifiedauthenticationservice] add Connector Template Code", "merged_at": "2024-12-10T11:03:06Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"api_models": ["crates/api_models/src/connector_enums.rs"], "core_business": ["crates/router/src/core/payments/connector_integration_v2_impls.rs", "crates/router/src/core/payments/flows.rs"], "connectors": ["crates/common_enums/src/connector_enums.rs", "crates/hyperswitch_connectors/src/connectors.rs", "crates/hyperswitch_connectors/src/connectors/unified_authentication_service.rs", "crates/hyperswitch_connectors/src/connectors/unified_authentication_service/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/hyperswitch_connectors/src/default_implementations_v2.rs", "crates/router/src/connector.rs", "crates/router/tests/connectors/main.rs", "crates/router/tests/connectors/sample_auth.toml", "crates/router/tests/connectors/unified_authentication_service.rs", "crates/test_utils/src/connector_auth.rs", "scripts/add_connector.sh"], "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", "crates/hyperswitch_interfaces/src/configs.rs"]}, "change_types": {"structs_added": 10, "functions_added": 78, "enums_added": 2, "fields_added": 154, "imports_added": 20}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [AIRWALLEX] Added Ideal & Skrill 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 Skrill and iDeal payment methods in `Airwallex` ### 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? ## iDeal <details> <summary> Request </summary> ``` { "amount": 6540, "currency": "EUR", "amount_to_capture": 6540, "confirm": true, "capture_method": "automatic", "setup_future_usage": "on_session", "all_keys_required": true, "connector": [ "airwallex" ], "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": "ideal", "payment_method_data": { "bank_redirect": { "ideal": { "billing_details": { "billing_name": "john doe", "email": "abc@gmail.com" }, "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_4kD0TrueYNM0rHzQhp6v", "merchant_id": "merchant_1751452437", "status": "requires_customer_action", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 6540, "amount_received": null, "connector": "airwallex", "client_secret": "pay_4kD0TrueYNM0rHzQhp6v_secret_eyZsYvebTp5yQVWhtGyF", "created": "2025-07-02T12:59:37.119Z", "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": "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_4kD0TrueYNM0rHzQhp6v/merchant_1751452437/pay_4kD0TrueYNM0rHzQhp6v_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "ideal", "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": 1751461177, "expires": 1751464777, "secret": "epk_ab755942f2b445ceba3f86fef3c8ad64" }, "manual_retry_allowed": null, "connector_transaction_id": "int_hkdm4tmd7h8ua5nkrzw", "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_hkdm4tmd7h8ua5nkrzw", "payment_link": null, "profile_id": "pro_TChYABTbCS5BAOmP7jUi", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_BGDDPtQnF2mblNhQ43R4", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-02T13:14:37.119Z", "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-02T12:59:39.171Z", "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> ## Skrill <details> <summary> Request </summary> ``` { "amount": 6540, "currency": "USD", "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", "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": "skrill", "payment_method_data": { "wallet": { "skrill": { } } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "AL", "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": "AL", "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> <img width="1728" alt="Screenshot 2025-07-02 at 4 07 00 PM" src="https://github.com/user-attachments/assets/4d871432-7fc7-4bf9-9b1f-dac7a30fa9d2" /> ``` { "payment_id": "pay_uflgeDx1Fokml4GmnWWq", "merchant_id": "merchant_1751452437", "status": "requires_customer_action", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 6540, "amount_received": null, "connector": "airwallex", "client_secret": "pay_uflgeDx1Fokml4GmnWWq_secret_kLkCB504SCrz90gTLcQz", "created": "2025-07-02T11:06:39.764Z", "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": "wallet", "payment_method_data": { "wallet": {}, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "AL", "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": "AL", "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": "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_uflgeDx1Fokml4GmnWWq/merchant_1751452437/pay_uflgeDx1Fokml4GmnWWq_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "skrill", "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": 1751454399, "expires": 1751457999, "secret": "epk_47860a35b02242a2990513ab6313c6f3" }, "manual_retry_allowed": null, "connector_transaction_id": "int_hkdm96s82h8u71ki67b", "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_hkdm96s82h8u71ki67b", "payment_link": null, "profile_id": "pro_TChYABTbCS5BAOmP7jUi", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_BGDDPtQnF2mblNhQ43R4", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-02T11:21:39.764Z", "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-02T11:06:41.729Z", "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 test </summary> <img width="583" height="623" alt="Screenshot 2025-07-14 at 1 50 17 PM" src="https://github.com/user-attachments/assets/f3f6f6d9-ed7f-4288-8248-83f9aacf09d2" /> </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` - `crates/api_models/src/payments/additional_info.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payment_method_data.rs` **3. External Connector Integration** - `crates/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - `crates/connector_configs/toml/sandbox.toml` - ... and 15 more files **4. Type Definitions** - `crates/router/src/types/transformers.rs` **5. Utils** - `crates/kgraph_utils/src/mca.rs` - `crates/kgraph_utils/src/transformers.rs` - `crates/payment_methods/src/helpers.rs` **6. Tests** - `config/deployments/integration_test.toml` - `cypress-tests/cypress/e2e/configs/Payment/Airwallex.js` - `cypress-tests/cypress/support/redirectionHandler.js` **7. Configuration Files** - `config/config.example.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 2 more files **8. Other** - `api-reference/v1/openapi_spec_v1.json` - `api-reference/v2/openapi_spec_v2.json` - `crates/common_enums/src/enums.rs` - ... and 4 more files **Code Patterns Applied:** - Define new data structures (6 changes) - Implement new functions (2 changes) - Extend existing types with new fields (110 changes) **Detailed Identifier Changes:** Commit 15d589d2: Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/api_models/src/payments/additional_info.rs** Modify existing code **crates/common_enums/src/enums.rs** Modify existing code **crates/common_enums/src/transformers.rs** Modify existing code **crates/euclid/src/frontend/dir/enums.rs** Modify existing code **crates/euclid/src/frontend/dir/lowering.rs** Modify existing code **crates/euclid/src/frontend/dir/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/adyen.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/airwallex.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs** Add: - struct: pub::SkrillData - struct: pub::SkrillDetails - struct: pub::IndonesianBankTransferData - struct: pub::IndonesianBankTransferDetails - struct: pub::IdealData - enum: pub::AirwallexBankTransferData **crates/hyperswitch_connectors/src/connectors/facilitapay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/itaubank/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/klarna.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/zen/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/zsl/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Modify existing code **crates/hyperswitch_domain_models/src/payment_method_data.rs** Modify existing code **crates/kgraph_utils/src/mca.rs** Modify existing code **crates/kgraph_utils/src/transformers.rs** Modify existing code **crates/payment_methods/src/configs/payment_connector_required_fields.rs** Modify existing code **crates/payment_methods/src/helpers.rs** Modify existing code **crates/router/src/connector/utils.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code
{"pr_number": 8535, "pr_title": "feat(connector): [AIRWALLEX] Added Ideal & Skrill payment methods ", "merged_at": "2025-07-24T08:11:05Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs", "crates/api_models/src/payments/additional_info.rs"], "domain": ["crates/hyperswitch_domain_models/src/payment_method_data.rs"], "connectors": ["crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/hyperswitch_connectors/src/connectors/adyen.rs", "crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs", "crates/hyperswitch_connectors/src/connectors/airwallex.rs", "crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs", "crates/hyperswitch_connectors/src/connectors/facilitapay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/itaubank/transformers.rs", "crates/hyperswitch_connectors/src/connectors/klarna.rs", "crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs", "crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs", "crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs", "crates/hyperswitch_connectors/src/connectors/zen/transformers.rs", "crates/hyperswitch_connectors/src/connectors/zsl/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/payment_methods/src/configs/payment_connector_required_fields.rs", "crates/router/src/connector/utils.rs"], "types": ["crates/router/src/types/transformers.rs"], "utils": ["crates/kgraph_utils/src/mca.rs", "crates/kgraph_utils/src/transformers.rs", "crates/payment_methods/src/helpers.rs"], "tests": ["config/deployments/integration_test.toml", "cypress-tests/cypress/e2e/configs/Payment/Airwallex.js", "cypress-tests/cypress/support/redirectionHandler.js"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.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/src/frontend/dir/enums.rs", "crates/euclid/src/frontend/dir/lowering.rs", "crates/euclid/src/frontend/dir/transformers.rs"]}, "change_types": {"structs_added": 6, "functions_added": 2, "enums_added": 1, "fields_added": 110}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [EFT] Add EFT as a payment method ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD Active Issue: https://github.com/juspay/hyperswitch/issues/7313 ## Description <!-- Describe your changes in detail --> Added EFT as a payment method in Bank Redirect. Active Issue linked to this PR: https://github.com/juspay/hyperswitch/issues/7313 but still PR convention checks are failing ### 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)? --> EFT is a new payment payment method and there is no connector to test that. Paystack is the only connector with EFT. ## 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. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payment_method_data.rs` **3. Core Business Logic** - `crates/router/src/core/payments/helpers.rs` **4. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/aci/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/iatapay/transformers.rs` - ... and 15 more files **5. Type Definitions** - `crates/router/src/types/transformers.rs` **6. Utils** - `crates/kgraph_utils/src/mca.rs` - `crates/kgraph_utils/src/transformers.rs` **7. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - `crates/common_enums/src/enums.rs` - ... and 4 more files **Code Patterns Applied:** - Extend existing types with new fields (13 changes) **Detailed Identifier Changes:** Commit 6df15789: Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/common_enums/src/enums.rs** Modify existing code **crates/common_enums/src/transformers.rs** Modify existing code **crates/euclid/src/frontend/dir/enums.rs** Modify existing code **crates/euclid/src/frontend/dir/lowering.rs** Modify existing code **crates/euclid/src/frontend/dir/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/aci/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/iatapay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/klarna.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/nexinets/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/volt/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldline/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/zen/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Modify existing code **crates/hyperswitch_domain_models/src/payment_method_data.rs** Modify existing code **crates/kgraph_utils/src/mca.rs** Modify existing code **crates/kgraph_utils/src/transformers.rs** Modify existing code **crates/router/src/connector/adyen.rs** Modify existing code **crates/router/src/connector/adyen/transformers.rs** Modify existing code **crates/router/src/connector/paypal/transformers.rs** Modify existing code **crates/router/src/connector/stripe/transformers.rs** Modify existing code **crates/router/src/connector/utils.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code
{"pr_number": 7304, "pr_title": "feat(connector): [EFT] Add EFT as a payment method", "merged_at": "2025-03-05T14:51:22Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "connector"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs"], "domain": ["crates/hyperswitch_domain_models/src/payment_method_data.rs"], "core_business": ["crates/router/src/core/payments/helpers.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/aci/transformers.rs", "crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs", "crates/hyperswitch_connectors/src/connectors/iatapay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/klarna.rs", "crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/nexinets/transformers.rs", "crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs", "crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs", "crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/volt/transformers.rs", "crates/hyperswitch_connectors/src/connectors/worldline/transformers.rs", "crates/hyperswitch_connectors/src/connectors/zen/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/router/src/connector/adyen.rs", "crates/router/src/connector/adyen/transformers.rs", "crates/router/src/connector/paypal/transformers.rs", "crates/router/src/connector/stripe/transformers.rs", "crates/router/src/connector/utils.rs"], "types": ["crates/router/src/types/transformers.rs"], "utils": ["crates/kgraph_utils/src/mca.rs", "crates/kgraph_utils/src/transformers.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/common_enums/src/enums.rs", "crates/common_enums/src/transformers.rs", "crates/euclid/src/frontend/dir/enums.rs", "crates/euclid/src/frontend/dir/lowering.rs", "crates/euclid/src/frontend/dir/transformers.rs"]}, "change_types": {"fields_added": 13}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore: Add samsung pay payment method support for cybersource ## 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 --> ![image](https://github.com/user-attachments/assets/566fabc3-0141-4ffc-916d-2d0af281c70a) ![image](https://github.com/user-attachments/assets/1f93b6d3-6946-43c9-ae90-ad9fbdf48784) Add required wasm changes for samsung pay integration. ### 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)? --> Once this PR is merged in Dashboard check the integration ## 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/connector_configs/src/common_config.rs` - `crates/connector_configs/src/connector.rs` - `crates/connector_configs/toml/development.toml` **Code Patterns Applied:** - Define new data structures (2 changes) - Extend existing types with new fields (29 changes) **Detailed Identifier Changes:** Commit ecaf7009: Files to modify: **crates/connector_configs/src/common_config.rs** Remove: - struct: pub::MetaDataInupt Add: - struct: pub::InputData **crates/connector_configs/src/connector.rs** Add: - struct: pub::ConnectorWalletDetailsConfig
{"pr_number": 6424, "pr_title": "chore: Add samsung pay payment method support for cybersource", "merged_at": "2024-10-24T15:05:18Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"connectors": ["crates/connector_configs/src/common_config.rs", "crates/connector_configs/src/connector.rs", "crates/connector_configs/toml/development.toml"]}, "change_types": {"structs_added": 2, "fields_added": 29, "imports_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(Connector): [checkout] 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 - Add l2l3 data for checkout - Note : checkout recommends some checks like line_items should sum up proper total and discount amount. But it doesn't throw any errors for this. Hence in this pr we are not adding any such validations . ## Request ```json { "amount": 30000, "capture_method": "automatic", "currency": "USD", "confirm": true, "payment_method": "card", "payment_method_type": "credit", "billing": { "address": { "zip": "560095", "country": "AT", "first_name": "Sakil", "last_name": "Mostak", "line1": "Fasdf", "line2": "Fasdf", "city": "Fasdf" } }, "payment_method_data": { "card": { "card_number": "4000000000009995", "card_exp_month": "01", "card_exp_year": "2026", "card_holder_name": "John Smith", "card_cvc": "100" } }, //l2l3 data "merchant_order_reference_id":"fasdfasfasf", "customer_id": "nithxxinn", "order_tax_amount": 10000, "shipping_cost": 21, "discount_amount": 1, "duty_amount": 2, "shipping_amount_tax":22, "order_details": [ //l2 l3data { "commodity_code": "8471", "unit_discount_amount": 1200, "product_name": "Laptop", "quantity": 1, "product_id":"fafasdfasdfdasdfsadfsadfrewfdscrwefdscerwfdasewfdsacxzfdsasdf", "total_tax_amount": 5000, "amount": 8000, "unit_of_measure": "EA", "unit_price": 8000 }, { "commodity_code": "471", "unit_discount_amount": 34, "product_name": "Laptop", "quantity": 1, "product_id":"fas22df", "total_tax_amount": 3000, "amount": 4000, "unit_of_measure": "EA", "unit_price": 8500 } ] } ``` ## Response ```json { "payment_id": "pay_v01RncbYqwx0ZtB6x7yV", "merchant_id": "merchant_1758258316", "status": "succeeded", "amount": 30000, "net_amount": 40021, "shipping_cost": 21, "amount_capturable": 0, "amount_received": 40021, "connector": "checkout", "client_secret": "pay_v01RncbYqwx0ZtB6x7yV_secret_iolJ5SxVFNsQljPaO42C", "created": "2025-09-19T06:18:02.547Z", "currency": "USD", "customer_id": "nithxxinn", "customer": { "id": "nithxxinn", "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": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "9995", "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": "2026", "card_holder_name": "John Smith", "payment_checks": { "avs_result": "G", "card_validation_result": "Y" }, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "Fasdf", "country": "AT", "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": null, "upc": null, "brand": null, "amount": 8000, "category": null, "quantity": 1, "tax_rate": null, "product_id": "fafasdfasdfdasdfsadfsadfrewfdscrwefdscerwfdasewfdsacxzfdsasdf", "description": null, "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": 5000, "requires_shipping": null, "unit_discount_amount": 1200 }, { "sku": null, "upc": null, "brand": null, "amount": 4000, "category": null, "quantity": 1, "tax_rate": null, "product_id": "fas22df", "description": null, "product_name": "Laptop", "product_type": null, "sub_category": null, "total_amount": null, "commodity_code": "471", "unit_of_measure": "EA", "product_img_link": null, "product_tax_code": null, "total_tax_amount": 3000, "requires_shipping": null, "unit_discount_amount": 34 } ], "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": "nithxxinn", "created_at": 1758262682, "expires": 1758266282, "secret": "epk_e62d911ac98c4ccea72189e40ad83af4" }, "manual_retry_allowed": null, "connector_transaction_id": "pay_2667htrzd3qu7bx4fk36nkiva4", "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": "pay_v01RncbYqwx0ZtB6x7yV_1", "payment_link": null, "profile_id": "pro_tqppxjNXH3TckLuEmhDJ", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_z4uydERX9Y3VqfGMXeuh", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-19T06:33:02.547Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "network_transaction_id": "716806996896398", "payment_method_status": null, "updated": "2025-09-19T06:18:04.255Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": "fasdfasfasf", "order_tax_amount": 10000, "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 } ``` ## connector mapping ```json { "source": { "type": "card", "number": "4000000000009995", "expiry_month": "01", "expiry_year": "2026", "cvv": "100" }, "amount": 40021, "currency": "USD", "processing_channel_id": "pc_jx5lvimg4obe7nhoqnhptm6xoq", "3ds": { "enabled": false, "force_3ds": false, "eci": null, "cryptogram": null, "xid": null, "version": null, "challenge_indicator": "no_preference" }, "success_url": "http://localhost:8080/payments/pay_v01RncbYqwx0ZtB6x7yV/merchant_1758258316/redirect/response/checkout?status=success", "failure_url": "http://localhost:8080/payments/pay_v01RncbYqwx0ZtB6x7yV/merchant_1758258316/redirect/response/checkout?status=failure", "capture": true, "reference": "pay_v01RncbYqwx0ZtB6x7yV_1", "payment_type": "Regular", "merchant_initiated": false, "customer": { "name": "nithxxinn" }, "processing": { "order_id": "fasdfasfasf", "tax_amount": 10000, "discount_amount": 1, "duty_amount": 2, "shipping_amount": 21, "shipping_tax_amount": 22 }, "shipping": { "address": {} }, "items": [ { "commodity_code": "8471", "discount_amount": 1200, "name": "Laptop", "quantity": 1, "reference": "fafasdfasdfdasdfsadfsadfrewfdscrwefdscerwfdasewfdsacxzfdsasdf", "tax_amount": 5000, "unit_of_measure": "EA", "unit_price": 8000 }, { "commodity_code": "471", "discount_amount": 34, "name": "Laptop", "quantity": 1, "reference": "fas22df", "tax_amount": 3000, "unit_of_measure": "EA", "unit_price": 4000 } ] } ``` ### 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` - [ ] 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/checkout/transformers.rs` **Code Patterns Applied:** - Define new data structures (5 changes) - Extend existing types with new fields (48 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 744c8281: Files to modify: **crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs** Add: - struct: pub::CheckoutCustomer - struct: pub::CheckoutProcessing - struct: pub::CheckoutShippingAddress - struct: pub::CheckoutShipping - struct: pub::CheckoutLineItem
{"pr_number": 9446, "pr_title": "feat(Connector): [checkout] l2l3 data ", "merged_at": "2025-09-19T12:29:00Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs"]}, "change_types": {"structs_added": 5, "fields_added": 48, "imports_added": 2, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
ci(cypress): Add Forte connector test in cypress ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description Enhanced Forte Connector in cypress for Comprehensive Testing. ## How did you test it? **Forte** <img width="552" alt="Forte" src="https://github.com/user-attachments/assets/21082635-e104-41d4-9d09-997939825c2d" /> ## 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 **connector_integration** feature, you'll need to modify these architectural layers: **1. Tests** - `cypress-tests/cypress/e2e/configs/Payment/Forte.js` - `cypress-tests/cypress/e2e/configs/Payment/Utils.js` - `cypress-tests/cypress/support/commands.js` **Code Patterns Applied:** - Extend existing types with new fields (637 changes)
{"pr_number": 8402, "pr_title": "ci(cypress): Add Forte connector test in cypress", "merged_at": "2025-06-24T12:58:24Z", "intent": {"feature_type": "connector_integration", "action": "add_feature", "entities": ["user", "connector"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/configs/Payment/Forte.js", "cypress-tests/cypress/e2e/configs/Payment/Utils.js", "cypress-tests/cypress/support/commands.js"]}, "change_types": {"fields_added": 637}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
refactor(constraint_graph): revert handle for cases where setup_future_usage is null in payments ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This will make the `mandate_payments` acceptable even when `setup_future_usage` is null in payments. ### 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/payment_methods/cards.rs` - `crates/router/src/core/payment_methods/utils.rs` **Detailed Identifier Changes:** Commit f2bad825: Files to modify: **crates/router/src/core/payment_methods/cards.rs** Modify existing code **crates/router/src/core/payment_methods/utils.rs** Modify existing code
{"pr_number": 6845, "pr_title": "refactor(constraint_graph): revert handle for cases where setup_future_usage is null in payments", "merged_at": "2024-12-16T13:24:35Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment"]}, "hierarchy": {"core_business": ["crates/router/src/core/payment_methods/cards.rs", "crates/router/src/core/payment_methods/utils.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
docs(api-reference): remove redundant webhooks page ## 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 --> This PR removes the redundant (and outdated) webhooks documentation page in our API reference (both v1 and v2) in favor of the one on `docs.hyperswitch.io`. ## 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 PR removes a redundant and outdated documentation page on webhooks. ## 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)? --> Set up Mintlify locally, generated the docs and ensured that the page is not included in the side navigation. ## 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 **connector_integration** feature, you'll need to modify these architectural layers: **1. Other** - `api-reference-v2/essentials/webhooks.mdx` - `api-reference-v2/mint.json` - `api-reference/essentials/webhooks.mdx` - ... and 1 more files
{"pr_number": 6538, "pr_title": "docs(api-reference): remove redundant webhooks page", "merged_at": "2024-11-12T15:02:42Z", "intent": {"feature_type": "connector_integration", "action": "add_feature", "entities": ["webhook"]}, "hierarchy": {"other": ["api-reference-v2/essentials/webhooks.mdx", "api-reference-v2/mint.json", "api-reference/essentials/webhooks.mdx", "api-reference/mint.json"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(connector): revert [paypal, trustpay] add in feature matrix ORIGINAL PR: https://github.com/juspay/hyperswitch/pull/8042 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 6394bbdc: 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": 8046, "pr_title": "feat(connector): revert [paypal, trustpay] add in feature matrix", "merged_at": "2025-05-15T14:22:25Z", "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"}
feat(core): Add profile-level configuration for L2/L3 data enablement ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR introduces profile-level configuration for enabling/disabling L2/L3 transaction data, providing merchants with granular control over enhanced payment data collection at the business profile level. # 🧩 Additional Changes ## 🗄️ Database & Schema - Added new column `is_l2_l3_enabled` to the `business_profile` table. - **Type:** `BOOLEAN` - **Nullable:** Yes (`NULLABLE BOOLEAN`) - Updated L2/L3 data construction logic to check **both**: 1. **Global config flag:** `state.conf.l2_l3_data_config.enabled` 2. **Profile-level flag:** `payment_data.is_l2_l3_enabled == Some(true)` - **New behavior:** L2/L3 data is now included **only when both** flags are enabled. --- ## ⚙️ Behavior Changes **Previously:** L2/L3 data inclusion was controlled **only** by the global configuration flag: ```text l2_l3_data_config.enabled = true **Now ** L2/L3 data inclusion requires both conditions to be true: Global config enabled → l2_l3_data_config.enabled = true Profile-level enabled → is_l2_l3_enabled = true ``` - [x] This PR modifies the API contract - [x] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- 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)? --> Flag False ``` curl --location 'http://localhost:8080/account/postman_merchant_GHAction_86dca2fb-b078-46c4-9ae4-fb347ac31204/business_profile/pro_VRw87wcMS3AfvczM2ROe' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_2Lukl788r5RWxkuO15MlUgGWKB17w8CQgU6Jiov5jEUhKIDyR8xJ9BqP1x6uT6Bh' \ --data '{ "is_l2_l3_enabled":false }' ``` Response ``` { "merchant_id": "postman_merchant_GHAction_86dca2fb-b078-46c4-9ae4-fb347ac31204", "profile_id": "pro_VRw87wcMS3AfvczM2ROe", "profile_name": "Update", "return_url": "https://google.com/success", "enable_payment_response_hash": true, "payment_response_hash_key": "cVla9zUpUCNm8lPgzW9zNWi9Le5utHWR3nFruLNhtjbwRdXGtL4PU2g7fGyb9WY6", "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": "https://webhook.site", "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": null, "is_l2_l3_enabled": false } ``` Payments Create +Confirm ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_2Lukl788r5RWxkuO15MlUgGWKB17w8CQgU6Jiov5jEUhKIDyR8xJ9BqP1x6uT6Bh' \ --data-raw '{ "amount": 10000, "currency": "USD", "tax_status": "exempt", "duty_amount": 400, "shipping_cost": 431, "discount_amount": 500, "shipping_amount_tax": 50, "order_date": "2024-01-15T10:30:00Z", "confirm": true, "customer": { "id":"2343", "name": "John Doe", "email": "john@example.com", "tax_registration_id": "TAX123456789" }, "payment_method": "card", "payment_method_data": { "card": { "card_number": "4457030000000007", "card_exp_month": "09", "card_exp_year": "30", "card_holder_name": "John Doe", "card_cvc": "123" } }, "shipping": { "address": { "line1": "123 Main St", "city": "New York", "state": "NY", "zip": "10001", "country": "US", "origin_zip": "90210" } }, "billing": { "address": { "line1": "123 Main St", "city": "New York", "state": "NY", "zip": "10001", "country": "US", "origin_zip": "90210" } }, "order_details": [ { "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 ``` { "payment_id": "pay_k5Bpv5PtEJybJqMpAxgh", "merchant_id": "postman_merchant_GHAction_86dca2fb-b078-46c4-9ae4-fb347ac31204", "status": "processing", "amount": 10000, "net_amount": 10431, "shipping_cost": 431, "amount_capturable": 10431, "amount_received": null, "connector": "worldpayvantiv", "client_secret": "pay_k5Bpv5PtEJybJqMpAxgh_secret_gIdSB9ymBpqxF67m2YuI", "created": "2025-10-06T10:20:03.012Z", "currency": "USD", "customer_id": "2343", "customer": { "id": "2343", "name": "John Doe", "email": "john@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": "card", "payment_method_data": { "card": { "last4": "0007", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "445703", "card_extended_bin": null, "card_exp_month": "09", "card_exp_year": "30", "card_holder_name": "John Doe", "payment_checks": { "avs_result": "00", "advanced_a_v_s_result": null, "authentication_result": null, "card_validation_result": "M" }, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "New York", "country": "US", "line1": "123 Main St", "line2": null, "line3": null, "zip": "10001", "state": "NY", "first_name": null, "last_name": null, "origin_zip": "90210" }, "phone": null, "email": null }, "billing": { "address": { "city": "New York", "country": "US", "line1": "123 Main St", "line2": null, "line3": null, "zip": "10001", "state": "NY", "first_name": null, "last_name": null, "origin_zip": "90210" }, "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": "john@example.com", "name": "John Doe", "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": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "2343", "created_at": 1759746002, "expires": 1759749602, "secret": "epk_b1c2dbc4c6974e5ba52bc4febad559c0" }, "manual_retry_allowed": null, "connector_transaction_id": "83997805908936712", "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": "yu3m15HUiA8RH7xlVbxYNbb_GXBH", "payment_link": null, "profile_id": "pro_VRw87wcMS3AfvczM2ROe", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_Xy151X2xCrZUxa679A2r", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-10-06T10:35:03.012Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "network_transaction_id": "500144570300000", "payment_method_status": null, "updated": "2025-10-06T10:20:06.451Z", "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": "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, "is_stored_credential": null, "mit_category": null } ``` enhanced_data : None (In vantive we pass the l2_l3_data in enchanced_data field ) <img width="1041" height="293" alt="Screenshot 2025-10-06 at 3 51 10 PM" src="https://github.com/user-attachments/assets/0bf180ae-a6ad-4653-aeec-9c333d2e5ae8" /> ----------------------------------------------------------------------------------------------------------------------- Prifle flag as true ``` curl --location 'http://localhost:8080/account/postman_merchant_GHAction_86dca2fb-b078-46c4-9ae4-fb347ac31204/business_profile/pro_VRw87wcMS3AfvczM2ROe' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_2Lukl788r5RWxkuO15MlUgGWKB17w8CQgU6Jiov5jEUhKIDyR8xJ9BqP1x6uT6Bh' \ --data '{ "is_l2_l3_enabled":true }' ``` Response ``` { "merchant_id": "postman_merchant_GHAction_86dca2fb-b078-46c4-9ae4-fb347ac31204", "profile_id": "pro_VRw87wcMS3AfvczM2ROe", "profile_name": "Update", "return_url": "https://google.com/success", "enable_payment_response_hash": true, "payment_response_hash_key": "cVla9zUpUCNm8lPgzW9zNWi9Le5utHWR3nFruLNhtjbwRdXGtL4PU2g7fGyb9WY6", "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": "https://webhook.site", "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": null, "is_l2_l3_enabled": true } ``` Pqyments Create+ Confirm ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_2Lukl788r5RWxkuO15MlUgGWKB17w8CQgU6Jiov5jEUhKIDyR8xJ9BqP1x6uT6Bh' \ --data-raw '{ "amount": 10000, "currency": "USD", "tax_status": "exempt", "duty_amount": 400, "shipping_cost": 431, "discount_amount": 500, "shipping_amount_tax": 50, "order_date": "2024-01-15T10:30:00Z", "confirm": true, "customer": { "id":"2343", "name": "John Doe", "email": "john@example.com", "tax_registration_id": "TAX123456789" }, "payment_method": "card", "payment_method_data": { "card": { "card_number": "4457030000000007", "card_exp_month": "09", "card_exp_year": "30", "card_holder_name": "John Doe", "card_cvc": "123" } }, "shipping": { "address": { "line1": "123 Main St", "city": "New York", "state": "NY", "zip": "10001", "country": "US", "origin_zip": "90210" } }, "billing": { "address": { "line1": "123 Main St", "city": "New York", "state": "NY", "zip": "10001", "country": "US", "origin_zip": "90210" } }, "order_details": [ { "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 ``` { "payment_id": "pay_G9uVSa1XhuipIytubifJ", "merchant_id": "postman_merchant_GHAction_86dca2fb-b078-46c4-9ae4-fb347ac31204", "status": "processing", "amount": 10000, "net_amount": 10431, "shipping_cost": 431, "amount_capturable": 10431, "amount_received": null, "connector": "worldpayvantiv", "client_secret": "pay_G9uVSa1XhuipIytubifJ_secret_lCs00yR6IDj1mQiv6CR3", "created": "2025-10-06T10:22:46.946Z", "currency": "USD", "customer_id": "2343", "customer": { "id": "2343", "name": "John Doe", "email": "john@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": "card", "payment_method_data": { "card": { "last4": "0007", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "445703", "card_extended_bin": null, "card_exp_month": "09", "card_exp_year": "30", "card_holder_name": "John Doe", "payment_checks": { "avs_result": "00", "advanced_a_v_s_result": null, "authentication_result": null, "card_validation_result": "M" }, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "New York", "country": "US", "line1": "123 Main St", "line2": null, "line3": null, "zip": "10001", "state": "NY", "first_name": null, "last_name": null, "origin_zip": "90210" }, "phone": null, "email": null }, "billing": { "address": { "city": "New York", "country": "US", "line1": "123 Main St", "line2": null, "line3": null, "zip": "10001", "state": "NY", "first_name": null, "last_name": null, "origin_zip": "90210" }, "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": "john@example.com", "name": "John Doe", "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": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "2343", "created_at": 1759746166, "expires": 1759749766, "secret": "epk_2e4eaf2fa2084f55adfbda7dd29be585" }, "manual_retry_allowed": null, "connector_transaction_id": "84085766858464538", "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": "i4q0Jo5exObW4PQfss0jq4uQ619b", "payment_link": null, "profile_id": "pro_VRw87wcMS3AfvczM2ROe", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_Xy151X2xCrZUxa679A2r", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-10-06T10:37:46.946Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "network_transaction_id": "500144570300000", "payment_method_status": null, "updated": "2025-10-06T10:22:49.462Z", "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": "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, "is_stored_credential": null, "mit_category": null } ``` <img width="1007" height="455" alt="Screenshot 2025-10-06 at 3 53 33 PM" src="https://github.com/user-attachments/assets/487931c3-4aec-4b0e-8ba7-fb6c64a50f01" /> ----------------------------------------------------------------------------------------------------------------------- Profile flag as None ``` ``` ## 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` - `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` - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/operations/payment_approve.rs` - ... and 16 more files **5. Type Definitions** - `crates/router/src/types/api/admin.rs` **6. Other** - `api-reference/v1/openapi_spec_v1.json` - `api-reference/v2/openapi_spec_v2.json` - `crates/router/src/db/events.rs` - ... and 2 more files **Code Patterns Applied:** - Extend existing types with new fields (78 changes) **Detailed Identifier Changes:** Commit bd853345: 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/core/payments.rs** Modify existing code **crates/router/src/core/payments/operations/payment_approve.rs** Modify existing code **crates/router/src/core/payments/operations/payment_cancel.rs** Modify existing code **crates/router/src/core/payments/operations/payment_cancel_post_capture.rs** Modify existing code **crates/router/src/core/payments/operations/payment_capture.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_post_session_tokens.rs** Modify existing code **crates/router/src/core/payments/operations/payment_reject.rs** Modify existing code **crates/router/src/core/payments/operations/payment_session.rs** Modify existing code **crates/router/src/core/payments/operations/payment_start.rs** Modify existing code **crates/router/src/core/payments/operations/payment_status.rs** Modify existing code **crates/router/src/core/payments/operations/payment_update.rs** Modify existing code **crates/router/src/core/payments/operations/payment_update_metadata.rs** Modify existing code **crates/router/src/core/payments/operations/payments_incremental_authorization.rs** Modify existing code **crates/router/src/core/payments/operations/tax_calculation.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/db/events.rs** Modify existing code **crates/router/src/types/api/admin.rs** Modify existing code
{"pr_number": 9683, "pr_title": "feat(core): Add profile-level configuration for L2/L3 data enablement", "merged_at": "2025-10-16T08:22:12Z", "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", "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", "crates/router/src/core/payments.rs", "crates/router/src/core/payments/operations/payment_approve.rs", "crates/router/src/core/payments/operations/payment_cancel.rs", "crates/router/src/core/payments/operations/payment_cancel_post_capture.rs", "crates/router/src/core/payments/operations/payment_capture.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_post_session_tokens.rs", "crates/router/src/core/payments/operations/payment_reject.rs", "crates/router/src/core/payments/operations/payment_session.rs", "crates/router/src/core/payments/operations/payment_start.rs", "crates/router/src/core/payments/operations/payment_status.rs", "crates/router/src/core/payments/operations/payment_update.rs", "crates/router/src/core/payments/operations/payment_update_metadata.rs", "crates/router/src/core/payments/operations/payments_incremental_authorization.rs", "crates/router/src/core/payments/operations/tax_calculation.rs", "crates/router/src/core/payments/transformers.rs"], "types": ["crates/router/src/types/api/admin.rs"], "other": ["api-reference/v1/openapi_spec_v1.json", "api-reference/v2/openapi_spec_v2.json", "crates/router/src/db/events.rs", "migrations/2025-10-06-093228_add_l2_l3_to_business_profile/down.sql", "migrations/2025-10-06-093228_add_l2_l3_to_business_profile/up.sql"]}, "change_types": {"fields_added": 78}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(connector): [facilitapay] move destination bank account number to connector metadata ## 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 --> Destination bank account id should be merchant facing, not customer. This PR removes any references to destination bank account id and moves it to connector metadata instead. ### 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` --> /crates/connector_configs/toml/development.toml /crates/connector_configs/toml/sandbox.toml /crates/connector_configs/toml/production.toml ## 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). --> Customer should not enter merchant's bank details. It should be merchant facing instead. Closes #8703. ## 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: ```curl curl --location 'http://localhost:8080/account/postman_merchant_GHAction_1753083253/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_Dyq5nDoX7lVK7WTywFMzt7RKqlI86c6FFg7kun0keGiZpByVLgo8y4dhdbAqYIm8' \ --data-raw '{ "connector_type": "payment_processor", "connector_name": "facilitapay", "business_country": "US", "business_label": "default", "connector_account_details": { "auth_type": "BodyKey", "api_key": "api_key", "key1": "key1" }, "test_mode": false, "disabled": false, "metadata": { "destination_account_number": "<UUID>" }, "payment_methods_enabled": [ { "payment_method": "bank_transfer", "payment_method_types": [ { "payment_method_type": "pix", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, ] }' ``` ```json { "connector_type": "payment_processor", "connector_name": "facilitapay", "connector_label": "facilitapay_US_default", "merchant_connector_id": "mca_rMIEEmHi0UapY2hNpT3H", "profile_id": "pro_0ebkZdbr9FTvQ7UwInzm", "connector_account_details": { "auth_type": "BodyKey", "api_key": "api_key", "key1": "key1" }, "payment_methods_enabled": [ { "payment_method": "bank_transfer", "payment_method_types": [ { "payment_method_type": "pix", "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 } ] }, ], "connector_webhook_details": null, "metadata": { "destination_account_number": "UUID" }, "test_mode": false, "disabled": false, "frm_configs": null, "business_country": "US", "business_label": "default", "business_sub_label": null, "applepay_verified_domains": null, "pm_auth_config": null, "status": "active", "additional_merchant_data": null, "connector_wallets_details": null } ``` Not passing connector metadata during MCA create call should result in a 4xx like below: ```json { "error": { "type": "invalid_request", "message": "The merchant_connector_account.metadata is invalid", "code": "IR_06" } } ``` <img width="729" height="981" alt="image" src="https://github.com/user-attachments/assets/42100bec-8635-41d5-a71c-d861de229385" /> <img width="642" height="1038" alt="image" src="https://github.com/user-attachments/assets/d0a146e4-f021-49a7-97b5-4b49556bf638" /> I'll fix the 1 failure in next PR. We throw `501`, commons expects a `2xx` ## 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. API Request/Response Models** - `crates/api_models/src/payments.rs` - `crates/api_models/src/payments/additional_info.rs` **2. Core Business Logic** - `crates/router/src/core/connector_validation.rs` **3. External Connector Integration** - `crates/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - `crates/connector_configs/toml/sandbox.toml` - ... and 2 more files **4. Tests** - `cypress-tests/cypress/e2e/configs/Payment/Facilitapay.js` **5. Other** - `api-reference/v1/openapi_spec_v1.json` - `api-reference/v2/openapi_spec_v2.json` **Code Patterns Applied:** - Define new data structures (2 changes) - Implement new functions (4 changes) - Extend existing types with new fields (8 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 38c19f30: Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/api_models/src/payments/additional_info.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/facilitapay/transformers.rs** Remove: - function: private::from_auth_type - function: private::try_from - function: private::try_from - struct: pub::FacilitapayAuthType - impl: impl FacilitapayAuthRequest - impl: impl TryFrom<&ConnectorAuthType> for FacilitapayAuthType - impl: impl TryFrom<&RefreshTokenRouterData> for FacilitapayAuthRequest Add: - function: private::from_auth_type - function: private::try_from - function: private::try_from - function: private::try_from - struct: pub::FacilitapayAuthType - struct: pub::FacilitapayConnectorMetadataObject - impl: impl FacilitapayAuthRequest - impl: impl TryFrom<&ConnectorAuthType> for FacilitapayAuthType - impl: impl TryFrom<&RefreshTokenRouterData> for FacilitapayAuthRequest - impl: impl TryFrom<&Option<pii::SecretSerdeValue>> for FacilitapayConnectorMetadataObject **crates/payment_methods/src/configs/payment_connector_required_fields.rs** Modify existing code **crates/router/src/core/connector_validation.rs** Modify existing code
{"pr_number": 8704, "pr_title": "refactor(connector): [facilitapay] move destination bank account number to connector metadata", "merged_at": "2025-07-25T12:44:09Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs", "crates/api_models/src/payments/additional_info.rs"], "core_business": ["crates/router/src/core/connector_validation.rs"], "connectors": ["crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/hyperswitch_connectors/src/connectors/facilitapay/transformers.rs", "crates/payment_methods/src/configs/payment_connector_required_fields.rs"], "tests": ["cypress-tests/cypress/e2e/configs/Payment/Facilitapay.js"], "other": ["api-reference/v1/openapi_spec_v1.json", "api-reference/v2/openapi_spec_v2.json"]}, "change_types": {"structs_added": 2, "functions_added": 4, "fields_added": 8, "imports_added": 1, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(cypress): do not update `card_expiry` while updating card info ## 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 --> the reason behind this pr is that there are a few connectors like adyen that expects the user to pass specific card expiry year and having it hard coded like we had until now results in unintended issues resulting the tests to fail. ### 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). --> updating card expiry resulted in unintended after effects for specific connectors like adyen where it expects the user to pass a specific card expiry year. we cannot hard code connector names in spec files. neither we can go ahead and pull in another set of connector configs for this. so, it is more viable to remove the entire field from getting update since updating one field should be more than enough. closes https://github.com/juspay/hyperswitch/issues/7833 ## 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 test against adyen since it was the one threw this error. not sure about other connectors but yeah, this change should fix them as well: <img width="524" alt="image" src="https://github.com/user-attachments/assets/3a9cf73f-0e60-4e0a-9e29-a2af8a63db3f" /> <img width="952" alt="image" src="https://github.com/user-attachments/assets/283eaf66-9233-4a20-83e1-e4eb808110fb" /> (failure is from ideal bank redirect redirection) ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `npm run format` - [x] I addressed lints thrown by `npm run lint -- --fix` - [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/spec/Payment/00014-SaveCardFlow.cy.js`
{"pr_number": 7834, "pr_title": "refactor(cypress): do not update `card_expiry` while updating card info", "merged_at": "2025-04-22T09:31:33Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user", "connector", "card"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/spec/Payment/00014-SaveCardFlow.cy.js"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(payments): override payment_method_type only for cards ## 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 --> This PR updates the BIN lookup override logic in payment transformers.rs to ensure payment_method_type is overridden only for Card payment methods. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables ## Motivation and Context This allows performing MIT wallet transactions for migrated wallet tokens. ## How did you test it? Locally <details> <summary>Run wallet migration</summary> cURL curl --location --request POST 'http://localhost:8080/payment_methods/migrate-batch' \ --header 'api-key: test_admin' \ --form 'merchant_id="merchant_1756795715"' \ --form 'merchant_connector_ids="mca_6wrjYYbE1zrrFSmbB0CJ"' \ --form 'file=@"wallet-migration.csv"' Response [ { "line_number": 1, "payment_method_id": "pm_edmFuErgTu8rvVwUtdTg", "payment_method": "wallet", "payment_method_type": "google_pay", "customer_id": "e4c4a19c2f92c9b61a65d1b1d31bdab9", "migration_status": "Success", "card_number_masked": "555555XXXXXX4444", "card_migrated": null, "network_token_migrated": true, "connector_mandate_details_migrated": true, "network_transaction_id_migrated": true }, { "line_number": 2, "payment_method_id": "pm_KC3l2F4HNRFiwVs8Xjaw", "payment_method": "wallet", "payment_method_type": "google_pay", "customer_id": "03ba537453a18466e42b2f9a92b70599", "migration_status": "Success", "card_number_masked": "411111XXXXXX1111", "card_migrated": null, "network_token_migrated": true, "connector_mandate_details_migrated": true, "network_transaction_id_migrated": true }, { "line_number": 3, "payment_method_id": "pm_zGxLnsiI4Eos0SPsY91Y", "payment_method": "wallet", "payment_method_type": "apple_pay", "customer_id": "c4ff0659d5e8775e9197092247355e8a", "migration_status": "Success", "card_number_masked": "520424XXXXXX7180", "card_migrated": null, "network_token_migrated": true, "connector_mandate_details_migrated": true, "network_transaction_id_migrated": true }, { "line_number": 4, "payment_method_id": "pm_6MueQrSZoca7NDcR5Ui9", "payment_method": "wallet", "payment_method_type": "apple_pay", "customer_id": "4b1f7771d465639a4856e0c246de8a50", "migration_status": "Success", "card_number_masked": "520424XXXXXX7180", "card_migrated": null, "network_token_migrated": true, "connector_mandate_details_migrated": true, "network_transaction_id_migrated": true } ] </details> <details> <summary>Perform wallet MIT using migrated token</summary> cURL curl --location --request POST 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_3x1wBsCK5Er6sMaYvQFVxQdzpVi8wfDXgVm6stQ5yZAZfnU4MM5rGXHGjhVaZAIt' \ --data '{"amount":1000,"currency":"EUR","confirm":true,"capture_on":"2022-09-10T10:11:12Z","customer_id":"e4c4a19c2f92c9b61a65d1b1d31bdab9","profile_id":"pro_SQD3Im1aEzJIm2o6xobw","description":"Its my first payment request","return_url":"https://hyperswitch.io","off_session":true,"recurring_details":{"type":"payment_method_id","data":"pm_edmFuErgTu8rvVwUtdTg"}}' Response {"payment_id":"pay_B9cZsoExS75t62J5G5Gl","merchant_id":"merchant_1756795715","status":"succeeded","amount":1000,"net_amount":1000,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"adyen","client_secret":"pay_B9cZsoExS75t62J5G5Gl_secret_1SKcL0XjWp8Rv0upzo7H","created":"2025-09-02T08:45:49.872Z","currency":"EUR","customer_id":"e4c4a19c2f92c9b61a65d1b1d31bdab9","customer":{"id":"e4c4a19c2f92c9b61a65d1b1d31bdab9","name":null,"email":"rsuolf2z6xlke@googlemail.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":true,"capture_on":null,"capture_method":null,"payment_method":"wallet","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":"12","card_exp_year":"2027","card_holder_name":null,"payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":"rsuolf2z6xlke@googlemail.com","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":null,"error_message":null,"unified_code":"UE_9000","unified_message":"Something went wrong","payment_experience":null,"payment_method_type":"google_pay","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"e4c4a19c2f92c9b61a65d1b1d31bdab9","created_at":1756802749,"expires":1756806349,"secret":"epk_9c30790bc68a4fd997d53b17e9087a9f"},"manual_retry_allowed":true,"connector_transaction_id":"DZFZZDRD5HSN6KV5","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_SQD3Im1aEzJIm2o6xobw","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_6wrjYYbE1zrrFSmbB0CJ","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-09-02T09:00:49.872Z","fingerprint":null,"browser_info":null,"payment_channel":null,"payment_method_id":"pm_edmFuErgTu8rvVwUtdTg","network_transaction_id":null,"payment_method_status":"active","updated":"2025-09-02T08:45:51.392Z","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-D20uVHTVD-12m14oZHDBZ20uRXT14oJ22w06g20u20u000232251","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} </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 (logging enhancement - tests not applicable)
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) - Extend existing types with new fields (1 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 50a8013d: 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** Remove: - impl: impl ForeignFrom<(Self, Option<&api_models::payments::AdditionalPaymentData>)> for Option<enums::PaymentMethodType> Add: - impl: impl ForeignFrom<( Self, Option<&api_models::payments::AdditionalPaymentData>, Option<enums::PaymentMethod>, )> for Option<enums::PaymentMethodType>
{"pr_number": 9241, "pr_title": "fix(payments): override payment_method_type only for cards", "merged_at": "2025-09-03T13:10:45Z", "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, "fields_added": 1, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [Wise] send uuid as connector_transaction_id ## 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 --> connector_transaction_id of wise only support UUID format. reference_id wont be required as value since we store the wise's transaction id. We only send UUID to make the transaction without any error. ### 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 an MCA with Wise, do a payout transaction with below body: ``` { "amount": 100, "currency": "USD", "customer_id": "{{customer_id}}", "email": "payout_customer@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payout request", "payout_type": "bank", "payout_method_data": { "bank": { "bank_account_number": "40000000000", "bank_routing_number": "064000020", "bank_name": "Deutsche Bank", "bank_country_code": "US", "bank_city": "NewYork" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "NY", "zip": "94122", "country": "US", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "entity_type": "Individual", "recurring": false, "priority": "instant", "metadata": { "ref": "123" }, "confirm": true, "auto_fulfill": true } ``` Below should be the response: ``` { "payout_id": "payout_kzRK3VXXZlUnCr1EnD0I", "merchant_id": "merchant_1754377291", "merchant_order_reference_id": null, "amount": 100, "currency": "USD", "connector": "wise", "payout_type": "bank", "payout_method_data": { "bank": { "bank_account_number": "*******0000", "bank_routing_number": "064***020", "bank_name": "Deutsche Bank", "bank_country_code": "US", "bank_city": "NewYork" } }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "NY", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "auto_fulfill": true, "customer_id": "cus_dLXANQ4lA5rPO9ILVMIU", "customer": { "id": "cus_dLXANQ4lA5rPO9ILVMIU", "name": "John Doe", "email": "payout_customer@example.com", "phone": "999999999", "phone_country_code": "+65" }, "client_secret": "payout_payout_kzRK3VXXZlUnCr1EnD0I_secret_aUlO2tVNNnSwCpwtT2BI", "return_url": null, "business_country": null, "business_label": null, "description": "Its my first payout request", "entity_type": "Individual", "recurring": false, "metadata": { "ref": "123" }, "merchant_connector_id": "mca_X32sex8t8YBX0yuIS77v", "status": "success", "error_message": null, "error_code": null, "profile_id": "pro_AlDa1vQRvtDEN6zUests", "created": "2025-08-05T07:01:49.063Z", "connector_transaction_id": "55301412", "priority": "instant", "payout_link": null, "email": "payout_customer@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "unified_code": null, "unified_message": null, "payout_method_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/hyperswitch_connectors/src/connectors/wise/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (1 changes) **Detailed Identifier Changes:** Commit 190d1360: Files to modify: **crates/hyperswitch_connectors/src/connectors/wise/transformers.rs** Modify existing code
{"pr_number": 8836, "pr_title": "fix(connector): [Wise] send uuid as connector_transaction_id", "merged_at": "2025-08-05T09:41:49Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "merchant", "order"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/wise/transformers.rs"]}, "change_types": {"fields_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(payments_v2): implement payments capture v2 ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] New feature ## Description <!-- Describe your changes in detail --> This PR introduces payments capture endpoint for the v2 version. This PR also changes the `GenerateResponse` trait to be implemented on the payment data. The new trait looks like this ```rust pub trait GenerateResponse<Response> where Self: Sized, { #[cfg(feature = "v2")] fn generate_response( self, state: &SessionState, connector_http_status_code: Option<u16>, external_latency: Option<u128>, is_latency_header_enabled: Option<bool>, merchant_account: &domain::MerchantAccount, ) -> RouterResponse<Response>; } ``` Also the fields in `AttemptAmountDetails` are made as private, necessary getters and setters are provided to work with these fields. Resolved some of the clippy warnings for v2. ## 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> Create a payment with automatic capture </summary> ```bash curl --location 'http://localhost:8080/v2/payments/create-intent' \ --header 'api-key: dev_WvQ9nNM8yudKrDcVqh3FrURJm3HMKU3tmxMFKnlZef9Hkhyxy1r9A89I4s03jO9h' \ --header 'Content-Type: application/json' \ --header 'x-profile-id: pro_MxajZP8J2IgEXmAs0MpY' \ --data '{ "amount_details": { "order_amount": 100, "currency": "USD" }, "capture_method":"automatic", "authentication_type": "no_three_ds" }' ``` - Response ```json { "id": "12345_pay_0193882e51ac7692905c3279518700eb", "status": "requires_payment_method", "amount_details": { "order_amount": 100, "currency": "USD", "shipping_cost": null, "order_tax_amount": null, "skip_external_tax_calculation": "Skip", "skip_surcharge_calculation": "Skip", "surcharge_amount": null, "tax_on_surcharge": null }, "client_secret": "12345_pay_0193882e51ac7692905c3279518700eb_secret_0193882e51ac7692905c3284173ac888", "merchant_reference_id": null, "routing_algorithm_id": null, "capture_method": "automatic", "authentication_type": "no_three_ds", "billing": null, "shipping": null, "customer_id": null, "customer_present": "Present", "description": null, "return_url": null, "setup_future_usage": "on_session", "apply_mit_exemption": "Skip", "statement_descriptor": null, "order_details": null, "allowed_payment_method_types": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "payment_link_enabled": "Skip", "payment_link_config": null, "request_incremental_authorization": "default", "expires_on": "2024-12-02T16:37:37.228Z", "frm_metadata": null, "request_external_three_ds_authentication": "Skip" } ``` </details> <details> <summary> Confirm the payment intent </summary> ```bash curl --location 'http://localhost:8080/v2/payments/12345_pay_0193882e51ac7692905c3279518700eb/confirm-intent' \ --header 'x-client-secret: 12345_pay_0193882e51ac7692905c3279518700eb_secret_0193882e51ac7692905c3284173ac888' \ --header 'x-profile-id: pro_MxajZP8J2IgEXmAs0MpY' \ --header 'Content-Type: application/json' \ --header 'api-key: pk_dev_538be9702de84258b89c6ac654f5ecb1' \ --data '{ "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "01", "card_exp_year": "25", "card_holder_name": "John Doe", "card_cvc": "100" } }, "payment_method_type": "card", "payment_method_subtype": "credit" }' ``` - In the response, `amount_capturable` should be 0 indicating that no amount can be captured further. `amount_captured` should be equal to the net amount. ```json { "id": "12345_pay_0193882e51ac7692905c3279518700eb", "status": "succeeded", "amount": { "order_amount": 100, "currency": "USD", "shipping_cost": null, "order_tax_amount": null, "skip_external_tax_calculation": "Skip", "skip_surcharge_calculation": "Skip", "surcharge_amount": null, "tax_on_surcharge": null, "net_amount": 100, "amount_to_capture": null, "amount_capturable": 0, "amount_captured": 100 }, "connector": "stripe", "client_secret": "12345_pay_0193882e51ac7692905c3279518700eb_secret_0193882e51ac7692905c3284173ac888", "created": "2024-12-02T16:22:37.228Z", "payment_method_data": null, "payment_method_type": "card", "payment_method_subtype": "credit", "next_action": null, "connector_transaction_id": "pi_3QRcOZD5R7gDAGff1DNcLrku", "connector_reference_id": null, "merchant_connector_id": "mca_viTlEW768QtaKIyYYGjl", "browser_info": null, "error": null } ``` </details> <details> <summary> Create a payment with manual capture </summary> ```bash curl --location 'http://localhost:8080/v2/payments/create-intent' \ --header 'api-key: dev_WvQ9nNM8yudKrDcVqh3FrURJm3HMKU3tmxMFKnlZef9Hkhyxy1r9A89I4s03jO9h' \ --header 'Content-Type: application/json' \ --header 'x-profile-id: pro_MxajZP8J2IgEXmAs0MpY' \ --data '{ "amount_details": { "order_amount": 100, "currency": "USD" }, "capture_method":"manual", "authentication_type": "no_three_ds" }' ``` </details> <details> <summary> Confirm the payment intent </summary> ```bash curl --location 'http://localhost:8080/v2/payments/create-intent' \ --header 'api-key: dev_WvQ9nNM8yudKrDcVqh3FrURJm3HMKU3tmxMFKnlZef9Hkhyxy1r9A89I4s03jO9h' \ --header 'Content-Type: application/json' \ --header 'x-profile-id: pro_MxajZP8J2IgEXmAs0MpY' \ --data '{ "amount_details": { "order_amount": 100, "currency": "USD" }, "capture_method":"manual", "authentication_type": "no_three_ds" }' ``` - The status should be `requires_capture`, with `amount_capturable` equal to the net amount ```json { "id": "12345_pay_0193967efce773d38d2db5dcd00df061", "status": "requires_capture", "amount": { "order_amount": 100, "currency": "USD", "shipping_cost": null, "order_tax_amount": null, "external_tax_calculation": "skip", "surcharge_calculation": "skip", "surcharge_amount": null, "tax_on_surcharge": null, "net_amount": 100, "amount_to_capture": null, "amount_capturable": 100, "amount_captured": 0 }, "connector": "stripe", "client_secret": "12345_pay_0193967efce773d38d2db5dcd00df061_secret_0193967efce87481a4075ab617dba612", "created": "2024-12-05T11:05:24.969Z", "payment_method_data": { "billing": null }, "payment_method_type": "card", "payment_method_subtype": "credit", "next_action": null, "connector_transaction_id": "pi_3QScs9D5R7gDAGff1Vn6BBrV", "connector_reference_id": null, "merchant_connector_id": "mca_VyXpopmpz9vwaQaNhmER", "browser_info": null, "error": null } ``` </details> <details> <summary>Capture the payment </summary> ```bash curl --location 'http://localhost:8080/v2/payments/12345_pay_019396c5a45870c1a45722b60b0159b5/capture' \ --header 'x-profile-id: pro_ByYDje1ZZELFwRyx8IIS' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_cj5iA6st5Dn6o8Grs6vrA9SvblTcRcwUWQ6LzC27Qv80wQQPodhTZuFgBcV59JDA' \ --data '{}' ``` - Response ```json { "id": "12345_pay_019396c5a45870c1a45722b60b0159b5", "status": "succeeded", "amount": { "order_amount": 100, "currency": "USD", "shipping_cost": null, "order_tax_amount": null, "external_tax_calculation": "skip", "surcharge_calculation": "skip", "surcharge_amount": null, "tax_on_surcharge": null, "net_amount": 100, "amount_to_capture": null, "amount_capturable": 0, "amount_captured": 100 } } ``` </details> <details> <summary> Create a 3DS payment </summary> ```bash curl --location 'http://localhost:8080/v2/payments/create-intent' \ --header 'api-key: dev_cj5iA6st5Dn6o8Grs6vrA9SvblTcRcwUWQ6LzC27Qv80wQQPodhTZuFgBcV59JDA' \ --header 'Content-Type: application/json' \ --header 'x-profile-id: pro_ByYDje1ZZELFwRyx8IIS' \ --data-raw '{ "amount_details": { "order_amount": 100, "currency": "USD" }, "capture_method":"manual", "authentication_type": "three_ds", "billing": { "address": { "first_name": "John", "last_name": "Dough" }, "email": "example@example.com" }, "shipping": { "address": { "first_name": "John", "last_name": "Dough", "city": "Karwar", "zip": "581301", "state": "Karnataka" }, "email": "example@example.com" } }' ``` - Response ```json { "id": "12345_pay_019396c80c8074d0a664df3d3a194856", "status": "requires_payment_method", "amount_details": { "order_amount": 100, "currency": "USD", "shipping_cost": null, "order_tax_amount": null, "external_tax_calculation": "skip", "surcharge_calculation": "skip", "surcharge_amount": null, "tax_on_surcharge": null }, "client_secret": "12345_pay_019396c80c8074d0a664df3d3a194856_secret_019396c80c8074d0a664df4671f65402", "profile_id": "pro_ByYDje1ZZELFwRyx8IIS", "merchant_reference_id": null, "routing_algorithm_id": null, "capture_method": "manual", "authentication_type": "three_ds", "billing": { "address": { "city": null, "country": null, "line1": null, "line2": null, "line3": null, "zip": null, "state": null, "first_name": "John", "last_name": "Dough" }, "phone": null, "email": "example@example.com" }, "shipping": { "address": { "city": "Karwar", "country": null, "line1": null, "line2": null, "line3": null, "zip": "581301", "state": "Karnataka", "first_name": "John", "last_name": "Dough" }, "phone": null, "email": "example@example.com" }, "customer_id": null, "customer_present": "Present", "description": null, "return_url": null, "setup_future_usage": "on_session", "apply_mit_exemption": "Skip", "statement_descriptor": null, "order_details": null, "allowed_payment_method_types": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "payment_link_enabled": "Skip", "payment_link_config": null, "request_incremental_authorization": "default", "expires_on": "2024-12-05T12:40:13.089Z", "frm_metadata": null, "request_external_three_ds_authentication": "Skip" } ``` - Confirm the payment intent ```bash curl --location 'http://localhost:8080/v2/payments/12345_pay_019396cc683b7a2195085791a9018983/confirm-intent' \ --header 'x-client-secret: 12345_pay_019396cc683b7a2195085791a9018983_secret_019396cc683c72e3a33309c8f573d29e' \ --header 'x-profile-id: pro_ByYDje1ZZELFwRyx8IIS' \ --header 'Content-Type: application/json' \ --header 'api-key: pk_dev_1896564f01cc4ffc8039f4e538a43b88' \ --data '{ "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "01", "card_exp_year": "25", "card_holder_name": "John Doe", "card_cvc": "100" } }, "payment_method_type": "card", "payment_method_subtype": "credit" }' ``` - Response ```json { "id": "12345_pay_019396cc683b7a2195085791a9018983", "status": "requires_customer_action", "amount": { "order_amount": 100, "currency": "USD", "shipping_cost": null, "order_tax_amount": null, "external_tax_calculation": "skip", "surcharge_calculation": "skip", "surcharge_amount": null, "tax_on_surcharge": null, "net_amount": 100, "amount_to_capture": null, "amount_capturable": 0, "amount_captured": null }, "connector": "stripe", "client_secret": "12345_pay_019396cc683b7a2195085791a9018983_secret_019396cc683c72e3a33309c8f573d29e", "created": "2024-12-05T12:29:58.716Z", "payment_method_data": { "billing": null }, "payment_method_type": "card", "payment_method_subtype": "credit", "next_action": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/v2/payments/12345_pay_019396cc683b7a2195085791a9018983/start-redirection?publishable_key=pk_dev_1896564f01cc4ffc8039f4e538a43b88&profile_id=pro_ByYDje1ZZELFwRyx8IIS" }, "connector_transaction_id": "pi_3QSeC3D5R7gDAGff0mIJA1Wg", "connector_reference_id": null, "merchant_connector_id": "mca_VyXpopmpz9vwaQaNhmER", "browser_info": null, "error": null } ``` - Complete the redirection ![image](https://github.com/user-attachments/assets/de6fab23-7099-412a-9c3e-6b20d1cd4744) - Retrieve the payment ```bash curl --location 'http://localhost:8080/v2/payments/12345_pay_019396cc683b7a2195085791a9018983' \ --header 'x-profile-id: pro_ByYDje1ZZELFwRyx8IIS' \ --header 'api-key: dev_cj5iA6st5Dn6o8Grs6vrA9SvblTcRcwUWQ6LzC27Qv80wQQPodhTZuFgBcV59JDA' \ --data '' ``` - Response ```json { "id": "12345_pay_019396cc683b7a2195085791a9018983", "status": "requires_capture", "amount": { "order_amount": 100, "currency": "USD", "shipping_cost": null, "order_tax_amount": null, "external_tax_calculation": "skip", "surcharge_calculation": "skip", "surcharge_amount": null, "tax_on_surcharge": null, "net_amount": 100, "amount_to_capture": null, "amount_capturable": 100, "amount_captured": 100 }, "connector": "stripe", "client_secret": "12345_pay_019396cc683b7a2195085791a9018983_secret_019396cc683c72e3a33309c8f573d29e", "created": "2024-12-05T12:29:58.716Z", "payment_method_data": { "billing": null }, "payment_method_type": "card", "payment_method_subtype": "credit", "connector_transaction_id": "pi_3QSeC3D5R7gDAGff0mIJA1Wg", "connector_reference_id": null, "merchant_connector_id": "mca_VyXpopmpz9vwaQaNhmER", "browser_info": null, "error": null, "shipping": { "address": { "city": "Karwar", "country": null, "line1": null, "line2": null, "line3": null, "zip": "581301", "state": "Karnataka", "first_name": "John", "last_name": "Dough" }, "phone": null, "email": "example@example.com" }, "billing": { "address": { "city": null, "country": null, "line1": null, "line2": null, "line3": null, "zip": null, "state": null, "first_name": "John", "last_name": "Dough" }, "phone": null, "email": "example@example.com" } } ``` - Capture the payment ```bash curl --location 'http://localhost:8080/v2/payments/12345_pay_019396cc683b7a2195085791a9018983/capture' \ --header 'x-profile-id: pro_ByYDje1ZZELFwRyx8IIS' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_cj5iA6st5Dn6o8Grs6vrA9SvblTcRcwUWQ6LzC27Qv80wQQPodhTZuFgBcV59JDA' \ --data '{}' ``` - Response ```json { "id": "12345_pay_019396cc683b7a2195085791a9018983", "status": "succeeded", "amount": { "order_amount": 100, "currency": "USD", "shipping_cost": null, "order_tax_amount": null, "external_tax_calculation": "skip", "surcharge_calculation": "skip", "surcharge_amount": null, "tax_on_surcharge": null, "net_amount": 100, "amount_to_capture": null, "amount_capturable": 0, "amount_captured": 100 } } ``` </details> <details> <summary> Create a partial capture</summary> - Create a payment ```bash curl --location 'http://localhost:8080/v2/payments/create-intent' \ --header 'api-key: dev_cj5iA6st5Dn6o8Grs6vrA9SvblTcRcwUWQ6LzC27Qv80wQQPodhTZuFgBcV59JDA' \ --header 'Content-Type: application/json' \ --header 'x-profile-id: pro_ByYDje1ZZELFwRyx8IIS' \ --data-raw '{ "amount_details": { "order_amount": 100, "currency": "USD" }, "capture_method":"manual", "authentication_type": "no_three_ds", "billing": { "address": { "first_name": "John", "last_name": "Dough" }, "email": "example@example.com" }, "shipping": { "address": { "first_name": "John", "last_name": "Dough", "city": "Karwar", "zip": "581301", "state": "Karnataka" }, "email": "example@example.com" } }' ``` - Response ```json { "id": "12345_pay_019396d160917c41baa6130f8716dbb7", "status": "requires_payment_method", "amount_details": { "order_amount": 100, "currency": "USD", "shipping_cost": null, "order_tax_amount": null, "external_tax_calculation": "skip", "surcharge_calculation": "skip", "surcharge_amount": null, "tax_on_surcharge": null }, "client_secret": "12345_pay_019396d160917c41baa6130f8716dbb7_secret_019396d160917c41baa6131341a1bc9e", "profile_id": "pro_ByYDje1ZZELFwRyx8IIS", "merchant_reference_id": null, "routing_algorithm_id": null, "capture_method": "manual", "authentication_type": "no_three_ds", "billing": { "address": { "city": null, "country": null, "line1": null, "line2": null, "line3": null, "zip": null, "state": null, "first_name": "John", "last_name": "Dough" }, "phone": null, "email": "example@example.com" }, "shipping": { "address": { "city": "Karwar", "country": null, "line1": null, "line2": null, "line3": null, "zip": "581301", "state": "Karnataka", "first_name": "John", "last_name": "Dough" }, "phone": null, "email": "example@example.com" }, "customer_id": null, "customer_present": "Present", "description": null, "return_url": null, "setup_future_usage": "on_session", "apply_mit_exemption": "Skip", "statement_descriptor": null, "order_details": null, "allowed_payment_method_types": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "payment_link_enabled": "Skip", "payment_link_config": null, "request_incremental_authorization": "default", "expires_on": "2024-12-05T12:50:24.434Z", "frm_metadata": null, "request_external_three_ds_authentication": "Skip" } ``` - confirm the payment ```bash curl --location 'http://localhost:8080/v2/payments/12345_pay_019396d160917c41baa6130f8716dbb7/confirm-intent' \ --header 'x-client-secret: 12345_pay_019396d160917c41baa6130f8716dbb7_secret_019396d160917c41baa6131341a1bc9e' \ --header 'x-profile-id: pro_ByYDje1ZZELFwRyx8IIS' \ --header 'Content-Type: application/json' \ --header 'api-key: pk_dev_1896564f01cc4ffc8039f4e538a43b88' \ --data '{ "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "01", "card_exp_year": "25", "card_holder_name": "John Doe", "card_cvc": "100" } }, "payment_method_type": "card", "payment_method_subtype": "credit" }' ``` - Response ```json { "id": "12345_pay_019396d160917c41baa6130f8716dbb7", "status": "requires_capture", "amount": { "order_amount": 100, "currency": "USD", "shipping_cost": null, "order_tax_amount": null, "external_tax_calculation": "skip", "surcharge_calculation": "skip", "surcharge_amount": null, "tax_on_surcharge": null, "net_amount": 100, "amount_to_capture": null, "amount_capturable": 100, "amount_captured": 0 }, "connector": "stripe", "client_secret": "12345_pay_019396d160917c41baa6130f8716dbb7_secret_019396d160917c41baa6131341a1bc9e", "created": "2024-12-05T12:35:24.434Z", "payment_method_data": { "billing": null }, "payment_method_type": "card", "payment_method_subtype": "credit", "next_action": null, "connector_transaction_id": "pi_3QSeIyD5R7gDAGff1woLG5lU", "connector_reference_id": null, "merchant_connector_id": "mca_VyXpopmpz9vwaQaNhmER", "browser_info": null, "error": null } ``` - Capture the payment with `amount_to_capture` ```bash curl --location 'http://localhost:8080/v2/payments/12345_pay_019396d160917c41baa6130f8716dbb7/capture' \ --header 'x-profile-id: pro_ByYDje1ZZELFwRyx8IIS' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_cj5iA6st5Dn6o8Grs6vrA9SvblTcRcwUWQ6LzC27Qv80wQQPodhTZuFgBcV59JDA' \ --data '{ "amount_to_capture": 69 }' ``` - Response, status should be `partially_captured` ```json { "id": "12345_pay_019396d160917c41baa6130f8716dbb7", "status": "partially_captured", "amount": { "order_amount": 100, "currency": "USD", "shipping_cost": null, "order_tax_amount": null, "external_tax_calculation": "skip", "surcharge_calculation": "skip", "surcharge_amount": null, "tax_on_surcharge": null, "net_amount": 100, "amount_to_capture": 69, "amount_capturable": 0, "amount_captured": 69 } } ``` </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
To implement this **payment** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/events/payment.rs` - `crates/api_models/src/payments.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/payment_attempt.rs` - `crates/diesel_models/src/payment_intent.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payments.rs` - `crates/hyperswitch_domain_models/src/payments/payment_attempt.rs` - `crates/hyperswitch_domain_models/src/payments/payment_intent.rs` - ... and 1 more files **4. Core Business Logic** - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/flows/capture_flow.rs` - `crates/router/src/core/payments/operations.rs` - ... and 5 more files **5. Type Definitions** - `crates/router/src/types.rs` **6. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - `crates/openapi/src/openapi_v2.rs` - ... and 2 more files **Code Patterns Applied:** - Define new data structures (6 changes) - Implement new functions (96 changes) - Extend existing types with new fields (351 changes) - Add conditional logic for feature flags or filtering (3 changes) **Detailed Identifier Changes:** Commit 977cb704: Files to modify: **crates/api_models/src/events/payment.rs** Add: - function: private::get_api_event_type - impl: impl ApiEventMetric for events::PaymentsCaptureResponse **crates/api_models/src/payments.rs** Remove: - struct: pub::ConfirmIntentAmountDetailsResponse Add: - struct: pub::PaymentAmountDetailsResponse - struct: pub::PaymentsCaptureResponse **crates/diesel_models/src/payment_attempt.rs** Modify existing code **crates/diesel_models/src/payment_intent.rs** Add: - enum: pub::PaymentIntentUpdate **crates/hyperswitch_domain_models/src/payments.rs** Add: - struct: pub::PaymentCaptureData **crates/hyperswitch_domain_models/src/payments/payment_attempt.rs** Add: - function: pub::validate_amount_to_capture **crates/hyperswitch_domain_models/src/payments/payment_intent.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_data.rs** Remove: - impl: impl status Add: - function: private::get_attempt_status_for_db_update - function: private::get_amount_capturable - function: private::get_captured_amount - function: private::get_payment_intent_update - function: private::get_payment_attempt_update - function: private::get_attempt_status_for_db_update - function: private::get_amount_capturable - function: private::get_captured_amount - function: private::get_attempt_status_for_db_update - function: private::get_amount_capturable - function: private::get_captured_amount - impl: impl TrackerPostUpdateObjects< router_flow_types::Capture, router_request_types::PaymentsCaptureData, payments::PaymentCaptureData<router_flow_types::Capture>, > for RouterData< router_flow_types::Capture, router_request_types::PaymentsCaptureData, router_response_types::PaymentsResponseData, > - impl: impl TrackerPostUpdateObjects< router_flow_types::PSync, router_request_types::PaymentsSyncData, payments::PaymentStatusData<router_flow_types::PSync>, > payment_data: &payments::PaymentStatusData<router_flow_types::PSync>, let amount_captured = self.get_captured_amount(payment_data); status: common_enums::IntentStatus::from( self.get_attempt_status_for_db_update(payment_data), ), amount_captured, amount_captured, payment_data: &payments::PaymentStatusData<router_flow_types::PSync>, let amount_capturable = self.get_amount_capturable(payment_data) **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/router/src/core/payments.rs** Add: - function: private::get_payment_attempt - function: private::get_payment_intent - function: private::get_payment_method_info - function: private::get_mandate_id - function: private::get_address - function: private::get_creds_identifier - function: private::get_token - function: private::get_multiple_capture_data - function: private::get_payment_link_data - function: private::get_ephemeral_key - function: private::get_setup_mandate - function: private::get_poll_config - function: private::get_authentication - function: private::get_frm_message - function: private::get_refunds - function: private::get_disputes - function: private::get_authorizations - function: private::get_attempts - function: private::get_recurring_details - function: private::get_payment_intent_profile_id - function: private::get_currency - function: private::get_amount - function: private::get_payment_attempt_connector - function: private::get_billing_address - function: private::get_payment_method_data - function: private::get_sessions_token - function: private::get_token_data - function: private::get_mandate_connector - function: private::get_force_sync - function: private::get_capture_method - function: private::get_optional_payment_attempt - function: private::set_payment_intent - function: private::set_payment_attempt - function: private::set_payment_method_data - function: private::set_payment_method_id_in_attempt - function: private::set_email_if_not_present - function: private::set_pm_token - function: private::set_connector_customer_id - function: private::push_sessions_token - function: private::set_surcharge_details - function: private::set_merchant_connector_id_in_attempt - function: private::set_frm_message - function: private::set_payment_intent_status - function: private::set_authentication_type_in_attempt - function: private::set_recurring_mandate_payment_data - function: private::set_mandate_id - function: private::set_setup_future_usage_in_payment_intent - function: private::set_connector_in_payment_attempt - impl: impl OperationSessionSetters<F> for PaymentCaptureData<F> **crates/router/src/core/payments/flows/capture_flow.rs** Add: - function: private::get_merchant_recipient_data **crates/router/src/core/payments/operations.rs** Add: - mod: pub::payment_capture_v2 **crates/router/src/core/payments/operations/payment_capture_v2.rs** Add: - function: private::validate_status_for_operation - function: private::to_validate_request - function: private::to_get_tracker - function: private::to_domain - function: private::to_update_tracker - function: private::to_validate_request - function: private::to_get_tracker - function: private::to_domain - function: private::to_update_tracker - function: private::validate_request - function: private::get_trackers - function: private::get_customer_details - function: private::make_pm_data - function: private::perform_routing - function: private::update_trackers - struct: pub::PaymentsCapture - impl: impl ValidateStatusForOperation for PaymentsCapture - impl: impl Operation<F, PaymentsCaptureRequest> for &PaymentsCapture - impl: impl Operation<F, PaymentsCaptureRequest> for PaymentsCapture - impl: impl ValidateRequest<F, PaymentsCaptureRequest, PaymentCaptureData<F>> for PaymentsCapture - impl: impl GetTracker<F, PaymentCaptureData<F>, PaymentsCaptureRequest> for PaymentsCapture - impl: impl Domain<F, PaymentsCaptureRequest, PaymentCaptureData<F>> for PaymentsCapture - impl: impl UpdateTracker<F, PaymentCaptureData<F>, PaymentsCaptureRequest> for PaymentsCapture **crates/router/src/core/payments/operations/payment_get.rs** Modify existing code **crates/router/src/core/payments/operations/payment_response.rs** Add: - function: private::to_post_update_tracker - function: private::update_tracker - impl: impl Operation<F, types::PaymentsCaptureData> for PaymentResponse - impl: impl PostUpdateTracker< F, hyperswitch_domain_models::payments::PaymentCaptureData<F>, types::PaymentsCaptureData, > for PaymentResponse **crates/router/src/core/payments/transformers.rs** Add: - function: private::generate_response **crates/router/src/core/webhooks/incoming_v2.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/payments.rs** Add: - function: pub::payments_capture **crates/router/src/types.rs** Modify existing code
{"pr_number": 6722, "pr_title": "feat(payments_v2): implement payments capture v2", "merged_at": "2024-12-20T15:53:01Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/events/payment.rs", "crates/api_models/src/payments.rs"], "database": ["crates/diesel_models/src/payment_attempt.rs", "crates/diesel_models/src/payment_intent.rs"], "domain": ["crates/hyperswitch_domain_models/src/payments.rs", "crates/hyperswitch_domain_models/src/payments/payment_attempt.rs", "crates/hyperswitch_domain_models/src/payments/payment_intent.rs", "crates/hyperswitch_domain_models/src/router_data.rs"], "core_business": ["crates/router/src/core/payments.rs", "crates/router/src/core/payments/flows/capture_flow.rs", "crates/router/src/core/payments/operations.rs", "crates/router/src/core/payments/operations/payment_capture_v2.rs", "crates/router/src/core/payments/operations/payment_get.rs", "crates/router/src/core/payments/operations/payment_response.rs", "crates/router/src/core/payments/transformers.rs", "crates/router/src/core/webhooks/incoming_v2.rs"], "types": ["crates/router/src/types.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/openapi/src/openapi_v2.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/payments.rs"]}, "change_types": {"structs_added": 6, "functions_added": 96, "enums_added": 1, "fields_added": 351, "imports_added": 15, "conditionals_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
ci(migration-check): install rustfmt to address migration run failures ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> - `diesel_cli` version `2.3.0` expects to call `rustfmt` to format its output. If `rustfmt` is not installed on the system it will give an error. - Added a step to install `rustfmt` to fix the workflow ### Additional Changes - [ ] This 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 #9385 ## 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 CI checks ## 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** - `.github/workflows/migration-check.yaml` **Code Patterns Applied:** - Extend existing types with new fields (1 changes)
{"pr_number": 9386, "pr_title": "ci(migration-check): install rustfmt to address migration run failures", "merged_at": "2025-09-15T12:52:03Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"other": [".github/workflows/migration-check.yaml"]}, "change_types": {"fields_added": 1}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(router): Enable client_secret auth for payments_get_intent [v2] ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Added support for `client_secret` authentication in `Payments - Get Intent` ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/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 #8118 ## 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_0196fc47794a7a81b64346c96b71be4d/get-intent' \ --header 'x-profile-id: pro_pbRrpRVsI1yMUsyNhmrC' \ --header 'Authorization: publishable-key=pk_dev_41285e1d1b2a4998b1d9192874583289,client-secret=cs_0196fc4779ac7fe2826efc5ea6a2be24' \ --data '' ``` - Response: ```json { "id": "12345_pay_0196fc47794a7a81b64346c96b71be4d", "status": "requires_payment_method", "amount_details": { "order_amount": 100, "currency": "USD", "shipping_cost": null, "order_tax_amount": null, "external_tax_calculation": "skip", "surcharge_calculation": "skip", "surcharge_amount": null, "tax_on_surcharge": null }, "client_secret": null, "profile_id": "pro_pbRrpRVsI1yMUsyNhmrC", "merchant_reference_id": null, "routing_algorithm_id": null, "capture_method": "manual", "authentication_type": "no_three_ds", "billing": { "address": { "city": null, "country": null, "line1": null, "line2": null, "line3": null, "zip": null, "state": null, "first_name": "John", "last_name": "Dough" }, "phone": null, "email": "example@example.com" }, "shipping": { "address": { "city": "Karwar", "country": null, "line1": null, "line2": null, "line3": null, "zip": "581301", "state": "Karnataka", "first_name": "John", "last_name": "Dough" }, "phone": null, "email": "example@example.com" }, "customer_id": "12345_cus_0196fb8c515f79c3bda13a5e8bd62de0", "customer_present": "present", "description": null, "return_url": null, "setup_future_usage": "on_session", "apply_mit_exemption": "Skip", "statement_descriptor": null, "order_details": null, "allowed_payment_method_types": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "payment_link_enabled": "Skip", "payment_link_config": null, "request_incremental_authorization": "default", "expires_on": "2025-05-23T08:49:24.798Z", "frm_metadata": null, "request_external_three_ds_authentication": "Skip" } ``` ## 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/router/src/routes/payments.rs` **Code Patterns Applied:** - Extend existing types with new fields (2 changes) **Detailed Identifier Changes:** Commit 68b0e386: Files to modify: **crates/router/src/routes/payments.rs** Modify existing code
{"pr_number": 8119, "pr_title": "feat(router): Enable client_secret auth for payments_get_intent [v2]", "merged_at": "2025-05-27T10:56:27Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"other": ["crates/router/src/routes/payments.rs"]}, "change_types": {"fields_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [ADYENPLATFORM] add card payouts ## 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 enables card payouts through AdyenPlatform 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 Allows merchants to process card payouts through Adyen's Balance Platform. ## How did you test it? <details> <summary>1. Card payouts via API</summary> cURL curl --location --request POST 'http://localhost:8080/payouts/create' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_lAISInmiO4UNrMmvkJogzRVKEGKlBKQbRCBFOkLJTXmq6nsD5G1H65BjOd4H72H8' \ --data '{"amount":100,"currency":"EUR","profile_id":"pro_vVSlzCG7M1GSX9SyssY8","customer_id":"cus_WULwykbL8laUbxDUeGEB","connector":["adyenplatform"],"description":"Its my first payout request","payout_type":"card","payout_method_data":{"card":{"card_number":"4111111111111111","expiry_month":"03","expiry_year":"2030"}},"billing":{"address":{"line1":"1467","line2":"Harrison Street","line3":"Harrison Street","city":"San Fransico","state":"CA","zip":"94122","country":"FR","first_name":"John","last_name":"Doe"}},"entity_type":"Individual","recurring":true,"metadata":{"ref":"123"},"confirm":true,"auto_fulfill":true}' Response {"payout_id":"ff21b89d-3cfd-4f0f-b3ff-c468d90d7074","merchant_id":"merchant_1751292662","amount":100,"currency":"EUR","connector":"adyenplatform","payout_type":"card","payout_method_data":{"card":{"card_issuer":null,"card_network":null,"card_type":null,"card_issuing_country":null,"bank_code":null,"last4":"1111","card_isin":"411111","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"2030","card_holder_name":null}},"billing":{"address":{"city":"San Fransico","country":"FR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"CA","first_name":"John","last_name":"Doe"},"phone":null,"email":null},"auto_fulfill":true,"customer_id":"cus_WULwykbL8laUbxDUeGEB","customer":{"id":"cus_WULwykbL8laUbxDUeGEB","name":"John Nether","email":null,"phone":"6168205362","phone_country_code":"+1"},"client_secret":"payout_ff21b89d-3cfd-4f0f-b3ff-c468d90d7074_secret_qzFALtOg6ZhYAOAUr2qY","return_url":null,"business_country":null,"business_label":null,"description":"Its my first payout request","entity_type":"Individual","recurring":true,"metadata":{"ref":"123"},"merchant_connector_id":"mca_SfssFvg5RBT2k7iKRRsS","status":"initiated","error_message":null,"error_code":null,"profile_id":"pro_vVSlzCG7M1GSX9SyssY8","created":"2025-06-30T14:12:47.886Z","connector_transaction_id":"38EBIX67HBSYZ30V","priority":null,"payout_link":null,"email":null,"name":"John Nether","phone":"6168205362","phone_country_code":"+1","unified_code":null,"unified_message":null,"payout_method_id":"pm_wScFhCfxELZ7gN13Nbxz"} </details> <details> <summary>2. Card payouts via Payout Links</summary> cURL curl --location --request POST 'http://localhost:8080/payouts/create' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_lAISInmiO4UNrMmvkJogzRVKEGKlBKQbRCBFOkLJTXmq6nsD5G1H65BjOd4H72H8' \ --data '{"amount":1,"currency":"EUR","customer_id":"cus_WULwykbL8laUbxDUeGEB","description":"Its my first payout request","entity_type":"Individual","confirm":false,"auto_fulfill":true,"session_expiry":1000000,"profile_id":"pro_vVSlzCG7M1GSX9SyssY8","payout_link":true,"return_url":"https://www.google.com","payout_link_config":{"form_layout":"journey","theme":"#0066ff","logo":"https://hyperswitch.io/favicon.ico","merchant_name":"HyperSwitch Inc.","test_mode":true}}' Response {"payout_id":"2371746b-df3d-41da-8fa2-455faf921ea9","merchant_id":"merchant_1751292662","amount":1,"currency":"EUR","connector":null,"payout_type":null,"payout_method_data":null,"billing":null,"auto_fulfill":true,"customer_id":"cus_WULwykbL8laUbxDUeGEB","customer":{"id":"cus_WULwykbL8laUbxDUeGEB","name":"John Nether","email":null,"phone":"6168205362","phone_country_code":"+1"},"client_secret":"payout_2371746b-df3d-41da-8fa2-455faf921ea9_secret_VwDeIScMTLFzG7Iz1DZU","return_url":"https://www.google.com","business_country":null,"business_label":null,"description":"Its my first payout request","entity_type":"Individual","recurring":false,"metadata":{},"merchant_connector_id":null,"status":"requires_payout_method_data","error_message":null,"error_code":null,"profile_id":"pro_vVSlzCG7M1GSX9SyssY8","created":"2025-06-30T14:14:48.897Z","connector_transaction_id":null,"priority":null,"payout_link":{"payout_link_id":"payout_link_vITmtOWGkaUfeXopruRs","link":"http://localhost:8080/payout_link/merchant_1751292662/2371746b-df3d-41da-8fa2-455faf921ea9?locale=en"},"email":null,"name":"John Nether","phone":"6168205362","phone_country_code":"+1","unified_code":null,"unified_message":null,"payout_method_id":null} <img width="1719" alt="Screenshot 2025-06-30 at 7 45 32 PM" src="https://github.com/user-attachments/assets/f7ff9bbd-2dbc-4f70-bc3d-a043cec22327" /> <img width="1721" alt="Screenshot 2025-06-30 at 7 45 48 PM" src="https://github.com/user-attachments/assets/9f833415-afa1-4dd5-b699-834e7a768a7a" /> <img width="913" alt="Screenshot 2025-06-30 at 7 45 54 PM" src="https://github.com/user-attachments/assets/27b3634b-5cd1-4ae8-8db3-e68116858a70" /> </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/adyenplatform/transformers/payouts.rs` **2. Configuration Files** - `crates/router/src/configs/defaults/payout_required_fields.rs` **Code Patterns Applied:** - Define new data structures (7 changes) - Implement new functions (2 changes) - Extend existing types with new fields (61 changes) **Detailed Identifier Changes:** Commit 0c649158: Files to modify: **crates/hyperswitch_connectors/src/connectors/adyenplatform/transformers/payouts.rs** Add: - function: private::try_from - function: private::try_from - struct: pub::AdyenCardDetails - struct: pub::AdyenCardIdentification - struct: pub::AdyenCardTokenDetails - struct: pub::AdyenCardTokenIdentification - enum: pub::AdyenPayoutMethodDetails - impl: impl TryFrom<&hyperswitch_domain_models::address::AddressDetails> for AdyenAddress - impl: impl TryFrom<(&types::PayoutsRouterData<F>, enums::PayoutType)> for AdyenAccountHolder **crates/router/src/configs/defaults/payout_required_fields.rs** Modify existing code
{"pr_number": 8504, "pr_title": "feat(connector): [ADYENPLATFORM] add card payouts", "merged_at": "2025-07-01T11:43:42Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "merchant", "user"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/adyenplatform/transformers/payouts.rs"], "config": ["crates/router/src/configs/defaults/payout_required_fields.rs"]}, "change_types": {"structs_added": 7, "functions_added": 2, "enums_added": 1, "fields_added": 61, "imports_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
ci(cypress): add multisafepay 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 Add multisafepay connector to cypress test suite Connector doesn't support no_three_ds payments hence mapped accordingly ### 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 Connector test case enhancement ## How did you test it? <img width="758" alt="image" src="https://github.com/user-attachments/assets/7e67656f-45a9-4faa-9deb-bbb2763d185e" /> Basic Payments are failing with error message `Declined` ## 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/Multisafepay.js` - `cypress-tests/cypress/e2e/configs/Payment/Utils.js` **Code Patterns Applied:** - Extend existing types with new fields (561 changes)
{"pr_number": 8479, "pr_title": "ci(cypress): add multisafepay connector", "merged_at": "2025-07-01T08:13:19Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "connector"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/configs/Payment/Multisafepay.js", "cypress-tests/cypress/e2e/configs/Payment/Utils.js"]}, "change_types": {"fields_added": 561}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(connector): [Flexiti]template code for flexiti connector ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Flexiti is not a traditional credit card. It's a co-branded credit card that offers installment financing. **Flexiti Payment Method Type:** Co-Branded Credit Card with Installment Financing - Flexiti issues a FlexitiCard (Mastercard network) - Functions as both a credit card AND installment loan provider - Customers get approved for a credit limit - Can be used at participating merchants in the Flexiti network This pr adds template code for flexiti as connector. ### 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)? --> This is template code PR, CI checks would be suffice. ## 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. External Connector Integration** - `crates/connector_configs/src/connector.rs` - `crates/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - ... and 11 more files **3. Tests** - `config/deployments/integration_test.toml` - `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 (10 changes) - Implement new functions (83 changes) - Extend existing types with new fields (163 changes) **Detailed Identifier Changes:** Commit 0f66692e: Files to modify: **crates/connector_configs/src/connector.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors.rs** Add: - mod: pub::flexiti **crates/hyperswitch_connectors/src/connectors/flexiti.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::Flexiti - impl: impl Flexiti - impl: impl api::Payment for Flexiti - impl: impl api::PaymentSession for Flexiti - impl: impl api::ConnectorAccessToken for Flexiti - impl: impl api::MandateSetup for Flexiti - impl: impl api::PaymentAuthorize for Flexiti - impl: impl api::PaymentSync for Flexiti - impl: impl api::PaymentCapture for Flexiti - impl: impl api::PaymentVoid for Flexiti - impl: impl api::Refund for Flexiti - impl: impl api::RefundExecute for Flexiti - impl: impl api::RefundSync for Flexiti - impl: impl api::PaymentToken for Flexiti - impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for Flexiti - impl: impl ConnectorCommonExt<Flow, Request, Response> for Flexiti - impl: impl ConnectorCommon for Flexiti - impl: impl ConnectorValidation for Flexiti - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Flexiti - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Flexiti - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Flexiti - impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Flexiti - impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Flexiti - impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Flexiti - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Flexiti - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Flexiti - impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Flexiti - impl: impl webhooks::IncomingWebhook for Flexiti - impl: impl ConnectorSpecifications for Flexiti - mod: pub::transformers **crates/hyperswitch_connectors/src/connectors/flexiti/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::FlexitiRouterData - struct: pub::FlexitiPaymentsRequest - struct: pub::FlexitiCard - struct: pub::FlexitiAuthType - struct: pub::FlexitiPaymentsResponse - struct: pub::FlexitiRefundRequest - struct: pub::RefundResponse - struct: pub::FlexitiErrorResponse - enum: pub::FlexitiPaymentStatus - enum: pub::RefundStatus - impl: impl From<(StringMinorUnit, T)> for FlexitiRouterData<T> - impl: impl TryFrom<&FlexitiRouterData<&PaymentsAuthorizeRouterData>> for FlexitiPaymentsRequest - impl: impl TryFrom<&ConnectorAuthType> for FlexitiAuthType - impl: impl From<FlexitiPaymentStatus> for common_enums::AttemptStatus - impl: impl TryFrom<ResponseRouterData<F, FlexitiPaymentsResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData> - impl: impl TryFrom<&FlexitiRouterData<&RefundsRouterData<F>>> for FlexitiRefundRequest - 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/tests/connectors/flexiti.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::FlexitiTest - impl: impl ConnectorActions for FlexitiTest - impl: impl utils::Connector for FlexitiTest **crates/router/tests/connectors/main.rs** Add: - mod: private::flexiti **crates/test_utils/src/connector_auth.rs** Modify existing code
{"pr_number": 8714, "pr_title": "feat(connector): [Flexiti]template code for flexiti connector", "merged_at": "2025-07-25T07:20:56Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/connector_endpoints.rs"], "connectors": ["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/flexiti.rs", "crates/hyperswitch_connectors/src/connectors/flexiti/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/hyperswitch_connectors/src/default_implementations_v2.rs", "crates/router/src/connector.rs", "crates/router/tests/connectors/flexiti.rs", "crates/router/tests/connectors/main.rs", "crates/test_utils/src/connector_auth.rs", "scripts/add_connector.sh"], "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": 163, "imports_added": 22}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(payments): [Payment links] Add config for changing button text 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 Added config for changing text of confirm button for payment links ### 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. Update `allowed_domains` in business profile (Expand to see details)</summary> ``` curl --location --request POST 'http://localhost:8080/account/merchant_1734440294/business_profile/pro_DD9djS7uH6B6uB9A8Nl4' \ --header 'Content-Type: application/json' \ --header 'api-key: test_admin' \ --data-raw '{ "payment_link_config": { "allowed_domains": [ "*" ], "enabled_saved_payment_method": true, "hide_card_nickname_field": true } }' ``` </details> <details> <summary>2. Create a payment link with `payment_button_text` (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_apDeSrDBnIV37SLkVVFFxmJogw3H1KslEXeeAPIqQCamCS6vKk71qkgZlvB1CLUZ' \ --header 'Accept-Language: zh-Hant' \ --data-raw '{ "amount": 100, "currency": "EUR", "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.", "payment_button_text": "Pay Now DG" } }' ``` Response of /payments `{ "payment_id": "pay_uWGKvq0GhsPOLazRZCaj", "merchant_id": "merchant_1734440294", "status": "requires_payment_method", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 100, "amount_received": null, "connector": null, "client_secret": "pay_uWGKvq0GhsPOLazRZCaj_secret_33a1Sy4E5rs7Tv53I4Is", "created": "2024-12-18T08:00:55.515Z", "currency": "EUR", "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_1734440294/pay_uWGKvq0GhsPOLazRZCaj?locale=zh-Hant", "secure_link": "http://localhost:8080/payment_link/s/merchant_1734440294/pay_uWGKvq0GhsPOLazRZCaj?locale=zh-Hant", "payment_link_id": "plink_ETWyoDZsOyC4f68LRjdS" }, "profile_id": "pro_DD9djS7uH6B6uB9A8Nl4", "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-29T21:47:35.508Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2024-12-18T08:00:55.532Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null }` </details> <details><summary>3. Set `payment_button_text` in business profile config</summary> ``` curl --location --request POST 'http://localhost:8080/account/merchant_1734516409/business_profile/pro_Emk2IPwiF6HkSkjTZCIc' \ --header 'Content-Type: application/json' \ --header 'api-key: test_admin' \ --data-raw '{ "payment_link_config": { "allowed_domains": [ "*" ], "enabled_saved_payment_method": true, "theme": "#1A1A1A", "logo": "https://hyperswitch.io/favicon.ico", "background_image": { "url": "https://img.freepik.com/free-photo/hand-painted-watercolor-background-with-sky-clouds-shape_24972-1095.jpg", "size": "cover" }, "payment_button_text": "DG Pay now", "business_specific_configs": { "style1": { "enabled_saved_payment_method": true, "theme": "#FEFEFE", "logo": "https://hyperswitch.io/favicon.ico" }, "style2": { "enabled_saved_payment_method": true, "theme": "#1A1A1A", "logo": "https://hyperswitch.io/favicon.ico" } } } }' ``` - Create a payment link using /payments cURL ```curl curl --location --request POST 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_Wnu3HE7zA4MpImfglpdCnSqZ00fL0BVLCj1aNe9TPXldcqXvdHy9nP943V6ud3JB' \ --data-raw '{ "authentication_type": "three_ds", "customer_id": "cus_rFGS1qK0MTSxdj0m5aqo", "profile_id": "pro_Emk2IPwiF6HkSkjTZCIc", "amount": 100, "currency": "HKD", "payment_link": true, "setup_future_usage": "off_session", "description": "This is my description of why this payment was requested.", "connector": [ "adyen" ], "capture_method": "automatic", "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" } }, "email": "john.doe@example.com", "session_expiry": 100000, "return_url": "https://example.com", "payment_link_config": { "theme": "#14356f", "logo": "https://static.wikia.nocookie.net/logopedia/images/4/41/Zurich-1997-Horizontal.png", "seller_name": "Hyperswitch Inc." } }' ``` </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="1657" alt="Screenshot 2024-12-18 at 13 31 13" src="https://github.com/user-attachments/assets/6234bc53-2b1a-485c-b873-04d02ad5d866" /> **Screenshot for secured payment link** <img width="1657" alt="Screenshot 2024-12-18 at 13 31 54" src="https://github.com/user-attachments/assets/fb5e4a80-2382-462c-95fc-b5064103b1ee" /> </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.js` - `crates/router/src/core/payments/transformers.rs` **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:** - Extend existing types with new fields (16 changes) **Detailed Identifier Changes:** Commit 46aad503: Files to modify: **crates/api_models/src/admin.rs** Modify existing code **crates/api_models/src/payments.rs** Modify existing code **crates/diesel_models/src/business_profile.rs** Modify existing code **crates/diesel_models/src/payment_intent.rs** Modify existing code **crates/hyperswitch_domain_models/src/lib.rs** Modify existing code **crates/router/src/core/payment_link.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code
{"pr_number": 6860, "pr_title": "feat(payments): [Payment links] Add config for changing button text for payment links", "merged_at": "2024-12-19T13:28:25Z", "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.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": {"fields_added": 16}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(connector): [TrustPay] Fix status and wasm changes ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description - Fix dynamic fields for SepaBankTransfer - Handle error case Status mapping - Fix wasm Changes for SepaBankTransfer ### 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 MCA for Trustpay ``` curl --location 'http://localhost:8080/account/merchant_1742994781/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "connector_type": "payment_processor", "connector_name": "trustpay", "connector_account_details": { "auth_type": "SignatureKey", "api_key": "_//=", "key1": "_", "api_secret": "_" }, "test_mode": false, "disabled": false, "payment_methods_enabled": [ { "payment_method": "bank_transfer", "payment_method_types": [ { "payment_method_type": "sepa_bank_transfer", "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "instant_bank_transfer", "recurring_enabled": true, "installment_payment_enabled": true ], "metadata":{ "currency_id": 1, "platform_id": 6, "ledger_account_id": "_" } }' ``` 4. Payment Create ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_90I0ZTyI3Fa4Lt90nzaOp9vk5YsvbNSQ8JQm4vHBDURhjNZaaitQDrrXkBYMlrzq' \ --data ' { "amount": 1000, "currency": "EUR", "confirm": false, "payment_link": false, "return_url": "https://duck.com", "capture_method": "automatic", "customer_id": "cus_536w4t5lmEKMxky8xwN0", "description": "Its my first payment request", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "no_three_ds", "name": "John Doe", "phone": "98989898989" }' ``` 5. PML response ``` { "redirect_url": "https://google.com/success", "currency": "EUR", "payment_methods": [ { "payment_method": "bank_transfer", "payment_method_types": [ { "payment_method_type": "sepa_bank_transfer", "payment_experience": null, "card_networks": null, "bank_names": null, "bank_debits": null, "bank_transfers": { "eligible_connectors": [ "trustpay" ] }, "required_fields": { "billing.address.country": { "required_field": "payment_method_data.billing.address.country", "display_name": "country", "field_type": { "user_address_country": { "options": [ "ALL" ] } }, "value": null }, "billing.address.zip": { "required_field": "payment_method_data.billing.address.zip", "display_name": "zip", "field_type": "user_address_pincode", "value": null }, "billing.address.first_name": { "required_field": "payment_method_data.billing.address.first_name", "display_name": "billing_first_name", "field_type": "user_billing_name", "value": null }, "billing.address.last_name": { "required_field": "payment_method_data.billing.address.last_name", "display_name": "billing_last_name", "field_type": "user_billing_name", "value": null }, "email": { "required_field": "email", "display_name": "email", "field_type": "user_email_address", "value": "p143@example.com" }, "billing.address.line1": { "required_field": "payment_method_data.billing.address.line1", "display_name": "line1", "field_type": "user_address_line1", "value": null }, "billing.address.city": { "required_field": "payment_method_data.billing.address.city", "display_name": "city", "field_type": "user_address_city", "value": null } }, "surcharge_details": null, "pm_auth_connector": null }, { "payment_method_type": "instant_bank_transfer", "payment_experience": null, "card_networks": null, "bank_names": null, "bank_debits": null, "bank_transfers": { "eligible_connectors": [ "trustpay" ] }, "required_fields": { "email": { "required_field": "email", "display_name": "email", "field_type": "user_email_address", "value": "p143@example.com" }, "billing.address.line1": { "required_field": "payment_method_data.billing.address.line1", "display_name": "line1", "field_type": "user_address_line1", "value": null }, "billing.address.last_name": { "required_field": "payment_method_data.billing.address.last_name", "display_name": "billing_last_name", "field_type": "user_billing_name", "value": null }, "billing.address.first_name": { "required_field": "payment_method_data.billing.address.first_name", "display_name": "billing_first_name", "field_type": "user_billing_name", "value": null }, "billing.address.city": { "required_field": "payment_method_data.billing.address.city", "display_name": "city", "field_type": "user_address_city", "value": null }, "billing.address.country": { "required_field": "payment_method_data.billing.address.country", "display_name": "country", "field_type": { "user_address_country": { "options": [ "ALL" ] } }, "value": null }, "billing.address.zip": { "required_field": "payment_method_data.billing.address.zip", "display_name": "zip", "field_type": "user_address_pincode", "value": null } }, "surcharge_details": null, "pm_auth_connector": null } ] } ], "mandate_payment": null, "merchant_name": "NewAge Retailer", "show_surcharge_breakup_screen": false, "payment_type": "normal", "request_external_three_ds_authentication": false, "collect_shipping_details_from_wallets": false, "collect_billing_details_from_wallets": false, "is_tax_calculation_enabled": false } ``` ________________________________________________________________________ Test for Psync after confirm call without redirection 1. Payment Create ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_90I0ZTyI3Fa4Lt90nzaOp9vk5YsvbNSQ8JQm4vHBDURhjNZaaitQDrrXkBYMlrzq' \ --data-raw ' { "amount": 1000, "currency": "EUR", "confirm": false, "payment_link": false, "return_url": "https://duck.com", "capture_method": "automatic", "customer_id": "cus_536w4t5lmEKMxky8xwN0", "description": "Its my first payment request", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "no_three_ds", "email": "p143@example.com", "name": "John Doe", "phone": "98989898989", "connector_metadata": { "noon": { "order_category": "pay" } }, "setup_future_usage": "on_session", "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" }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "Ceuta", "zip": "94122", "country": "SK", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "p143@example.com" } }' ``` 2. payment Confirm - instant_bank_transfer ``` curl --location 'http://localhost:8080/payments/pay_C6F36iQW3v1Mk4jE5JSI/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: ______' \ --data ' { "payment_method": "bank_transfer", "payment_method_type": "instant_bank_transfer", "payment_method_data": { "bank_transfer": { "instant_bank_transfer": {} } } }' ``` 3. Psync without completing redirection ``` curl --location 'http://localhost:8080/payments/pay_5lw3r93YnRlLx7JJ849H?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: _' ``` Response ``` { "payment_id": "pay_5lw3r93YnRlLx7JJ849H", "merchant_id": "merchant_1742994781", "status": "requires_customer_action", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 1000, "amount_received": null, "connector": "trustpay", "client_secret": "pay_5lw3r93YnRlLx7JJ849H_secret_qOk0qcaWOgQolwi8UTZT", "created": "2025-03-26T14:53:38.108Z", "currency": "EUR", "customer_id": "cus_536w4t5lmEKMxky8xwN0", "customer": { "id": "cus_536w4t5lmEKMxky8xwN0", "name": "John Doe", "email": "p143@example.com", "phone": "98989898989", "phone_country_code": null }, "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_transfer", "payment_method_data": { "bank_transfer": { "instant_bank_transfer": {} }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "SK", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "Ceuta", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "p143@example.com" }, "order_details": null, "email": "p143@example.com", "name": "John Doe", "phone": "98989898989", "return_url": "https://duck.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_5lw3r93YnRlLx7JJ849H/merchant_1742994781/pay_5lw3r93YnRlLx7JJ849H_1" }, "cancellation_reason": null, "error_code": "1132005", "error_message": "TransactionNotFound", "unified_code": "UE_9000", "unified_message": "Something went wrong", "payment_experience": null, "payment_method_type": "instant_bank_transfer", "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": "3463456165", "frm_message": null, "metadata": null, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "pay" }, "braintree": null }, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_bfO3IrshhzN8spixIFYU", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_mJ7rFHk2BZ8rjzLAbERd", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-03-26T15:08:38.108Z", "fingerprint": null, "browser_info": { "os_type": null, "language": null, "time_zone": null, "ip_address": "::1", "os_version": null, "user_agent": null, "color_depth": null, "device_model": null, "java_enabled": null, "screen_width": null, "accept_header": null, "screen_height": null, "accept_language": "en", "java_script_enabled": null }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-03-26T14:53:44.157Z", "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 } ``` ________________________________________________________________ 1. Create Payment ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: _' \ --data-raw ' { "amount": 1000, "currency": "EUR", "confirm": false, "payment_link": false, "return_url": "https://duck.com", "capture_method": "automatic", "customer_id": "cus_536w4t5lmEKMxky8xwN0", "description": "Its my first payment request", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "no_three_ds", "email": "p143@example.com", "name": "John Doe", "phone": "98989898989", "connector_metadata": { "noon": { "order_category": "pay" } }, "setup_future_usage": "on_session", "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" }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "Ceuta", "zip": "94122", "country": "SK", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "p143@example.com" } }' ``` 2. Confirm Payment - sepa_bank_transfer ``` curl --location 'http://localhost:8080/payments/pay_xo9DAp8Fy9UzjkWIgLKu/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: _' \ --data ' { "payment_method": "bank_transfer", "payment_method_type": "sepa_bank_transfer", "payment_method_data": { "bank_transfer": { "sepa_bank_transfer": {} } } } ' ``` 3. Psync without completing redirection ``` curl --location 'http://localhost:8080/payments/pay_xo9DAp8Fy9UzjkWIgLKu?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_90I0ZTyI3Fa4Lt90nzaOp9vk5YsvbNSQ8JQm4vHBDURhjNZaaitQDrrXkBYMlrzq' ``` Response ``` {"payment_id":"pay_xo9DAp8Fy9UzjkWIgLKu","merchant_id":"merchant_1742994781","status":"processing","amount":1000,"net_amount":1000,"shipping_cost":null,"amount_capturable":1000,"amount_received":null,"connector":"trustpay","client_secret":"pay_xo9DAp8Fy9UzjkWIgLKu_secret_WSUDpkM2fO9vR3lJwiQt","created":"2025-03-26T14:55:39.245Z","currency":"EUR","customer_id":"cus_536w4t5lmEKMxky8xwN0","customer":{"id":"cus_536w4t5lmEKMxky8xwN0","name":"John Doe","email":"p143@example.com","phone":"98989898989","phone_country_code":null},"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_transfer","payment_method_data":{"bank_transfer":{"sepa":{}},"billing":null},"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"SK","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceuta","first_name":"joseph","last_name":"Doe"},"phone":{"number":"8056594427","country_code":"+91"},"email":"p143@example.com"},"order_details":null,"email":"p143@example.com","name":"John Doe","phone":"98989898989","return_url":"https://duck.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":"sepa_bank_transfer","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":"3061758642","frm_message":null,"metadata":null,"connector_metadata":{"apple_pay":null,"airwallex":null,"noon":{"order_category":"pay"},"braintree":null},"feature_metadata":null,"reference_id":null,"payment_link":null,"profile_id":"pro_bfO3IrshhzN8spixIFYU","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_mJ7rFHk2BZ8rjzLAbERd","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-03-26T15:10:39.245Z","fingerprint":null,"browser_info":{"os_type":null,"language":null,"time_zone":null,"ip_address":"::1","os_version":null,"user_agent":null,"color_depth":null,"device_model":null,"java_enabled":null,"screen_width":null,"accept_header":null,"screen_height":null,"accept_language":"en","java_script_enabled":null},"payment_method_id":null,"payment_method_status":null,"updated":"2025-03-26T14:56:25.455Z","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} ``` Here we sometime get processing status by connector, and when we will get error response we have mapped to previous status ____________________________________________________ Success scenario 1. SepaBankTransfer Create + confirm ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: _' \ --data-raw ' { "amount": 6540, "currency": "EUR", "confirm": true, "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": "+1", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://google.com", "payment_method": "bank_transfer", "payment_method_type" :"sepa_bank_transfer", "payment_method_data": { "bank_transfer": { "sepa_bank_transfer": { } } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "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": "ES", "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": "ES", "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" } }' ``` Response ``` { "payment_id": "pay_j6Jw3eeOwrFnkMTzcxMt", "merchant_id": "merchant_1742994781", "status": "requires_customer_action", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 6540, "amount_received": null, "connector": "trustpay", "client_secret": "pay_j6Jw3eeOwrFnkMTzcxMt_secret_HZoeXhgZjBJiN3mEv3LD", "created": "2025-03-26T14:59:20.559Z", "currency": "EUR", "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": "bank_transfer", "payment_method_data": { "bank_transfer": { "sepa": {} }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "ES", "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": "ES", "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_j6Jw3eeOwrFnkMTzcxMt/merchant_1742994781/pay_j6Jw3eeOwrFnkMTzcxMt_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "sepa_bank_transfer", "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": 1743001160, "expires": 1743004760, "secret": "epk_90e0284f3902416fb47ba537b7ebf9c0" }, "manual_retry_allowed": null, "connector_transaction_id": "1246086473", "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_bfO3IrshhzN8spixIFYU", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_mJ7rFHk2BZ8rjzLAbERd", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-03-26T15:14:20.559Z", "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-03-26T14:59:20.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": null, "issuer_error_code": null, "issuer_error_message": null } ``` Complete Redirection 2. Do psync Psync response ``` {"payment_id":"pay_j6Jw3eeOwrFnkMTzcxMt","merchant_id":"merchant_1742994781","status":"processing","amount":6540,"net_amount":6540,"shipping_cost":null,"amount_capturable":6540,"amount_received":null,"connector":"trustpay","client_secret":"pay_j6Jw3eeOwrFnkMTzcxMt_secret_HZoeXhgZjBJiN3mEv3LD","created":"2025-03-26T14:59:20.559Z","currency":"EUR","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":"bank_transfer","payment_method_data":{"bank_transfer":{"sepa":{}},"billing":null},"payment_token":null,"shipping":{"address":{"city":"San Fransico","country":"ES","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":"ES","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":"sepa_bank_transfer","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":"1246086473","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_bfO3IrshhzN8spixIFYU","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_mJ7rFHk2BZ8rjzLAbERd","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-03-26T15:14:20.559Z","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-03-26T15:00:25.635Z","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} ``` instant bank transfer create+ confirm ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_90I0ZTyI3Fa4Lt90nzaOp9vk5YsvbNSQ8JQm4vHBDURhjNZaaitQDrrXkBYMlrzq' \ --data-raw ' { "amount": 6540, "currency": "EUR", "confirm": true, "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": "+1", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://google.com", "payment_method": "bank_transfer", "payment_method_type" :"instant_bank_transfer", "payment_method_data": { "bank_transfer": { "instant_bank_transfer": { } } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "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": "SK", "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": "SK", "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" } }' ``` Response ``` { "payment_id": "pay_Xi9hfKAeDXG1Y2ZDFj16", "merchant_id": "merchant_1742994781", "status": "requires_customer_action", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 6540, "amount_received": null, "connector": "trustpay", "client_secret": "pay_Xi9hfKAeDXG1Y2ZDFj16_secret_Ddc5ZtCoDSJcPIwaJGO5", "created": "2025-03-26T15:01:33.841Z", "currency": "EUR", "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": "bank_transfer", "payment_method_data": { "bank_transfer": { "instant_bank_transfer": {} }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "SK", "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": "SK", "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_Xi9hfKAeDXG1Y2ZDFj16/merchant_1742994781/pay_Xi9hfKAeDXG1Y2ZDFj16_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "instant_bank_transfer", "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": 1743001293, "expires": 1743004893, "secret": "epk_8507cbe0beda44aaa14adb7fa15d7747" }, "manual_retry_allowed": null, "connector_transaction_id": "1871783810", "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_bfO3IrshhzN8spixIFYU", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_mJ7rFHk2BZ8rjzLAbERd", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-03-26T15:16:33.841Z", "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-03-26T15:01:34.166Z", "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 } ``` Complete redirection 2. Do psync Response ``` { "payment_id": "pay_Xi9hfKAeDXG1Y2ZDFj16", "merchant_id": "merchant_1742994781", "status": "processing", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 6540, "amount_received": null, "connector": "trustpay", "client_secret": "pay_Xi9hfKAeDXG1Y2ZDFj16_secret_Ddc5ZtCoDSJcPIwaJGO5", "created": "2025-03-26T15:01:33.841Z", "currency": "EUR", "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": "bank_transfer", "payment_method_data": { "bank_transfer": { "instant_bank_transfer": {} }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "SK", "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": "SK", "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": "1132014", "error_message": "Too many requests for a given ID. Please try again in 00:00:00.3560000", "unified_code": "UE_9000", "unified_message": "Something went wrong", "payment_experience": null, "payment_method_type": "instant_bank_transfer", "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": "1871783810", "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_bfO3IrshhzN8spixIFYU", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_mJ7rFHk2BZ8rjzLAbERd", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-03-26T15:16:33.841Z", "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-03-26T15:02:13.934Z", "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 } ``` ## 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/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - `crates/connector_configs/toml/sandbox.toml` - ... and 2 more files **Code Patterns Applied:** - Extend existing types with new fields (3 changes) **Detailed Identifier Changes:** Commit 86938255: Files to modify: **crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs** Modify existing code **crates/router/src/configs/defaults/payment_connector_required_fields.rs** Modify existing code Commit 27da0af4: Files to modify: **crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs** Modify existing code **crates/router/src/configs/defaults/payment_connector_required_fields.rs** Modify existing code
{"pr_number": 7649, "pr_title": "refactor(connector): [TrustPay] Fix status and wasm changes ", "merged_at": "2025-03-26T18:06:21Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs", "crates/router/src/configs/defaults/payment_connector_required_fields.rs"]}, "change_types": {"fields_added": 3}, "has_identifier_data": true, "commits_matched": 2, "match_method": "pr_number"}
fix(connector): [CYBERSOURCE] Pass transaction type for only wallet MITs ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description This PR introduces the following fix: HS should pass `paymentInformation.tokenizedCard.transactionType` for only wallet MITs. Presently `paymentInformation.tokenizedCard.transactionType` is being passed for card MITs as well, which is incorrect according to cybersource docs. ### 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. Test MIT for connector mandate flow via Cybersource for cards, and check router logs. `paymentInformation.tokenizedCard.transactionType` should not be present. Logs from localhost: <img width="864" height="129" alt="Screenshot 2025-09-18 at 8 18 41 PM" src="https://github.com/user-attachments/assets/8db27d98-4257-4484-bdc3-503f47f9e887" /> 2. Test MIT for setup mandate flow via Cybersource for cards, and check router logs. `paymentInformation.tokenizedCard.transactionType` should not be present. Logs from localhost: <img width="864" height="141" alt="Screenshot 2025-09-18 at 8 37 42 PM" src="https://github.com/user-attachments/assets/d8d1c554-c57b-4e3a-a473-297f427c521c" /> ## 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/cybersource/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (2 changes) **Detailed Identifier Changes:** Commit e29a121b: Files to modify: **crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs** Modify existing code
{"pr_number": 9444, "pr_title": "fix(connector): [CYBERSOURCE] Pass transaction type for only wallet MITs", "merged_at": "2025-09-19T13:08:08Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "connector"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs"]}, "change_types": {"fields_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(connector): Move connectors Datatrans, Paybox, Placetopay, Bluesnap from router crate to hyperswitch_connector crate ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Moving Datatrans, Paybox, Placetopay, Bluesnap from router crate to hyperswitch_connector 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)? --> Bluesnap 1. Merchant Account 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": "merchant_1733471721", "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": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name":"john", "last_name":"Doe" } }, "return_url": "https://google.com/success", "webhook_details": { "webhook_version": "1.0.1", "webhook_username": "ekart_retail", "webhook_password": "password_ekart@123", "webhook_url":"https://webhook.site", "payment_created_enabled": true, "payment_succeeded_enabled": true, "payment_failed_enabled": true }, "sub_merchants_enabled": false, "parent_merchant_id":"merchant_123", "metadata": { "city": "NY", "unit": "245" }, "primary_business_details": [ { "country": "US", "business": "default" } ] }' ``` 2. API Key create: ``` curl --location 'http://localhost:8080/api_keys/merchant_1733471718' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "name": "API Key 1", "description": null, "expiration": "2038-01-19T03:14:08.000Z" }' ``` 3. Payments Connector Create: ``` curl --location 'http://localhost:8080/account/merchant_1733471718/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "connector_type": "payment_processor", "connector_name": "bluesnap", "connector_account_details": { "auth_type": "BodyKey", "key1": "*********", "api_key": "********" }, "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, "accepted_countries": { "type": "disable_only", "list": [ "HK" ] }, "accepted_currencies": { "type": "enable_only", "list": [ "USD", "GBP", "INR" ] } }, { "payment_method_type": "debit", "card_networks": [ "Visa", "Mastercard" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true, "accepted_countries": { "type": "disable_only", "list": [ "HK" ] }, "accepted_currencies": { "type": "enable_only", "list": [ "USD", "GBP", "INR" ] } } ] }, { "payment_method": "pay_later", "payment_method_types": [ { "payment_method_type": "klarna", "payment_experience": "redirect_to_url", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "affirm", "payment_experience": "redirect_to_url", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "afterpay_clearpay", "payment_experience": "redirect_to_url", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "metadata": { "city": "NY", "unit": "245" }, "connector_webhook_details": { "merchant_secret": "MyWebhookSecret" }, "business_country": "US", "business_label": "default" }' ``` 4. Payment Create ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_tPWY3rQZOEH3yvne2TjmwmdiUMEoZWDHiXAnqQYCI1WLD8tTAOz73HUVnP2NapdP' \ --data-raw '{ "amount": 6540, "currency": "USD", "amount_to_capture": 6540, "confirm": true, "profile_id": null, "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", "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": "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 }' ``` Response: ``` { "payment_id": "pay_0ff0Bsh6apC6g9uB7Ucb", "merchant_id": "merchant_1733471718", "status": "succeeded", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6540, "connector": "bluesnap", "client_secret": "pay_0ff0Bsh6apC6g9uB7Ucb_secret_yCNuS9M4bKbIY1IORmyJ", "created": "2024-12-06T07:57:10.872Z", "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": "CREDIT", "card_network": "Visa", "card_issuer": "STRIPE PAYMENTS UK LIMITED", "card_issuing_country": "UNITEDKINGDOM", "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": "token_mXfChlbmpcm0bszGzMx3", "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, "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": "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": 1733471830, "expires": 1733475430, "secret": "epk_900cb6e800c84683b9d6e7329b80de0f" }, "manual_retry_allowed": false, "connector_transaction_id": "1069992070", "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" } }, "feature_metadata": null, "reference_id": "1069992070", "payment_link": null, "profile_id": "pro_124TsP9d0vq1SfNk02kh", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_Uhud5Ut3On6vftqGdGRG", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-12-06T08:12:10.872Z", "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": "2024-12-06T07:57:14.163Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": "test_ord", "order_tax_amount": null, "connector_mandate_id": null } ``` 5. Payments Retreive: ``` curl --location 'http://localhost:8080/payments/pay_0ff0Bsh6apC6g9uB7Ucb?force_sync=true&expand_captures=true&expand_attempts=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_tPWY3rQZOEH3yvne2TjmwmdiUMEoZWDHiXAnqQYCI1WLD8tTAOz73HUVnP2NapdP' ``` Response ``` { "payment_id": "pay_0ff0Bsh6apC6g9uB7Ucb", "merchant_id": "merchant_1733471718", "status": "succeeded", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6540, "connector": "bluesnap", "client_secret": "pay_0ff0Bsh6apC6g9uB7Ucb_secret_yCNuS9M4bKbIY1IORmyJ", "created": "2024-12-06T07:57:10.872Z", "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, "attempts": [ { "attempt_id": "pay_0ff0Bsh6apC6g9uB7Ucb_1", "status": "charged", "amount": 6540, "currency": "USD", "connector": "bluesnap", "error_message": null, "payment_method": "card", "connector_transaction_id": "1069992070", "capture_method": "automatic", "authentication_type": "no_three_ds", "created_at": "2024-12-06T07:57:10.872Z", "modified_at": "2024-12-06T07:57:14.180Z", "cancellation_reason": null, "mandate_id": null, "error_code": null, "payment_token": "token_mXfChlbmpcm0bszGzMx3", "connector_metadata": null, "payment_experience": null, "payment_method_type": "credit", "reference_id": "1069992070", "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": "4242", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "STRIPE PAYMENTS UK LIMITED", "card_issuing_country": "UNITEDKINGDOM", "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": "token_mXfChlbmpcm0bszGzMx3", "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, "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": "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": null, "manual_retry_allowed": false, "connector_transaction_id": "1069992070", "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" } }, "feature_metadata": null, "reference_id": "1069992070", "payment_link": null, "profile_id": "pro_124TsP9d0vq1SfNk02kh", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_Uhud5Ut3On6vftqGdGRG", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-12-06T08:12:10.872Z", "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_WxMaNbb2RnrDW7BwG42N", "payment_method_status": "active", "updated": "2024-12-06T07:57:14.163Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": "test_ord", "order_tax_amount": null, "connector_mandate_id": null } ``` --- 2. Paybox: Payment Connector Create: ``` { "connector_type": "payment_processor", "connector_name": "datatrans", "connector_account_details": { "auth_type": "BodyKey", "key1": "hidden", "api_key": "hidden" }, "test_mode": false, "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" } } ``` Payments Create: Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_P1heFBcrJN6rygECCa2nY1FpksdWWwOv3cMhESdNurWrZgfdI46hhyKIk1SzvoNy' \ --data-raw '{ "amount": 1234, "currency": "USD", "confirm": true, "email": "p1qqdwxsdw43@example.com", "authentication_type": "no_three_ds", "payment_method": "card", "payment_method_type": "debit", "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "06", "card_exp_year": "2025", "card_holder_name": "John Doe", "card_cvc": "975" } } }' ``` Response: ``` { "payment_id": "pay_Wh6vQU7MEawVULtkdqOa", "merchant_id": "merchant_1733745720", "status": "succeeded", "amount": 1234, "net_amount": 1234, "shipping_cost": null, "amount_capturable": 0, "amount_received": 1234, "connector": "datatrans", "client_secret": "pay_Wh6vQU7MEawVULtkdqOa_secret_SDr4aNY3XHI0EGsPQqna", "created": "2024-12-09T12:07:40.471Z", "currency": "USD", "customer_id": null, "customer": { "id": null, "name": null, "email": "p1qqdwxsdw43@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": "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": "2025", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": 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": "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": "241209130740638496", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_QxhsX7qdij93dhXZ2s9Y", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_kJYzhfkQOToFnpcCNXFF", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-12-09T12:22:40.471Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2024-12-09T12:07:40.884Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` 3. Paybox: Payment Connector Create: ``` { "connector_type": "payment_processor", "connector_name": "paybox", "connector_account_details": { "auth_type": "MultiAuthKey", "api_key": "hidden", "key1": "hidden", "api_secret": "hidden", "key2":"hidden" }, "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, "accepted_countries": { "type": "enable_only", "list": [ "US" ] } }, { "payment_method_type": "debit", "card_networks": [ "Visa", "Mastercard" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true, "accepted_countries": { "type": "enable_only", "list": [ "US" ] } } ] } ], "connector_webhook_details": { "merchant_secret": "MyWebhookSecret" }, "business_country": "US", "business_label": "default" } ``` Payments Create: Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_NplkxQ8Lo7HNh1Dh8futGetrXKaqWzN7V0hRmr7GOtm3scEsSIe3Qo0hpXPTi3zm' \ --data-raw '{ "amount": 500, "currency": "EUR", "confirm": true, "capture_method": "automatic", "authentication_type": "no_three_ds", "customer_id": "abcdef", "email": "guest@example.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "5200000000000007", "card_exp_month": "01", "card_exp_year": "26", "card_holder_name": "John Doe", "card_cvc": "123" } } }' ``` Response: ``` { "payment_id": "pay_ZhtVT1EprfMuMobjBjzW", "merchant_id": "merchant_1733746240", "status": "succeeded", "amount": 500, "net_amount": 500, "shipping_cost": null, "amount_capturable": 0, "amount_received": 500, "connector": "paybox", "client_secret": "pay_ZhtVT1EprfMuMobjBjzW_secret_lzYvpxiqYBWG7Njap3Ux", "created": "2024-12-09T12:13:35.920Z", "currency": "EUR", "customer_id": "abcdef", "customer": { "id": "abcdef", "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": "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": "26", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": "token_5QPn9srKeNDiyYkmeDRx", "shipping": null, "billing": null, "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": "abcdef", "created_at": 1733746415, "expires": 1733750015, "secret": "epk_547111b48c3d45b895d5b012287b8ba9" }, "manual_retry_allowed": false, "connector_transaction_id": "0080283777", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_0d0C3NhGL1jaw8gmRm3s", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_QH3dxu7K6VWFTUExK71o", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-12-09T12:28:35.919Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2024-12-09T12:13:37.610Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` Note: Placetopay cannot be tested due to unavailability of connector credentials ## 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/connector_integration_v2_impls.rs` - `crates/router/src/core/payments/flows.rs` **2. External Connector Integration** - `crates/hyperswitch_connectors/Cargo.toml` - `crates/hyperswitch_connectors/src/connectors.rs` - `crates/router/src/connector/bluesnap.rs` - ... and 13 more files **3. Utils** - `crates/common_utils/src/consts.rs` **4. Other** - `Cargo.lock` - `crates/router/src/consts.rs` **Code Patterns Applied:** - Define new data structures (4 changes) - Implement new functions (19 changes) - Extend existing types with new fields (382 changes) - Add conditional logic for feature flags or filtering (3 changes) **Detailed Identifier Changes:** Commit da5c34a3: Files to modify: **crates/common_utils/src/consts.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors.rs** Add: - mod: pub::bluesnap - mod: pub::datatrans - mod: pub::paybox - mod: pub::placetopay **crates/hyperswitch_connectors/src/connectors/gocardless/transformers.rs** Remove: - impl: impl TryFrom<(&api::CurrencyUnit, Currency, i64, T)> for GocardlessRouterData<T> Add: - impl: impl TryFrom<(&api::CurrencyUnit, enums::Currency, i64, T)> for GocardlessRouterData<T> **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code **crates/hyperswitch_connectors/src/default_implementations_v2.rs** Modify existing code **crates/hyperswitch_connectors/src/types.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Add: - function: pub::to_currency_lower_unit - function: private::get_connector_error_type - function: pub::get_error_code_error_message_based_on_priority - function: private::from - function: pub::generate_random_bytes - function: private::is_cit_mandate_payment - function: private::is_cit_mandate_payment - struct: pub::ErrorCodeAndMessage - struct: pub::GooglePayWalletData - struct: pub::GooglePayPaymentMethodInfo - struct: pub::GpayTokenizationData - enum: pub::ConnectorErrorType - trait: pub::ConnectorErrorTypeMapping - impl: impl From<payment_method_data::GooglePayWalletData> for GooglePayWalletData **crates/router/src/connector.rs** Remove: - mod: pub::bluesnap - mod: pub::datatrans - mod: pub::paybox - mod: pub::placetopay **crates/router/src/consts.rs** Modify existing code **crates/router/src/core/payments/connector_integration_v2_impls.rs** Modify existing code **crates/router/src/core/payments/flows.rs** Modify existing code
{"pr_number": 6730, "pr_title": "refactor(connector): Move connectors Datatrans, Paybox, Placetopay, Bluesnap from router crate to hyperswitch_connector crate", "merged_at": "2024-12-12T07:45:33Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/connector_integration_v2_impls.rs", "crates/router/src/core/payments/flows.rs"], "connectors": ["crates/hyperswitch_connectors/Cargo.toml", "crates/hyperswitch_connectors/src/connectors.rs", "crates/router/src/connector/bluesnap.rs", "crates/router/src/connector/bluesnap/transformers.rs", "crates/router/src/connector/datatrans.rs", "crates/router/src/connector/datatrans/transformers.rs", "crates/hyperswitch_connectors/src/connectors/gocardless/transformers.rs", "crates/router/src/connector/paybox.rs", "crates/router/src/connector/paybox/transformers.rs", "crates/router/src/connector/placetopay.rs", "crates/router/src/connector/placetopay/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/hyperswitch_connectors/src/default_implementations_v2.rs", "crates/hyperswitch_connectors/src/types.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/router/src/connector.rs"], "utils": ["crates/common_utils/src/consts.rs"], "other": ["Cargo.lock", "crates/router/src/consts.rs"]}, "change_types": {"structs_added": 4, "functions_added": 19, "enums_added": 1, "fields_added": 382, "imports_added": 46, "conditionals_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(routing): add profile config to switch between HS routing and DE routing result - [ ] Bugfix - [ ] New feature - [X] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This pull request introduces a new field, `routing_result_source`, across various structs and enums in the codebase to specify the source of routing decision results. This field allows for flexibility in choosing between Hyperswitch's inbuilt routing engine and an external decision engine. The changes span multiple modules, including API models, database models, and domain models. Also, while creating the routing rule decision engine rule_id will be prefilled with the hyperswitch rule_id, so both systems will have the same id ### 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). --> Add profile-level config to choose between Hyperswitch routing result and Decision engine routing result ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> 1. Create a merchant account, API key, profile, connector <details> <summary>2. Create Routing Rule </summary> Request curl --location 'http://localhost:8080/routing' \ --header 'X-Profile-Id: pro_Wt98jyZeU8jaQ3cr9zDP' \ --header 'api-key: dev_yUplJwLqvtAJiqOMmiamv78Xj9k1DkaEK3kxRExy4baMX4tsSVpEm55eTohlaifG' \ --data '{ "name": "Rule Based Routing-2025-05-07", "description": "This is a rule based routing created at Wed, 07 May 2025 13:03:39 GMT", "profile_id": "pro_Wt98jyZeU8jaQ3cr9zDP", "algorithm": { "type": "advanced", "data": { "defaultSelection": { "type": "priority", "data": [] }, "metadata": {}, "rules": [ { "name": "rule_1", "connectorSelection": { "type": "priority", "data": [ { "connector": "cybersource", "merchant_connector_id": "mca_EU1XaLVDXZumYK8r3ft7" } ] }, "statements": [ { "condition": [ { "lhs": "billing_country", "comparison": "equal", "value": { "type": "enum_variant", "value": "India" }, "metadata": {} } ], "nested": null } ] } ] } } }' Response { "id": "routing_rFQyeEY3ujqyjtjJIlDB", "profile_id": "pro_Wt98jyZeU8jaQ3cr9zDP", "name": "Rule Based Routing-2025-05-07", "kind": "advanced", "description": "This is a rule based routing created at Wed, 07 May 2025 13:03:39 GMT", "created_at": 1750082560, "modified_at": 1750082560, "algorithm_for": "payment", "decision_engine_routing_id": "routing_rFQyeEY3ujqyjtjJIlDB" } </details> <details> <summary>3. List Routing Rules </summary> Request curl --location 'http://localhost:8080/configs/' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "key": "routing_result_source_pro_Wt98jyZeU8jaQ3cr9zDP", "value": "decision_engine" }' Response { key: "routing_result_source_pro_Wt98jyZeU8jaQ3cr9zDP", value: "decision_engine" } Rules are getting fetched from hyperswitch <img width="1324" alt="Screenshot 2025-06-16 at 7 35 55 PM" src="https://github.com/user-attachments/assets/2b655974-444f-4bf4-8b14-2f6f0b10f055" /> </details> <details> <summary>4. Change Profile config to use decision engine result directly </summary> Request curl --location 'http://localhost:8080/account/merchant_1750082519/business_profile/pro_Wt98jyZeU8jaQ3cr9zDP' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_j1154b6pVqBwC32eFEcQDZDIBKGGEBT3zh3VMi3cWUpFcurnQqBD2SDLXmFbaJem' \ --data '{ "dynamic_routing_algorithm": { "routing_result_source": "decision_engine" } }' Response { "merchant_id": "merchant_1750082519", "profile_id": "pro_Wt98jyZeU8jaQ3cr9zDP", "profile_name": "1750082525", "return_url": "https://google.com/success", "enable_payment_response_hash": true, "payment_response_hash_key": "MkZkTPS7BIusBLHYEmQCKB0FaGiTkTsASUBTQCfuEuGwCRrN9zso4M0qIOKValbF", "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": null, "is_iframe_redirection_enabled": null, "merchant_category_code": null } </details> <details> <summary>5. List Routing Rules again</summary> This time result from the decision engine should be used to return results Request curl --location 'http://localhost:8080/routing/list/profile?limit=100' \ --header 'sec-ch-ua-platform: "macOS"' \ --header 'Referer: https://app.hyperswitch.io/dashboard/routing' \ --header 'sec-ch-ua: "Chromium";v="136", "Google Chrome";v="136", "Not.A/Brand";v="99"' \ --header 'X-Profile-Id: pro_Wt98jyZeU8jaQ3cr9zDP' \ --header 'sec-ch-ua-mobile: ?0' \ --header 'api-key: dev_yUplJwLqvtAJiqOMmiamv78Xj9k1DkaEK3kxRExy4baMX4tsSVpEm55eTohlaifG' \ --header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36' \ --header 'Content-Type: application/json' Response [ { "id": "routing_rFQyeEY3ujqyjtjJIlDB", "profile_id": "pro_Wt98jyZeU8jaQ3cr9zDP", "name": "Rule Based Routing-2025-05-07", "kind": "advanced", "description": "This is a rule based routing created at Wed, 07 May 2025 13:03:39 GMT", "created_at": 1750082560, "modified_at": 1750082560, "algorithm_for": "payment", "decision_engine_routing_id": null } ] <img width="1320" alt="Screenshot 2025-06-16 at 7 37 57 PM" src="https://github.com/user-attachments/assets/df30369e-30b8-4565-ab29-c5289305409e" /> </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. API Request/Response Models** - `crates/api_models/src/open_router.rs` - `crates/api_models/src/routing.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/business_profile.rs` **3. Core Business Logic** - `crates/router/src/core/payments/routing.rs` - `crates/router/src/core/payments/routing/utils.rs` - `crates/router/src/core/routing.rs` - ... and 1 more files **Code Patterns Applied:** - Define new data structures (2 changes) - Implement new functions (17 changes) - Extend existing types with new fields (71 changes) - Add conditional logic for feature flags or filtering (8 changes) - Modify database queries (10 changes) **Detailed Identifier Changes:** Commit a721d90c: Files to modify: **crates/api_models/src/open_router.rs** Add: - struct: pub::GetDecisionEngineConfigRequest - enum: pub::DecisionEngineDynamicAlgorithmType **crates/api_models/src/routing.rs** Add: - enum: pub::RoutingResultSource **crates/hyperswitch_domain_models/src/business_profile.rs** Add: - function: pub::get_payment_routing_algorithm - function: pub::get_payout_routing_algorithm - function: pub::get_frm_routing_algorithm **crates/router/src/core/payments/routing.rs** Modify existing code **crates/router/src/core/payments/routing/utils.rs** Remove: - function: private::send_decision_engine_request_without_response_parsing - function: private::send_decision_engine_request_without_response_parsing - function: private::send_decision_engine_request_without_response_parsing Add: - function: private::list_de_euclid_active_routing_algorithm - function: private::deserialize_connector_choices - function: private::from - struct: pub::DeRoutableConnectorChoice **crates/router/src/core/routing.rs** Add: - function: private::build_list_routing_result **crates/router/src/core/routing/helpers.rs** Add: - function: pub::get_decision_engine_active_dynamic_routing_algorithm
{"pr_number": 8350, "pr_title": "feat(routing): add profile config to switch between HS routing and DE routing result", "merged_at": "2025-06-20T13:20:57Z", "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/routing.rs"], "domain": ["crates/hyperswitch_domain_models/src/business_profile.rs"], "core_business": ["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"]}, "change_types": {"structs_added": 2, "functions_added": 17, "enums_added": 3, "fields_added": 71, "imports_added": 6, "conditionals_added": 8, "database_queries": 10}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(relay): populate connector metadata in the refunds 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 --> Some connector requires connector metadata in the refund flow. Example adyen requires `endpoint_prefix`. Hence this change is to populate the connector metadata in the relay refunds flow. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- 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). --> Some connector like adyen requires the connector metadata in order to perform the refund. ## 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 adyen merchant connector account with `endpoint_prefix` in the metadata -> 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: ' \ --data-raw '{ "amount": 100, "amount_to_capture": 100, "currency": "USD", "confirm": true, "capture_method": "automatic", "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_1737027612", "return_url": "http://127.0.0.1:4040", "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_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "card_cvc": "737" } }, "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" }, "routing": { "type": "single", "data": { "connector": "cybersource", "merchant_connector_id": "mca_8W0CQfwE89J1BJBbpcnt" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` ``` { "payment_id": "pay_8jnUUY21QbQQUYZw3oXp", "merchant_id": "merchant_1737026210", "status": "succeeded", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 0, "amount_received": 100, "connector": "adyen", "client_secret": "pay_8jnUUY21QbQQUYZw3oXp_secret_gCitDmBCSL1rf57aWz2x", "created": "2025-01-16T11:17:06.935Z", "currency": "USD", "customer_id": "cu_1737026227", "customer": { "id": "cu_1737026227", "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": "1111", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "411111", "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": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cu_1737026227", "created_at": 1737026226, "expires": 1737029826, "secret": "epk_60cc9662baa0498baf38418e6012aec4" }, "manual_retry_allowed": false, "connector_transaction_id": "JTP7LKV93245FNV5", "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_8jnUUY21QbQQUYZw3oXp_1", "payment_link": null, "profile_id": "pro_G34dqlGIBvt43dRfzHqg", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_ElpENwTfGeuTBYpCz0mq", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-01-16T11:32:06.935Z", "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-01-16T11:17:08.458Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` -> With the above connector reference id perform the relay refund ``` curl --location 'http://localhost:8080/relay' \ --header 'Content-Type: application/json' \ --header 'x-profile-id: pro_G34dqlGIBvt43dRfzHqg' \ --header 'api-key:' \ --data '{ "connector_id": "mca_ElpENwTfGeuTBYpCz0mq", "connector_resource_id": "JTP7LKV93245FNV5", "data": { "refund": { "amount": 1, "currency": "USD" } }, "type": "refund" }' ``` ``` { "id": "relay_IzveULiShYKchIM8AL8Q", "status": "pending", "connector_resource_id": "JTP7LKV93245FNV5", "error": null, "connector_reference_id": "STZLZN7FSHSXRCV5", "connector_id": "mca_ElpENwTfGeuTBYpCz0mq", "profile_id": "pro_G34dqlGIBvt43dRfzHqg", "type": "refund", "data": { "refund": { "amount": 1, "currency": "USD", "reason": 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/relay/utils.rs` **Code Patterns Applied:** - Extend existing types with new fields (1 changes) **Detailed Identifier Changes:** Commit e38078f1: Files to modify: **crates/router/src/core/relay/utils.rs** Modify existing code
{"pr_number": 7045, "pr_title": "fix(relay): populate connector metadata in the refunds flow", "merged_at": "2025-01-19T14:14:43Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/relay/utils.rs"]}, "change_types": {"fields_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [AUTHORIZEDOTNET] Populated merchant required fields in setupmandate 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 --> Previously we were not sending some customer's details (email, shipping details) in the payload while creating the customer and thus merchant was not able to see the details in connector dashboard, this PR passes the fields and thus visible in the dashboard as well. Populated description as None, because passing email and description together was throwing error considering it an invalid field. Have raised a query with authorize.NET for same. ### 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)? --> Previously we were not sending some customer's details (email, shipping details) in the while creating the customer and thus merchant was not able to see the details in connector dashboard, this PR passes the fields and thus visible in the dashboard as well. ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_VXSrYYAUIpSs2kzGeGUYR2iQRuMwMW3KXTTNYetsa2AtH4WNILp16V2k0fQlijtG' \ --data-raw ' { "amount": 0, "currency": "USD", "confirm": true, "customer_id": "tester123C", "email": "johndoe@gmail.com", "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" } } } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "John", "last_name": "Doe" }, "email":"johndoe@gmail.com" } }' ``` ``` {"payment_id":"pay_XavQKzhEkDEY7aFf2dwo","merchant_id":"merchant_1752151744","status":"succeeded","amount":0,"net_amount":0,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"authorizedotnet","client_secret":"pay_XavQKzhEkDEY7aFf2dwo_secret_KXJBxcksN6IKZoCupdJS","created":"2025-07-11T13:03:06.550Z","currency":"USD","customer_id":"tester123C","customer":{"id":"tester123C","name":null,"email":"johndoe@gmail.com","phone":null,"phone_country_code":null},"description":null,"refunds":null,"disputes":null,"mandate_id":"man_MhdFRQMHMNhdRuRgD5PD","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":"CREDIT","card_network":"Visa","card_issuer":"JP Morgan","card_issuing_country":"INDIA","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":"johndoe@gmail.com"},"billing":null,"order_details":null,"email":"johndoe@gmail.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":"tester123C","created_at":1752238986,"expires":1752242586,"secret":"epk_e8ecb65babdd45f1bcb40c650f9501f0"},"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_wUwOOdqvK0JFEBlK5BhR","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_pJM3Sz2vcdU7NWLVAggw","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-11T13:18:06.550Z","fingerprint":null,"browser_info":null,"payment_method_id":"pm_n1jAH07DXUwI70oEOPkk","payment_method_status":"active","updated":"2025-07-11T13:03:07.233Z","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":"931873326-931150437","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} ``` <img width="692" height="56" alt="Screenshot 2025-07-11 at 6 44 48 PM" src="https://github.com/user-attachments/assets/052f84ca-cbc3-4945-a154-4497182c58be" /> <img width="790" height="697" alt="Screenshot 2025-07-11 at 6 44 57 PM" src="https://github.com/user-attachments/assets/d0df9d79-48ba-4163-aa2f-b4eac486a008" /> ## 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/router_request_types.rs` **2. Core Business Logic** - `crates/router/src/core/payments/transformers.rs` **3. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs` **Code Patterns Applied:** - Define new data structures (1 changes) - Extend existing types with new fields (48 changes) **Detailed Identifier Changes:** Commit cb8dff00: Files to modify: **crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs** Add: - struct: pub::ShipToList **crates/hyperswitch_domain_models/src/router_request_types.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code
{"pr_number": 8618, "pr_title": "feat(connector): [AUTHORIZEDOTNET] Populated merchant required fields in setupmandate flow", "merged_at": "2025-07-14T07:33:35Z", "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/payments/transformers.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs"]}, "change_types": {"structs_added": 1, "fields_added": 48}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [fiuu] update PSync and webhooks response ## 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/7211 ### 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 Helps fix Fiuu connector specifically for DuitNow. ## How did you test it? DuitNow cannot be tested. Updated based on API documentation. ## 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/fiuu.rs` - `crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (6 changes) **Detailed Identifier Changes:** Commit 1f30db2d: Files to modify: **crates/hyperswitch_connectors/src/connectors/fiuu.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs** Modify existing code
{"pr_number": 7242, "pr_title": "fix(connector): [fiuu] update PSync and webhooks response", "merged_at": "2025-02-11T11:32:38Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["connector"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/fiuu.rs", "crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs"]}, "change_types": {"fields_added": 6}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
build(docker): specify user for runner stage ## 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 modifies the `Dockerfile` to specify the user at runner stage. ### 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). --> From the security perspective, it is better to be a `user` rather than being a `root`. Closes https://github.com/juspay/hyperswitch/issues/7643 ## 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)? --> build succeeded (tested by making a debug build): ![image](https://github.com/user-attachments/assets/3c27cbe1-56fa-48b9-a4bb-4a5ebb59563c) ```sh podman build \ --load \ --file Dockerfile \ --build-arg "BINARY=router" \ --tag hyperswitch-router \ . ``` ## 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** - `Dockerfile`
{"pr_number": 7641, "pr_title": "build(docker): specify user for runner stage", "merged_at": "2025-03-27T09:20:47Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"other": ["Dockerfile"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix: Disable UCS PSync call for Cashtocode ## 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 --> Cashtocode does not support PSync. When a PSync call is processed via Hyperswitch, the RouterData remains unchanged (payment status is not modified). However, when the same PSync call goes via UCS, UCS returns an error response. This causes inconsistent behavior between Hyperswitch and UCS flows. To replicate Hyperswitch behavior when authorize was done through UCS: - Introduced configuration "ucs_psync_disabled_connectors" under grpc_client.unified_connector_service. - During call_unified_connector_service, we check if the connector is listed in "ucs_psync_disabled_connectors". If the connector is present, UCS PSync call is skipped, and unmodified RouterData is returned (same as Hyperswitch behavior). ### 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 evoucher payment through UCS for Cashtocode. <details> <summary>Enable Payments via UCS</summary> ```sh curl --location 'http://localhost:8080/configs/' \ --header 'Content-Type: application/json' \ --header 'api-key: ' \ --header 'x-tenant-id: public' \ --data '{ "key": "ucs_rollout_config_merchant_1756446892_cashtocode_reward_Authorize", "value": "1" }' ``` </details> <details> <summary>Create Payment Evoucher For Cashtocode</summary> Request ```json { "amount": 1000, "currency": "USD", "confirm": true, "payment_method_data": "reward", "payment_method_type": "evoucher", "payment_method":"reward", "capture_method": "automatic", "browser_info": { "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1.2 Safari/605.1.15", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "en-US", "color_depth": 24, "screen_height": 1117, "screen_width": 1728, "time_zone": -330, "java_enabled": true, "java_script_enabled": true }, "customer_id": "cus_5ZiQdWmdv9efuLCPWeoN", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://www.google.com", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "sundari" }, "phone": { "number": "1233456789", "country_code": "+1" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "sundari" }, "phone": { "number": "1233456789", "country_code": "+1" } } } ``` Response ```json { "payment_id": "pay_zBEXBJSHcgiiBihUBZd6", "merchant_id": "merchant_1756640756", "status": "requires_customer_action", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 1000, "amount_received": null, "connector": "cashtocode", "client_secret": "pay_zBEXBJSHcgiiBihUBZd6_secret_OuxmlTO7YOGOVWzXAFB2", "created": "2025-08-31T12:04:05.954Z", "currency": "USD", "customer_id": "cus_5ZiQdWmdv9efuLCPWeoN", "customer": { "id": "cus_5ZiQdWmdv9efuLCPWeoN", "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": "reward", "payment_method_data": "reward", "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "sundari", "last_name": null, "origin_zip": null }, "phone": { "number": "1233456789", "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": "sundari", "last_name": null, "origin_zip": null }, "phone": { "number": "1233456789", "country_code": "+1" }, "email": null }, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://www.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_zBEXBJSHcgiiBihUBZd6/merchant_1756640756/pay_zBEXBJSHcgiiBihUBZd6_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "evoucher", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cus_5ZiQdWmdv9efuLCPWeoN", "created_at": 1756641845, "expires": 1756645445, "secret": "epk_47eacc344437434e97664bd6b3e2722a" }, "manual_retry_allowed": null, "connector_transaction_id": "pay_zBEXBJSHcgiiBihUBZd6_1", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": { "redirect_response": null, "search_tags": null, "apple_pay_recurring_details": null, "gateway_system": "unified_connector_service" }, "reference_id": null, "payment_link": null, "profile_id": "pro_MrgPu8NG45h4Ea7ah7kC", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_mRMHa49InsH1tw9OQKXk", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-31T12:19:05.954Z", "fingerprint": null, "browser_info": { "language": "en-US", "time_zone": -330, "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1.2 Safari/605.1.15", "color_depth": 24, "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": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-31T12:04:06.829Z", "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": "{\"payUrl\":\"https://cluster05.api-test.cashtocode.com/paytoken/redirect?token=ODJkYzNkOTAtZDk3Mi00MWQ1LThlMjItNTMyYzM3ZmQyZDYw\"}", "enable_partial_authorization": null } ``` </details> Do a PSync. <details> <summary>PSync repsponse</summary> ```json { "payment_id": "pay_zBEXBJSHcgiiBihUBZd6", "merchant_id": "merchant_1756640756", "status": "requires_customer_action", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 1000, "amount_received": null, "connector": "cashtocode", "client_secret": "pay_zBEXBJSHcgiiBihUBZd6_secret_OuxmlTO7YOGOVWzXAFB2", "created": "2025-08-31T12:04:05.954Z", "currency": "USD", "customer_id": "cus_5ZiQdWmdv9efuLCPWeoN", "customer": { "id": "cus_5ZiQdWmdv9efuLCPWeoN", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "attempts": [ { "attempt_id": "pay_zBEXBJSHcgiiBihUBZd6_1", "status": "authentication_pending", "amount": 1000, "order_tax_amount": null, "currency": "USD", "connector": "cashtocode", "error_message": null, "payment_method": "reward", "connector_transaction_id": "pay_zBEXBJSHcgiiBihUBZd6_1", "capture_method": "automatic", "authentication_type": "no_three_ds", "created_at": "2025-08-31T12:04:05.955Z", "modified_at": "2025-08-31T12:04:43.026Z", "cancellation_reason": null, "mandate_id": null, "error_code": null, "payment_token": null, "connector_metadata": null, "payment_experience": null, "payment_method_type": "evoucher", "reference_id": null, "unified_code": null, "unified_message": null, "client_source": null, "client_version": null } ], "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "reward", "payment_method_data": "reward", "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "sundari", "last_name": null, "origin_zip": null }, "phone": { "number": "1233456789", "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": "sundari", "last_name": null, "origin_zip": null }, "phone": { "number": "1233456789", "country_code": "+1" }, "email": null }, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://www.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_zBEXBJSHcgiiBihUBZd6/merchant_1756640756/pay_zBEXBJSHcgiiBihUBZd6_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "evoucher", "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": "pay_zBEXBJSHcgiiBihUBZd6_1", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": { "redirect_response": null, "search_tags": null, "apple_pay_recurring_details": null, "gateway_system": "unified_connector_service" }, "reference_id": null, "payment_link": null, "profile_id": "pro_MrgPu8NG45h4Ea7ah7kC", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_mRMHa49InsH1tw9OQKXk", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-31T12:19:05.954Z", "fingerprint": null, "browser_info": { "language": "en-US", "time_zone": -330, "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1.2 Safari/605.1.15", "color_depth": 24, "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": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-31T12:04:54.483Z", "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 } ``` </details> <img width="1203" height="51" alt="Screenshot 2025-08-31 at 5 26 20 PM" src="https://github.com/user-attachments/assets/62cc23de-bcf9-4b65-bb32-df7776c92556" /> ## 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/flows/psync_flow.rs` **2. External Connector Integration** - `crates/external_services/src/grpc_client/unified_connector_service.rs` **3. Tests** - `config/deployments/integration_test.toml` **4. Configuration Files** - `config/config.example.toml` - `config/deployments/env_specific.toml` - `config/deployments/production.toml` - ... and 2 more files **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 7c6e5f6e: Files to modify: **crates/external_services/src/grpc_client/unified_connector_service.rs** Modify existing code **crates/router/src/core/payments/flows/psync_flow.rs** Modify existing code
{"pr_number": 9093, "pr_title": "fix: Disable UCS PSync call for Cashtocode", "merged_at": "2025-09-02T14:46:21Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/flows/psync_flow.rs"], "connectors": ["crates/external_services/src/grpc_client/unified_connector_service.rs"], "tests": ["config/deployments/integration_test.toml"], "config": ["config/config.example.toml", "config/deployments/env_specific.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml"]}, "change_types": {"fields_added": 1, "imports_added": 1, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(routing): build the gRPC interface for communicating with the external service to perform elimination routing ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description build the gRPC interface for communicating with the external service to perform elimination routing ### 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? - Communication is being established with dynamo <img width="1705" alt="Screenshot 2024-12-05 at 6 03 54 PM" src="https://github.com/user-attachments/assets/09c62052-6c86-47a2-b03f-da0c2835df55"> ## 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/routing.rs` **2. Core Business Logic** - `crates/router/src/core/payments/routing.rs` - `crates/router/src/core/routing.rs` - `crates/router/src/core/routing/helpers.rs` **3. Other** - `crates/external_services/build.rs` - `crates/external_services/src/grpc_client/dynamic_routing.rs` - `crates/external_services/src/grpc_client/dynamic_routing/elimination_rate_client.rs` - ... and 2 more files **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (17 changes) - Extend existing types with new fields (60 changes) **Detailed Identifier Changes:** Commit 2a66f4a3: Files to modify: **crates/api_models/src/routing.rs** Add: - function: pub::new - struct: pub::RoutableConnectorChoiceWithBucketName - impl: impl RoutableConnectorChoiceWithBucketName **crates/external_services/build.rs** Modify existing code **crates/external_services/src/grpc_client/dynamic_routing.rs** Remove: - function: private::calculate_success_rate - function: private::update_success_rate - function: private::invalidate_success_rate_routing_keys - function: private::foreign_try_from - function: private::foreign_try_from - trait: pub::SuccessBasedDynamicRouting - impl: impl SuccessBasedDynamicRouting for SuccessRateCalculatorClient<Client> - impl: impl ForeignTryFrom<CurrentBlockThreshold> for DynamicCurrentThreshold - impl: impl ForeignTryFrom<SuccessBasedRoutingConfigBody> for UpdateSuccessRateWindowConfig - mod: pub::success_rate Add: - mod: pub::elimination_rate_client - mod: pub::success_rate_client **crates/external_services/src/grpc_client/dynamic_routing/elimination_rate_client.rs** Add: - function: private::perform_elimination_routing - function: private::update_elimination_bucket_config - function: private::invalidate_elimination_bucket - function: private::foreign_try_from - trait: pub::EliminationBasedRouting - impl: impl EliminationBasedRouting for EliminationAnalyserClient<Client> - impl: impl ForeignTryFrom<EliminationConfig> for EliminationBucketConfig - mod: pub::elimination_rate **crates/external_services/src/grpc_client/dynamic_routing/success_rate_client.rs** Add: - function: private::calculate_success_rate - function: private::update_success_rate - function: private::invalidate_success_rate_routing_keys - function: private::foreign_try_from - function: private::foreign_try_from - function: private::foreign_try_from - trait: pub::SuccessBasedDynamicRouting - impl: impl SuccessBasedDynamicRouting for SuccessRateCalculatorClient<Client> - impl: impl ForeignTryFrom<CurrentBlockThreshold> for DynamicCurrentThreshold - impl: impl ForeignTryFrom<SuccessBasedRoutingConfigBody> for UpdateSuccessRateWindowConfig - impl: impl ForeignTryFrom<SuccessBasedRoutingConfigBody> for CalSuccessRateConfig - mod: pub::success_rate **crates/router/src/core/payments/routing.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": 6672, "pr_title": "feat(routing): build the gRPC interface for communicating with the external service to perform elimination routing", "merged_at": "2024-12-13T05:41:41Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"api_models": ["crates/api_models/src/routing.rs"], "core_business": ["crates/router/src/core/payments/routing.rs", "crates/router/src/core/routing.rs", "crates/router/src/core/routing/helpers.rs"], "other": ["crates/external_services/build.rs", "crates/external_services/src/grpc_client/dynamic_routing.rs", "crates/external_services/src/grpc_client/dynamic_routing/elimination_rate_client.rs", "crates/external_services/src/grpc_client/dynamic_routing/success_rate_client.rs", "proto/elimination_rate.proto"]}, "change_types": {"structs_added": 1, "functions_added": 17, "enums_added": 2, "fields_added": 60, "imports_added": 12}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(payment-link): alternate text for manual captures ## 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 --> Payment links will have `Add Payment Method` as button text in case merchant send is_setup_mandate_flow as `true` in payment_link_config, `Authorize Payment` in case of manual capture payments and `Pay Now` in automatic captures. is_setup_mandate_flow field is only used to alter the text in payment button our core flow of setup mandate remains the same i.e setup mandate flow is used only if amount is zero other authorize flow is used in payments core. Priority given according to below: 1. Payment button text added while business profile creation. 2. is_setup_mandate_flow passed in payment_link_config 3. Zero amount setup mandate flow. 4. Manual captures payment. 5. Automatic captures. ### 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). --> Payment links created with capture_method: manual - where the intention is to authorize the customer for some non zero amount, and capture the authorized amount at some later point in time. In such scenarios, the text Pay Now is incorrect as the user is not actually paying in that moment. ## 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)? --> Curls involved to test the flows: Automatic captures: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_qTm0pV0gtb4DRMB1eKS5h3EgUvdNvvSADkPjZMXyUY5rvEkvPUMdJBjMq0Y8M7MV' \ --data-raw '{ "currency": "EUR", "amount": 10, "authentication_type": "three_ds", "description": "Joseph First Crypto", "email": "hyperswitch_sdk_demo_id@gmail.com", "setup_future_usage": "off_session", "connector_metadata": { "noon": { "order_category": "applepay" } }, "payment_link": true, "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.", "setup_mandate": true }, "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "customer_acceptance": null, "customer_id": "cus_CL6UOh3X35RCzaGNN24t" }' ``` <img width="1728" alt="image" src="https://github.com/user-attachments/assets/cb1a37e0-9b74-4018-acdf-5c8869204ff0" /> Manual Captures: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_qTm0pV0gtb4DRMB1eKS5h3EgUvdNvvSADkPjZMXyUY5rvEkvPUMdJBjMq0Y8M7MV' \ --data-raw '{ "currency": "EUR", "amount": 10, "authentication_type": "three_ds", "description": "Joseph First Crypto", "email": "hyperswitch_sdk_demo_id@gmail.com", "setup_future_usage": "off_session", "connector_metadata": { "noon": { "order_category": "applepay" } }, "payment_link": true, "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." }, "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "customer_acceptance": null, "capture_method": "manual", "customer_id": "cus_CL6UOh3X35RCzaGNN24t" }' ``` <img width="1728" alt="image" src="https://github.com/user-attachments/assets/7eea0e9d-be33-46f1-a648-ec7c8e2f1029" /> setup_mandate_flow ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_qTm0pV0gtb4DRMB1eKS5h3EgUvdNvvSADkPjZMXyUY5rvEkvPUMdJBjMq0Y8M7MV' \ --data-raw '{ "currency": "EUR", "amount": 10, "authentication_type": "three_ds", "description": "Joseph First Crypto", "email": "hyperswitch_sdk_demo_id@gmail.com", "setup_future_usage": "off_session", "connector_metadata": { "noon": { "order_category": "applepay" } }, "payment_link": true, "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.", "is_setup_mandate_flow": true }, "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "customer_acceptance": null, "capture_method": "manual", "customer_id": "cus_CL6UOh3X35RCzaGNN24t" }' ``` <img width="1728" alt="image" src="https://github.com/user-attachments/assets/e0b298b3-6efe-49c2-be55-d1bbb3febf4c" /> setup_mandate_flow with zero amount ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_iwLbXyltixlkkaaEPH4Sa5HtJtXlDKZ9wOdiGGZV3RTDhgl24aD9lbghKEn9fz88' \ --data-raw '{ "currency": "EUR", "amount": 0, "setup_future_usage": "off_session", "authentication_type": "three_ds", "description": "Joseph First Crypto", "email": "hyperswitch_sdk_demo_id@gmail.com", "connector_metadata": { "noon": { "order_category": "applepay" } }, "payment_link": true, "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." }, "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "customer_acceptance": null, "customer_id": "cus_CL6UOh3X35RCzaGNN24t" }' ``` <img width="1728" alt="image" src="https://github.com/user-attachments/assets/1d9ac845-7070-4e37-b374-15c455649396" /> ## 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/locale.js` - `crates/router/src/core/payment_link/payment_link_initiate/payment_link.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` **Code Patterns Applied:** - Extend existing types with new fields (59 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit fa465930: Files to modify: **crates/api_models/src/admin.rs** Modify existing code **crates/api_models/src/payments.rs** Modify existing code **crates/diesel_models/src/business_profile.rs** Modify existing code **crates/diesel_models/src/payment_intent.rs** Modify existing code **crates/hyperswitch_domain_models/src/lib.rs** Modify existing code **crates/router/src/core/payment_link.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code
{"pr_number": 7574, "pr_title": "feat(payment-link): alternate text for manual captures", "merged_at": "2025-04-25T12:16:40Z", "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/locale.js", "crates/router/src/core/payment_link/payment_link_initiate/payment_link.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": {"fields_added": 59, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(core): add should_call_connector_customer function to connector specification ## 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 --> Earlier Limitation: 1. Adding connector to customer create config will trigger customer create for all types of payments where mostly, connectors would require customer create for a specific payment method or customer initiated payment method. 2. This config will not change depending on the environment This pR - adds the ability to call customer create according to the connector need, based on the parameters of payment attempt. >Note: This PR only adds the capability to call connector according to the requirement and it is not handled for any connector. This pr is a pre-requisite for Paysafe recurring ## 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. Authorize.net create a cit with new customer and check if customer call has happened. Customer call is expected to happen ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_5dLbCL5aZt8XTkvr6yuljA1O6yW89oy4AHECe8vp2rDsNcechPyi9uvZd6s6XnCL' \ --data-raw '{ "amount": 100, "currency": "USD", "confirm": true, "capture_method": "automatic", "email": "hello@123.com", "customer_id": "cus_001247", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4000000000001091", "card_exp_month": "10", "card_exp_year": "25", "card_cvc": "111" } }, "customer_acceptance": { "acceptance_type": "online", "accepted_at": "2025-03-27T13:56:49.848Z", "online": { "ip_address": null, "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Safari/605.1.15" } }, "setup_future_usage": "off_session", "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": "13.232.74.226" }, "billing": { "address": { "zip": "560095", "country": "CA", "state": "ab", "first_name": "Sakil", "last_name": "Mostak", "line1": "Fasdf", "line2": "Fasdf", "city": "Fasdf" } } }' ``` Response ``` { "payment_id": "pay_fLd6FYOYfYOA9bNeKjl1", "merchant_id": "postman_merchant_GHAction_aa704bd6-a15a-4e36-8aa8-14c856f736f7", "status": "succeeded", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 0, "amount_received": 100, "connector": "authorizedotnet", "client_secret": "pay_fLd6FYOYfYOA9bNeKjl1_secret_h93kplljoJcUxguJyIpj", "created": "2025-09-26T07:27:51.413Z", "currency": "USD", "customer_id": "cus_001247", "customer": { "id": "cus_001247", "name": null, "email": "hello@123.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": "automatic", "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": "10", "card_exp_year": "25", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "Fasdf", "country": "CA", "line1": "Fasdf", "line2": "Fasdf", "line3": null, "zip": "560095", "state": "ab", "first_name": "Sakil", "last_name": "Mostak", "origin_zip": null }, "phone": null, "email": null }, "order_details": null, "email": "hello@123.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": "cus_001247", "created_at": 1758871671, "expires": 1758875271, "secret": "epk_8e029574d35b4424b9ad0ca4bf6df324" }, "manual_retry_allowed": null, "connector_transaction_id": "0", "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": "0", "payment_link": null, "profile_id": "pro_fKWiw0Pbhwo6g8CPBpuE", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_GuStJEZSP9HpoQ5vWhc3", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-26T07:42:51.412Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "13.232.74.226", "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": "pm_2nBdpBO5KXAsojpOdAVK", "network_transaction_id": null, "payment_method_status": "active", "updated": "2025-09-26T07:27:53.974Z", "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 } ``` <img width="975" height="344" alt="Screenshot 2025-09-26 at 12 58 18 PM" src="https://github.com/user-attachments/assets/8a8fef48-27f4-439a-8336-9f097c5c7d0e" /> Hyperswitch Vaulting may be affected ## 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` - `crates/router/src/core/payments/customers.rs` - `crates/router/src/core/payments/vault_session.rs` **2. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/authorizedotnet.rs` - `crates/hyperswitch_connectors/src/connectors/dwolla.rs` - `crates/hyperswitch_connectors/src/connectors/facilitapay.rs` - ... and 5 more files **3. Tests** - `config/deployments/integration_test.toml` - `loadtest/config/development.toml` **4. Configuration Files** - `config/config.example.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 3 more files **5. Other** - `crates/hyperswitch_interfaces/src/api.rs` **Code Patterns Applied:** - Implement new functions (9 changes) - Extend existing types with new fields (11 changes) **Detailed Identifier Changes:** Commit bfc136cc: Files to modify: **crates/hyperswitch_connectors/src/connectors/authorizedotnet.rs** Add: - function: private::should_call_connector_customer **crates/hyperswitch_connectors/src/connectors/dwolla.rs** Add: - function: private::should_call_connector_customer **crates/hyperswitch_connectors/src/connectors/facilitapay.rs** Add: - function: private::should_call_connector_customer **crates/hyperswitch_connectors/src/connectors/gocardless.rs** Add: - function: private::should_call_connector_customer **crates/hyperswitch_connectors/src/connectors/hyperswitch_vault.rs** Remove: - impl: impl ConnectorSpecifications for HyperswitchVault Add: - function: private::should_call_connector_customer - impl: impl ConnectorSpecifications for HyperswitchVault **crates/hyperswitch_connectors/src/connectors/stax.rs** Add: - function: private::should_call_connector_customer **crates/hyperswitch_connectors/src/connectors/stripe.rs** Add: - function: private::should_call_connector_customer **crates/hyperswitch_interfaces/src/api.rs** Add: - function: private::should_call_connector_customer **crates/hyperswitch_interfaces/src/connector_integration_interface.rs** Add: - function: private::should_call_connector_customer **crates/router/src/configs/settings.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/customers.rs** Modify existing code **crates/router/src/core/payments/vault_session.rs** Modify existing code
{"pr_number": 9569, "pr_title": "fix(core): add should_call_connector_customer function to connector specification", "merged_at": "2025-09-30T07:42:14Z", "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/customers.rs", "crates/router/src/core/payments/vault_session.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/authorizedotnet.rs", "crates/hyperswitch_connectors/src/connectors/dwolla.rs", "crates/hyperswitch_connectors/src/connectors/facilitapay.rs", "crates/hyperswitch_connectors/src/connectors/gocardless.rs", "crates/hyperswitch_connectors/src/connectors/hyperswitch_vault.rs", "crates/hyperswitch_connectors/src/connectors/stax.rs", "crates/hyperswitch_connectors/src/connectors/stripe.rs", "crates/hyperswitch_interfaces/src/connector_integration_interface.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", "crates/router/src/configs/settings.rs"], "other": ["crates/hyperswitch_interfaces/src/api.rs"]}, "change_types": {"functions_added": 9, "fields_added": 11, "imports_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(router): implement post_update_tracker for SessionUpdate Flow and add support for session_update_flow for Paypal ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description - implement session update flow for Paypal - implement post_update_tracker for SessionUpdate Flow hotfix for [PR](https://github.com/juspay/hyperswitch/pull/6299) ### 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? 1. Create Merchant Account ``` curl --location 'http://localhost:8080/accounts' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data-raw '{ "merchant_id": "merchant_1728546485", "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": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US" } }, "return_url": "https://google.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": "food" } ] }' ``` 2. Create API Key ``` curl --location 'http://localhost:8080/api_keys/merchant_1728540504' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "name": "API Key 1", "description": null, "expiration": "2025-09-23T01:02:03.000Z" }' ``` 3. Create MCA ``` curl --location 'http://localhost:8080/account/merchant_1728540504/connectors?=' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "connector_type": "payment_processor", "connector_name": "paypal", "connector_account_details": { "auth_type": "BodyKey", "api_key": "_", "key1": "_" }, "test_mode": false, "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 } ] }, { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "paypal", "payment_experience": "redirect_to_url", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": false, "installment_payment_enabled": false }, { "payment_method_type": "paypal", "payment_experience": "invoke_sdk_client", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": false, "installment_payment_enabled": false } ] }, { "payment_method": "bank_redirect", "payment_method_types": [ { "payment_method_type": "giropay", "recurring_enabled": true, "installment_payment_enabled": true, "payment_experience": "redirect_to_url" }, { "payment_method_type": "ideal", "recurring_enabled": true, "installment_payment_enabled": true, "payment_experience": "redirect_to_url" }, { "payment_method_type": "eps", "recurring_enabled": true, "installment_payment_enabled": true, "payment_experience": "redirect_to_url" }, { "payment_method_type": "sofort", "recurring_enabled": true, "installment_payment_enabled": true, "payment_experience": "redirect_to_url" } ] } ], "metadata": { "paypal_sdk": { "client_id": "___" } }, "business_country": "US", "business_label": "food" }' ``` 4. Create Payment ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_MTxKOCiP8GOiXv955xYCMuW0MUzl1anEbVVkxBBR87wfDUObqYqOsCqpogsFFnCd' \ --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": "+1", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` 5. Create Session token ``` curl --location 'http://localhost:8080/payments/session_tokens' \ --header 'Content-Type: application/json' \ --header 'api-key: pk_dev_10cfee22267a4184a3d45665920788ea' \ --data '{ "payment_id": "pay_J3IXGvol8nNvUkSRTcwQ", "wallets": [], "client_secret": "pay_J3IXGvol8nNvUkSRTcwQ_secret_VN76rK4oCqTghQ1kwNcO" }' ``` Response ``` { "payment_id": "pay_mcVzUMZws5KmEKbGkZ0g", "client_secret": "pay_mcVzUMZws5KmEKbGkZ0g_secret_RMWlmy1jSdlp9VOMX1qc", "session_token": [ { "wallet_name": "paypal", "connector": "paypal", "session_token": "ASKAGh2WXgqfQ5TzjpZzLsfhVGlFbjq5VrV5IOX8KXDD2N_XqkGeYNDkWyr_UXnfhXpEkABdmP284b_2", "sdk_next_action": { "next_action": "post_session_tokens" } } ] } ``` In Response Check for Next action - It should be `post_session_tokens` 6. List Payment Methods for merchant - Check for required fields (shipping_details) ``` curl --location 'http://localhost:8080/account/payment_methods?client_secret=pay_J3IXGvol8nNvUkSRTcwQ_secret_VN76rK4oCqTghQ1kwNcO' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_10cfee22267a4184a3d45665920788ea' ``` Response ``` { "redirect_url": "https://google.com/success", "currency": "USD", "payment_methods": [ { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "paypal", "payment_experience": [ { "payment_experience_type": "invoke_sdk_client", "eligible_connectors": [ "paypal" ] }, { "payment_experience_type": "redirect_to_url", "eligible_connectors": [ "paypal" ] } ], "card_networks": null, "bank_names": null, "bank_debits": null, "bank_transfers": null, "required_fields": { "shipping.address.country": { "required_field": "shipping.address.country", "display_name": "country", "field_type": { "user_shipping_address_country": { "options": [ "ALL" ] } }, "value": "US" }, "shipping.address.first_name": { "required_field": "shipping.address.first_name", "display_name": "shipping_first_name", "field_type": "user_shipping_name", "value": "PiX" }, "shipping.address.zip": { "required_field": "shipping.address.zip", "display_name": "zip", "field_type": "user_shipping_address_pincode", "value": "94122" }, "shipping.address.state": { "required_field": "shipping.address.state", "display_name": "state", "field_type": "user_shipping_address_state", "value": "California" }, "shipping.address.city": { "required_field": "shipping.address.city", "display_name": "city", "field_type": "user_shipping_address_city", "value": "San Fransico" }, "shipping.address.last_name": { "required_field": "shipping.address.last_name", "display_name": "shipping_last_name", "field_type": "user_shipping_name", "value": null }, "shipping.address.line1": { "required_field": "shipping.address.line1", "display_name": "line1", "field_type": "user_shipping_address_line1", "value": "1467" } }, "surcharge_details": null, "pm_auth_connector": null } ] }, ], "mandate_payment": null, "merchant_name": "NewAge Retailer", "show_surcharge_breakup_screen": false, "payment_type": "normal", "request_external_three_ds_authentication": false, "collect_shipping_details_from_wallets": false, "collect_billing_details_from_wallets": false, "is_tax_calculation_enabled": false } ``` 7. Create Post Session Tokens for Paypal ``` curl --location 'http://localhost:8080/payments/pay_J3IXGvol8nNvUkSRTcwQ/post_session_tokens' \ --header 'Content-Type: application/json' \ --header 'api-key: pk_dev_10cfee22267a4184a3d45665920788ea' \ --data '{ "client_secret": "pay_J3IXGvol8nNvUkSRTcwQ_secret_VN76rK4oCqTghQ1kwNcO", "payment_method_type": "paypal", "payment_method": "wallet" }' ``` Response ``` { "payment_id": "pay_mcVzUMZws5KmEKbGkZ0g", "next_action": { "type": "invoke_sdk_client", "next_action_data": { "next_action": "confirm", "order_id": "2KW93090954330301" } } } ``` In Response Check for Next action - It should be confirm 8. Call /calculate_tax - SessionUpdate ``` curl --location 'http://localhost:8080/payments/pay_mcVzUMZws5KmEKbGkZ0g/calculate_tax' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_43922dfcb2694e09929891b0f4f7b6dc' \ --data-raw '{ "client_secret": "_", "shipping": { "address": { "line1": "1335", "line2": "E 103rd St", "city": "Los Angeles", "state": "California", "zip": "90002", "country": "US", "first_name": "Test", "last_name": "Person-us" }, "phone": { "number": "5551234", "country_code": "+1" }, "email": "generated_email_us+1715685671426@example.com" }, "payment_method_type": "paypal" } ' ``` Response ``` { "payment_id": "pay_mcVzUMZws5KmEKbGkZ0g", "net_amount": 3284, "order_tax_amount": 285, "shipping_cost": null, "display_amount": { "net_amount": "32.84", "order_tax_amount": "2.85", "shipping_cost": null } } ``` 9. Confirm Request ``` curl 'http://localhost:8080/payments/pay_6oSZ2utmkjgdOlfrZ53E/confirm' \ -X 'POST' \ -H 'Content-Type: application/json' \ -H 'Accept-Encoding: gzip, deflate' \ -H 'Sec-Fetch-Mode: cors' \ -H 'x-payment-confirm-source: sdk' \ -H 'x-client-source: ExpressCheckoutElement' \ -H 'api-key: pk_dev_43922dfcb2694e09929891b0f4f7b6dc' \ -H 'x-browser-version: 605.1.15' \ --data-binary '{"client_secret":"pay_6oSZ2utmkjgdOlfrZ53E_secret_EFrF7Izc98NHygNyG51x","return_url":"http://localhost:9060","retry_action":"manual_retry","shipping":{"address":{"country":"US","state":"California","zip":"94588","first_name":"Jagan","city":"Pleasanton","last_name":"Elavarasan","line1":"4141"}},"payment_method":"wallet","payment_method_type":"paypal","payment_experience":"invoke_sdk_client","connector":["paypal"],"payment_method_data":{"wallet":{"paypal_sdk":{"token":""}}},"browser_info":{"user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1.2 Safari/605.1.15","accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","language":"en-US","color_depth":24,"screen_height":1117,"screen_width":1728,"time_zone":-330,"java_enabled":true,"java_script_enabled":true},"payment_type":"normal"}' ``` Response ```{ "payment_id": "pay_6oSZ2utmkjgdOlfrZ53E", "merchant_id": "merchant_1728844379", "status": "succeeded", "amount": 2999, "net_amount": 3284, "amount_capturable": 0, "amount_received": 3284, "connector": "paypal", "client_secret": "pay_6oSZ2utmkjgdOlfrZ53E_secret_EFrF7Izc98NHygNyG51x", "created": "2024-10-14T09:09:36.340Z", "currency": "USD", "customer_id": "hyperswitch_sdk_demo_id", "customer": { "id": "hyperswitch_sdk_demo_id", "name": null, "email": "hyperswitch_sdk_demo_id@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": "automatic", "payment_method": "wallet", "payment_method_data": { "wallet": {}, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "Pleasanton", "country": "US", "line1": "4141", "line2": "Amsterdam Ave", "line3": "alsksoe", "zip": "94588", "state": "California", "first_name": "Jagan", "last_name": "Elavarasan" }, "phone": { "number": "5551234", "country_code": "+1" }, "email": "customer@email.us" }, "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": "_", "country_code": "+91" }, "email": "swangi@getMaxListeners.com" }, "order_details": [ { "brand": null, "amount": 2999, "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": "hyperswitch_sdk_demo_id@gmail.com", "name": null, "phone": null, "return_url": "http://localhost:9060/", "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": "invoke_sdk_client", "payment_method_type": "paypal", "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": "1SV0561343891340C", "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_6oSZ2utmkjgdOlfrZ53E_1", "payment_link": null, "profile_id": "pro_03iBylVoOpuldQsVZKtO", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_frKbF7wxB3Rt7tAFbpJA", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-10-14T09:24:36.340Z", "fingerprint": null, "browser_info": { "language": "en-US", "time_zone": -330, "ip_address": "::1", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1.2 Safari/605.1.15", "color_depth": 24, "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-10-14T09:10:19.289Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` For end to end testing, we need to do the payment via SDK ## 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. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/router_request_types.rs` - `crates/hyperswitch_domain_models/src/router_response_types.rs` **3. Core Business Logic** - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/flows.rs` - `crates/router/src/core/payments/operations/payment_approve.rs` - ... and 15 more files **4. External Connector Integration** - `crates/router/src/connector/paypal.rs` - `crates/router/src/connector/paypal/transformers.rs` - `crates/router/tests/connectors/utils.rs` **5. Type Definitions** - `crates/hyperswitch_interfaces/src/types.rs` - `crates/router/src/types.rs` **6. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - `crates/common_enums/src/enums.rs` **Code Patterns Applied:** - Define new data structures (2 changes) - Implement new functions (16 changes) - Extend existing types with new fields (95 changes) - Add conditional logic for feature flags or filtering (3 changes) **Detailed Identifier Changes:** Commit 75a67f21: Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/common_enums/src/enums.rs** Add: - enum: pub::SessionUpdateStatus **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/connector/paypal.rs** Add: - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::get_request_body - function: private::handle_response - function: private::get_error_response - impl: impl api::PaymentSessionUpdate for Paypal - impl: impl ConnectorIntegration< api::SdkSessionUpdate, types::SdkPaymentsSessionUpdateData, types::PaymentsResponseData, > for Paypal **crates/router/src/connector/paypal/transformers.rs** Add: - function: private::try_from - function: private::try_from - function: pub::get_inner_value - function: private::try_from - struct: pub::PaypalUpdateOrderRequest - struct: pub::Operation - enum: pub::PaypalOperationType - enum: pub::Value - impl: impl TryFrom<&PaypalRouterData<&types::SdkSessionUpdateRouterData>> for OrderRequestAmount - impl: impl TryFrom<&PaypalRouterData<&types::SdkSessionUpdateRouterData>> for ItemDetails - impl: impl PaypalUpdateOrderRequest - impl: impl TryFrom<&PaypalRouterData<&types::SdkSessionUpdateRouterData>> for PaypalUpdateOrderRequest **crates/router/src/core/payments.rs** Add: - function: private::should_update_in_post_update_tracker - function: private::should_update_in_update_tracker - trait: pub::PaymentMethodChecker - impl: impl PaymentMethodChecker<F> for PaymentData<F> **crates/router/src/core/payments/flows.rs** Modify existing code **crates/router/src/core/payments/operations/payment_approve.rs** Modify existing code **crates/router/src/core/payments/operations/payment_cancel.rs** Modify existing code **crates/router/src/core/payments/operations/payment_capture.rs** Modify existing code **crates/router/src/core/payments/operations/payment_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_post_session_tokens.rs** Modify existing code **crates/router/src/core/payments/operations/payment_reject.rs** Modify existing code **crates/router/src/core/payments/operations/payment_response.rs** Modify existing code **crates/router/src/core/payments/operations/payment_session.rs** Modify existing code **crates/router/src/core/payments/operations/payment_start.rs** Modify existing code **crates/router/src/core/payments/operations/payment_status.rs** Modify existing code **crates/router/src/core/payments/operations/payment_update.rs** Modify existing code **crates/router/src/core/payments/operations/payments_incremental_authorization.rs** Modify existing code **crates/router/src/core/payments/operations/tax_calculation.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/types.rs** Modify existing code **crates/router/tests/connectors/utils.rs** Modify existing code
{"pr_number": 6350, "pr_title": "feat(router): implement post_update_tracker for SessionUpdate Flow and add support for session_update_flow for Paypal", "merged_at": "2024-10-17T10:22:37Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs"], "domain": ["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/operations/payment_approve.rs", "crates/router/src/core/payments/operations/payment_cancel.rs", "crates/router/src/core/payments/operations/payment_capture.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_post_session_tokens.rs", "crates/router/src/core/payments/operations/payment_reject.rs", "crates/router/src/core/payments/operations/payment_response.rs", "crates/router/src/core/payments/operations/payment_session.rs", "crates/router/src/core/payments/operations/payment_start.rs", "crates/router/src/core/payments/operations/payment_status.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/operations/tax_calculation.rs", "crates/router/src/core/payments/transformers.rs"], "connectors": ["crates/router/src/connector/paypal.rs", "crates/router/src/connector/paypal/transformers.rs", "crates/router/tests/connectors/utils.rs"], "types": ["crates/hyperswitch_interfaces/src/types.rs", "crates/router/src/types.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/common_enums/src/enums.rs"]}, "change_types": {"structs_added": 2, "functions_added": 16, "enums_added": 3, "fields_added": 95, "imports_added": 2, "conditionals_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): add support to generate session token response from both `connector_wallets_details` and `metadata` ## 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 --> - google pay details can be collected from connector_wallets_details field in MCA. Both for decrypt and tokenized flow - session token response can be generated from both connector_wallets_details and metadata. (connector_wallets_details is given the priority in case both are present) ### 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: Case 1: Decryption flow through connector_wallets_details - pass the following in connector_wallets_details of MCA creation ``` "connector_wallets_details": { "google_pay": { "provider_details": { "merchant_info": { "merchant_name": "merchant_name", "tokenization_specification": { "type": "DIRECT", "parameters": { "public_key": "public_key", "private_key": "private_key", "recipient_id": "recipient_id" } } } }, "cards": { "allowed_auth_methods": [ "PAN_ONLY", "CRYPTOGRAM_3DS" ], "allowed_card_networks": [ "AMEX", "DISCOVER", "INTERAC", "JCB", "MASTERCARD", "VISA" ] } } }, ``` - Create an intent and do a session call, following should be the response ``` { "payment_id": "pay_cV5ldnk4rejWhMMTtQSE", "client_secret": "pay_cV5ldnk4rejWhMMTtQSE_secret_gpGwSsn42cb4fpsFxO3B", "session_token": [ { "wallet_name": "google_pay", "merchant_info": { "merchant_name": "merchant_name" }, "shipping_address_required": false, "email_required": false, "shipping_address_parameters": { "phone_number_required": false }, "allowed_payment_methods": [ { "type": "CARD", "parameters": { "allowed_auth_methods": [ "PAN_ONLY", "CRYPTOGRAM_3DS" ], "allowed_card_networks": [ "AMEX", "DISCOVER", "INTERAC", "JCB", "MASTERCARD", "VISA" ], "billing_address_required": false }, "tokenization_specification": { "type": "DIRECT", "parameters": { "protocol_version": "ECv2", "public_key": "public_key" } } } ], "transaction_info": { "country_code": "US", "currency_code": "USD", "total_price_status": "Final", "total_price": "65.40" }, "delayed_session_token": false, "connector": "cybersource", "sdk_next_action": { "next_action": "confirm" }, "secrets": null } ] } ``` Case 2: Tokenization Flow through connector_wallets_details - pass the following in connector_wallets_details of MCA creation ``` "connector_wallets_details": { "google_pay": { "provider_details": { "merchant_info": { "merchant_id": "merchant_id", "merchant_name": "merchant_name", "tokenization_specification": { "type": "PAYMENT_GATEWAY", "parameters": { "gateway": "cybersource", "gateway_merchant_id": "gateway_merchant_id" } } } }, "cards": { "allowed_auth_methods": [ "PAN_ONLY", "CRYPTOGRAM_3DS" ], "allowed_card_networks": [ "AMEX", "DISCOVER", "INTERAC", "JCB", "MASTERCARD", "VISA" ] } } }, ``` - Create an intent and do a session call, following should be the response ``` { "payment_id": "pay_HtBC94o8GdUdGqynG5g1", "client_secret": "pay_HtBC94o8GdUdGqynG5g1_secret_BHYkDtaJXYNPhkFpkEI1", "session_token": [ { "wallet_name": "google_pay", "merchant_info": { "merchant_id": "merchant_id", "merchant_name": "merchant_name" }, "shipping_address_required": false, "email_required": false, "shipping_address_parameters": { "phone_number_required": false }, "allowed_payment_methods": [ { "type": "CARD", "parameters": { "allowed_auth_methods": [ "PAN_ONLY", "CRYPTOGRAM_3DS" ], "allowed_card_networks": [ "AMEX", "DISCOVER", "INTERAC", "JCB", "MASTERCARD", "VISA" ], "billing_address_required": false }, "tokenization_specification": { "type": "PAYMENT_GATEWAY", "parameters": { "gateway": "cybersource", "gateway_merchant_id": "gateway_merchant_id" } } } ], "transaction_info": { "country_code": "US", "currency_code": "USD", "total_price_status": "Final", "total_price": "65.40" }, "delayed_session_token": false, "connector": "cybersource", "sdk_next_action": { "next_action": "confirm" }, "secrets": null } ] } ``` Case 3: Tokenization Flow through metadata - pass the following in metadata of MCA creation ``` "metadata": { "google_pay": { "merchant_info": { "merchant_id": "merchant_id", "merchant_name": "merchant_name" }, "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": "cybersource", "gateway_merchant_id": "gateway_merchant_id" } } } ] } } ``` - Create an intent and do a session call, following should be the response ``` { "payment_id": "pay_HtBC94o8GdUdGqynG5g1", "client_secret": "pay_HtBC94o8GdUdGqynG5g1_secret_BHYkDtaJXYNPhkFpkEI1", "session_token": [ { "wallet_name": "google_pay", "merchant_info": { "merchant_id": "merchant_id", "merchant_name": "merchant_name" }, "shipping_address_required": false, "email_required": false, "shipping_address_parameters": { "phone_number_required": false }, "allowed_payment_methods": [ { "type": "CARD", "parameters": { "allowed_auth_methods": [ "PAN_ONLY", "CRYPTOGRAM_3DS" ], "allowed_card_networks": [ "AMEX", "DISCOVER", "INTERAC", "JCB", "MASTERCARD", "VISA" ], "billing_address_required": false }, "tokenization_specification": { "type": "PAYMENT_GATEWAY", "parameters": { "gateway": "cybersource", "gateway_merchant_id": "gateway_merchant_id" } } } ], "transaction_info": { "country_code": "US", "currency_code": "USD", "total_price_status": "Final", "total_price": "65.40" }, "delayed_session_token": false, "connector": "cybersource", "sdk_next_action": { "next_action": "confirm" }, "secrets": null } ] } ``` Case 4: Tokenization Flow through both connector_wallets_details and metadata - pass the following in connector_wallets_details and metadata of MCA creation ``` "connector_wallets_details": { "google_pay": { "provider_details": { "merchant_info": { "merchant_id": "merchant_id_1", "merchant_name": "merchant_name", "tokenization_specification": { "type": "PAYMENT_GATEWAY", "parameters": { "gateway": "cybersource", "gateway_merchant_id": "gateway_merchant_id_1" } } } }, "cards": { "allowed_auth_methods": [ "PAN_ONLY", "CRYPTOGRAM_3DS" ], "allowed_card_networks": [ "AMEX", "DISCOVER", "INTERAC", "JCB", "MASTERCARD", "VISA" ] } } }, "metadata": { "google_pay": { "merchant_info": { "merchant_id": "merchant_id_2", "merchant_name": "merchant_name" }, "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": "cybersource", "gateway_merchant_id": "gateway_merchant_id_2" } } } ] } } ``` - Create an intent and do a session call, following should be the response since connector_wallets_details is prioritized over metadata if both are present ``` { "payment_id": "pay_HtBC94o8GdUdGqynG5g1", "client_secret": "pay_HtBC94o8GdUdGqynG5g1_secret_BHYkDtaJXYNPhkFpkEI1", "session_token": [ { "wallet_name": "google_pay", "merchant_info": { "merchant_id": "merchant_id_1", "merchant_name": "merchant_name" }, "shipping_address_required": false, "email_required": false, "shipping_address_parameters": { "phone_number_required": false }, "allowed_payment_methods": [ { "type": "CARD", "parameters": { "allowed_auth_methods": [ "PAN_ONLY", "CRYPTOGRAM_3DS" ], "allowed_card_networks": [ "AMEX", "DISCOVER", "INTERAC", "JCB", "MASTERCARD", "VISA" ], "billing_address_required": false }, "tokenization_specification": { "type": "PAYMENT_GATEWAY", "parameters": { "gateway": "cybersource", "gateway_merchant_id": "gateway_merchant_id_1" } } } ], "transaction_info": { "country_code": "US", "currency_code": "USD", "total_price_status": "Final", "total_price": "65.40" }, "delayed_session_token": false, "connector": "cybersource", "sdk_next_action": { "next_action": "confirm" }, "secrets": 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. API Request/Response Models** - `crates/api_models/src/payments.rs` **2. Core Business Logic** - `crates/router/src/core/errors.rs` - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/flows/session_flow.rs` - ... and 1 more files **3. External Connector Integration** - `crates/router/src/connector/trustpay/transformers.rs` **4. Configuration Files** - `crates/router/src/configs/secrets_transformers.rs` - `crates/router/src/configs/settings.rs` **5. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - `crates/router/src/consts.rs` **Code Patterns Applied:** - Implement new functions (2 changes) - Extend existing types with new fields (75 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 66d9c731: Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/router/src/configs/secrets_transformers.rs** Remove: - function: private::convert_to_raw_secret - impl: impl SecretsHandler for settings::GooglePayDecryptConfig **crates/router/src/configs/settings.rs** Modify existing code **crates/router/src/connector/trustpay/transformers.rs** Modify existing code **crates/router/src/consts.rs** Modify existing code **crates/router/src/core/errors.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/flows/session_flow.rs** Add: - function: private::get_allowed_payment_methods_from_cards **crates/router/src/core/payments/helpers.rs** Modify existing code
{"pr_number": 7140, "pr_title": "feat(core): add support to generate session token response from both `connector_wallets_details` and `metadata`", "merged_at": "2025-02-13T08:26:17Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "connector"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs"], "core_business": ["crates/router/src/core/errors.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/payments/flows/session_flow.rs", "crates/router/src/core/payments/helpers.rs"], "connectors": ["crates/router/src/connector/trustpay/transformers.rs"], "config": ["crates/router/src/configs/secrets_transformers.rs", "crates/router/src/configs/settings.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/router/src/consts.rs"]}, "change_types": {"functions_added": 2, "fields_added": 75, "imports_added": 3, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
ci(cypress): Add shipping cost test case ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description Add Shipping Cost test case for cypress automation ### 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 Currently Test case was not present ## How did you test it? Cypress <img width="602" alt="image" src="https://github.com/user-attachments/assets/f6f26932-d6b4-4d0a-8312-461839417f35"> ## 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/PaymentTest/00004-NoThreeDSAutoCapture.cy.js` - `cypress-tests/cypress/e2e/PaymentUtils/Adyen.js` - `cypress-tests/cypress/e2e/PaymentUtils/BankOfAmerica.js` - ... and 10 more files **Code Patterns Applied:** - Extend existing types with new fields (262 changes) - Add conditional logic for feature flags or filtering (4 changes)
{"pr_number": 6779, "pr_title": "ci(cypress): Add shipping cost test case", "merged_at": "2024-12-10T12:53:48Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/PaymentTest/00004-NoThreeDSAutoCapture.cy.js", "cypress-tests/cypress/e2e/PaymentUtils/Adyen.js", "cypress-tests/cypress/e2e/PaymentUtils/BankOfAmerica.js", "cypress-tests/cypress/e2e/PaymentUtils/Bluesnap.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/Nmi.js", "cypress-tests/cypress/e2e/PaymentUtils/Noon.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/support/commands.js"]}, "change_types": {"fields_added": 262, "conditionals_added": 4}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(euclid): integration with decision engine ## 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 integrates the Euclid-based decision engine with Hyperswitch’s dynamic routing infrastructure. It enables dual routing logic: legacy DSL-based evaluation and decision-engine-backed configurations. The integration ensures routing algorithms can be authored, activated, and evaluated via Euclid and linked seamlessly to merchant profiles. ## Outcomes - Adds support for storing and linking decision-engine routing IDs (`decision_engine_routing_id`) in the existing `routing_algorithm` table. - Enables creation and linking of Euclid routing configurations during algorithm creation and configuration linking flows. - Enhances observability with logging and tracing of decision engine interactions. - Preserves backward compatibility with existing static/dynamic routing mechanisms. ## Diff Hunk Explanation ### `crates/api_models/src/routing.rs` - Added `decision_engine_routing_id` to `RoutingDictionaryRecord` to expose the DE mapping in API responses. - Updated `RoutingAlgorithmKind` with `PartialEq` to aid in logic branching. ### `crates/diesel_models/src/routing_algorithm.rs` - Included new optional field `decision_engine_routing_id` to map to Euclid's algorithm record. ### `crates/diesel_models/src/schema.rs` - Altered `routing_algorithm` schema to include `decision_engine_routing_id VARCHAR(64)`. ### `crates/router/src/core/payments/routing.rs` - Imported `perform_decision_euclid_routing` into static routing flow for test execution and future use. ### `crates/router/src/core/routing.rs` - On routing creation, checks if the algorithm is a Euclid (Advanced) type, then creates it in the decision engine and stores the returned ID. - On routing configuration linking, activates the respective routing config in the decision engine using `ActivateRoutingConfigRequest`. - Enhances `retrieve_merchant_routing_dictionary` to fetch and append decision engine routing configs by profile ID. ### `crates/router/src/core/routing/transformers.rs` - Ensures `decision_engine_routing_id` is preserved and transformed when converting between internal and API models. ### `migrations/2025-05-08-102850_add_de_euclid_id_in_routing_algorithm_table/*.sql` - Adds and removes the `decision_engine_routing_id` column in the `routing_algorithm` table via Diesel migrations. ### 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? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Here is the complete testing [guidelines](https://docs.google.com/document/d/1xL3EJdMoCLXP5epOeqNsNYvqFqlJyhxss3LahQQ5xGU/edit?usp=sharing). ## Migrations ``` ALTER TABLE routing_algorithm ADD COLUMN decision_engine_routing_id VARCHAR(64); ``` ## 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. API Request/Response Models** - `crates/api_models/src/routing.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/routing_algorithm.rs` - `crates/diesel_models/src/schema.rs` **3. Core Business Logic** - `crates/router/src/core/payments/routing.rs` - `crates/router/src/core/payments/routing/utils.rs` - `crates/router/src/core/routing.rs` - ... and 2 more files **4. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - `migrations/2025-05-08-102850_add_de_euclid_id_in_routing_algorithm_table/down.sql` - ... and 2 more files **Code Patterns Applied:** - Define new data structures (16 changes) - Implement new functions (24 changes) - Extend existing types with new fields (146 changes) - Add conditional logic for feature flags or filtering (20 changes) **Detailed Identifier Changes:** Commit 4087cd27: Files to modify: **crates/api_models/src/routing.rs** Modify existing code **crates/diesel_models/src/routing_algorithm.rs** Modify existing code **crates/diesel_models/src/schema.rs** Modify existing code **crates/router/src/core/payments/routing.rs** Add: - mod: pub::utils **crates/router/src/core/payments/routing/utils.rs** Add: - function: private::build_and_send_euclid_http_request - function: private::send_euclid_request - function: private::send_euclid_request_without_response_parsing - function: pub::perform_decision_euclid_routing - function: pub::create_de_euclid_routing_algo - function: pub::link_de_euclid_routing_algorithm - function: pub::list_de_euclid_routing_algorithms - function: pub::compare_and_log_result - function: private::is_equal - function: private::is_equal - function: pub::to_json_string - function: pub::convert_backend_input_to_routing_eval - function: private::from - function: private::from - function: private::convert_rule - function: private::convert_if_stmt - function: private::convert_comparison - function: private::convert_comparison_type - function: private::convert_value - function: private::convert_output - function: private::stringify_choice - struct: pub::EuclidApiClient - struct: pub::ActivateRoutingConfigRequest - struct: pub::ListRountingAlgorithmsRequest - struct: pub::RoutingEvaluateRequest - struct: pub::RoutingEvaluateResponse - struct: pub::MetadataValue - struct: pub::NumberComparison - struct: pub::Comparison - struct: pub::IfStatement - struct: pub::Rule - struct: pub::VolumeSplit - struct: pub::Program - struct: pub::RoutingRule - struct: pub::RoutingMetadata - struct: pub::RoutingDictionaryRecord - struct: pub::RoutingAlgorithmRecord - enum: pub::ValueType - enum: pub::ComparisonType - enum: pub::RoutingType - enum: pub::Output - trait: pub::EuclidApiHandler - trait: pub::RoutingEq - impl: impl EuclidApiClient - impl: impl EuclidApiHandler for EuclidApiClient - impl: impl RoutingEq<Self> for api_routing::RoutingDictionaryRecord - impl: impl RoutingEq<Self> for String - impl: impl From<RoutingAlgorithmRecord> for routing_algorithm::RoutingProfileMetadata - impl: impl From<ast::Program<ConnectorSelection>> for Program **crates/router/src/core/routing.rs** Modify existing code **crates/router/src/core/routing/helpers.rs** Modify existing code **crates/router/src/core/routing/transformers.rs** Modify existing code
{"pr_number": 7930, "pr_title": "feat(euclid): integration with decision engine", "merged_at": "2025-05-14T18:40:13Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/routing.rs"], "database": ["crates/diesel_models/src/routing_algorithm.rs", "crates/diesel_models/src/schema.rs"], "core_business": ["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", "crates/router/src/core/routing/transformers.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "migrations/2025-05-08-102850_add_de_euclid_id_in_routing_algorithm_table/down.sql", "migrations/2025-05-08-102850_add_de_euclid_id_in_routing_algorithm_table/up.sql", "v2_migrations/2025-01-13-081847_drop_v1_columns/up.sql"]}, "change_types": {"structs_added": 16, "functions_added": 24, "enums_added": 4, "fields_added": 146, "imports_added": 15, "conditionals_added": 20}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix: fixes the docker setup to clean up the scarf data ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [X] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Corrected the docker setup, for demo app, control-center, and removed mailhog. ### 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). --> removing the mailhog from the basic setup. Closes #7962 7962 ## 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** - `docker-compose-development.yml` - `docker-compose.yml` **2. Other** - `README.md` - `scripts/docker_output.sh` - `scripts/poststart_hook.sh` - ... and 1 more files **Code Patterns Applied:** - Extend existing types with new fields (8 changes)
{"pr_number": 7963, "pr_title": "fix: fixes the docker setup to clean up the scarf data", "merged_at": "2025-05-12T16:21:53Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"config": ["docker-compose-development.yml", "docker-compose.yml"], "other": ["README.md", "scripts/docker_output.sh", "scripts/poststart_hook.sh", "scripts/setup.sh"]}, "change_types": {"fields_added": 8}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(config): Set common required fields for Givex (v2) ## 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 --> - Moved required fields for `givex` gift card for `Adyen` from `non-mandate` to `common` ### 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` --> config/payment_required_fields_v2.toml ## 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 #9413 ## 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)? --> - PML Request: ``` curl --location 'http://localhost:8080/v2/payments/12345_pay_019956cafc887e028748d3bf29b35a2e/payment-methods' \ --header 'Content-Type: application/json' \ --header 'x-profile-id: pro_DsAY3PdGJ0ROvUdK6EpX' \ --header 'Authorization: publishable-key=pk_dev_304de2a7a06e4074967faa195a48bd4a, client-secret=cs_019956cafc967983b4b673f259b6680e' \ --header 'api-key: pk_dev_304de2a7a06e4074967faa195a48bd4a' ``` - PML Response: ```json { "payment_methods_enabled": [ { "payment_method_type": "card", "payment_method_subtype": "card", "payment_experience": null, "required_fields": [], "surcharge_details": null }, { "payment_method_type": "card_redirect", "payment_method_subtype": "card_redirect", "payment_experience": [ "redirect_to_url" ], "required_fields": [], "surcharge_details": null }, { "payment_method_type": "pay_later", "payment_method_subtype": "klarna", "payment_experience": [ "redirect_to_url" ], "required_fields": [], "surcharge_details": null }, { "payment_method_type": "wallet", "payment_method_subtype": "apple_pay", "payment_experience": null, "required_fields": [], "surcharge_details": null }, { "payment_method_type": "wallet", "payment_method_subtype": "google_pay", "payment_experience": null, "required_fields": [], "surcharge_details": null }, { "payment_method_type": "wallet", "payment_method_subtype": "paypal", "payment_experience": null, "required_fields": [ { "required_field": "payment_method_data.billing.email", "display_name": "email_address", "field_type": "user_email_address", "value": null } ], "surcharge_details": null }, { "payment_method_type": "gift_card", "payment_method_subtype": "givex", "payment_experience": null, "required_fields": [ { "required_field": "payment_method_data.gift_card.givex.number", "display_name": "gift_card_number", "field_type": "user_card_number", "value": null }, { "required_field": "payment_method_data.gift_card.givex.cvc", "display_name": "gift_card_cvc", "field_type": "user_card_cvc", "value": 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. Configuration Files** - `config/payment_required_fields_v2.toml`
{"pr_number": 9414, "pr_title": "fix(config): Set common required fields for Givex (v2)", "merged_at": "2025-09-18T08:51:00Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "user"]}, "hierarchy": {"config": ["config/payment_required_fields_v2.toml"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
ci: add workflow to check wasm-pack build ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Added WASM build check as part of pipeline ![image](https://github.com/user-attachments/assets/f89a5241-1cf2-4f05-a696-02e801198872) ![image](https://github.com/user-attachments/assets/7cec2b6c-5da8-43d1-bdc6-199442263172) ![image](https://github.com/user-attachments/assets/a3cc0b59-2be5-4501-9605-9241c43bf1a8) ### 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. Configuration Files** - `.github/workflows/wasm-bulild-check.yml` **Code Patterns Applied:** - Extend existing types with new fields (16 changes)
{"pr_number": 6842, "pr_title": "ci: add workflow to check wasm-pack build", "merged_at": "2024-12-17T10:58:16Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"config": [".github/workflows/wasm-bulild-check.yml"]}, "change_types": {"fields_added": 16}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
refactor(connector): [Nuvei] Fix card 3ds ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Fix deserlization error for Nuvei card 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 <!-- 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? Create nuvie card 3ds ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_5iub419oM0WIf9pI6nHrCbopoQ5dSKQEJkyPJZCmYbqECx5KC61S7N1yl7c1IdKD' \ --data-raw '{ "amount": 15100, "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", "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": "2221008123677736", "card_exp_month": "12", "card_exp_year": "2030", "card_holder_name": "CL-BRW2", "card_cvc": "217" } }, "setup_future_usage": "on_session" }' ``` response ``` { "payment_id": "pay_SwA17VK0vJc9lZyksSsp", "merchant_id": "merchant_1754896786", "status": "requires_customer_action", "amount": 15100, "net_amount": 15100, "shipping_cost": null, "amount_capturable": 15100, "amount_received": null, "connector": "nuvei", "client_secret": "pay_SwA17VK0vJc9lZyksSsp_secret_1Le4qoHaeDahJN4pDv4N", "created": "2025-08-11T12:47:40.099Z", "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": "on_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "7736", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "222100", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2030", "card_holder_name": "CL-BRW2", "payment_checks": { "avs_description": null, "avs_result_code": "", "cvv_2_reply_code": "", "cvv_2_description": null, "merchant_advice_code": "", "merchant_advice_code_description": null }, "authentication_data": { "cReq": "eyJ0aHJlZURTU2VydmVyVHJhbnNJRCI6IjZjNzNkZWQ5LTRmMzEtNDNjMS1iYjdmLTEwMDA2YmYyMTBmYiIsImFjc1RyYW5zSUQiOiIzZmRhNGVjYS0xMzI3LTQyZjctOGU2Ny1mYzE4ZDUxNDM0NTIiLCJjaGFsbGVuZ2VXaW5kb3dTaXplIjoiMDUiLCJtZXNzYWdlVHlwZSI6IkNSZXEiLCJtZXNzYWdlVmVyc2lvbiI6IjIuMi4wIn0", "flow": "challenge", "acsUrl": "https://3dsn.sandbox.safecharge.com/ThreeDSACSEmulatorChallenge/api/ThreeDSACSChallengeController/ChallengePage?eyJub3RpZmljYXRpb25VUkwiOiJodHRwOi8vbG9jYWxob3N0OjgwODAvcGF5bWVudHMvcGF5X1N3QTE3VkswdkpjOWxaeWtzU3NwL21lcmNoYW50XzE3NTQ4OTY3ODYvcmVkaXJlY3QvY29tcGxldGUvbnV2ZWkiLCJ0aHJlZURTU2VydmVyVHJhbnNJRCI6IjZjNzNkZWQ5LTRmMzEtNDNjMS1iYjdmLTEwMDA2YmYyMTBmYiIsImFjc1RyYW5zSUQiOiIzZmRhNGVjYS0xMzI3LTQyZjctOGU2Ny1mYzE4ZDUxNDM0NTIiLCJkc1RyYW5zSUQiOiI3ZGUyY2YxZC00MmYxLTQ1ZWItOGE1Mi02MmQ5Mjk3OWEwOWUiLCJkYXRhIjpudWxsLCJNZXNzYWdlVmVyc2lvbiI6IjIuMi4wIn0=", "version": "2.2.0", "threeDFlow": "1", "decisionReason": "NoPreference", "threeDReasonId": "", "acquirerDecision": "ExemptionRequest", "challengePreferenceReason": "12", "isExemptionRequestInAuthentication": "0" } }, "billing": null }, "payment_token": "token_jptsctTb26hNYSmaPHom", "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": "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": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_SwA17VK0vJc9lZyksSsp/merchant_1754896786/pay_SwA17VK0vJc9lZyksSsp_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": "nithxxinn", "created_at": 1754916460, "expires": 1754920060, "secret": "epk_00825ca507a647b1a68b6e174af4ad28" }, "manual_retry_allowed": null, "connector_transaction_id": "8110000000012074375", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "7784849111", "payment_link": null, "profile_id": "pro_Ff3vG29EedTBVrRtdf20", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_vvdYt5E4uXbNvYftGlYf", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-11T13:02:40.099Z", "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-08-11T12:47:42.875Z", "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 } ``` Complete payment using redirection 2. Do psync Response ``` { "payment_id": "pay_SwA17VK0vJc9lZyksSsp", "merchant_id": "merchant_1754896786", "status": "succeeded", "amount": 15100, "net_amount": 15100, "shipping_cost": null, "amount_capturable": 0, "amount_received": 15100, "connector": "nuvei", "client_secret": "pay_SwA17VK0vJc9lZyksSsp_secret_1Le4qoHaeDahJN4pDv4N", "created": "2025-08-11T12:47:40.099Z", "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": "on_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "7736", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "222100", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2030", "card_holder_name": "CL-BRW2", "payment_checks": { "avs_description": null, "avs_result_code": "", "cvv_2_reply_code": "", "cvv_2_description": null, "merchant_advice_code": "", "merchant_advice_code_description": null }, "authentication_data": { "flow": "challenge", "decisionReason": "NoPreference", "acquirerDecision": "ExemptionRequest", "challengePreferenceReason": "12" } }, "billing": null }, "payment_token": "token_jptsctTb26hNYSmaPHom", "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": "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": null, "manual_retry_allowed": false, "connector_transaction_id": "8110000000012074525", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "7784849111", "payment_link": null, "profile_id": "pro_Ff3vG29EedTBVrRtdf20", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_vvdYt5E4uXbNvYftGlYf", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-11T13:02:40.099Z", "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-08-11T12:49:18.842Z", "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 } ``` cypress test <img width="1486" height="1756" alt="Screenshot 2025-08-12 at 1 41 17 PM" src="https://github.com/user-attachments/assets/e52ca0ab-1600-48ca-8430-3b3e80ba4545" /> <img width="1824" height="1550" alt="Screenshot 2025-08-12 at 4 44 25 PM" src="https://github.com/user-attachments/assets/42c36473-c99e-489c-b668-07782a3b7a99" /> <img width="855" height="792" alt="Screenshot 2025-08-19 at 3 30 24 PM" src="https://github.com/user-attachments/assets/78d85781-a5e4-4e6c-842a-26736dd57151" /> ## 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. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs` **3. Tests** - `cypress-tests/cypress/e2e/configs/Payment/Nuvei.js` **Code Patterns Applied:** - Extend existing types with new fields (12 changes) **Detailed Identifier Changes:** Commit ba15c0f1: Files to modify: **crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_request_types/authentication.rs** Modify existing code
{"pr_number": 8913, "pr_title": "refactor(connector): [Nuvei] Fix card 3ds", "merged_at": "2025-08-19T11:00:18Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/router_request_types/authentication.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs"], "tests": ["cypress-tests/cypress/e2e/configs/Payment/Nuvei.js"]}, "change_types": {"fields_added": 12}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(payment_method_session): implement payment methods session confirm ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] New feature ## Description <!-- Describe your changes in detail --> This PR adds payment methods session confirm endpoint. This endpoint can be used to create multi use tokens for the given payment method data. Payment method session confirm endpoint creates a payment method based on the `payment_method_session` data. If tokenization parameter is passed when creating the session, then based on the tokenization type appropriate action is taken - multi_use: A zero auth payment is created and the payment method is updated with the connector mandate details of multi use token. - single_use: The payment method data is tokenized at the connector and the single use token is stored in the redis. This will have an expiry and the ttl in redis is same as the expiry. Payment method update endpoint has been modified to take in connector_token_details. This will be used by the payments service to update the payment method with connector details. Payment method session endpoint also supports passing a `return_url`. This return url will be used to redirect the customer after adding the payment method. <!-- 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). --> Add the ability for payment methods to create `multi_use` tokens. These tokens can be used by the merchant to create recurring payments. The interaction between various services looks like this ```mermaid sequenceDiagram participant Client as Client participant PaymentMethodSession as Payment Method Session Service participant PaymentMethodService as Payment Method Service participant PaymentService as Payment Service participant Processor as Payment Service Provider ( PSP ) Client ->> PaymentMethodSession: Confirm ( payment instrument ) PaymentMethodSession ->> PaymentMethodService: Create payment method PaymentMethodService -->> PaymentMethodSession: Created payment method PaymentMethodSession ->> PaymentService: Create zero dollar payment PaymentService ->> Processor: Create zero dollar payment Processor ->> PaymentService: Multi use token PaymentService ->> PaymentMethodService: Update payment method PaymentMethodService ->> PaymentService: Updated payment method PaymentService -->> PaymentMethodSession: PaymentsResponse PaymentMethodSession -->> Client: Final Response ``` ## 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 payment method session ```bash curl --location 'http://localhost:8080/v2/payment-methods-session' \ --header 'x-profile-id: pro_m4wtxJJdOjEkxU91BRlH' \ --header 'Authorization: api-key=dev_B0nkISzanqmcJh32XBxVlyvKmMcX5Yq8FPcEkDDbcX8gO0UrgWD4HnpUedxfE32G' \ --header 'Content-Type: application/json' \ --data-raw '{ "customer_id": "12345_cus_0194f628ad6975c1afdd405f1fea91f2", "billing": { "address": { "first_name": "John", "last_name": "Dough" }, "email": "example@example.com" }, "psp_tokenization": { "tokenization_type": "multi_use" } }' ``` - Confirm the payment method session ```bash curl --location 'http://localhost:8080/v2/payment-methods-session/12345_pms_0194f8662d1f7f93a40742d6bad750f5/confirm' \ --header 'x-profile-id: pro_m4wtxJJdOjEkxU91BRlH' \ --header 'Authorization: publishable-key=pk_dev_fe499cfc3af84916b8a6c88d1e6d4685,client-secret=cs_0194f8662d217f039899809bd56b8935' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_B0nkISzanqmcJh32XBxVlyvKmMcX5Yq8FPcEkDDbcX8gO0UrgWD4HnpUedxfE32G' \ --data '{ "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "03", "card_exp_year": "25", "card_holder_name": "John Doe", "card_cvc": "100" } }, "payment_method_type": "card", "payment_method_subtype": "credit" }' ``` - Response ```json { "id": "12345_pms_019536be6fd07a528fe2fc854e1c4d85", "customer_id": "12345_cus_019536acdafa7072a37358266d29d792", "billing": { "address": { "city": null, "country": null, "line1": null, "line2": null, "line3": null, "zip": null, "state": null, "first_name": "John", "last_name": "Dough" }, "phone": null, "email": "example@example.com" }, "psp_tokenization": { "tokenization_type": "multi_use", "connector_id": null }, "network_tokenization": null, "expires_at": "2025-02-24T07:11:45.009Z", "client_secret": "CLIENT_SECRET_REDACTED", "return_url": "https://example.com/", "next_action": null, "authentication_details": { "status": "succeeded", "error": null }, "associated_payment_methods": null } ``` - Retrieve the payment method ```bash curl --location 'http://localhost:8080/v2/payment-methods/12345_pm_019504c895957b519c76a18e87dea20a' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'X-Profile-Id: pro_1RoTuoBXXI26yZynB5Fo' \ --header 'X-Resource-Type: payment_method' \ --header 'api-key: dev_is9uwUErOA7ZgYT8w8l7tBxFSEdjaS05m2tTolfmo5UjecJvpyqMJjs8GfFya4ag' ``` - Response ```json { "id": "12345_pm_019504c895957b519c76a18e87dea20a", "merchant_id": "cloth_seller_gcurrlmBuT1eneyzkrEl", "customer_id": "12345_cus_019504c817f17551810ceb7a97c2caeb", "payment_method_type": null, "payment_method_subtype": null, "recurring_enabled": false, "created": "2025-02-14T14:06:49.238Z", "last_used_at": "2025-02-14T14:06:49.238Z", "payment_method_data": { "card": { "issuer_country": null, "last4_digits": "4242", "expiry_month": "03", "expiry_year": "25", "card_holder_name": "John Doe", "card_fingerprint": null, "nick_name": null, "card_network": null, "card_isin": null, "card_issuer": null, "card_type": null, "saved_to_locker": true } }, "connector_tokens": [ { "connector_id": "mca_THuVOEAhX1eniohK6sdD", "token_type": "multi_use", "status": "active", "connector_token_request_reference_id": "UAXPZSDMQiNhPLdGSn", "original_payment_authorized_amount": 0, "original_payment_authorized_currency": "USD", "metadata": null, "token": "pm_1QsPXZD5R7gDAGffWSJ6wrsz" } ] } ``` ## 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
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/events.rs` - `crates/api_models/src/events/payment.rs` - `crates/api_models/src/payment_methods.rs` - ... and 2 more files **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/payment_attempt.rs` - `crates/diesel_models/src/payment_method.rs` - `crates/diesel_models/src/payment_methods_session.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/api.rs` - `crates/hyperswitch_domain_models/src/mandates.rs` - `crates/hyperswitch_domain_models/src/merchant_account.rs` - ... and 4 more files **4. Core Business Logic** - `crates/router/src/core/admin.rs` - `crates/router/src/core/payment_methods.rs` - `crates/router/src/core/payment_methods/transformers.rs` - ... and 8 more files **5. Type Definitions** - `crates/common_types/src/payment_methods.rs` - `crates/router_env/src/logger/types.rs` **6. Utils** - `crates/common_utils/src/macros.rs` - `crates/router/src/routes/lock_utils.rs` **7. Other** - `api-reference-v2/api-reference/payment-method-session/payment-method-session--confirm-a-payment-method-session.mdx` - `api-reference-v2/mint.json` - `api-reference-v2/openapi_spec.json` - ... and 12 more files **Code Patterns Applied:** - Define new data structures (17 changes) - Implement new functions (39 changes) - Extend existing types with new fields (320 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 0fb01917: Files to modify: **crates/api_models/src/events.rs** Remove: - impl: impl ApiEventMetric for PaymentMethodsSessionResponse Add: - impl: impl ApiEventMetric for PaymentMethodsSessionUpdateRequest - impl: impl ApiEventMetric for PaymentMethodSessionResponse **crates/api_models/src/events/payment.rs** Remove: - function: private::get_api_event_type - function: private::get_api_event_type - impl: impl ApiEventMetric for payments::PaymentsResponse - impl: impl ApiEventMetric for PaymentsConfirmIntentResponse **crates/api_models/src/payment_methods.rs** Remove: - struct: pub::PaymentMethodsSessionResponse Add: - struct: pub::ConnectorTokenDetails - struct: pub::PaymentMethodsSessionUpdateRequest - struct: pub::PaymentMethodSessionConfirmRequest - struct: pub::PaymentMethodSessionResponse - struct: pub::AuthenticationDetails **crates/api_models/src/payments.rs** Remove: - struct: pub::PaymentsResponse - struct: pub::PaymentsConfirmIntentResponse Add: - function: pub::new_for_zero_auth_payment - function: private::try_from - impl: impl AmountDetails - impl: impl TryFrom<payment_methods::CardDetail> for Card **crates/api_models/src/webhooks.rs** Modify existing code **crates/common_enums/src/enums.rs** Add: - enum: pub::ConnectorTokenStatus **crates/common_types/src/payment_methods.rs** Modify existing code **crates/common_utils/src/macros.rs** Modify existing code **crates/diesel_models/src/payment_attempt.rs** Modify existing code **crates/diesel_models/src/payment_method.rs** Add: - function: private::deref - function: private::deref_mut - function: pub::insert_payment_token_reference_record - function: private::from_sql - struct: pub::CommonMandateReference - impl: impl std::ops::Deref for PaymentsTokenReference - impl: impl std::ops::DerefMut for PaymentsTokenReference - impl: impl diesel::deserialize::FromSql<diesel::sql_types::Jsonb, DB> for CommonMandateReference **crates/diesel_models/src/payment_methods_session.rs** Remove: - struct: pub::PaymentMethodsSession Add: - function: pub::apply_changeset - struct: pub::PaymentMethodSession - struct: pub::PaymentMethodsSessionUpdateInternal - impl: impl PaymentMethodSession **crates/hyperswitch_domain_models/src/api.rs** Add: - function: pub::get_json_body - impl: impl ApplicationResponse<R> **crates/hyperswitch_domain_models/src/mandates.rs** Remove: - struct: pub::PaymentsMandateReferenceRecord Add: - function: private::deref_mut - function: pub::insert_payment_token_reference_record - function: private::from - function: private::from - struct: pub::ConnectorTokenReferenceRecord - struct: pub::CommonMandateReference - impl: impl std::ops::DerefMut for PaymentsTokenReference - impl: impl From<diesel_models::PaymentsTokenReference> for PaymentsTokenReference - impl: impl From<PaymentsTokenReference> for diesel_models::PaymentsTokenReference **crates/hyperswitch_domain_models/src/merchant_account.rs** Modify existing code **crates/hyperswitch_domain_models/src/payment_methods.rs** Add: - function: pub::set_payment_method_type - function: pub::set_payment_method_subtype - struct: pub::PaymentMethodSession - struct: pub::PaymentMethodsSessionUpdateInternal **crates/hyperswitch_domain_models/src/payments/payment_attempt.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_data.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_response_types.rs** Modify existing code **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/openapi/src/routes/payment_method.rs** Add: - function: pub::payment_method_session_confirm **crates/openapi/src/routes/payments.rs** Modify existing code **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/core/payment_methods.rs** Modify existing code **crates/router/src/core/payment_methods/transformers.rs** Add: - function: pub::generate_payment_method_session_response - function: private::foreign_from - impl: impl transformers::ForeignFrom<api_models::payment_methods::ConnectorTokenDetails> for hyperswitch_domain_models::mandates::ConnectorTokenReferenceRecord **crates/router/src/core/payments.rs** Remove: - function: pub::handle_payments_intent_response **crates/router/src/core/payments/operations/payment_confirm_intent.rs** Modify existing code **crates/router/src/core/payments/operations/payment_response.rs** Add: - function: private::save_pm_and_mandate **crates/router/src/core/payments/tokenization.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/core/payouts.rs** Modify existing code **crates/router/src/core/webhooks/incoming_v2.rs** Modify existing code **crates/router/src/core/webhooks/recovery_incoming.rs** Modify existing code **crates/router/src/db/kafka_store.rs** Add: - function: private::update_payment_method_session **crates/router/src/db/payment_method_session.rs** Add: - function: private::update_payment_method_session - function: private::update_payment_method_session **crates/router/src/lib.rs** Modify existing code **crates/router/src/routes.rs** Modify existing code **crates/router/src/routes/app.rs** Remove: - struct: pub::PaymentMethodsSession - impl: impl PaymentMethodsSession Add: - struct: pub::PaymentMethodSession - impl: impl PaymentMethodSession **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/payment_methods.rs** Add: - function: pub::payment_methods_session_update - function: pub::payment_method_session_confirm **crates/router/src/routes/payments.rs** Modify existing code **crates/router_env/src/logger/types.rs** Modify existing code **crates/storage_impl/src/errors.rs** Modify existing code
{"pr_number": 7248, "pr_title": "feat(payment_method_session): implement payment methods session confirm", "merged_at": "2025-02-26T18:13:18Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/events.rs", "crates/api_models/src/events/payment.rs", "crates/api_models/src/payment_methods.rs", "crates/api_models/src/payments.rs", "crates/api_models/src/webhooks.rs"], "database": ["crates/diesel_models/src/payment_attempt.rs", "crates/diesel_models/src/payment_method.rs", "crates/diesel_models/src/payment_methods_session.rs"], "domain": ["crates/hyperswitch_domain_models/src/api.rs", "crates/hyperswitch_domain_models/src/mandates.rs", "crates/hyperswitch_domain_models/src/merchant_account.rs", "crates/hyperswitch_domain_models/src/payment_methods.rs", "crates/hyperswitch_domain_models/src/payments/payment_attempt.rs", "crates/hyperswitch_domain_models/src/router_data.rs", "crates/hyperswitch_domain_models/src/router_response_types.rs"], "core_business": ["crates/router/src/core/admin.rs", "crates/router/src/core/payment_methods.rs", "crates/router/src/core/payment_methods/transformers.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/payments/operations/payment_confirm_intent.rs", "crates/router/src/core/payments/operations/payment_response.rs", "crates/router/src/core/payments/tokenization.rs", "crates/router/src/core/payments/transformers.rs", "crates/router/src/core/payouts.rs", "crates/router/src/core/webhooks/incoming_v2.rs", "crates/router/src/core/webhooks/recovery_incoming.rs"], "types": ["crates/common_types/src/payment_methods.rs", "crates/router_env/src/logger/types.rs"], "utils": ["crates/common_utils/src/macros.rs", "crates/router/src/routes/lock_utils.rs"], "other": ["api-reference-v2/api-reference/payment-method-session/payment-method-session--confirm-a-payment-method-session.mdx", "api-reference-v2/mint.json", "api-reference-v2/openapi_spec.json", "crates/common_enums/src/enums.rs", "crates/openapi/src/openapi_v2.rs", "crates/openapi/src/routes/payment_method.rs", "crates/openapi/src/routes/payments.rs", "crates/router/src/db/kafka_store.rs", "crates/router/src/db/payment_method_session.rs", "crates/router/src/lib.rs", "crates/router/src/routes.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/payment_methods.rs", "crates/router/src/routes/payments.rs", "crates/storage_impl/src/errors.rs"]}, "change_types": {"structs_added": 17, "functions_added": 39, "enums_added": 2, "fields_added": 320, "imports_added": 5, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(cypress): fix itaubank, datatrans and facilitapay ## 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 fixes Cypress tests for Itaubank, Paybox and Datatrans. Datatrans still fail. Datatrans fails because `ResponseCustom` needs a refactor while Paybox requires us to pass `FR` as country and upon fixing it, it started to say wrong creds. Facilitapay has no issues. Wise and Elavon creds issue. JP Morgan addressed in https://github.com/juspay/hyperswitch/pull/8282 ### 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). --> Fix stuff. Closes #8230 ## 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)? --> |command|screenshot| |-|-| |`CYPRESS_CONNECTOR=itaubank npm run cypress:payments`|<img width="420" alt="image" src="https://github.com/user-attachments/assets/988695cf-97af-4c6d-88bc-8fdc04ae4caf" />| |`CYPRESS_CONNECTOR=datatrans npm run cypress:payments`|<img width="424" alt="image" src="https://github.com/user-attachments/assets/398e7468-fec9-43f9-a8e4-9bc24c41eeb2" />| |`CYPRESS_CONNECTOR=facilitapay npm run cypress:payments`|![image](https://github.com/user-attachments/assets/fe19b957-7f86-4936-a75e-514d589cdb6c)| ## 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/Datatrans.js` - `cypress-tests/cypress/e2e/configs/Payment/ItauBank.js` - `cypress-tests/cypress/e2e/configs/Payment/Modifiers.js` - ... and 1 more files **Code Patterns Applied:** - Extend existing types with new fields (402 changes)
{"pr_number": 8229, "pr_title": "fix(cypress): fix itaubank, datatrans and facilitapay", "merged_at": "2025-06-10T10:26:47Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "connector"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/configs/Payment/Datatrans.js", "cypress-tests/cypress/e2e/configs/Payment/ItauBank.js", "cypress-tests/cypress/e2e/configs/Payment/Modifiers.js", "cypress-tests/cypress/e2e/configs/Payment/Utils.js"]}, "change_types": {"fields_added": 402}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
refactor(users): remove deprecated permission groups ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Deprecated groups include: 1. organizationManage 2. merchantDetailsView 3. merchantDetailsManage These permissions are equivalent to organizationManage == accountManage merchantDetailsManage == accountManage merchantDetailsView == accountView Also earlier validation blocks organizationManage when creating custom roles because this permission was only available for predefined roles. We will be removing that validation check as the permission itself doesn't exists now. ### 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 Required to remove deprecated apis. ## How did you test it? Local Verification Steps: 1. Created custom roles using deprecated permissions. 2. Verified the actual access those roles provided. 3. Ran the query to replace/update the deprecated permissions. 4. Rechecked the same roles after the update. 5. Confirmed that the access remained unchanged post-migration. ## 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/utils/user_role.rs` **2. Other** - `crates/common_enums/src/enums.rs` - `crates/router/src/services/authorization/info.rs` - `crates/router/src/services/authorization/permission_groups.rs` - ... and 3 more files **Code Patterns Applied:** - Add conditional logic for feature flags or filtering (1 changes) - Modify database queries (4 changes) **Detailed Identifier Changes:** Commit 1f34f890: Files to modify: **crates/common_enums/src/enums.rs** Modify existing code **crates/router/src/services/authorization/info.rs** Modify existing code **crates/router/src/services/authorization/permission_groups.rs** Modify existing code **crates/router/src/services/authorization/roles/predefined_roles.rs** Modify existing code **crates/router/src/utils/user_role.rs** Modify existing code
{"pr_number": 9604, "pr_title": "refactor(users): remove deprecated permission groups", "merged_at": "2025-10-16T07:26:55Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant"]}, "hierarchy": {"utils": ["crates/router/src/utils/user_role.rs"], "other": ["crates/common_enums/src/enums.rs", "crates/router/src/services/authorization/info.rs", "crates/router/src/services/authorization/permission_groups.rs", "crates/router/src/services/authorization/roles/predefined_roles.rs", "migrations/2025-10-06-111411_deprecated_roles_backfill/down.sql", "migrations/2025-10-06-111411_deprecated_roles_backfill/up.sql"]}, "change_types": {"conditionals_added": 1, "database_queries": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): payment links - add support for custom background image and layout in details section ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Hotfix for https://github.com/juspay/hyperswitch/pull/6725 ### 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. 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.html` - ... and 3 more files **5. Type Definitions** - `crates/router/src/types/transformers.rs` **6. Configuration Files** - `config/deployments/production.toml` **7. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - `crates/common_enums/src/enums.rs` - ... and 3 more files **Code Patterns Applied:** - Define new data structures (3 changes) - Implement new functions (8 changes) - Extend existing types with new fields (64 changes) - Add conditional logic for feature flags or filtering (18 changes) **Detailed Identifier Changes:** Commit 4c2c05a1: Files to modify: **crates/api_models/src/admin.rs** Add: - struct: pub::PaymentLinkBackgroundImageConfig **crates/api_models/src/payments.rs** Modify existing code **crates/common_enums/src/enums.rs** Add: - mod: private::ui **crates/common_enums/src/enums/ui.rs** Add: - function: private::deserialize - function: private::expecting - function: private::visit_str - function: private::serialize - struct: private::ElementSizeVisitor - enum: pub::ElementPosition - enum: pub::ElementSize - enum: pub::SizeVariants - enum: pub::PaymentLinkDetailsLayout - impl: impl Deserialize<'de> for ElementSize - impl: impl Visitor<'_> for ElementSizeVisitor - impl: impl Serialize for ElementSize **crates/diesel_models/src/business_profile.rs** Add: - struct: pub::PaymentLinkBackgroundImageConfig **crates/diesel_models/src/payment_intent.rs** Modify existing code **crates/hyperswitch_domain_models/src/lib.rs** Add: - function: private::convert_from - function: private::convert_back - impl: impl ApiModelToDieselModelConvertor<api_models::admin::PaymentLinkBackgroundImageConfig> for diesel_models::business_profile::PaymentLinkBackgroundImageConfig **crates/openapi/src/openapi.rs** Modify existing code **crates/openapi/src/openapi_v2.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** Add: - function: private::foreign_from - impl: impl ForeignFrom<diesel_models::business_profile::PaymentLinkBackgroundImageConfig> for api_models::admin::PaymentLinkBackgroundImageConfig
{"pr_number": 6831, "pr_title": "feat(core): payment links - add support for custom background image and layout in details section", "merged_at": "2024-12-12T17:58:15Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "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.html", "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/payments/transformers.rs"], "types": ["crates/router/src/types/transformers.rs"], "config": ["config/deployments/production.toml"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/common_enums/src/enums.rs", "crates/common_enums/src/enums/ui.rs", "crates/openapi/src/openapi.rs", "crates/openapi/src/openapi_v2.rs"]}, "change_types": {"structs_added": 3, "functions_added": 8, "enums_added": 4, "fields_added": 64, "imports_added": 4, "conditionals_added": 18}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
docs: upload new logos ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [x] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Closes - #5175 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with 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. Other** - `README.md` - `docs/imgs/hyperswitch-logo-dark.svg` - `docs/imgs/hyperswitch-logo-light.svg` - ... and 2 more files
{"pr_number": 6368, "pr_title": "docs: upload new logos", "merged_at": "2024-10-18T14:34:22Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"other": ["README.md", "docs/imgs/hyperswitch-logo-dark.svg", "docs/imgs/hyperswitch-logo-light.svg", "docs/imgs/hyperswitch-product.png", "docs/imgs/switch.png"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(connector): [TRUSTPAY] Consuming Amount 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 Ref [PR](https://github.com/juspay/hyperswitch/pull/8455) ### 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/hyperswitch_connectors/src/connectors/trustpay.rs` - `crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (7 changes) **Detailed Identifier Changes:** Commit dfcba7ab: Files to modify: **crates/hyperswitch_connectors/src/connectors/trustpay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs** Modify existing code
{"pr_number": 8508, "pr_title": "fix(connector): [TRUSTPAY] Consuming Amount in PSync Response", "merged_at": "2025-07-01T09:56:26Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/trustpay.rs", "crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs"]}, "change_types": {"fields_added": 7}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(router): Introduce ApiKeyId id type ## 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 --> ### 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)? --> 1a. Create API key ``` curl --location 'http://localhost:8080/api_keys/merchant_1729063721' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "name": "API Key 1", "description": null, "expiration": "2038-01-19T03:14:08.000Z" }' ``` 1b. Response ```json { "key_id": "dev_ZfucbDHJm7pbcFjsoq5I", "merchant_id": "merchant_1729063721", "name": "API Key 1", "description": null, "api_key": "dev_sNyAhsbOkEYtuuUvMOzlTIMpTZ3Kd9AC5sboxRuQOMX5xKyqTDn0oG9Vaq4XGwN1", "created": "2024-10-16T07:28:44.906Z", "expiration": "2038-01-19T03:14:08.000Z" } ``` 2a. Update API Key ``` curl --location 'http://localhost:8080/api_keys/merchant_1729063721/dev_ZfucbDHJm7pbcFjsoq5I' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "name": null, "description": "My very awesome API key", "expiration": null }' ``` 2b. Reponse ```json { "key_id": "dev_ZfucbDHJm7pbcFjsoq5I", "merchant_id": "merchant_1729063721", "name": "API Key 1", "description": "My very awesome API key", "prefix": "dev_sNyAhsbO", "created": "2024-10-16T07:28:44.906Z", "expiration": "2038-01-19T03:14:08.000Z" } ``` 3a. Retrieve API Key ``` curl --location 'http://localhost:8080/api_keys/merchant_1729063721/dev_ZfucbDHJm7pbcFjsoq5I' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' ``` 3b. Response ```json { "key_id": "dev_ZfucbDHJm7pbcFjsoq5I", "merchant_id": "merchant_1729063721", "name": "API Key 1", "description": "My very awesome API key", "prefix": "dev_sNyAhsbO", "created": "2024-10-16T07:28:44.906Z", "expiration": "2038-01-19T03:14:08.000Z" } ``` 4a. Delete API Key ``` curl --location --request DELETE 'http://localhost:8080/api_keys/merchant_1729063721/dev_ZfucbDHJm7pbcFjsoq5I' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' ``` 4b. Response ```json { "merchant_id": "merchant_1729063721", "key_id": "dev_ZfucbDHJm7pbcFjsoq5I", "revoked": true } ``` 5a. List API Keys ``` curl --location 'http://localhost:8080/api_keys/merchant_1729063721/list' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' ``` 5b. Response ```json [ { "key_id": "dev_kKu6dWq8k3ZwWOfsS3fi", "merchant_id": "merchant_1729063721", "name": "API Key 1", "description": null, "prefix": "dev_6gvWcG7g", "created": "2024-10-16T07:32:48.698Z", "expiration": "2038-01-19T03:14:08.000Z" }, { "key_id": "dev_f1PMFHmWHi2v0fmZp7t2", "merchant_id": "merchant_1729063721", "name": "API Key 2", "description": null, "prefix": "dev_jSU9qvIU", "created": "2024-10-16T07:32:54.057Z", "expiration": "2038-01-19T03:14:08.000Z" } ] ``` ## 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. API Request/Response Models** - `crates/api_models/src/api_keys.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/api_keys.rs` - `crates/diesel_models/src/query/api_keys.rs` **3. Core Business Logic** - `crates/router/src/core/api_keys.rs` **4. Utils** - `crates/common_utils/src/events.rs` - `crates/common_utils/src/id_type.rs` - `crates/common_utils/src/id_type/api_key.rs` **5. Configuration Files** - `.typos.toml` **6. Other** - `crates/router/src/db/api_keys.rs` - `crates/router/src/db/kafka_store.rs` - `crates/router/src/routes/api_keys.rs` - ... and 3 more files **Code Patterns Applied:** - Implement new functions (7 changes) - Extend existing types with new fields (44 changes) **Detailed Identifier Changes:** Commit b3ce373f: Files to modify: **crates/api_models/src/api_keys.rs** Modify existing code **crates/common_utils/src/events.rs** Modify existing code **crates/common_utils/src/id_type.rs** Add: - mod: private::api_key **crates/common_utils/src/id_type/api_key.rs** Add: - function: pub::generate_key_id - function: private::get_api_event_type - function: private::get_api_event_type - function: private::get_api_event_type - impl: impl ApiKeyId - impl: impl crate::events::ApiEventMetric for ApiKeyId - impl: impl crate::events::ApiEventMetric for (super::MerchantId, ApiKeyId) - impl: impl crate::events::ApiEventMetric for (&super::MerchantId, &ApiKeyId) **crates/diesel_models/src/api_keys.rs** Modify existing code **crates/diesel_models/src/query/api_keys.rs** Modify existing code **crates/router/src/core/api_keys.rs** Modify existing code **crates/router/src/db/api_keys.rs** Modify existing code **crates/router/src/db/kafka_store.rs** Modify existing code **crates/router/src/routes/api_keys.rs** Modify existing code **crates/router/src/services/authentication.rs** Modify existing code **crates/router/src/services/authentication/decision.rs** Modify existing code **crates/router/src/services/authentication/detached.rs** Add: - function: private::append_api_key
{"pr_number": 6324, "pr_title": "refactor(router): Introduce ApiKeyId id type", "merged_at": "2024-10-21T14:14:20Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/api_keys.rs"], "database": ["crates/diesel_models/src/api_keys.rs", "crates/diesel_models/src/query/api_keys.rs"], "core_business": ["crates/router/src/core/api_keys.rs"], "utils": ["crates/common_utils/src/events.rs", "crates/common_utils/src/id_type.rs", "crates/common_utils/src/id_type/api_key.rs"], "config": [".typos.toml"], "other": ["crates/router/src/db/api_keys.rs", "crates/router/src/db/kafka_store.rs", "crates/router/src/routes/api_keys.rs", "crates/router/src/services/authentication.rs", "crates/router/src/services/authentication/decision.rs", "crates/router/src/services/authentication/detached.rs"]}, "change_types": {"functions_added": 7, "fields_added": 44, "imports_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(user): use global redis key prefix for user lineage context ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR updates the lineage context Redis caching logic to use a dedicated global Redis key prefix (`global`) instead of the default tenant-scoped prefixes (`public_`, `public_v2_`), causing inconsistencies between deployments (i.e., v1 and v2). Introduced a new helper: `get_redis_connection_for_global_tenant` - Fetches Redis connection with `key_prefix` set to `global`. - Updated lineage context caching (`get_lineage_context_from_cache`, `set_lineage_context_in_cache`) to use the global Redis connection This will enable [https://github.com/juspay/hyperswitch/pull/7871](https://github.com/juspay/hyperswitch/pull/7871) to work with both v1 and v2 merchant accounts. The redis-key should now be in the format of global:LINEAGE_CONTEXT_<user_id> ### 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). --> Previously, lineage context was being cached with environment-specific prefixes (`public_` in V1 and `public_v2_` in V2), leading to inconsistencies in user experience during login/logout flows across deployments. Switching to a consistent global prefix resolves this by isolating user lineage data under a unified Redis namespace. ## 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)? --> Use test cases from this PR: [https://github.com/juspay/hyperswitch/pull/7871](https://github.com/juspay/hyperswitch/pull/7871) The key should now be in the format of global:LINEAGE_CONTEXT_<user_id> <img width="1202" alt="image" src="https://github.com/user-attachments/assets/830883c3-5e08-4e00-b101-c2af6a251564" /> ## 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/utils/user.rs` **Code Patterns Applied:** - Implement new functions (1 changes) - Extend existing types with new fields (7 changes) **Detailed Identifier Changes:** Commit 25197c66: Files to modify: **crates/router/src/utils/user.rs** Add: - function: pub::get_redis_connection_for_global_tenant
{"pr_number": 7892, "pr_title": "feat(user): use global redis key prefix for user lineage context", "merged_at": "2025-04-24T17:38:33Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant", "user"]}, "hierarchy": {"utils": ["crates/router/src/utils/user.rs"]}, "change_types": {"functions_added": 1, "fields_added": 7}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [Hyperwallet] template code ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> template for hyperwallet integration ### 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). --> No Testing Required ## 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. External Connector Integration** - `crates/common_enums/src/connector_enums.rs` - `crates/connector_configs/src/connector.rs` - `crates/connector_configs/toml/development.toml` - ... and 12 more files **3. Tests** - `config/deployments/integration_test.toml` - `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 (10 changes) - Implement new functions (83 changes) - Extend existing types with new fields (163 changes) **Detailed Identifier Changes:** Commit b797d934: 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::hyperwallet **crates/hyperswitch_connectors/src/connectors/hyperwallet.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::Hyperwallet - impl: impl Hyperwallet - impl: impl api::Payment for Hyperwallet - impl: impl api::PaymentSession for Hyperwallet - impl: impl api::ConnectorAccessToken for Hyperwallet - impl: impl api::MandateSetup for Hyperwallet - impl: impl api::PaymentAuthorize for Hyperwallet - impl: impl api::PaymentSync for Hyperwallet - impl: impl api::PaymentCapture for Hyperwallet - impl: impl api::PaymentVoid for Hyperwallet - impl: impl api::Refund for Hyperwallet - impl: impl api::RefundExecute for Hyperwallet - impl: impl api::RefundSync for Hyperwallet - impl: impl api::PaymentToken for Hyperwallet - impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for Hyperwallet - impl: impl ConnectorCommonExt<Flow, Request, Response> for Hyperwallet - impl: impl ConnectorCommon for Hyperwallet - impl: impl ConnectorValidation for Hyperwallet - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Hyperwallet - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Hyperwallet - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Hyperwallet - impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Hyperwallet - impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Hyperwallet - impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Hyperwallet - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Hyperwallet - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Hyperwallet - impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Hyperwallet - impl: impl webhooks::IncomingWebhook for Hyperwallet - impl: impl ConnectorSpecifications for Hyperwallet - mod: pub::transformers **crates/hyperswitch_connectors/src/connectors/hyperwallet/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::HyperwalletRouterData - struct: pub::HyperwalletPaymentsRequest - struct: pub::HyperwalletCard - struct: pub::HyperwalletAuthType - struct: pub::HyperwalletPaymentsResponse - struct: pub::HyperwalletRefundRequest - struct: pub::RefundResponse - struct: pub::HyperwalletErrorResponse - enum: pub::HyperwalletPaymentStatus - enum: pub::RefundStatus - impl: impl From<(StringMinorUnit, T)> for HyperwalletRouterData<T> - impl: impl TryFrom<&HyperwalletRouterData<&PaymentsAuthorizeRouterData>> for HyperwalletPaymentsRequest - impl: impl TryFrom<&ConnectorAuthType> for HyperwalletAuthType - impl: impl From<HyperwalletPaymentStatus> for common_enums::AttemptStatus - impl: impl TryFrom<ResponseRouterData<F, HyperwalletPaymentsResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData> - impl: impl TryFrom<&HyperwalletRouterData<&RefundsRouterData<F>>> for HyperwalletRefundRequest - 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/tests/connectors/hyperwallet.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::HyperwalletTest - impl: impl ConnectorActions for HyperwalletTest - impl: impl utils::Connector for HyperwalletTest **crates/router/tests/connectors/main.rs** Add: - mod: private::hyperwallet **crates/test_utils/src/connector_auth.rs** Modify existing code
{"pr_number": 8926, "pr_title": "feat(connector): [Hyperwallet] template code", "merged_at": "2025-08-14T08:29:02Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/connector_endpoints.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/hyperwallet.rs", "crates/hyperswitch_connectors/src/connectors/hyperwallet/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/hyperswitch_connectors/src/default_implementations_v2.rs", "crates/router/src/connector.rs", "crates/router/tests/connectors/hyperwallet.rs", "crates/router/tests/connectors/main.rs", "crates/test_utils/src/connector_auth.rs", "scripts/add_connector.sh"], "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": 163, "imports_added": 22}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(router): pass card network for external 3DS from additional_payment_method_data ## 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 --> - card network fetch from db was not being populated in payment call resulting in sending the default value which failed the payment - util function have been added to collect the card network from additional_payment_method_data - ucaf_indicator is being populated for mastercard - profile generic update is made optional to not update the force_3ds_challenge if it is passed as null - External authentication is disabled for Datatrans Note: hotfix raised against https://github.com/juspay/hyperswitch/pull/7473 ### 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 MCA(Cybersource): - Create MCA(Netcetera): - Create a payment call (enable external 3ds): ``` { "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": "5512459816707531", "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "Sakil Mostak", "card_cvc": "737" } }, "billing": { "address": { "city": "test", "country": "US", "line1": "here is some \n there is some \n none is some? \n ", "line2": "there", "line3": "anywhere", "zip": "560095", "state": "CA", "first_name": "Sakil", "last_name": "Mostak" }, "phone": { "number": "1234567890", "country_code": "+1" }, "email": "guest@example.com" }, "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" }, "authentication_type": "three_ds" } ``` Response should have the following data: ``` { "payment_id": "pay_DJzWCB8vpM2nl6tti5q5", "merchant_id": "merchant_1741687051", "status": "requires_customer_action", "amount": 499, "net_amount": 499, "shipping_cost": null, "amount_capturable": 499, "amount_received": null, "connector": "cybersource", "client_secret": "pay_DJzWCB8vpM2nl6tti5q5_secret_JwlJcjRW9Q5TRrlNKNrf", "created": "2025-03-11T10:43:06.966Z", "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": "7531", "card_type": null, "card_network": "Mastercard", "card_issuer": null, "card_issuing_country": null, "card_isin": "551245", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "Sakil Mostak", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": "token_eappafndmAWU8SvNsaoy", "shipping": null, "billing": { "address": { "city": "test", "country": "US", "line1": "here is some \n there is some \n none is some? \n ", "line2": "there", "line3": "anywhere", "zip": "560095", "state": "CA", "first_name": "Sakil", "last_name": "Mostak" }, "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": "three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": { "type": "three_ds_invoke", "three_ds_data": { "three_ds_authentication_url": "http://localhost:8080/payments/pay_DJzWCB8vpM2nl6tti5q5/3ds/authentication", "three_ds_authorize_url": "http://localhost:8080/payments/pay_DJzWCB8vpM2nl6tti5q5/merchant_1741687051/authorize/cybersource", "three_ds_method_details": { "three_ds_method_key": "threeDSMethodData", "three_ds_method_data_submission": true, "three_ds_method_data": "eyJ0aHJlZURTTWV0aG9kTm90aWZpY2F0aW9uVVJMIjoiaHR0cHM6Ly9leGFtcGxlLmNvbS8zZHMtbWV0aG9kLW5vdGlmaWNhdGlvbi11cmwiLCJ0aHJlZURTU2VydmVyVHJhbnNJRCI6ImVkNmQ4Y2M1LWU2YTgtNDg4ZC05NDI4LWM2ZDRkZWY2ZDFlNiJ9", "three_ds_method_url": "https://ndm-prev.3dss-non-prod.cloud.netcetera.com/acs/3ds-method" }, "poll_config": { "poll_id": "external_authentication_pay_DJzWCB8vpM2nl6tti5q5", "delay_in_secs": 2, "frequency": 5 }, "message_version": "2.3.1", "directory_server_id": "A000000004" } }, "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": 1741689786, "expires": 1741693386, "secret": "epk_71a1ecdc177e48a2af0172ad2bb14fc8" }, "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_IauTXmHo2gR6Cufm1fXK", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_qJi1npMpCWiTuiL0rGOK", "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": "ed6d8cc5-e6a8-488d-9428-c6d4def6d1e6", "version": "2.3.1", "error_code": null, "error_message": null }, "external_3ds_authentication_attempted": true, "expires_on": "2025-03-11T10:58:06.966Z", "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-03-11T10:43:07.760Z", "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" } ``` - Create Challenge ``` curl --location '{{baseurl}}/payments/{{payment_id}}/3ds/authentication' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key:{{api_key}}' \ --data '{ "client_secret": "{{client_secret}}", "device_channel": "BRW", "threeds_method_comp_ind": "Y" }' ``` - Response should contain following data: ``` { "trans_status": "Y", "acs_url": null, "challenge_request": null, "acs_reference_number": null, "acs_trans_id": null, "three_dsserver_trans_id": "ed6d8cc5-e6a8-488d-9428-c6d4def6d1e6", "acs_signed_content": null, "three_ds_requestor_url": "https://google.com" } ``` - Authorize from Netcetera: ``` curl --location --request POST '{{baseurl}}/payments/{{payment_id}}/{{merchant_id}}/authorize/checkout' \ --header 'api-key:{{api_Key}}' ``` - Retrieve the transaction, the status should be succeeded in response, below is an example: ``` { "payment_id": "pay_lTIv7ZbWr5Y237CqHXxq", "merchant_id": "merchant_1741687051", "status": "succeeded", "amount": 499, "net_amount": 499, "shipping_cost": null, "amount_capturable": 0, "amount_received": 499, "connector": "cybersource", "client_secret": "pay_lTIv7ZbWr5Y237CqHXxq_secret_cYx3O8cQMGUR2O1RVta9", "created": "2025-03-11T10:28:34.005Z", "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": "7531", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "551245", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "Sakil Mostak", "payment_checks": { "avs_response": { "code": "X", "codeRaw": "I1" }, "card_verification": null }, "authentication_data": null }, "billing": null }, "payment_token": "token_P8rNgP3WpYuJWLRgRWaz", "shipping": null, "billing": { "address": { "city": "test", "country": "US", "line1": "here is some \n there is some \n none is some? \n ", "line2": "there", "line3": "anywhere", "zip": "560095", "state": "CA", "first_name": "Sakil", "last_name": "Mostak" }, "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": "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": "7416889232566498604807", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_lTIv7ZbWr5Y237CqHXxq_1", "payment_link": null, "profile_id": "pro_IauTXmHo2gR6Cufm1fXK", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_qJi1npMpCWiTuiL0rGOK", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": { "authentication_flow": "frictionless", "electronic_commerce_indicator": null, "status": "success", "ds_transaction_id": "19329442-7532-4e25-bc88-a5f1d99c1f5e", "version": "2.3.1", "error_code": null, "error_message": null }, "external_3ds_authentication_attempted": true, "expires_on": "2025-03-11T10:43:34.005Z", "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": "pm_Wfs6CcChddyjlx99kQKU", "payment_method_status": "active", "updated": "2025-03-11T10:28:43.771Z", "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" } ``` ## 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/business_profile.rs` **2. Core Business Logic** - `crates/router/src/core/admin.rs` - `crates/router/src/core/payments/transformers.rs` **3. External Connector Integration** - `crates/common_enums/src/connector_enums.rs` - `crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs` - `crates/hyperswitch_connectors/src/utils.rs` **Code Patterns Applied:** - Implement new functions (2 changes) - Extend existing types with new fields (4 changes) **Detailed Identifier Changes:** Commit 98ce5f42: Files to modify: **crates/common_enums/src/connector_enums.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Add: - function: private::get_card_network_from_additional_payment_method_data **crates/hyperswitch_domain_models/src/business_profile.rs** Modify existing code **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code
{"pr_number": 7481, "pr_title": "fix(router): pass card network for external 3DS from additional_payment_method_data", "merged_at": "2025-03-11T15:42:49Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/business_profile.rs"], "core_business": ["crates/router/src/core/admin.rs", "crates/router/src/core/payments/transformers.rs"], "connectors": ["crates/common_enums/src/connector_enums.rs", "crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs"]}, "change_types": {"functions_added": 2, "fields_added": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [NETCETERA] add `sdk-type` and `default-sdk-type` in netcetera authentication request ## 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 `sdk-type` and `default-sdk-type` in netcetera authentication request add `sdk-type` in SDK Information of PaymentsExternalAuthenticationRequest ### 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)? --> Tested Manually 1. Sanity External Authentication Request through Mobile SDK CURL ``` curl --location 'localhost:8080/payments/pay_OxGBWwRs9qH0nJP1CI99/3ds/authentication' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_74ab7c8aac7c49d793f9c980c544a09f' \ --data '{ "client_secret": "pay_OxGBWwRs9qH0nJP1CI99_secret_Vw1ItPPePtpz32zI2V9d", "device_channel": "APP", "threeds_method_comp_ind": "Y", "sdk_information": { "sdk_app_id": "92deb809-a452-47af-ac3b-301978a9e9e0", "sdk_enc_data": "eyJraWQiOiIzYzVlZDMxOTBhOWFlNGI2OTI1NjZiYmZkZTc0ODNiZTI4MDAyMzg4IiwiZW5jIjoiQTEyOEdDTSIsImFsZyI6IlJTQS1PQUVQLTI1NiJ9.at-tUcn4zXOCzxRdP7FB6cpSLsC9M5fKRCLZrup6nIkwfV80aa0.rQ2YtC2RZvW-LeznAErdMg", "sdk_ephem_pub_key": { "kty": "EC", "x": "P5zWKpoAZoUlrtUoe6Xzvia3zgCX1mSmpGj5XlV9R0w", "y": "ov2s2HF_HVwf2vzZMPOLjGwFASSmEGxeSUEuyMcrhLI", "crv": "P-256" }, "sdk_trans_id": "4fa7696e-ca08-42cc-806f-1081287a1b9b", "sdk_reference_number": "3DS_LOA_SDK_JTPL_020200_00788", "sdk_max_timeout": 5 } }' ``` Response ``` { "trans_status": "C", "acs_url": null, "challenge_request": null, "acs_reference_number": "3DS_LOA_ACS_201_13579", "acs_trans_id": "c532ad1e-0fb7-438e-a0db-be68405c6bdc", "three_dsserver_trans_id": "305f8eaa-43c1-49f0-a5f4-0789b8eae7d1", "acs_signed_content": "eyJhbGciOiJQUzI1NiIsIng1YyI6WyJNSUlFRURDQ0F2aWdBd0lCQWdJSWFYL2RWZE9CM0hnd0RRWUpLb1pJaHZjTkFRRUxCUUKQ", "three_ds_requestor_url": "https://google.com/" } ``` ## 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. External Connector Integration** - `crates/router/src/connector/netcetera/netcetera_types.rs` **3. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - `crates/openapi/src/openapi.rs` - ... and 1 more files **Code Patterns Applied:** - Implement new functions (1 changes) - Extend existing types with new fields (6 changes) **Detailed Identifier Changes:** Commit 64a7afa6: Files to modify: **crates/api_models/src/payments.rs** Add: - enum: pub::SdkType **crates/openapi/src/openapi.rs** Modify existing code **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/router/src/connector/netcetera/netcetera_types.rs** Add: - function: private::from - enum: pub::SdkType - impl: impl From<api_models::payments::SdkType> for SdkType
{"pr_number": 7156, "pr_title": "fix(connector): [NETCETERA] add `sdk-type` and `default-sdk-type` in netcetera authentication request", "merged_at": "2025-02-03T19:31:57Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs"], "connectors": ["crates/router/src/connector/netcetera/netcetera_types.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/openapi/src/openapi.rs", "crates/openapi/src/openapi_v2.rs"]}, "change_types": {"functions_added": 1, "enums_added": 2, "fields_added": 6}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [CYBERSOURCE] Passing pares_status for MasterCard & Visa and transaction_type field ## 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 --> Hotfix for [PR](https://github.com/juspay/hyperswitch/pull/8518) ### 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/payments.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/payment_attempt.rs` - `crates/diesel_models/src/payment_intent.rs` - `crates/diesel_models/src/schema.rs` - ... and 2 more files **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payments.rs` - `crates/hyperswitch_domain_models/src/payments/payment_attempt.rs` - `crates/hyperswitch_domain_models/src/payments/payment_intent.rs` - ... and 1 more files **4. Core Business Logic** - `crates/router/src/core/authentication/transformers.rs` - `crates/router/src/core/fraud_check/flows/checkout_flow.rs` - `crates/router/src/core/fraud_check/flows/fulfillment_flow.rs` - ... and 15 more files **5. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/redsys.rs` - `crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs` - ... and 7 more files **6. Type Definitions** - `crates/router/src/types.rs` - `crates/router/src/types/storage/payment_attempt.rs` **7. Utils** - `crates/router/src/utils/user/sample_data.rs` **8. Other** - `crates/hyperswitch_interfaces/src/api.rs` - `crates/hyperswitch_interfaces/src/conversion_impls.rs` - `crates/router/src/routes/payments.rs` - ... and 6 more files **Code Patterns Applied:** - Implement new functions (9 changes) - Extend existing types with new fields (143 changes) - Add conditional logic for feature flags or filtering (7 changes) **Detailed Identifier Changes:** Commit b6dfffdc: Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/diesel_models/src/payment_attempt.rs** Modify existing code **crates/diesel_models/src/payment_intent.rs** Modify existing code **crates/diesel_models/src/schema.rs** Modify existing code **crates/diesel_models/src/schema_v2.rs** Modify existing code **crates/diesel_models/src/user/sample_data.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs** Add: - enum: pub::CybersourceParesStatus **crates/hyperswitch_connectors/src/connectors/redsys.rs** Add: - function: private::generate_connector_request_reference_id **crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_attempt.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_intent.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_data.rs** Modify existing code **crates/hyperswitch_interfaces/src/api.rs** Add: - function: private::generate_connector_request_reference_id **crates/hyperswitch_interfaces/src/connector_integration_interface.rs** Add: - function: private::generate_connector_request_reference_id **crates/hyperswitch_interfaces/src/conversion_impls.rs** Modify existing code **crates/router/src/core/authentication/transformers.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/mandate/utils.rs** Modify existing code **crates/router/src/core/payment_methods.rs** Modify existing code **crates/router/src/core/payments.rs** Add: - function: private::set_connector_request_reference_id_in_payment_attempt - function: private::set_connector_request_reference_id_in_payment_attempt - function: private::set_connector_request_reference_id_in_payment_attempt - function: private::set_connector_request_reference_id_in_payment_attempt - function: private::set_connector_request_reference_id_in_payment_attempt **crates/router/src/core/payments/helpers.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/retry.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/core/relay/utils.rs** Modify existing code **crates/router/src/core/unified_authentication_service/utils.rs** Modify existing code **crates/router/src/core/utils.rs** Modify existing code **crates/router/src/core/webhooks/utils.rs** Modify existing code **crates/router/src/routes/payments.rs** Modify existing code **crates/router/src/services/kafka/payment_intent.rs** Modify existing code **crates/router/src/services/kafka/payment_intent_event.rs** Modify existing code **crates/router/src/types.rs** Modify existing code **crates/router/src/types/api/verify_connector.rs** Modify existing code **crates/router/src/types/storage/payment_attempt.rs** Modify existing code **crates/router/src/utils/user/sample_data.rs** Modify existing code **crates/router/tests/connectors/aci.rs** Modify existing code **crates/router/tests/connectors/utils.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": 8578, "pr_title": "fix(connector): [CYBERSOURCE] Passing pares_status for MasterCard & Visa and transaction_type field", "merged_at": "2025-07-08T18:57:17Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs"], "database": ["crates/diesel_models/src/payment_attempt.rs", "crates/diesel_models/src/payment_intent.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.rs", "crates/hyperswitch_domain_models/src/payments/payment_attempt.rs", "crates/hyperswitch_domain_models/src/payments/payment_intent.rs", "crates/hyperswitch_domain_models/src/router_data.rs"], "core_business": ["crates/router/src/core/authentication/transformers.rs", "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/mandate/utils.rs", "crates/router/src/core/payment_methods.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/operations/payment_confirm.rs", "crates/router/src/core/payments/operations/payment_create.rs", "crates/router/src/core/payments/retry.rs", "crates/router/src/core/payments/transformers.rs", "crates/router/src/core/relay/utils.rs", "crates/router/src/core/unified_authentication_service/utils.rs", "crates/router/src/core/utils.rs", "crates/router/src/core/webhooks/utils.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs", "crates/hyperswitch_connectors/src/connectors/redsys.rs", "crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/hyperswitch_interfaces/src/connector_integration_interface.rs", "crates/router/src/types/api/verify_connector.rs", "crates/router/tests/connectors/aci.rs", "crates/router/tests/connectors/utils.rs", "migrations/2025-07-01-073253_add_connector_request_reference_id_and_is_payment_id_from_merchant/down.sql", "migrations/2025-07-01-073253_add_connector_request_reference_id_and_is_payment_id_from_merchant/up.sql"], "types": ["crates/router/src/types.rs", "crates/router/src/types/storage/payment_attempt.rs"], "utils": ["crates/router/src/utils/user/sample_data.rs"], "other": ["crates/hyperswitch_interfaces/src/api.rs", "crates/hyperswitch_interfaces/src/conversion_impls.rs", "crates/router/src/routes/payments.rs", "crates/router/src/services/kafka/payment_intent.rs", "crates/router/src/services/kafka/payment_intent_event.rs", "crates/storage_impl/src/mock_db/payment_attempt.rs", "crates/storage_impl/src/payments/payment_attempt.rs", "v2_migrations/2025-01-13-081847_drop_v1_columns/down.sql", "v2_migrations/2025-01-13-081847_drop_v1_columns/up.sql"]}, "change_types": {"functions_added": 9, "enums_added": 1, "fields_added": 143, "imports_added": 1, "conditionals_added": 7}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [CYBERSOURCE] fix CartesBancaires card_type for Cybersource …source (#8031) ## Type of Change <!-- Put an `x` in the boxes that apply --> Hotfix for [8031](https://github.com/juspay/hyperswitch/pull/8031) - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Clippy screenshot ![Screenshot 2025-05-22 at 3 07 28 PM](https://github.com/user-attachments/assets/3c49917d-d290-48ab-9509-e05b5893aad7) ### 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. 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 3 more files **Detailed Identifier Changes:** Commit 7c15f372: Files to modify: **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/payeezy/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/payone/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Modify existing code
{"pr_number": 8108, "pr_title": "fix(connector): [CYBERSOURCE] fix CartesBancaires card_type for Cybersource", "merged_at": "2025-05-22T09:47:47Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "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/payeezy/transformers.rs", "crates/hyperswitch_connectors/src/connectors/payone/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore(events): making events nanosecond level precision ## 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 --> Nanosecond level precision for time based fields ### 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 change would change the timestamp based fields to unix timestamp in nanosecond level precision ## 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="1513" height="875" alt="Screenshot 2025-07-25 at 6 31 43 PM" src="https://github.com/user-attachments/assets/30a52cfb-155e-4a6e-b19d-0fbb21613ddf" /> ## 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/router/src/services/kafka/dispute_event.rs` - `crates/router/src/services/kafka/fraud_check_event.rs` - `crates/router/src/services/kafka/payment_attempt_event.rs` - ... and 2 more files **Detailed Identifier Changes:** Commit c6fcf29f: Files to modify: **crates/router/src/services/kafka/dispute_event.rs** Modify existing code **crates/router/src/services/kafka/fraud_check_event.rs** Modify existing code **crates/router/src/services/kafka/payment_attempt_event.rs** Modify existing code **crates/router/src/services/kafka/payment_intent_event.rs** Modify existing code **crates/router/src/services/kafka/refund_event.rs** Modify existing code
{"pr_number": 8759, "pr_title": "chore(events): making events nanosecond level precision", "merged_at": "2025-08-06T12:20:15Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"other": ["crates/router/src/services/kafka/dispute_event.rs", "crates/router/src/services/kafka/fraud_check_event.rs", "crates/router/src/services/kafka/payment_attempt_event.rs", "crates/router/src/services/kafka/payment_intent_event.rs", "crates/router/src/services/kafka/refund_event.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(hipay): Add Template PR ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Template PR for Hipay ### 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). --> Template PR for Hipay ## 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)? --> Just CI -Checks. No need of testing it ## 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` - `crates/router/src/core/payments/connector_integration_v2_impls.rs` - `crates/router/src/core/payments/flows.rs` **2. External Connector Integration** - `crates/common_enums/src/connector_enums.rs` - `crates/connector_configs/src/connector.rs` - `crates/hyperswitch_connectors/src/connectors.rs` - ... and 9 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 3 more files **Code Patterns Applied:** - Define new data structures (10 changes) - Implement new functions (78 changes) - Extend existing types with new fields (152 changes) **Detailed Identifier Changes:** Commit add51526: 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::hipay **crates/hyperswitch_connectors/src/connectors/hipay.rs** Add: - function: pub::new - function: private::build_headers - function: private::id - function: private::get_currency_unit - function: private::common_get_content_type - function: private::base_url - function: private::get_auth_header - function: private::build_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_webhook_object_reference_id - function: private::get_webhook_event_type - function: private::get_webhook_resource_object - struct: pub::Hipay - impl: impl Hipay - impl: impl api::Payment for Hipay - impl: impl api::PaymentSession for Hipay - impl: impl api::ConnectorAccessToken for Hipay - impl: impl api::MandateSetup for Hipay - impl: impl api::PaymentAuthorize for Hipay - impl: impl api::PaymentSync for Hipay - impl: impl api::PaymentCapture for Hipay - impl: impl api::PaymentVoid for Hipay - impl: impl api::Refund for Hipay - impl: impl api::RefundExecute for Hipay - impl: impl api::RefundSync for Hipay - impl: impl api::PaymentToken for Hipay - impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for Hipay - impl: impl ConnectorCommonExt<Flow, Request, Response> for Hipay - impl: impl ConnectorCommon for Hipay - impl: impl ConnectorValidation for Hipay - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Hipay - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Hipay - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Hipay - impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Hipay - impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Hipay - impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Hipay - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Hipay - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Hipay - impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Hipay - impl: impl webhooks::IncomingWebhook for Hipay - impl: impl ConnectorSpecifications for Hipay - mod: pub::transformers **crates/hyperswitch_connectors/src/connectors/hipay/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::HipayRouterData - struct: pub::HipayPaymentsRequest - struct: pub::HipayCard - struct: pub::HipayAuthType - struct: pub::HipayPaymentsResponse - struct: pub::HipayRefundRequest - struct: pub::RefundResponse - struct: pub::HipayErrorResponse - enum: pub::HipayPaymentStatus - enum: pub::RefundStatus - impl: impl From<(StringMinorUnit, T)> for HipayRouterData<T> - impl: impl TryFrom<&HipayRouterData<&PaymentsAuthorizeRouterData>> for HipayPaymentsRequest - impl: impl TryFrom<&ConnectorAuthType> for HipayAuthType - impl: impl From<HipayPaymentStatus> for common_enums::AttemptStatus - impl: impl TryFrom<ResponseRouterData<F, HipayPaymentsResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData> - impl: impl TryFrom<&HipayRouterData<&RefundsRouterData<F>>> for HipayRefundRequest - impl: impl From<RefundStatus> for enums::RefundStatus - impl: impl TryFrom<RefundsResponseRouterData<Execute, RefundResponse>> for RefundsRouterData<Execute> - impl: impl TryFrom<RefundsResponseRouterData<RSync, RefundResponse>> for RefundsRouterData<RSync> **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code **crates/hyperswitch_connectors/src/default_implementations_v2.rs** Modify existing code **crates/hyperswitch_interfaces/src/configs.rs** Modify existing code **crates/router/src/connector.rs** Modify existing code **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/core/payments/connector_integration_v2_impls.rs** Modify existing code **crates/router/src/core/payments/flows.rs** Modify existing code **crates/router/src/types/api.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code **crates/router/tests/connectors/hipay.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::HipayTest - impl: impl ConnectorActions for HipayTest - impl: impl utils::Connector for HipayTest **crates/router/tests/connectors/main.rs** Add: - mod: private::hipay **crates/test_utils/src/connector_auth.rs** Modify existing code
{"pr_number": 7360, "pr_title": "feat(hipay): Add Template PR", "merged_at": "2025-03-07T07:57:40Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"core_business": ["crates/router/src/core/admin.rs", "crates/router/src/core/payments/connector_integration_v2_impls.rs", "crates/router/src/core/payments/flows.rs"], "connectors": ["crates/common_enums/src/connector_enums.rs", "crates/connector_configs/src/connector.rs", "crates/hyperswitch_connectors/src/connectors.rs", "crates/hyperswitch_connectors/src/connectors/hipay.rs", "crates/hyperswitch_connectors/src/connectors/hipay/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/hyperswitch_connectors/src/default_implementations_v2.rs", "crates/router/src/connector.rs", "crates/router/tests/connectors/hipay.rs", "crates/router/tests/connectors/main.rs", "crates/test_utils/src/connector_auth.rs", "scripts/add_connector.sh"], "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", "crates/hyperswitch_interfaces/src/configs.rs"]}, "change_types": {"structs_added": 10, "functions_added": 78, "enums_added": 2, "fields_added": 152, "imports_added": 20}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore: update payment method configs for globalpay ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR adds necessary payment method configs to the GlobalPay connector. For wallets (Paypal, Apple Pay and Google Pay), their developer docs does not mention about them being support while their main page says it to be supported. Have got in touch with the team asking for clarification on this topic. Will update the wallet configs accordingly in upcoming PRs. ### 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` --> config 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 https://github.com/juspay/hyperswitch/issues/7511 Refer to the parent issue of the attached issue to learn more about supported currencies and countries. Supported payment types: https://github.com/juspay/hyperswitch/issues/7502#issuecomment-2718463863 ## 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 via GlobalPay should fail if currencies or countries that are not supported is used to make transactions: ```curl curl --location 'http://Localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_fO6IOJVOk6dmWoDhkHnw3EzJHjZytuOfViMDKpi1eOasWTqrXIcUuuoGNUDafqGZ' \ --data-raw '{ "amount": 1000, "currency": "XPS", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 1000, "customer_id": "StripeCustomer", "email": "abcdef123@gmail.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://google.com", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4263970000005262", "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": "DE", "first_name": "PiX" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "DE", "first_name": "PiX" } } }' ``` ```json { "error": { "error_type": "invalid_request", "message": "Json deserialize error: unknown variant `XPS`, expected one of `AED`, `AFN`, `ALL`, `AMD`, `ANG`, `AOA`, `ARS`, `AUD`, `AWG`, `AZN`, `BAM`, `BBD`, `BDT`, `BGN`, `BHD`, `BIF`, `BMD`, `BND`, `BOB`, `BRL`, `BSD`, `BTN`, `BWP`, `BYN`, `BZD`, `CAD`, `CDF`, `CHF`, `CLF`, `CLP`, `CNY`, `COP`, `CRC`, `CUC`, `CUP`, `CVE`, `CZK`, `DJF`, `DKK`, `DOP`, `DZD`, `EGP`, `ERN`, `ETB`, `EUR`, `FJD`, `FKP`, `GBP`, `GEL`, `GHS`, `GIP`, `GMD`, `GNF`, `GTQ`, `GYD`, `HKD`, `HNL`, `HRK`, `HTG`, `HUF`, `IDR`, `ILS`, `INR`, `IQD`, `IRR`, `ISK`, `JMD`, `JOD`, `JPY`, `KES`, `KGS`, `KHR`, `KMF`, `KPW`, `KRW`, `KWD`, `KYD`, `KZT`, `LAK`, `LBP`, `LKR`, `LRD`, `LSL`, `LYD`, `MAD`, `MDL`, `MGA`, `MKD`, `MMK`, `MNT`, `MOP`, `MRU`, `MUR`, `MVR`, `MWK`, `MXN`, `MYR`, `MZN`, `NAD`, `NGN`, `NIO`, `NOK`, `NPR`, `NZD`, `OMR`, `PAB`, `PEN`, `PGK`, `PHP`, `PKR`, `PLN`, `PYG`, `QAR`, `RON`, `RSD`, `RUB`, `RWF`, `SAR`, `SBD`, `SCR`, `SDG`, `SEK`, `SGD`, `SHP`, `SLE`, `SLL`, `SOS`, `SRD`, `SSP`, `STD`, `STN`, `SVC`, `SYP`, `SZL`, `THB`, `TJS`, `TMT`, `TND`, `TOP`, `TRY`, `TTD`, `TWD`, `TZS`, `UAH`, `UGX`, `USD`, `UYU`, `UZS`, `VES`, `VND`, `VUV`, `WST`, `XAF`, `XCD`, `XOF`, `XPF`, `YER`, `ZAR`, `ZMW`, `ZWL` at line 3 column 19", "code": "IR_06" } } ``` bank redirect: ```curl curl --location 'http://Localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_fO6IOJVOk6dmWoDhkHnw3EzJHjZytuOfViMDKpi1eOasWTqrXIcUuuoGNUDafqGZ' \ --data-raw '{ "amount": 1000, "currency": "EUR", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 1000, "customer_id": "StripeCustomer", "email": "abcdef123@gmail.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://google.com", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "payment_method": "bank_redirect", "payment_method_type": "ideal", "payment_method_data": { "bank_redirect": { "ideal": { "bank_name": "ing" } } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "IN", "first_name": "PiX" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "IN", "first_name": "PiX" } } }' ``` ```json { "error": { "type": "invalid_request", "message": "No eligible connector was found for the current payment method configuration", "code": "IR_39" } } ``` without this change, the payment would fail and the connector would throw `INVALID_REQUEST_DATA` ## 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. Type Definitions** - `crates/currency_conversion/src/types.rs` **2. Utils** - `crates/kgraph_utils/src/transformers.rs` **3. Tests** - `config/deployments/integration_test.toml` - `cypress-tests/cypress/e2e/configs/Payment/Commons.js` - `loadtest/config/development.toml` **4. Configuration Files** - `config/config.example.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 2 more files **5. Other** - `crates/common_enums/src/enums.rs` **Code Patterns Applied:** - Implement new functions (2 changes) **Detailed Identifier Changes:** Commit 23a2a0cf: Files to modify: **crates/common_enums/src/enums.rs** Add: - function: private::is_four_decimal_currency **crates/currency_conversion/src/types.rs** Modify existing code **crates/kgraph_utils/src/transformers.rs** Modify existing code
{"pr_number": 7512, "pr_title": "chore: update payment method configs for globalpay", "merged_at": "2025-03-20T07:39:28Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "connector"]}, "hierarchy": {"types": ["crates/currency_conversion/src/types.rs"], "utils": ["crates/kgraph_utils/src/transformers.rs"], "tests": ["config/deployments/integration_test.toml", "cypress-tests/cypress/e2e/configs/Payment/Commons.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/common_enums/src/enums.rs"]}, "change_types": {"functions_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(router): add payment method-specific features to connector feature list ## 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 --> This PR extends the connector feature matrix response to include threeds and non_threeds support flags along with card network details in case of cards > This PR won't affect Payments ### Additional Changes - [x] 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)? --> ``` curl --location 'http://localhost:8080/feature_matrix' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' ``` Response ``` { "connector_count": 3, "connectors": [ { "name": "BAMBORA", "description": "Bambora is a leading online payment provider in Canada and United States.", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "card", "payment_method_type": "credit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "non_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard", "AmericanExpress", "Discover", "JCB", "DinersClub" ], "supported_countries": [ "CA", "US" ], "supported_currencies": [ "USD" ] } ], "supported_webhook_flows": [] }, { "name": "DEUTSCHEBANK", "description": "Deutsche Bank is a German multinational investment bank and financial services company ", "category": "bank_acquirer", "supported_payment_methods": [ { "payment_method": "bank_debit", "payment_method_type": "sepa", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "card", "payment_method_type": "credit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "non_three_ds": "not_supported", "supported_card_networks": [ "Visa", "Mastercard" ], "supported_countries": null, "supported_currencies": null } ], "supported_webhook_flows": [] }, { "name": "ZSL", "description": "Zsl is a payment gateway operating in China, specializing in facilitating local bank transfers", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "bank_transfer", "payment_method_type": "local_bank_transfer", "mandates": "not_supported", "refunds": "not_supported", "supported_capture_methods": [ "automatic" ], "supported_countries": [ "CN" ], "supported_currencies": [ "CNY" ] } ], "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 **payment** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/feature_matrix.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/router_response_types.rs` **3. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/bambora.rs` - `crates/hyperswitch_connectors/src/connectors/deutschebank.rs` - `crates/hyperswitch_connectors/src/connectors/zsl.rs` **4. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - `crates/openapi/src/openapi.rs` - ... and 2 more files **Code Patterns Applied:** - Define new data structures (1 changes) - Extend existing types with new fields (17 changes) **Detailed Identifier Changes:** Commit e35f7079: Files to modify: **crates/api_models/src/feature_matrix.rs** Add: - struct: pub::CardSpecificFeatures - enum: pub::PaymentMethodSpecificFeatures **crates/hyperswitch_connectors/src/connectors/bambora.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/deutschebank.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/zsl.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_response_types.rs** Modify existing code **crates/openapi/src/openapi.rs** Modify existing code **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/router/src/routes/feature_matrix.rs** Modify existing code
{"pr_number": 6963, "pr_title": "feat(router): add payment method-specific features to connector feature list", "merged_at": "2025-01-21T09:36:09Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["payment", "refund", "connector"]}, "hierarchy": {"api_models": ["crates/api_models/src/feature_matrix.rs"], "domain": ["crates/hyperswitch_domain_models/src/router_response_types.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/bambora.rs", "crates/hyperswitch_connectors/src/connectors/deutschebank.rs", "crates/hyperswitch_connectors/src/connectors/zsl.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/openapi/src/openapi.rs", "crates/openapi/src/openapi_v2.rs", "crates/router/src/routes/feature_matrix.rs"]}, "change_types": {"structs_added": 1, "enums_added": 1, "fields_added": 17}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(connector): [Adyen] Removed deprecated PMTs from Ayden (Giropay, Sofort) ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Removed deprecated PMTs from Ayden: https://www.adyen.com/payment-methods ### 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-cloud/issues/8202 ## 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)? --> Removed the deprecated payment methods, so no testing required. Reference that the payment methods are actually no longer available: https://www.adyen.com/payment-methods No-3DS auto capture <img width="1720" alt="Screenshot 2025-02-10 at 5 25 26 PM" src="https://github.com/user-attachments/assets/0ca86a25-1c0c-41cf-9348-9676b1254cf7" /> 3DS auto capture <img width="1715" alt="Screenshot 2025-02-10 at 5 25 46 PM" src="https://github.com/user-attachments/assets/fb4f99ae-2d89-4833-8e1c-f918c303020d" /> No-3DS manual capture <img width="1724" alt="Screenshot 2025-02-10 at 5 26 06 PM" src="https://github.com/user-attachments/assets/407799ef-67de-4f26-b458-a5a4329303f4" /> 3DS manual capture <img width="1727" alt="Screenshot 2025-02-10 at 5 26 54 PM" src="https://github.com/user-attachments/assets/6dcf53b9-4c2e-45c9-a521-8985090032f8" /> Bank Redirect -- All test cases in bank redirect is passed, other than `ideal`. Ideal's payment is failing currently and I will be fixing that in other PR. <img width="1722" alt="Screenshot 2025-02-10 at 5 36 47 PM" src="https://github.com/user-attachments/assets/a823e7cb-744a-455f-b004-63b6834fb63c" /> <img width="1725" alt="Screenshot 2025-02-10 at 5 36 56 PM" src="https://github.com/user-attachments/assets/ab0369c1-d49c-4606-9830-63992c701040" /> ## 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` - ... and 2 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 **Detailed Identifier Changes:** Commit 40a36fd3: Files to modify: **crates/router/src/connector/adyen.rs** Modify existing code **crates/router/src/connector/adyen/transformers.rs** Modify existing code
{"pr_number": 7100, "pr_title": "refactor(connector): [Adyen] Removed deprecated PMTs from Ayden (Giropay, Sofort)", "merged_at": "2025-02-12T08:48:54Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user"]}, "hierarchy": {"connectors": ["crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/router/src/connector/adyen.rs", "crates/router/src/connector/adyen/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"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [checkout] Add US Support for Apple Pay and Google Pay + Enhanced Checkout Response 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 --> ### Payment Method Configuration Updates - **Apple Pay**: Added `US` to the supported countries list across all environments (production, sandbox, development). - **Google Pay**: Added `US` to the supported countries list across all environments. - Updated configuration files: - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - `config/development.toml` ### Checkout Connector Enhancements - Enhanced the Checkout connector's payment response handling with new fields: - `scheme_id`: Network transaction identifier from the payment scheme - `processing`: Object containing additional payment processing details - `partner_merchant_advice_code`: Mastercard Merchant Advice Code (MAC) for additional transaction information - `partner_response_code`: Original authorization response code from the payment scheme ### 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)? --> NTID in response : ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_CNNVEVEVl87A1XBJ7ptFqZhNiT1KxrloiusmK2wGbiCzmB0l86yEhXZl3jvJv44t' \ --data-raw '{ "amount": 7445, "currency": "USD", "confirm": true, "business_country": "US", "business_label": "default", "amount_to_capture": 7445, "customer_id": "cu_1757579182", "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": "card", "payment_method_type": "credit", "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" } }, "payment_method_data": { "card": { "card_number": "4152812521833588", "card_exp_month": "01", "card_exp_year": "2026", "card_holder_name": "John Smith", "card_cvc": "100" } }, "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "in sit", "user_agent": "amet irure esse" } } }' ``` Response ``` { "payment_id": "pay_9awP2lsrd6G29hEdV09L", "merchant_id": "merchant_1757576266", "status": "processing", "amount": 7445, "net_amount": 7445, "shipping_cost": null, "amount_capturable": 7445, "amount_received": null, "connector": "checkout", "client_secret": "pay_9awP2lsrd6G29hEdV09L_secret_rPunJVGL7JPw0fDRIyqS", "created": "2025-09-11T08:26:12.638Z", "currency": "USD", "customer_id": "cu_1757579173", "customer": { "id": "cu_1757579173", "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": "3588", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "415281", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "2026", "card_holder_name": "John Smith", "payment_checks": null, "authentication_data": null }, "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": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": "checkout_US_default", "business_country": "US", "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cu_1757579173", "created_at": 1757579172, "expires": 1757582772, "secret": "epk_19e9ed092dc74b70a6bb4d2c886e67a2" }, "manual_retry_allowed": false, "connector_transaction_id": "pay_lhtaj72eeuoupoayqnnftqkvs4", "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": "pay_9awP2lsrd6G29hEdV09L_1", "payment_link": null, "profile_id": "pro_DGBA9fPcLBkiiu9Cr1dh", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_9N99Glg7s4XsTNmSti29", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-11T08:41:12.638Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "network_transaction_id": "871013284140204", "payment_method_status": null, "updated": "2025-09-11T08:26:14.480Z", "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 } ``` 2)MAC Code (Right now the connector is not giving us the mac/network code ) 3) ApplePay/Gpay for nuvei and checkout Checkout - ApplePay (Gpay PR not merged yet ,.Can't test ) ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_ZcREmKaL8nuSgDr76kRE6qflreo2LMtKg58GSad4c3BUSvRmDQgvrei4jJMWa2B2' \ --data-raw '{ "amount": 7445, "currency": "USD", "confirm": true, "amount_to_capture": 7445, "customer_id": "cu_1757579844", "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", "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_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": "4761344136141390", "application_expiration_month": "09", "application_expiration_year": "30", "application_brand": "VISA", "payment_data": { "online_payment_cryptogram": "Ar2132432321efwssdf3t2A", "eci_indicator": "7" } }, "payment_method": { "display_name": "Discover 9319", "network": "VISA", "type": "debit" }, "transaction_identifier": "c635c5b3af900d3243232ee65ec7afd988a678194751" } } } }' ``` Response ``` { "payment_id": "pay_jY7smJaQbGzAgA4X2DTd", "merchant_id": "merchant_1757579779", "status": "processing", "amount": 7445, "net_amount": 7445, "shipping_cost": null, "amount_capturable": 7445, "amount_received": null, "connector": "checkout", "client_secret": "pay_jY7smJaQbGzAgA4X2DTd_secret_f5xyOfbPJCziCNWHfN00", "created": "2025-09-11T08:37:44.792Z", "currency": "USD", "customer_id": "cu_1757579844", "customer": { "id": "cu_1757579844", "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": 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_1757579844", "created_at": 1757579864, "expires": 1757583464, "secret": "epk_ff06acf59a19497f82b507856f7cd02a" }, "manual_retry_allowed": false, "connector_transaction_id": "pay_rcx6jvhdzcpunfgvexjtkkknim", "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": "pay_jY7smJaQbGzAgA4X2DTd_1", "payment_link": null, "profile_id": "pro_6rmaluPWUcLlzO6dWUrb", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_h8Fb0zjH5Q5HoCfDlF2v", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-11T08:52:44.792Z", "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": "417005479348614", "payment_method_status": null, "updated": "2025-09-11T08:37:45.353Z", "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": null } ``` Nuvei GooglePay Request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_EPgoTNRTdCyaUHO4ak953AgCSPohacVq6BbMC3DpKHiqZHthK8VhQSY1qdezNt6q' \ --data-raw '{ "amount": 7445, "currency": "USD", "confirm": true, "business_country": "US", "business_label": "default", "amount_to_capture": 7445, "customer_id": "cu_1757580226", "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": "google_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" } }, "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": { "wallet": { "google_pay": { "type": "CARD", "description": "SuccessfulAuth: Visa •••• 1000", "info": { "assurance_details": { "account_verified": true, "card_holder_authenticated": false }, "card_details": "1000", "card_network": "VISA" }, "tokenization_data": { "application_primary_account_number": "5454545454545454", "card_exp_month": "01", "card_exp_year": "28", "cryptogram": "" } } } } }' ``` Response ``` { "payment_id": "pay_WoogeONiVcac1riUJdsK", "merchant_id": "postman_merchant_GHAction_5d9d15c8-eb6c-42e0-a20d-55e85e94b22f", "status": "succeeded", "amount": 7445, "net_amount": 7445, "shipping_cost": null, "amount_capturable": 0, "amount_received": 7445, "connector": "nuvei", "client_secret": "pay_WoogeONiVcac1riUJdsK_secret_sj5qW6IEDhZ9w7zY0Fvd", "created": "2025-09-11T08:43:34.778Z", "currency": "USD", "customer_id": "cu_1757580215", "customer": { "id": "cu_1757580215", "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": { "google_pay": { "last4": "1000", "card_network": "VISA", "type": "CARD" } }, "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": "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": "google_pay", "connector_label": "nuvei_US_default", "business_country": "US", "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cu_1757580215", "created_at": 1757580214, "expires": 1757583814, "secret": "epk_ea4fef54d3ed450e8ad0edde0837f30e" }, "manual_retry_allowed": false, "connector_transaction_id": "8110000000014064767", "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": "8701925111", "payment_link": null, "profile_id": "pro_FzGjTwn0ow1tnS6uQ5At", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_WMVh12ovQRImCzUCDIqD", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-11T08:58:34.778Z", "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-11T08:43:36.908Z", "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": null } ``` Nuvei -> ApplePay ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_EPgoTNRTdCyaUHO4ak953AgCSPohacVq6BbMC3DpKHiqZHthK8VhQSY1qdezNt6q' \ --data-raw '{ "amount": 7445, "currency": "USD", "confirm": true, "amount_to_capture": 7445, "customer_id": "cu_1757580308", "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", "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_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": "4761344136141390", "application_expiration_month": "09", "application_expiration_year": "30", "application_brand": "VISA", "payment_data": { "online_payment_cryptogram": "Ar2132432321efwssdf3t2A", "eci_indicator": "7" } }, "payment_method": { "display_name": "Discover 9319", "network": "VISA", "type": "debit" }, "transaction_identifier": "c635c5b3af900d3243232ee65ec7afd988a678194751" } } } }' ``` Response ``` { "payment_id": "pay_IofHezqWiq5pPAJWgiZj", "merchant_id": "postman_merchant_GHAction_5d9d15c8-eb6c-42e0-a20d-55e85e94b22f", "status": "succeeded", "amount": 7445, "net_amount": 7445, "shipping_cost": null, "amount_capturable": 0, "amount_received": 7445, "connector": "nuvei", "client_secret": "pay_IofHezqWiq5pPAJWgiZj_secret_zJ9BkUKb2yd8PN38RJdT", "created": "2025-09-11T08:45:03.166Z", "currency": "USD", "customer_id": "cu_1757580303", "customer": { "id": "cu_1757580303", "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": "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": 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_1757580303", "created_at": 1757580303, "expires": 1757583903, "secret": "epk_217af708b77a42d39b63cb80bf1e3417" }, "manual_retry_allowed": false, "connector_transaction_id": "8110000000014064887", "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": "8701981111", "payment_link": null, "profile_id": "pro_FzGjTwn0ow1tnS6uQ5At", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_WMVh12ovQRImCzUCDIqD", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-11T09:00:03.166Z", "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": "pm_jOj5siOR5BsDKOLDpOYy", "network_transaction_id": "483297487231504", "payment_method_status": "active", "updated": "2025-09-11T08:45:05.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": "2385441111", "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 } ``` ## 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/checkout/transformers.rs` **2. Tests** - `config/deployments/integration_test.toml` **3. Configuration Files** - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - `config/development.toml` **Code Patterns Applied:** - Define new data structures (1 changes) - Extend existing types with new fields (13 changes) **Detailed Identifier Changes:** Commit cadfcf7c: Files to modify: **crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs** Add: - struct: pub::PaymentProcessingDetails
{"pr_number": 9356, "pr_title": "fix(connector): [checkout] Add US Support for Apple Pay and Google Pay + Enhanced Checkout Response Data", "merged_at": "2025-09-11T13:22:02Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs"], "tests": ["config/deployments/integration_test.toml"], "config": ["config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml"]}, "change_types": {"structs_added": 1, "fields_added": 13}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(cypress): make amount configurable ## 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 --> this pr makes the amount for refund and capture configurable within connector configs. standardizes the amount to be 6000 while making partial amount to be 2000. while doing so, a lot of config clean up has been done. ### 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). --> below mentioned prs are closed on behalf of this since the implementation done there is subpar, unmanageable and has a lot of conflicts: https://github.com/juspay/hyperswitch/pull/6286 https://github.com/juspay/hyperswitch/pull/6223 https://github.com/juspay/hyperswitch/pull/6292 ## 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)? --> |Adyen|Cybersource|Stripe| |-|-|-| |<img width="1012" alt="image" src="https://github.com/user-attachments/assets/ad589d2c-756f-4ec9-bb26-2d96d112d2ab" />|<img width="988" alt="image" src="https://github.com/user-attachments/assets/cbd52d26-0e85-4997-bd5c-23a552dc69ac" />|<img width="1009" alt="image" src="https://github.com/user-attachments/assets/df0a5bc7-77c0-4d1f-be23-f10f843d9cd8" />| since the changes made are same to every other connector, and given that they all have same behavior, i've only added screenshots of 3 connectors. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `npm run format` - [x] I addressed lints thrown by `npm run lint` - [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/Adyen.js` - `cypress-tests/cypress/e2e/configs/Payment/BankOfAmerica.js` - `cypress-tests/cypress/e2e/configs/Payment/Bluesnap.js` - ... and 43 more files **Code Patterns Applied:** - Extend existing types with new fields (336 changes) - Add conditional logic for feature flags or filtering (2 changes)
{"pr_number": 7219, "pr_title": "refactor(cypress): make amount configurable", "merged_at": "2025-02-12T08:23:26Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user", "refund", "connector"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/configs/Payment/Adyen.js", "cypress-tests/cypress/e2e/configs/Payment/BankOfAmerica.js", "cypress-tests/cypress/e2e/configs/Payment/Bluesnap.js", "cypress-tests/cypress/e2e/configs/Payment/Checkout.js", "cypress-tests/cypress/e2e/configs/Payment/Commons.js", "cypress-tests/cypress/e2e/configs/Payment/Cybersource.js", "cypress-tests/cypress/e2e/configs/Payment/Datatrans.js", "cypress-tests/cypress/e2e/configs/Payment/Deutschebank.js", "cypress-tests/cypress/e2e/configs/Payment/Elavon.js", "cypress-tests/cypress/e2e/configs/Payment/Fiservemea.js", "cypress-tests/cypress/e2e/configs/Payment/Fiuu.js", "cypress-tests/cypress/e2e/configs/Payment/Iatapay.js", "cypress-tests/cypress/e2e/configs/Payment/Jpmorgan.js", "cypress-tests/cypress/e2e/configs/Payment/Nexixpay.js", "cypress-tests/cypress/e2e/configs/Payment/Nmi.js", "cypress-tests/cypress/e2e/configs/Payment/Noon.js", "cypress-tests/cypress/e2e/configs/Payment/Novalnet.js", "cypress-tests/cypress/e2e/configs/Payment/Paybox.js", "cypress-tests/cypress/e2e/configs/Payment/Paypal.js", "cypress-tests/cypress/e2e/configs/Payment/Stripe.js", "cypress-tests/cypress/e2e/configs/Payment/Trustpay.js", "cypress-tests/cypress/e2e/configs/Payment/WellsFargo.js", "cypress-tests/cypress/e2e/configs/Payment/WorldPay.js", "cypress-tests/cypress/e2e/configs/Payment/Xendit.js", "cypress-tests/cypress/e2e/configs/PaymentMethodList/Commons.js", "cypress-tests/cypress/e2e/configs/Routing/Adyen.js", "cypress-tests/cypress/e2e/configs/Routing/Stripe.js", "cypress-tests/cypress/e2e/spec/Payment/00006-NoThreeDSManualCapture.cy.js", "cypress-tests/cypress/e2e/spec/Payment/00009-RefundPayment.cy.js", "cypress-tests/cypress/e2e/spec/Payment/00010-SyncRefund.cy.js", "cypress-tests/cypress/e2e/spec/Payment/00011-CreateSingleuseMandate.cy.js", "cypress-tests/cypress/e2e/spec/Payment/00012-CreateMultiuseMandate.cy.js", "cypress-tests/cypress/e2e/spec/Payment/00013-ListAndRevokeMandate.cy.js", "cypress-tests/cypress/e2e/spec/Payment/00014-SaveCardFlow.cy.js", "cypress-tests/cypress/e2e/spec/Payment/00015-ZeroAuthMandate.cy.js", "cypress-tests/cypress/e2e/spec/Payment/00016-ThreeDSManualCapture.cy.js", "cypress-tests/cypress/e2e/spec/Payment/00019-MandatesUsingPMID.cy.js", "cypress-tests/cypress/e2e/spec/Payment/00020-MandatesUsingNTIDProxy.cy.js", "cypress-tests/cypress/e2e/spec/Payment/00021-UPI.cy.js", "cypress-tests/cypress/e2e/spec/Payment/00022-Variations.cy.js", "cypress-tests/cypress/e2e/spec/Payment/00026-DeletedCustomerPsyncFlow.cy.js", "cypress-tests/cypress/e2e/spec/Payment/00029-IncrementalAuth.cy.js", "cypress-tests/cypress/fixtures/create-confirm-body.json", "cypress-tests/cypress/fixtures/create-mandate-cit.json", "cypress-tests/cypress/fixtures/create-payment-body.json", "cypress-tests/cypress/support/commands.js"]}, "change_types": {"fields_added": 336, "conditionals_added": 2}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(connector): [checkout] Add mandate 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 --> Integrated CIT/MIT and setup mandate flow. Added `setup_future_usage` to `PaymentsSyncData` to support mandate payments. For mandate flows, the source_id (connector mandate ID) must be stored in the MandateReference. To identify whether a payment is mandate-based, we need the setup_future_usage 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). --> ## 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)? --> CIT/MIT: <details> <summary>CIT </summary> Request ``` { "amount": 100, "currency": "USD", "confirm": true, "setup_future_usage": "off_session", // "payment_type": "setup_mandate", "customer_id": "chec", "return_url": "https://www.google.com", "capture_method": "automatic", "payment_method": "card", "payment_method_type": "credit", "all_keys_required": true, "authentication_type": "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": "2221008123677736", "card_number": "5137210000000158", "card_exp_month": "12", "card_exp_year": "2030", "card_holder_name": "CL-BRW2", "card_cvc": "217" } }, "customer_acceptance": { "acceptance_type": "online", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "in sit", "user_agent": "amet irure esse" } } } ``` Response ``` { "payment_id": "pay_x6DG2ez6RwRFTE1fQKyy", "merchant_id": "merchant_1756831157", "status": "requires_customer_action", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 100, "amount_received": null, "connector": "checkout", "client_secret": "pay_x6DG2ez6RwRFTE1fQKyy_secret_H3pAxetStLZ4y321oqD2", "created": "2025-09-03T03:39:32.638Z", "currency": "USD", "customer_id": "chec", "customer": { "id": "chec", "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": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "0158", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "513721", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2030", "card_holder_name": "CL-BRW2", "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": "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": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_x6DG2ez6RwRFTE1fQKyy/merchant_1756831157/pay_x6DG2ez6RwRFTE1fQKyy_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": "chec", "created_at": 1756870772, "expires": 1756874372, "secret": "epk_8c2ab88aa66b4225b1cae8ecb30c0ff5" }, "manual_retry_allowed": null, "connector_transaction_id": "pay_qkcqdb4d5eourp52jbsb56u5li", "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": "pay_x6DG2ez6RwRFTE1fQKyy_1", "payment_link": null, "profile_id": "pro_iAJjPLq8Jy18zB0dMRCp", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_HuSsMZdOxGYMxylcPlDq", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-03T03:54:32.638Z", "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-03T03:39:33.696Z", "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": "{\"id\":\"pay_qkcqdb4d5eourp52jbsb56u5li\",\"status\":\"Pending\",\"reference\":\"pay_x6DG2ez6RwRFTE1fQKyy_1\",\"3ds\":{\"downgraded\":false,\"enrolled\":\"Y\"},\"_links\":{\"self\":{\"href\":\"https://api.sandbox.checkout.com/payments/pay_qkcqdb4d5eourp52jbsb56u5li\"},\"actions\":{\"href\":\"https://api.sandbox.checkout.com/payments/pay_qkcqdb4d5eourp52jbsb56u5li/actions\"},\"redirect\":{\"href\":\"https://authentication-devices.sandbox.checkout.com/sessions-interceptor/sid_6dxmtvhe44dulaknf465r3oriu\"}}}", "enable_partial_authorization": null } ``` Psync (after comleting redirection) ``` { "payment_id": "pay_x6DG2ez6RwRFTE1fQKyy", "merchant_id": "merchant_1756831157", "status": "succeeded", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 0, "amount_received": 100, "connector": "checkout", "client_secret": "pay_x6DG2ez6RwRFTE1fQKyy_secret_H3pAxetStLZ4y321oqD2", "created": "2025-09-03T03:39:32.638Z", "currency": "USD", "customer_id": "chec", "customer": { "id": "chec", "name": null, "email": "hello@gmail.com", "phone": null, "phone_country_code": null }, "description": "hellow world", "refunds": null, "disputes": null, "attempts": [ { "attempt_id": "pay_x6DG2ez6RwRFTE1fQKyy_1", "status": "charged", "amount": 100, "order_tax_amount": null, "currency": "USD", "connector": "checkout", "error_message": null, "payment_method": "card", "connector_transaction_id": "pay_qkcqdb4d5eourp52jbsb56u5li", "capture_method": "automatic", "authentication_type": "three_ds", "created_at": "2025-09-03T03:39:32.638Z", "modified_at": "2025-09-03T03:39:52.242Z", "cancellation_reason": null, "mandate_id": null, "error_code": null, "payment_token": null, "connector_metadata": { "psync_flow": "Capture" }, "payment_experience": null, "payment_method_type": "credit", "reference_id": "pay_x6DG2ez6RwRFTE1fQKyy_1", "unified_code": null, "unified_message": null, "client_source": null, "client_version": 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": "0158", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "513721", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2030", "card_holder_name": "CL-BRW2", "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": "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": null, "manual_retry_allowed": false, "connector_transaction_id": "pay_qkcqdb4d5eourp52jbsb56u5li", "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": "pay_x6DG2ez6RwRFTE1fQKyy_1", "payment_link": null, "profile_id": "pro_iAJjPLq8Jy18zB0dMRCp", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_HuSsMZdOxGYMxylcPlDq", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-03T03:54:32.638Z", "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": "pm_VZ3QnaEEi22c4qmKOkW1", "network_transaction_id": null, "payment_method_status": "active", "updated": "2025-09-03T03:40:15.234Z", "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": "src_7dvn5hvhfwvenpontohrcvi6ty", "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": "{\"id\":\"pay_qkcqdb4d5eourp52jbsb56u5li\",\"requested_on\":\"2025-09-03T03:39:32.823722Z\",\"source\":{\"id\":\"src_7dvn5hvhfwvenpontohrcvi6ty\",\"type\":\"card\",\"expiry_month\":12,\"expiry_year\":2030,\"scheme\":\"Mastercard\",\"scheme_local\":\"cartes_bancaires\",\"local_schemes\":[\"cartes_bancaires\"],\"last4\":\"0158\",\"fingerprint\":\"F6044B07C3770BC948DF7AE193C1FA809E1B4DB5C72EDF7C0B23888A4D09CF0F\",\"bin\":\"51372100\",\"card_type\":\"CREDIT\",\"card_category\":\"CONSUMER\",\"issuer\":\"BANQUE CHAABI DU MAROC\",\"issuer_country\":\"FR\",\"product_id\":\"BPD\",\"product_type\":\"Business Premium Debit\",\"avs_check\":\"S\",\"cvv_check\":\"Y\",\"payment_account_reference\":\"\"},\"expires_on\":\"2025-10-03T03:39:50.4661992Z\",\"amount\":100,\"currency\":\"USD\",\"payment_type\":\"Regular\",\"reference\":\"pay_x6DG2ez6RwRFTE1fQKyy_1\",\"status\":\"Captured\",\"approved\":true,\"3ds\":{\"downgraded\":false,\"enrolled\":\"Y\",\"authentication_response\":\"Y\",\"cryptogram\":\"AAABAVIREQAAAAAAAAAAAAAAAAA=\",\"xid\":\"69bca5bc-d23a-4925-b1af-1a1dcc9ed97d\",\"version\":\"2.2.0\",\"exemption\":\"none\",\"challenged\":true,\"exemption_applied\":\"none\",\"eci\":\"02\"},\"authentication\":{\"experience\":\"3ds\"},\"balances\":{\"total_authorized\":100,\"total_voided\":0,\"available_to_void\":0,\"total_captured\":100,\"available_to_capture\":0,\"total_refunded\":0,\"available_to_refund\":100},\"risk\":{\"flagged\":false,\"score\":0.0},\"processing\":{\"acquirer_transaction_id\":\"117453352243070678536\",\"retrieval_reference_number\":\"411589373241\",\"merchant_category_code\":\"5815\",\"scheme_merchant_id\":\"788826\",\"scheme\":\"MASTERCARD\",\"aft\":false,\"pan_type_processed\":\"fpan\",\"cko_network_token_available\":false,\"provision_network_token\":false},\"eci\":\"02\",\"scheme_id\":\"642351794611712\",\"_links\":{\"self\":{\"href\":\"https://api.sandbox.checkout.com/payments/pay_qkcqdb4d5eourp52jbsb56u5li\"},\"actions\":{\"href\":\"https://api.sandbox.checkout.com/payments/pay_qkcqdb4d5eourp52jbsb56u5li/actions\"},\"refund\":{\"href\":\"https://api.sandbox.checkout.com/payments/pay_qkcqdb4d5eourp52jbsb56u5li/refunds\"}}}", "enable_partial_authorization": null } ``` </details> <details> <summary>MIT</summary> Request ``` { "amount": 100, "currency": "USD", "customer_id": "chec", "confirm": true, "off_session": true, "recurring_details": { "type": "payment_method_id", "data": "pm_VZ3QnaEEi22c4qmKOkW1" } } ``` Response ``` { "payment_id": "pay_kOSDa28c2DUYmQijjcCr", "merchant_id": "merchant_1756831157", "status": "processing", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 100, "amount_received": null, "connector": "checkout", "client_secret": "pay_kOSDa28c2DUYmQijjcCr_secret_E9YM9Wg5cFWYJCcAKZou", "created": "2025-09-03T03:41:43.717Z", "currency": "USD", "customer_id": "chec", "customer": { "id": "chec", "name": null, "email": "hello@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": null, "payment_method": "card", "payment_method_data": { "card": { "last4": "0158", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "513721", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2030", "card_holder_name": "CL-BRW2", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "hello@gmail.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": "chec", "created_at": 1756870903, "expires": 1756874503, "secret": "epk_a2c6c511308f4e90b4ce155dde49e914" }, "manual_retry_allowed": false, "connector_transaction_id": "pay_aedfbqdjzp7uvjwf5qk5fhqcpy", "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": "pay_kOSDa28c2DUYmQijjcCr_1", "payment_link": null, "profile_id": "pro_iAJjPLq8Jy18zB0dMRCp", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_HuSsMZdOxGYMxylcPlDq", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-03T03:56:43.717Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": "pm_VZ3QnaEEi22c4qmKOkW1", "network_transaction_id": null, "payment_method_status": "active", "updated": "2025-09-03T03:41:44.440Z", "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": "src_7dvn5hvhfwvenpontohrcvi6ty", "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 } ``` PSync ``` { "payment_id": "pay_kOSDa28c2DUYmQijjcCr", "merchant_id": "merchant_1756831157", "status": "succeeded", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 0, "amount_received": 100, "connector": "checkout", "client_secret": "pay_kOSDa28c2DUYmQijjcCr_secret_E9YM9Wg5cFWYJCcAKZou", "created": "2025-09-03T03:41:43.717Z", "currency": "USD", "customer_id": "chec", "customer": { "id": "chec", "name": null, "email": "hello@gmail.com", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "attempts": [ { "attempt_id": "pay_kOSDa28c2DUYmQijjcCr_1", "status": "pending", "amount": 100, "order_tax_amount": null, "currency": "USD", "connector": "checkout", "error_message": null, "payment_method": "card", "connector_transaction_id": "pay_aedfbqdjzp7uvjwf5qk5fhqcpy", "capture_method": null, "authentication_type": "no_three_ds", "created_at": "2025-09-03T03:41:43.717Z", "modified_at": "2025-09-03T03:41:44.439Z", "cancellation_reason": null, "mandate_id": null, "error_code": null, "payment_token": null, "connector_metadata": { "psync_flow": "Capture" }, "payment_experience": null, "payment_method_type": "credit", "reference_id": "pay_kOSDa28c2DUYmQijjcCr_1", "unified_code": null, "unified_message": null, "client_source": null, "client_version": 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": "0158", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "513721", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2030", "card_holder_name": "CL-BRW2", "payment_checks": null, "authentication_data": null }, "billing": { "address": { "city": "Fasdf", "country": "US", "line1": "Fasdf", "line2": "Fasdf", "line3": null, "zip": "560095", "state": null, "first_name": "CL-BRW2", "last_name": null, "origin_zip": null }, "phone": null, "email": null } }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "hello@gmail.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": null, "manual_retry_allowed": false, "connector_transaction_id": "pay_aedfbqdjzp7uvjwf5qk5fhqcpy", "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": "pay_kOSDa28c2DUYmQijjcCr_1", "payment_link": null, "profile_id": "pro_iAJjPLq8Jy18zB0dMRCp", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_HuSsMZdOxGYMxylcPlDq", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-03T03:56:43.717Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": "pm_VZ3QnaEEi22c4qmKOkW1", "network_transaction_id": null, "payment_method_status": "active", "updated": "2025-09-03T03:43:01.697Z", "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": "{\"id\":\"pay_aedfbqdjzp7uvjwf5qk5fhqcpy\",\"requested_on\":\"2025-09-03T03:41:43.893082Z\",\"source\":{\"id\":\"src_7dvn5hvhfwvenpontohrcvi6ty\",\"type\":\"card\",\"expiry_month\":12,\"expiry_year\":2030,\"scheme\":\"Mastercard\",\"scheme_local\":\"cartes_bancaires\",\"local_schemes\":[\"cartes_bancaires\"],\"last4\":\"0158\",\"fingerprint\":\"F6044B07C3770BC948DF7AE193C1FA809E1B4DB5C72EDF7C0B23888A4D09CF0F\",\"bin\":\"51372100\",\"card_type\":\"CREDIT\",\"card_category\":\"CONSUMER\",\"issuer\":\"BANQUE CHAABI DU MAROC\",\"issuer_country\":\"FR\",\"product_id\":\"BPD\",\"product_type\":\"Business Premium Debit\",\"avs_check\":\"S\",\"payment_account_reference\":\"\"},\"expires_on\":\"2025-10-03T03:41:44.2783422Z\",\"amount\":100,\"currency\":\"USD\",\"payment_type\":\"Recurring\",\"reference\":\"pay_kOSDa28c2DUYmQijjcCr_1\",\"status\":\"Captured\",\"approved\":true,\"balances\":{\"total_authorized\":100,\"total_voided\":0,\"available_to_void\":0,\"total_captured\":100,\"available_to_capture\":0,\"total_refunded\":0,\"available_to_refund\":100},\"risk\":{\"flagged\":false},\"processing\":{\"acquirer_transaction_id\":\"127885786606297372535\",\"retrieval_reference_number\":\"383588287480\",\"merchant_category_code\":\"5815\",\"scheme_merchant_id\":\"788826\",\"scheme\":\"MASTERCARD\",\"aft\":false,\"pan_type_processed\":\"fpan\",\"cko_network_token_available\":false,\"provision_network_token\":false},\"merchant_initiated\":true,\"scheme_id\":\"194570014059728\",\"_links\":{\"self\":{\"href\":\"https://api.sandbox.checkout.com/payments/pay_aedfbqdjzp7uvjwf5qk5fhqcpy\"},\"actions\":{\"href\":\"https://api.sandbox.checkout.com/payments/pay_aedfbqdjzp7uvjwf5qk5fhqcpy/actions\"},\"refund\":{\"href\":\"https://api.sandbox.checkout.com/payments/pay_aedfbqdjzp7uvjwf5qk5fhqcpy/refunds\"}}}", "enable_partial_authorization": null } ``` </details> Setup Mandate flow <details> <summary> CIT </summary> Request ``` { "amount": 0, "currency": "USD", "confirm": true, "setup_future_usage": "off_session", "payment_type": "setup_mandate", "customer_id": "checkout_test", "return_url": "https://www.google.com", "capture_method": "automatic", "payment_method": "card", "payment_method_type": "credit", "all_keys_required": true, "authentication_type": "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": "2221008123677736", "card_number": "5137210000000158", "card_exp_month": "12", "card_exp_year": "2030", "card_holder_name": "CL-BRW2", "card_cvc": "217" } }, "customer_acceptance": { "acceptance_type": "online", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "in sit", "user_agent": "amet irure esse" } } } ``` Response ``` { "payment_id": "pay_S5bugqtX2XtuZqlBdLsF", "merchant_id": "merchant_1756831157", "status": "requires_customer_action", "amount": 0, "net_amount": 0, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "checkout", "client_secret": "pay_S5bugqtX2XtuZqlBdLsF_secret_5BY6ptKlDOiquFFFjdbp", "created": "2025-09-03T03:45:12.631Z", "currency": "USD", "customer_id": "checkout_test", "customer": { "id": "checkout_test", "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": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "0158", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "513721", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2030", "card_holder_name": "CL-BRW2", "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": "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": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_S5bugqtX2XtuZqlBdLsF/merchant_1756831157/pay_S5bugqtX2XtuZqlBdLsF_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": "checkout_test", "created_at": 1756871112, "expires": 1756874712, "secret": "epk_4a38d6e875d84048876102170688156c" }, "manual_retry_allowed": null, "connector_transaction_id": "pay_6evhe3fwgdpejdi6awaewkgu5a", "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": "pay_S5bugqtX2XtuZqlBdLsF_1", "payment_link": null, "profile_id": "pro_iAJjPLq8Jy18zB0dMRCp", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_HuSsMZdOxGYMxylcPlDq", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-03T04:00:12.631Z", "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": "pm_ekWhZLbwrTIglNg2q0TP", "network_transaction_id": null, "payment_method_status": "inactive", "updated": "2025-09-03T03:45:14.294Z", "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 } ``` Psync ``` { "payment_id": "pay_S5bugqtX2XtuZqlBdLsF", "merchant_id": "merchant_1756831157", "status": "succeeded", "amount": 0, "net_amount": 0, "shipping_cost": null, "amount_capturable": 0, "amount_received": 0, "connector": "checkout", "client_secret": "pay_S5bugqtX2XtuZqlBdLsF_secret_5BY6ptKlDOiquFFFjdbp", "created": "2025-09-03T03:45:12.631Z", "currency": "USD", "customer_id": "checkout_test", "customer": { "id": "checkout_test", "name": null, "email": "hello@gmail.com", "phone": null, "phone_country_code": null }, "description": "hellow world", "refunds": null, "disputes": null, "attempts": [ { "attempt_id": "pay_S5bugqtX2XtuZqlBdLsF_1", "status": "charged", "amount": 0, "order_tax_amount": null, "currency": "USD", "connector": "checkout", "error_message": null, "payment_method": "card", "connector_transaction_id": "pay_6evhe3fwgdpejdi6awaewkgu5a", "capture_method": "automatic", "authentication_type": "three_ds", "created_at": "2025-09-03T03:45:12.632Z", "modified_at": "2025-09-03T03:45:31.964Z", "cancellation_reason": null, "mandate_id": null, "error_code": null, "payment_token": null, "connector_metadata": { "psync_flow": "Capture" }, "payment_experience": null, "payment_method_type": "credit", "reference_id": "pay_S5bugqtX2XtuZqlBdLsF_1", "unified_code": null, "unified_message": null, "client_source": null, "client_version": 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": "0158", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "513721", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2030", "card_holder_name": "CL-BRW2", "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": "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": null, "manual_retry_allowed": false, "connector_transaction_id": "pay_6evhe3fwgdpejdi6awaewkgu5a", "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": "pay_S5bugqtX2XtuZqlBdLsF_1", "payment_link": null, "profile_id": "pro_iAJjPLq8Jy18zB0dMRCp", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_HuSsMZdOxGYMxylcPlDq", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-03T04:00:12.631Z", "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": "pm_ekWhZLbwrTIglNg2q0TP", "network_transaction_id": null, "payment_method_status": "active", "updated": "2025-09-03T03:46:05.901Z", "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": "src_mijqhujphamejfnp6p3jm6tdae", "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": "{\"id\":\"pay_6evhe3fwgdpejdi6awaewkgu5a\",\"requested_on\":\"2025-09-03T03:45:13.4839483Z\",\"source\":{\"id\":\"src_mijqhujphamejfnp6p3jm6tdae\",\"type\":\"card\",\"expiry_month\":12,\"expiry_year\":2030,\"scheme\":\"Mastercard\",\"scheme_local\":\"cartes_bancaires\",\"local_schemes\":[\"cartes_bancaires\"],\"last4\":\"0158\",\"fingerprint\":\"F6044B07C3770BC948DF7AE193C1FA809E1B4DB5C72EDF7C0B23888A4D09CF0F\",\"bin\":\"51372100\",\"card_type\":\"CREDIT\",\"card_category\":\"CONSUMER\",\"issuer\":\"BANQUE CHAABI DU MAROC\",\"issuer_country\":\"FR\",\"product_id\":\"BPD\",\"product_type\":\"Business Premium Debit\",\"avs_check\":\"S\",\"cvv_check\":\"Y\",\"payment_account_reference\":\"\"},\"expires_on\":\"2025-10-03T03:45:29.8397502Z\",\"amount\":0,\"currency\":\"USD\",\"payment_type\":\"Recurring\",\"reference\":\"pay_S5bugqtX2XtuZqlBdLsF_1\",\"status\":\"Card Verified\",\"approved\":true,\"3ds\":{\"downgraded\":false,\"enrolled\":\"Y\",\"authentication_response\":\"Y\",\"cryptogram\":\"AAABAVIREQAAAAAAAAAAAAAAAAA=\",\"xid\":\"f703a7cf-1b55-4ff6-8b9d-10df5ca67c60\",\"version\":\"2.2.0\",\"exemption\":\"none\",\"challenged\":true,\"exemption_applied\":\"none\",\"eci\":\"02\"},\"authentication\":{\"experience\":\"3ds\"},\"balances\":{\"total_authorized\":0,\"total_voided\":0,\"available_to_void\":0,\"total_captured\":0,\"available_to_capture\":0,\"total_refunded\":0,\"available_to_refund\":0},\"risk\":{\"flagged\":false},\"processing\":{\"acquirer_transaction_id\":\"365581360734470027417\",\"retrieval_reference_number\":\"400338603491\",\"merchant_category_code\":\"5815\",\"scheme_merchant_id\":\"788826\",\"scheme\":\"MASTERCARD\",\"aft\":false,\"pan_type_processed\":\"fpan\",\"cko_network_token_available\":false,\"provision_network_token\":false},\"eci\":\"02\",\"scheme_id\":\"643913801749841\",\"_links\":{\"self\":{\"href\":\"https://api.sandbox.checkout.com/payments/pay_6evhe3fwgdpejdi6awaewkgu5a\"},\"actions\":{\"href\":\"https://api.sandbox.checkout.com/payments/pay_6evhe3fwgdpejdi6awaewkgu5a/actions\"}}}", "enable_partial_authorization": null } ``` </details> <details> <summary> MIT </summary> Request: ``` { "amount": 100, "currency": "USD", "customer_id": "checkout_test", "confirm": true, "off_session": true, "recurring_details": { "type": "payment_method_id", "data": "pm_ekWhZLbwrTIglNg2q0TP" } } ``` Response: ``` { "payment_id": "pay_QrFXVcAUVFDEITHuXynS", "merchant_id": "merchant_1756831157", "status": "processing", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 100, "amount_received": null, "connector": "checkout", "client_secret": "pay_QrFXVcAUVFDEITHuXynS_secret_xu1bR6MrQMp1HSVHayGM", "created": "2025-09-03T03:48:37.016Z", "currency": "USD", "customer_id": "checkout_test", "customer": { "id": "checkout_test", "name": null, "email": "hello@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": null, "payment_method": "card", "payment_method_data": { "card": { "last4": "0158", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "513721", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2030", "card_holder_name": "CL-BRW2", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "hello@gmail.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": "checkout_test", "created_at": 1756871316, "expires": 1756874916, "secret": "epk_c6f75b7d264e474ca2ace89e92ef8232" }, "manual_retry_allowed": false, "connector_transaction_id": "pay_qci5hlkqbcdedkyvju2i5o3pna", "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": "pay_QrFXVcAUVFDEITHuXynS_1", "payment_link": null, "profile_id": "pro_iAJjPLq8Jy18zB0dMRCp", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_HuSsMZdOxGYMxylcPlDq", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-03T04:03:37.016Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": "pm_ekWhZLbwrTIglNg2q0TP", "network_transaction_id": null, "payment_method_status": "active", "updated": "2025-09-03T03:48:38.147Z", "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": "src_mijqhujphamejfnp6p3jm6tdae", "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 } ``` PSync ``` { "payment_id": "pay_QrFXVcAUVFDEITHuXynS", "merchant_id": "merchant_1756831157", "status": "succeeded", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 0, "amount_received": 100, "connector": "checkout", "client_secret": "pay_QrFXVcAUVFDEITHuXynS_secret_xu1bR6MrQMp1HSVHayGM", "created": "2025-09-03T03:48:37.016Z", "currency": "USD", "customer_id": "checkout_test", "customer": { "id": "checkout_test", "name": null, "email": "hello@gmail.com", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "attempts": [ { "attempt_id": "pay_QrFXVcAUVFDEITHuXynS_1", "status": "pending", "amount": 100, "order_tax_amount": null, "currency": "USD", "connector": "checkout", "error_message": null, "payment_method": "card", "connector_transaction_id": "pay_qci5hlkqbcdedkyvju2i5o3pna", "capture_method": null, "authentication_type": "no_three_ds", "created_at": "2025-09-03T03:48:37.016Z", "modified_at": "2025-09-03T03:48:38.147Z", "cancellation_reason": null, "mandate_id": null, "error_code": null, "payment_token": null, "connector_metadata": { "psync_flow": "Capture" }, "payment_experience": null, "payment_method_type": "credit", "reference_id": "pay_QrFXVcAUVFDEITHuXynS_1", "unified_code": null, "unified_message": null, "client_source": null, "client_version": 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": "0158", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "513721", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2030", "card_holder_name": "CL-BRW2", "payment_checks": null, "authentication_data": null }, "billing": { "address": { "city": "Fasdf", "country": "US", "line1": "Fasdf", "line2": "Fasdf", "line3": null, "zip": "560095", "state": null, "first_name": "CL-BRW2", "last_name": null, "origin_zip": null }, "phone": null, "email": null } }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "hello@gmail.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": null, "manual_retry_allowed": false, "connector_transaction_id": "pay_qci5hlkqbcdedkyvju2i5o3pna", "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": "pay_QrFXVcAUVFDEITHuXynS_1", "payment_link": null, "profile_id": "pro_iAJjPLq8Jy18zB0dMRCp", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_HuSsMZdOxGYMxylcPlDq", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-03T04:03:37.016Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": "pm_ekWhZLbwrTIglNg2q0TP", "network_transaction_id": null, "payment_method_status": "active", "updated": "2025-09-03T03:49:31.615Z", "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": "{\"id\":\"pay_qci5hlkqbcdedkyvju2i5o3pna\",\"requested_on\":\"2025-09-03T03:48:37.7904045Z\",\"source\":{\"id\":\"src_mijqhujphamejfnp6p3jm6tdae\",\"type\":\"card\",\"expiry_month\":12,\"expiry_year\":2030,\"scheme\":\"Mastercard\",\"scheme_local\":\"cartes_bancaires\",\"local_schemes\":[\"cartes_bancaires\"],\"last4\":\"0158\",\"fingerprint\":\"F6044B07C3770BC948DF7AE193C1FA809E1B4DB5C72EDF7C0B23888A4D09CF0F\",\"bin\":\"51372100\",\"card_type\":\"CREDIT\",\"card_category\":\"CONSUMER\",\"issuer\":\"BANQUE CHAABI DU MAROC\",\"issuer_country\":\"FR\",\"product_id\":\"BPD\",\"product_type\":\"Business Premium Debit\",\"avs_check\":\"S\",\"payment_account_reference\":\"\"},\"expires_on\":\"2025-10-03T03:48:37.9856259Z\",\"amount\":100,\"currency\":\"USD\",\"payment_type\":\"Recurring\",\"reference\":\"pay_QrFXVcAUVFDEITHuXynS_1\",\"status\":\"Captured\",\"approved\":true,\"balances\":{\"total_authorized\":100,\"total_voided\":0,\"available_to_void\":0,\"total_captured\":100,\"available_to_capture\":0,\"total_refunded\":0,\"available_to_refund\":100},\"risk\":{\"flagged\":false,\"score\":0.0},\"processing\":{\"acquirer_transaction_id\":\"056872613587707842595\",\"retrieval_reference_number\":\"269337673321\",\"merchant_category_code\":\"5815\",\"scheme_merchant_id\":\"788826\",\"scheme\":\"MASTERCARD\",\"aft\":false,\"pan_type_processed\":\"fpan\",\"cko_network_token_available\":false,\"provision_network_token\":false},\"merchant_initiated\":true,\"scheme_id\":\"379510993733605\",\"_links\":{\"self\":{\"href\":\"https://api.sandbox.checkout.com/payments/pay_qci5hlkqbcdedkyvju2i5o3pna\"},\"actions\":{\"href\":\"https://api.sandbox.checkout.com/payments/pay_qci5hlkqbcdedkyvju2i5o3pna/actions\"},\"refund\":{\"href\":\"https://api.sandbox.checkout.com/payments/pay_qci5hlkqbcdedkyvju2i5o3pna/refunds\"}}}", "enable_partial_authorization": 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. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/router_request_types.rs` **2. Core Business Logic** - `crates/router/src/core/payments/transformers.rs` **3. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/checkout.rs` - `crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs` - `crates/hyperswitch_connectors/src/utils.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 **Code Patterns Applied:** - Define new data structures (2 changes) - Implement new functions (10 changes) - Extend existing types with new fields (83 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 7355a83e: Files to modify: **crates/hyperswitch_connectors/src/connectors/checkout.rs** Add: - function: private::validate_mandate_payment - function: private::get_headers - function: private::get_url - function: private::get_request_body **crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs** Add: - struct: pub::MandateSource - enum: pub::CheckoutPaymentType **crates/hyperswitch_connectors/src/utils.rs** Add: - function: private::is_mandate_payment **crates/hyperswitch_domain_models/src/router_request_types.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code
{"pr_number": 9248, "pr_title": "feat(connector): [checkout] Add mandate flow", "merged_at": "2025-09-10T08:51:15Z", "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/payments/transformers.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/checkout.rs", "crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs", "crates/hyperswitch_connectors/src/utils.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": {"structs_added": 2, "functions_added": 10, "enums_added": 2, "fields_added": 83, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [TRUSTPAY] implement Banktransfer PaymentMethod ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Implement Banktransfer PaymentMethod - SepabankTransfer - InstantBankTransfer ### 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 a Merchant Account 2. Create API Key 3. Create MCA for Trustpay ``` curl --location 'http://localhost:8080/account/merchant_1742393217/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "connector_type": "payment_processor", "connector_name": "trustpay", "connector_account_details": { "auth_type": "SignatureKey", "api_key": "_/", "key1": "_", "api_secret": "_" }, "test_mode": false, "disabled": false, "payment_methods_enabled": [ { "payment_method": "bank_transfer", "payment_method_types": [ { "payment_method_type": "sepa_bank_transfer", "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "instant_bank_transfer", "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "card_networks": [ "AmericanExpress", "Discover", "Interac", "JCB", "Mastercard", "Visa", "DinersClub", "UnionPay", "RuPay" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "debit", "card_networks": [ "AmericanExpress", "Discover", "Interac", "JCB", "Mastercard", "Visa", "DinersClub", "UnionPay", "RuPay" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method": "bank_redirect", "payment_method_types": [ { "payment_method_type": "giropay", "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "eps", "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "sofort", "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "ideal", "recurring_enabled": true, "installment_payment_enabled": true, "minimum_amount": 1, "maximum_amount": 68607706, "payment_experience": "redirect_to_url" }, { "payment_method_type": "blik", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "trustly", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "metadata":{ "currency_id": 1, "platform_id": 6, "ledger_account_id": "__" } }' ``` 4. Create a SepaBankTransfer Request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_qvBkR76d1dON9WyPNxtZWeulmuwqqF5Rw6Cm8qOkKbvl8rdAqaDpc7U59iD91A1s' \ --data-raw ' { "amount": 6540, "currency": "EUR", "confirm": true, "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": "+1", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://google.com", "payment_method": "bank_transfer", "payment_method_type" :"sepa_bank_transfer", "payment_method_data": { "bank_transfer": { "sepa_bank_transfer": { } } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "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": "ES", "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": "ES", "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" } }' ``` Response ``` { "payment_id": "pay_VUpjOHvTvYtckYOV48up", "merchant_id": "merchant_1742809428", "status": "requires_customer_action", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 6540, "amount_received": null, "connector": "trustpay", "client_secret": "pay_VUpjOHvTvYtckYOV48up_secret_vQzFcUlrhGzCSv1RiCU4", "created": "2025-03-24T09:45:13.330Z", "currency": "EUR", "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": "bank_transfer", "payment_method_data": { "bank_transfer": { "sepa": {} }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "ES", "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": "ES", "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_VUpjOHvTvYtckYOV48up/merchant_1742809428/pay_VUpjOHvTvYtckYOV48up_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "sepa_bank_transfer", "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": 1742809513, "expires": 1742813113, "secret": "epk_76fc87101d92434c934333b45e0cde63" }, "manual_retry_allowed": null, "connector_transaction_id": "1823755940", "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_gdGGL1iBKEtqubRWArMs", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_xumIJOB7bf110Ev1YEK4", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-03-24T10:00:13.330Z", "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-03-24T09:45:15.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, "issuer_error_code": null, "issuer_error_message": null } ``` 5. Create a InstantBankTransfer Payment ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_qvBkR76d1dON9WyPNxtZWeulmuwqqF5Rw6Cm8qOkKbvl8rdAqaDpc7U59iD91A1s' \ --data-raw ' { "amount": 6540, "currency": "EUR", "confirm": true, "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": "+1", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://google.com", "payment_method": "bank_transfer", "payment_method_type" :"instant_bank_transfer", "payment_method_data": { "bank_transfer": { "instant_bank_transfer": { } } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "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": "SK", "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": "SK", "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" } }' ``` Response ``` {"payment_id":"pay_OSdcJIXIcFFySqWm7FZ3","merchant_id":"merchant_1742385527","status":"requires_customer_action","amount":6540,"net_amount":6540,"shipping_cost":null,"amount_capturable":6540,"amount_received":null,"connector":"trustpay","client_secret":"pay_OSdcJIXIcFFySqWm7FZ3_secret_hmkqdAMHQ2PpObgTgIfc","created":"2025-03-19T12:02:02.266Z","currency":"EUR","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":"bank_transfer","payment_method_data":{"bank_transfer":{"instant_bank_transfer":{}},"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":"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_OSdcJIXIcFFySqWm7FZ3/merchant_1742385527/pay_OSdcJIXIcFFySqWm7FZ3_1"},"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"instant_bank_transfer","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":1742385722,"expires":1742389322,"secret":"epk_fb63b0b5ff5d4b09bec618b213434452"},"manual_retry_allowed":null,"connector_transaction_id":"5968676728","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_GKgBVFZG1sYIeDDTTFht","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_LYv7UDOEKVo9ISDI4vYh","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-03-19T12:17:02.266Z","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-03-19T12:02:03.526Z","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} ``` Complete payment using redirection link. payment will be in `processing` step. PML response ``` { "redirect_url": "https://google.com/success", "currency": "EUR", "payment_methods": [ { "payment_method": "bank_transfer", "payment_method_types": [ { "payment_method_type": "sepa_bank_transfer", "payment_experience": null, "card_networks": null, "bank_names": null, "bank_debits": null, "bank_transfers": { "eligible_connectors": [ "trustpay" ] }, "required_fields": null, "surcharge_details": null, "pm_auth_connector": null }, { "payment_method_type": "instant_bank_transfer", "payment_experience": null, "card_networks": null, "bank_names": null, "bank_debits": null, "bank_transfers": { "eligible_connectors": [ "trustpay" ] }, "required_fields": { "billing.address.last_name": { "required_field": "payment_method_data.billing.address.last_name", "display_name": "billing_last_name", "field_type": "user_billing_name", "value": null }, "billing.address.line1": { "required_field": "payment_method_data.billing.address.line1", "display_name": "line1", "field_type": "user_address_line1", "value": null }, "billing.address.zip": { "required_field": "payment_method_data.billing.address.zip", "display_name": "zip", "field_type": "user_address_pincode", "value": null }, "billing.address.country": { "required_field": "payment_method_data.billing.address.country", "display_name": "country", "field_type": { "user_address_country": { "options": [ "ALL" ] } }, "value": null }, "billing.address.first_name": { "required_field": "payment_method_data.billing.address.first_name", "display_name": "billing_first_name", "field_type": "user_billing_name", "value": null }, "email": { "required_field": "email", "display_name": "email", "field_type": "user_email_address", "value": "guest@example.com" }, "billing.address.city": { "required_field": "payment_method_data.billing.address.city", "display_name": "city", "field_type": "user_address_city", "value": null } }, "surcharge_details": null, "pm_auth_connector": null } ] } ], "mandate_payment": null, "merchant_name": "NewAge Retailer", "show_surcharge_breakup_screen": false, "payment_type": "normal", "request_external_three_ds_authentication": false, "collect_shipping_details_from_wallets": false, "collect_billing_details_from_wallets": false, "is_tax_calculation_enabled": false } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
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` - `crates/api_models/src/payments/additional_info.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payment_method_data.rs` **3. Core Business Logic** - `crates/router/src/core/payments/helpers.rs` **4. External Connector Integration** - `crates/common_enums/src/connector_enums.rs` - `crates/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - ... and 15 more files **5. Type Definitions** - `crates/router/src/types/transformers.rs` **6. Utils** - `crates/kgraph_utils/src/mca.rs` - `crates/kgraph_utils/src/transformers.rs` **7. Tests** - `config/deployments/integration_test.toml` - `cypress-tests/cypress/e2e/configs/Payout/Adyen.js` - `cypress-tests/cypress/e2e/configs/Payout/AdyenPlatform.js` - ... and 6 more files **8. Configuration Files** - `config/config.example.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 2 more files **9. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - `crates/common_enums/src/enums.rs` - ... and 4 more files **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (5 changes) - Extend existing types with new fields (98 changes) **Detailed Identifier Changes:** Commit dbcca0fb: Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/api_models/src/payments/additional_info.rs** Modify existing code **crates/common_enums/src/connector_enums.rs** Modify existing code **crates/common_enums/src/enums.rs** Modify existing code **crates/common_enums/src/transformers.rs** Modify existing code **crates/euclid/src/frontend/dir/enums.rs** Modify existing code **crates/euclid/src/frontend/dir/lowering.rs** Modify existing code **crates/euclid/src/frontend/dir/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/adyen.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/itaubank/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/klarna.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/trustpay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs** Add: - enum: pub::TrustpayBankTransferPaymentMethod **crates/hyperswitch_connectors/src/connectors/zen/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/zsl/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Modify existing code **crates/hyperswitch_domain_models/src/payment_method_data.rs** Modify existing code **crates/kgraph_utils/src/mca.rs** Modify existing code **crates/kgraph_utils/src/transformers.rs** Modify existing code **crates/router/src/configs/defaults/payment_connector_required_fields.rs** Modify existing code **crates/router/src/connector/stripe/transformers.rs** Modify existing code **crates/router/src/connector/utils.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code
{"pr_number": 7575, "pr_title": "feat(connector): [TRUSTPAY] implement Banktransfer PaymentMethod", "merged_at": "2025-03-25T14:58:25Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs", "crates/api_models/src/payments/additional_info.rs"], "domain": ["crates/hyperswitch_domain_models/src/payment_method_data.rs"], "core_business": ["crates/router/src/core/payments/helpers.rs"], "connectors": ["crates/common_enums/src/connector_enums.rs", "crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/hyperswitch_connectors/src/connectors/adyen.rs", "crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs", "crates/hyperswitch_connectors/src/connectors/itaubank/transformers.rs", "crates/hyperswitch_connectors/src/connectors/klarna.rs", "crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs", "crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs", "crates/hyperswitch_connectors/src/connectors/trustpay.rs", "crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/zen/transformers.rs", "crates/hyperswitch_connectors/src/connectors/zsl/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/router/src/configs/defaults/payment_connector_required_fields.rs", "crates/router/src/connector/stripe/transformers.rs", "crates/router/src/connector/utils.rs"], "types": ["crates/router/src/types/transformers.rs"], "utils": ["crates/kgraph_utils/src/mca.rs", "crates/kgraph_utils/src/transformers.rs"], "tests": ["config/deployments/integration_test.toml", "cypress-tests/cypress/e2e/configs/Payout/Adyen.js", "cypress-tests/cypress/e2e/configs/Payout/AdyenPlatform.js", "cypress-tests/cypress/e2e/configs/Payout/Nomupay.js", "cypress-tests/cypress/e2e/configs/Payout/Wise.js", "cypress-tests/cypress/e2e/spec/Payout/00004-BankTransfer.cy.js", "cypress-tests/cypress/e2e/spec/Payout/00005-SavePayout.cy.js", "cypress-tests/cypress/e2e/spec/Payout/00006-PayoutUsingPayoutMethodId.cy.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": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/common_enums/src/enums.rs", "crates/common_enums/src/transformers.rs", "crates/euclid/src/frontend/dir/enums.rs", "crates/euclid/src/frontend/dir/lowering.rs", "crates/euclid/src/frontend/dir/transformers.rs"]}, "change_types": {"structs_added": 1, "functions_added": 5, "enums_added": 1, "fields_added": 98}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [CYBERSOURCE] add SEK currency for cybersource ## 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 SEK currency for cybersource ### 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)? --> **/payment curl** ` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_T2i3ahN91KOsWsk7hGjfY7qN35q2bE2xPIyL0kd8bNDk2rmvMSb4rsrOx4HJoGSE' \ --data-raw '{ "amount": 700, "currency": "SEK", "confirm": true, "payment_link": false, "capture_on": "2029-09-10T10:11:12Z", "amount_to_capture": 700, "name": "John Doe", "email": "dg@example.com", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://google.com", "payment_method_data": { "card": { "card_number": "4111 1111 1111 1111", "card_exp_month": "12", "card_exp_year": "30", "card_cvc": "123" }, "billing": { "address": { "line1": "Storgatan 14", "line2": "Lägenhet 67", "city": "Stockholm", "state": " Bourgogne-Franche-Comté", "country": "SE", "zip": "114 55", "first_name": "Max", "last_name": "Mustermann" } } }, "payment_method": "card", "payment_method_type": "credit", "browser_info": { "color_depth": 24, "java_enabled": true, "java_script_enabled": true, "language": "en-GB", "screen_height": 720, "screen_width": 1280, "time_zone": -330, "ip_address": "208.127.127.193", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0" }, "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "order_details": [ { "product_name": "Tea", "quantity": 1, "amount": 110, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" }, { "product_name": "Tea", "quantity": 1, "amount": 110, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" }, { "product_name": "Tea", "quantity": 1, "amount": 110, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" } ] }' ` **Response (currently failing, since test account does not have SEK enabled)** <img width="1088" alt="Screenshot 2025-05-19 at 1 17 27 PM" src="https://github.com/user-attachments/assets/0fecb24a-4217-4aaf-8e01-53fc53e89482" /> ## 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/config.example.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 2 more files
{"pr_number": 8048, "pr_title": "feat(connector): [CYBERSOURCE] add SEK currency for cybersource", "merged_at": "2025-05-19T11:08:01Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "user"]}, "hierarchy": {"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): [Airwallex] Remove optional fields for Ideal and Klarna 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 --> Removed bank_name field from ideal request and language field from klarna request as it is optional. ### 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)? --> Klarna ``` { "currency": "EUR", "amount": 1210, "amount_to_capture": 1210, "confirm": true, "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", "payment_method": "pay_later", "payment_method_type": "klarna", "payment_method_data": { "pay_later": { "klarna_redirect": {} } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "DE", "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" } }, //Some connectors like Apple Pay, Airwallex and Noon might require some additional information, find more in the doc. "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", //The type of the payment that differentiates between normal and various types of mandate payments. "request_incremental_authorization": false, "merchant_order_reference_id": "test_ord", "session_expiry": 900 //Will be used to expire client secret after certain amount of time to be supplied in seconds (900) for 15 mins } ``` ``` { "payment_id": "pay_Km1BO17vtotyjm9aO5Xu", "merchant_id": "merchant_1756184166", "status": "requires_customer_action", "amount": 1210, "net_amount": 1210, "shipping_cost": null, "amount_capturable": 1210, "amount_received": null, "connector": "airwallex", "client_secret": "pay_Km1BO17vtotyjm9aO5Xu_secret_I30lOlczBM9ak5RXj1gZ", "created": "2025-08-26T04:56:27.359Z", "currency": "EUR", "customer_id": "customer123", "customer": { "id": "customer123", "name": null, "email": null, "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": "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", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "billing": { "address": { "city": "San Fransico", "country": "DE", "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": null, "name": null, "phone": null, "return_url": null, "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_Km1BO17vtotyjm9aO5Xu/merchant_1756184166/pay_Km1BO17vtotyjm9aO5Xu_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": 1756184187, "expires": 1756187787, "secret": "epk_a10aa6063e384a0c9beb4c133ee7378b" }, "manual_retry_allowed": null, "connector_transaction_id": "int_hkdmft5dhhaijvmou0z", "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": "int_hkdmft5dhhaijvmou0z", "payment_link": null, "profile_id": "pro_WF8HiGJAYiI57fwZYssF", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_JJPjnito9chYN6qJ3PbB", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-26T05:11:27.358Z", "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_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-26T04:56:31.958Z", "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, "whole_connector_response": "{\"latest_payment_attempt\":{\"id\":\"att_hkdmft5dhhaijvmxn5r_vmou0z\",\"amount\":12.1,\"currency\":\"EUR\",\"payment_method\":{\"type\":\"klarna\",\"klarna\":{\"country_code\":\"DE\",\"billing\":{\"first_name\":\"joseph\",\"last_name\":\"Doe\",\"email\":\"guest@example.com\",\"phone_number\":\"8056594427\",\"address\":{\"country_code\":\"DE\",\"city\":\"San Fransico\",\"street\":\"1467\",\"postcode\":\"94122\"}}},\"id\":\"mtd_hkdm7tdw8haijvoixo5\",\"status\":\"CREATED\",\"created_at\":\"2025-08-26T04:56:29+0000\",\"updated_at\":\"2025-08-26T04:56:29+0000\"},\"merchant_order_id\":\"pay_Km1BO17vtotyjm9aO5Xu_1\",\"payment_intent_id\":\"int_hkdmft5dhhaijvmou0z\",\"status\":\"AUTHENTICATION_REDIRECTED\",\"provider_transaction_id\":\"hkdmqcg2vhaijvn6hcr\",\"captured_amount\":0,\"refunded_amount\":0,\"created_at\":\"2025-08-26T04:56:29+0000\",\"updated_at\":\"2025-08-26T04:56:31+0000\",\"settle_via\":\"airwallex\",\"authentication_data\":{\"ds_data\":{},\"fraud_data\":{\"action\":\"ACCEPT\",\"score\":\"0\",\"risk_factors\":[]},\"avs_result\":\"U\",\"cvc_result\":\"U\"},\"expires_at\":\"2025-08-26T05:06:29+0000\",\"payment_method_options\":{\"card\":{}},\"device_data\":{\"ip_address\":\"128.0.0.1\",\"screen_height\":723,\"screen_width\":1536,\"screen_color_depth\":24,\"language\":\"en\",\"timezone\":\"0\",\"browser\":{\"java_enabled\":true,\"javascript_enabled\":true,\"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\"}}},\"id\":\"int_hkdmft5dhhaijvmou0z\",\"request_id\":\"c0d2ec1b-0704-479e-b5ec-87bbaf5f8c0e\",\"amount\":12.1,\"currency\":\"EUR\",\"merchant_order_id\":\"pay_Km1BO17vtotyjm9aO5Xu_1\",\"order\":{\"products\":[{\"name\":\"Apple iphone 15\",\"quantity\":1,\"unit_price\":6540}],\"shipping\":{\"first_name\":\"joseph\",\"last_name\":\"Doe\",\"phone_number\":\"+918056594427\",\"address\":{\"country_code\":\"DK\",\"city\":\"San Fransico\",\"street\":\"1467\",\"postcode\":\"94122\"}}},\"descriptor\":\"Cathy Testing\",\"status\":\"REQUIRES_CUSTOMER_ACTION\",\"captured_amount\":0,\"created_at\":\"2025-08-26T04:56:28+0000\",\"updated_at\":\"2025-08-26T04:56:31+0000\",\"next_action\":{\"type\":\"redirect\",\"method\":\"GET\",\"url\":\"https://api-demo.airwallex.com/pa/redirect/hk/hkdmqj665haijvoh63x_vmou0z?checksum=3ec8afe2cf83\"},\"base_amount\":12.1,\"base_currency\":\"EUR\"}", "enable_partial_authorization": null } ``` iDeal ``` { "amount": 6540, "currency": "EUR", "amount_to_capture": 6540, "confirm": true, "capture_method": "automatic", "authentication_type": "no_three_ds", "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": "ideal", "payment_method_data": { "bank_redirect": { "ideal": { "billing_details": { "billing_name": "john doe", "email": "abc@gmail.com" }, "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" } } ``` ``` { "payment_id": "pay_IFydW2Aa7nlUMsKhraZJ", "merchant_id": "merchant_1756184166", "status": "requires_customer_action", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 6540, "amount_received": null, "connector": "airwallex", "client_secret": "pay_IFydW2Aa7nlUMsKhraZJ_secret_hR4yz6AdPJ8B7pz1t5Kn", "created": "2025-08-26T05:17:03.907Z", "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": null, "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", "origin_zip": null }, "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", "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": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_IFydW2Aa7nlUMsKhraZJ/merchant_1756184166/pay_IFydW2Aa7nlUMsKhraZJ_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "ideal", "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": 1756185423, "expires": 1756189023, "secret": "epk_417778a9c93c4010b53923cf6c5aba78" }, "manual_retry_allowed": null, "connector_transaction_id": "int_hkdmgpg5khaikg2hy26", "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": "int_hkdmgpg5khaikg2hy26", "payment_link": null, "profile_id": "pro_WF8HiGJAYiI57fwZYssF", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_JJPjnito9chYN6qJ3PbB", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-26T05:32:03.907Z", "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-26T05:17:07.526Z", "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 } ``` ## 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` - `crates/payment_methods/src/configs/payment_connector_required_fields.rs` **Code Patterns Applied:** - Extend existing types with new fields (5 changes) **Detailed Identifier Changes:** Commit d112179f: Files to modify: **crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs** Modify existing code **crates/payment_methods/src/configs/payment_connector_required_fields.rs** Modify existing code
{"pr_number": 9060, "pr_title": "fix(connector): [Airwallex] Remove optional fields for Ideal and Klarna pm", "merged_at": "2025-08-28T11:52:06Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs", "crates/payment_methods/src/configs/payment_connector_required_fields.rs"]}, "change_types": {"fields_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [Worldpayxml] add card payment ## 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 --> Implement card payment with Worldpay xml Hotfix for https://github.com/juspay/hyperswitch/pull/8076 > Note: Status updation takes 5-10 mins at the connector ## 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. MCA create </summary> ``` curl --location 'http://localhost:8080/account/postman_merchant_GHAction_b90895b7-51ca-4824-9f06-834ddc53293c/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_RPa8nmiLG06tHc9W4v378FsyNnVwO7Ko2fBI7NmsJ1Cq4CXatdt3xqrMFIed9gbb' \ --data '{ "connector_type": "payment_processor", "connector_name": "redsys", "business_country": "US", "business_label": "default", "connector_account_details": { "auth_type": "SignatureKey", "api_key": "*******8", "key1": "*******", "api_secret": "****************" }, "test_mode": false, "disabled": false, "payment_methods_enabled": [ { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "debit", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, ], "metadata": { } }' ``` Response ```json {"connector_type":"payment_processor","connector_name":"redsys","connector_label":"redsys_US_default","merchant_connector_id":"mca_lTOks70dqG9F8f770IAt","profile_id":"pro_1OJnibg63SywyAechHCC","connector_account_details":{"auth_type":"SignatureKey","api_key":"33*****31","key1":"***","api_secret":"sq****************************J7"},"payment_methods_enabled":[{"payment_method":"pay_later","payment_method_types":[{"payment_method_type":"affirm","payment_experience":"redirect_to_url","card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]},{"payment_method":"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":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]},{"payment_method":"pay_later","payment_method_types":[{"payment_method_type":"klarna","payment_experience":"redirect_to_url","card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]},{"payment_method":"pay_later","payment_method_types":[{"payment_method_type":"klarna","payment_experience":"invoke_sdk_client","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_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":"bancontact_card","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":"przelewy24","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","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":"becs","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"sepa","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"bacs","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]},{"payment_method":"bank_transfer","payment_method_types":[{"payment_method_type":"ach","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"bacs","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true},{"payment_method_type":"sepa","payment_experience":null,"card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]},{"payment_method":"card","payment_method_types":[{"payment_method_type":"credit","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":"card","payment_method_types":[{"payment_method_type":"debit","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":"wallet","payment_method_types":[{"payment_method_type":"apple_pay","payment_experience":"invoke_sdk_client","card_networks":null,"accepted_currencies":null,"accepted_countries":null,"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","card_networks":null,"accepted_currencies":null,"accepted_countries":null,"minimum_amount":1,"maximum_amount":68607706,"recurring_enabled":true,"installment_payment_enabled":true}]}],"connector_webhook_details":null,"metadata":{"google_pay":{"merchant_info":{"merchant_name":"Narayan Bhat"},"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":"{{gateway_merchant_id}}"}}}]}},"test_mode":false,"disabled":false,"frm_configs":null,"business_country":"US","business_label":"default","business_sub_label":null,"applepay_verified_domains":null,"pm_auth_config":null,"status":"active","additional_merchant_data":null,"connector_wallets_details":null} ``` </details> <details> <summary>2. Automatic Card Payment</summary> ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_X1J2lFi1QS1vL4u11B4FMVtV4HakriV3Ow30FEgTQ4sMVieSpKKEt6vkEFwCQggW' \ --data '{ "amount": 100, "currency": "EUR", "confirm": true, "description": "payments", "authentication_type": "three_ds", "payment_method": "card", "payment_method_data": { "card": { "card_number": "4444333322221111", "card_exp_month": "12", "card_exp_year": "49", "card_holder_name": "Akshaya", "card_cvc": "123" } } ,"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": "13.232.74.226" } }' ``` Response ```json {"payment_id":"pay_7uOikIjBhvjrYDXc36Cx","merchant_id":"postman_merchant_GHAction_2f406804-7af5-4850-abaa-4999b4fa3f14","status":"processing","amount":100,"net_amount":100,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"worldpayxml","client_secret":"pay_7uOikIjBhvjrYDXc36Cx_secret_t0fuVie1nBw5hGl69WZe","created":"2025-05-20T06:21:18.104Z","currency":"EUR","customer_id":null,"customer":null,"description":"payments","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":"444433","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"49","card_holder_name":"Akshaya","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":null,"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":null,"manual_retry_allowed":false,"connector_transaction_id":"pay_7uOikIjBhvjrYDXc36Cx_1","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_7uOikIjBhvjrYDXc36Cx_1","payment_link":null,"profile_id":"pro_3eQAt6KJcj2IkVeFHv4T","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_xBSM1IZ30g83XmJU3X3d","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-05-20T06:36:18.104Z","fingerprint":null,"browser_info":{"language":"nl-NL","time_zone":0,"ip_address":"13.232.74.226","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-05-20T06:21:19.507Z","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} ``` Psync ``` curl --location 'http://localhost:8080/payments/pay_7uOikIjBhvjrYDXc36Cx' \ --header 'Accept: application/json' \ --header 'api-key: dev_X1J2lFi1QS1vL4u11B4FMVtV4HakriV3Ow30FEgTQ4sMVieSpKKEt6vkEFwCQggW' ``` Response ``` {"payment_id":"pay_7uOikIjBhvjrYDXc36Cx","merchant_id":"postman_merchant_GHAction_2f406804-7af5-4850-abaa-4999b4fa3f14","status":"succeeded","amount":100,"net_amount":100,"shipping_cost":null,"amount_capturable":0,"amount_received":100,"connector":"worldpayxml","client_secret":"pay_7uOikIjBhvjrYDXc36Cx_secret_t0fuVie1nBw5hGl69WZe","created":"2025-05-20T06:21:18.104Z","currency":"EUR","customer_id":null,"customer":null,"description":"payments","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":"444433","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"49","card_holder_name":"Akshaya","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":null,"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":null,"manual_retry_allowed":false,"connector_transaction_id":"pay_7uOikIjBhvjrYDXc36Cx_1","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_7uOikIjBhvjrYDXc36Cx_1","payment_link":null,"profile_id":"pro_3eQAt6KJcj2IkVeFHv4T","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_xBSM1IZ30g83XmJU3X3d","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-05-20T06:36:18.104Z","fingerprint":null,"browser_info":{"language":"nl-NL","time_zone":0,"ip_address":"13.232.74.226","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-05-20T06:40:35.280Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null} ``` </details> <details> <summary>3. Manual Card Payment</summary> ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_X1J2lFi1QS1vL4u11B4FMVtV4HakriV3Ow30FEgTQ4sMVieSpKKEt6vkEFwCQggW' \ --data '{ "amount": 100, "currency": "EUR", "confirm": true, "capture_method": "manual", "description": "payments", "payment_method": "card", "payment_method_data": { "card": { "card_number": "4444333322221111", "card_exp_month": "12", "card_exp_year": "49", "card_holder_name": "Akshaya", "card_cvc": "123" } } ,"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": "13.232.74.226" } }' ``` Response ``` {"payment_id":"pay_G9SuNUoZacHL0xaGxdi0","merchant_id":"postman_merchant_GHAction_2f406804-7af5-4850-abaa-4999b4fa3f14","status":"requires_capture","amount":100,"net_amount":100,"shipping_cost":null,"amount_capturable":100,"amount_received":null,"connector":"worldpayxml","client_secret":"pay_G9SuNUoZacHL0xaGxdi0_secret_ujj7y0xYJOiYkGazvGq1","created":"2025-05-20T09:00:55.987Z","currency":"EUR","customer_id":null,"customer":null,"description":"payments","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":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"444433","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"49","card_holder_name":"Akshaya","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":null,"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":null,"manual_retry_allowed":false,"connector_transaction_id":"pay_G9SuNUoZacHL0xaGxdi0_1","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_G9SuNUoZacHL0xaGxdi0_1","payment_link":null,"profile_id":"pro_3eQAt6KJcj2IkVeFHv4T","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_xBSM1IZ30g83XmJU3X3d","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-05-20T09:15:55.987Z","fingerprint":null,"browser_info":{"language":"nl-NL","time_zone":0,"ip_address":"13.232.74.226","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-05-20T09:00:56.695Z","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} ``` Capture call ``` curl --location 'http://localhost:8080/payments/pay_G9SuNUoZacHL0xaGxdi0/capture' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_X1J2lFi1QS1vL4u11B4FMVtV4HakriV3Ow30FEgTQ4sMVieSpKKEt6vkEFwCQggW' \ --data '{ "amount_to_capture": 10, "statement_descriptor_name": "Joseph", "statement_descriptor_suffix": "JS" }' ``` Response ```json {"payment_id":"pay_G9SuNUoZacHL0xaGxdi0","merchant_id":"postman_merchant_GHAction_2f406804-7af5-4850-abaa-4999b4fa3f14","status":"processing","amount":100,"net_amount":100,"shipping_cost":null,"amount_capturable":100,"amount_received":null,"connector":"worldpayxml","client_secret":"pay_G9SuNUoZacHL0xaGxdi0_secret_ujj7y0xYJOiYkGazvGq1","created":"2025-05-20T09:00:55.987Z","currency":"EUR","customer_id":null,"customer":null,"description":"payments","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":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"444433","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"49","card_holder_name":"Akshaya","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":null,"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":null,"manual_retry_allowed":false,"connector_transaction_id":"pay_G9SuNUoZacHL0xaGxdi0_1","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_G9SuNUoZacHL0xaGxdi0_1","payment_link":null,"profile_id":"pro_3eQAt6KJcj2IkVeFHv4T","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_xBSM1IZ30g83XmJU3X3d","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-05-20T09:15:55.987Z","fingerprint":null,"browser_info":{"language":"nl-NL","time_zone":0,"ip_address":"13.232.74.226","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-05-20T09:02:48.712Z","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} ``` Psync call ``` curl --location 'http://localhost:8080/payments/pay_G9SuNUoZacHL0xaGxdi0?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_X1J2lFi1QS1vL4u11B4FMVtV4HakriV3Ow30FEgTQ4sMVieSpKKEt6vkEFwCQggW' ``` Response ``` {"payment_id":"pay_G9SuNUoZacHL0xaGxdi0","merchant_id":"postman_merchant_GHAction_2f406804-7af5-4850-abaa-4999b4fa3f14","status":"partially_captured","amount":100,"net_amount":100,"shipping_cost":null,"amount_capturable":0,"amount_received":10,"connector":"worldpayxml","client_secret":"pay_G9SuNUoZacHL0xaGxdi0_secret_ujj7y0xYJOiYkGazvGq1","created":"2025-05-20T09:00:55.987Z","currency":"EUR","customer_id":null,"customer":null,"description":"payments","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":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"444433","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"49","card_holder_name":"Akshaya","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":null,"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":null,"manual_retry_allowed":false,"connector_transaction_id":"pay_G9SuNUoZacHL0xaGxdi0_1","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_G9SuNUoZacHL0xaGxdi0_1","payment_link":null,"profile_id":"pro_3eQAt6KJcj2IkVeFHv4T","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_xBSM1IZ30g83XmJU3X3d","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-05-20T09:15:55.987Z","fingerprint":null,"browser_info":{"language":"nl-NL","time_zone":0,"ip_address":"13.232.74.226","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-05-20T09:05:56.777Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null} ``` </details> <details> <summary> 4. Refund </summary> ``` curl --location 'http://localhost:8080/refunds' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_X1J2lFi1QS1vL4u11B4FMVtV4HakriV3Ow30FEgTQ4sMVieSpKKEt6vkEFwCQggW' \ --data '{ "payment_id": "pay_OKYmLEJQY1O7DkDBO8Ax", "amount": 10, "reason": "Customer returned product", "refund_type": "instant", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } } }' ``` Response ``` {"refund_id":"ref_oNkvIu2PWfKi2RfoVrBn","payment_id":"pay_OKYmLEJQY1O7DkDBO8Ax","amount":10,"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-05-20T11:15:05.175Z","updated_at":"2025-05-20T11:15:05.402Z","connector":"worldpayxml","profile_id":"pro_3eQAt6KJcj2IkVeFHv4T","merchant_connector_id":"mca_xBSM1IZ30g83XmJU3X3d","split_refunds":{"stripe_split_refund":{"revert_platform_fee":true,"revert_transfer":true}},"issuer_error_code":null,"issuer_error_message":null} ``` Rsync ``` {"refund_id":"ref_oNkvIu2PWfKi2RfoVrBn","payment_id":"pay_OKYmLEJQY1O7DkDBO8Ax","amount":10,"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-05-20T11:15:05.175Z","updated_at":"2025-05-20T11:21:35.656Z","connector":"worldpayxml","profile_id":"pro_3eQAt6KJcj2IkVeFHv4T","merchant_connector_id":"mca_xBSM1IZ30g83XmJU3X3d","split_refunds":{"stripe_split_refund":{"revert_platform_fee":true,"revert_transfer":true}},"issuer_error_code":null,"issuer_error_message":null} ``` </details> <details> <summary> Void </summary> ``` curl --location 'http://localhost:8080/payments/pay_P5IkFoEExowU6Nqf74k8/cancel' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_N2utjEdSs1p0PtPwRVYQp3Jnwdfj4HHlma1XQpcjIMysYca57WiMOHSM1H4bJD58' \ --data '{"cancellation_reason":"requested_by_customer"}' ``` Response ``` {"payment_id":"pay_P5IkFoEExowU6Nqf74k8","merchant_id":"postman_merchant_GHAction_2c820b48-09b9-4035-a144-662641c32be8","status":"processing","amount":5000,"net_amount":5000,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"worldpayxml","client_secret":"pay_P5IkFoEExowU6Nqf74k8_secret_2bMWCYQGeVhcAJjKYXke","created":"2025-05-22T08:23:01.758Z","currency":"USD","customer_id":null,"customer":{"id":null,"name":null,"email":"hyperswitch_sdk_demo_id@gmail.com","phone":null,"phone_country_code":null},"description":"Test Payment","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":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"444433","card_extended_bin":null,"card_exp_month":"01","card_exp_year":"27","card_holder_name":"AUTHORISED","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"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":"john","last_name":"doe"},"phone":null,"email":null},"order_details":null,"email":null,"name":null,"phone":null,"return_url":"https://example.com/","authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":"requested_by_customer","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":"pay_P5IkFoEExowU6Nqf74k8_1","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_P5IkFoEExowU6Nqf74k8_1","payment_link":null,"profile_id":"pro_3qdXNDn2bZxbrHClQBwa","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_IhXe2U3f7XmrYnxk0NKk","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-05-22T08:38:01.758Z","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-05-22T08:23:09.965Z","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} ``` Psync ``` curl --location 'http://localhost:8080/payments/pay_P5IkFoEExowU6Nqf74k8?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_N2utjEdSs1p0PtPwRVYQp3Jnwdfj4HHlma1XQpcjIMysYca57WiMOHSM1H4bJD58' ``` Response ``` {"payment_id":"pay_P5IkFoEExowU6Nqf74k8","merchant_id":"postman_merchant_GHAction_2c820b48-09b9-4035-a144-662641c32be8","status":"cancelled","amount":5000,"net_amount":5000,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"worldpayxml","client_secret":"pay_P5IkFoEExowU6Nqf74k8_secret_2bMWCYQGeVhcAJjKYXke","created":"2025-05-22T08:23:01.758Z","currency":"USD","customer_id":null,"customer":{"id":null,"name":null,"email":"hyperswitch_sdk_demo_id@gmail.com","phone":null,"phone_country_code":null},"description":"Test Payment","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":"1111","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"444433","card_extended_bin":null,"card_exp_month":"01","card_exp_year":"27","card_holder_name":"AUTHORISED","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"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":"john","last_name":"doe"},"phone":null,"email":null},"order_details":null,"email":null,"name":null,"phone":null,"return_url":"https://example.com/","authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":"requested_by_customer","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":"pay_P5IkFoEExowU6Nqf74k8_1","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_P5IkFoEExowU6Nqf74k8_1","payment_link":null,"profile_id":"pro_3qdXNDn2bZxbrHClQBwa","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_IhXe2U3f7XmrYnxk0NKk","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-05-22T08:38:01.758Z","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-05-22T08:46:18.210Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null} ``` </details> ## 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. 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 5 more files **3. Type Definitions** - `crates/router/src/types/api.rs` - `crates/router/src/types/transformers.rs` **4. Tests** - `config/deployments/integration_test.toml` - `cypress-tests/cypress/e2e/configs/Payment/Utils.js` - `cypress-tests/cypress/e2e/configs/Payment/Worldpayxml.js` **5. Configuration Files** - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - `config/development.toml` - ... and 1 more files **6. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` **Code Patterns Applied:** - Define new data structures (30 changes) - Implement new functions (30 changes) - Extend existing types with new fields (580 changes) - Add conditional logic for feature flags or filtering (14 changes) **Detailed Identifier Changes:** Commit cb773c50: 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/worldpayxml.rs** Remove: - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Worldpayxml - impl: impl ConnectorSpecifications for Worldpayxml Add: - function: private::validate_mandate_payment - function: private::build_request - function: private::get_request_body - 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_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Worldpayxml - impl: impl ConnectorSpecifications for Worldpayxml **crates/hyperswitch_connectors/src/connectors/worldpayxml/transformers.rs** Remove: - struct: pub::WorldpayxmlPaymentsRequest - enum: private::RefundStatus Add: - function: private::try_from - function: private::try_from - function: private::try_from - function: private::try_from - function: private::try_from - struct: pub::PaymentService - struct: private::Modify - struct: private::OrderModification - struct: private::RefundRequest - struct: private::CancelRequest - struct: private::CaptureRequest - struct: private::Inquiry - struct: private::OrderInquiry - struct: private::Submit - struct: pub::Reply - struct: private::OkResponse - struct: private::ModifyRequestReceived - struct: pub::WorldpayXmlErrorResponse - struct: private::OrderStatus - struct: private::Payment - struct: private::ReturnCode - struct: private::ResultCode - struct: private::Balance - struct: private::PaymentMethodDetail - struct: private::CardResponse - struct: private::AuthorisationId - struct: private::SchemeResponse - struct: private::Order - struct: private::PaymentDetails - struct: private::CardSSL - struct: private::Date - enum: private::LastEvent - enum: private::AutoCapture - impl: impl TryFrom<&Card> for PaymentDetails - impl: impl TryFrom<(&WorldpayxmlRouterData<&PaymentsAuthorizeRouterData>, &Card)> for PaymentService - impl: impl TryFrom<&WorldpayxmlRouterData<&PaymentsCaptureRouterData>> for PaymentService - impl: impl TryFrom<&PaymentsCancelRouterData> for PaymentService - impl: impl TryFrom<&WorldpayxmlRouterData<&RefundsRouterData<F>>> for PaymentService - mod: pub::worldpayxml_constants **crates/hyperswitch_connectors/src/utils.rs** Add: - function: pub::serialize_to_xml_bytes - struct: pub::XmlSerializer - impl: impl XmlSerializer **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": 8154, "pr_title": "feat(connector): [Worldpayxml] add card payment", "merged_at": "2025-05-27T11:45:17Z", "intent": {"feature_type": "payment", "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/worldpayxml.rs", "crates/hyperswitch_connectors/src/connectors/worldpayxml/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs"], "types": ["crates/router/src/types/api.rs", "crates/router/src/types/transformers.rs"], "tests": ["config/deployments/integration_test.toml", "cypress-tests/cypress/e2e/configs/Payment/Utils.js", "cypress-tests/cypress/e2e/configs/Payment/Worldpayxml.js"], "config": ["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": {"structs_added": 30, "functions_added": 30, "enums_added": 2, "fields_added": 580, "imports_added": 6, "conditionals_added": 14}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): populate UCS status_code in response headers ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR populates UCS status_code (connector HTTP code) in response headers. It also introduces proxy_connector_http_status_code which when enabled, configures Hyperswitch to mirror (proxy) the connector’s HTTP status code in its own response. ### 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)? --> Enable UCS Config ``` curl --location 'http://localhost:8080/configs/' \ --header 'api-key: test_admin' \ --header 'x-tenant-id: public' \ --header 'Content-Type: application/json' \ --data '{ "key": "ucs_rollout_config_{{merchant_id}}_razorpay_upi_Authorize", "value": "1.0" }' ``` Make a payment ``` curl --location 'http://localhost:8080/v2/payments' \ --header 'api-key: dev_mwKUL6tWhsO8FbwWtKjNllSa7GnZutXqKsv9oLxJRv4c7l8UX9muRdsC4r9Wh2A5' \ --header 'Content-Type: application/json' \ --header 'x-profile-id: pro_cQ4q1A6oYpi89Zi7zyxW' \ --header 'Authorization: api-key=dev_mwKUL6tWhsO8FbwWtKjNllSa7GnZutXqKsv9oLxJRv4c7l8UX9muRdsC4r9Wh2A5' \ --data-raw '{ "amount_details": { "order_amount": 100, "currency": "INR" }, "capture_method":"automatic", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://google.com", "payment_method_data": { "upi": { "upi_collect": { "vpa_id": "success" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "IN", "first_name": "Swangi", "last_name": "Kumari" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "swangi.kumari@juspay.in" } }, "payment_method_subtype": "upi_collect", "payment_method_type": "upi", "return_raw_connector_response": true }' ``` Response ``` { "id": "12345_pay_019860443e3d7f939e80e9a98effba3d", "status": "requires_merchant_action", "amount": { "order_amount": 100, "currency": "INR", "shipping_cost": null, "order_tax_amount": null, "external_tax_calculation": "skip", "surcharge_calculation": "skip", "surcharge_amount": null, "tax_on_surcharge": null, "net_amount": 100, "amount_to_capture": null, "amount_capturable": 0, "amount_captured": null }, "customer_id": null, "connector": "razorpay", "created": "2025-07-31T11:35:41.885Z", "payment_method_data": { "billing": { "address": { "city": "San Fransico", "country": "IN", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "Swangi", "last_name": "Kumari" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "swangi.kumari@juspay.in" } }, "payment_method_type": "upi", "payment_method_subtype": "upi_collect", "connector_transaction_id": "order_QzezHblnRQM45h", "connector_reference_id": null, "merchant_connector_id": "mca_BIFmH1dr6Vh5UoYu2srb", "browser_info": null, "error": { "code": "BAD_REQUEST_ERROR", "message": "Invalid VPA. Please enter a valid Virtual Payment Address", "unified_code": null, "unified_message": null, "network_advice_code": null, "network_decline_code": null, "network_error_message": null }, "shipping": null, "billing": null, "attempts": null, "connector_token_details": null, "payment_method_id": null, "next_action": null, "return_url": "https://google.com/", "authentication_type": "no_three_ds", "authentication_type_applied": "no_three_ds", "is_iframe_redirection_enabled": null, "merchant_reference_id": null, "raw_connector_response": "{\"error\":{\"code\":\"BAD_REQUEST_ERROR\",\"description\":\"Invalid VPA. Please enter a valid Virtual Payment Address\",\"source\":\"customer\",\"step\":\"payment_initiation\",\"reason\":\"invalid_vpa\",\"metadata\":{},\"field\":\"vpa\"}}", "feature_metadata": null } ``` Verify response headers for connector_http_status_code <img width="806" height="373" alt="image" src="https://github.com/user-attachments/assets/d948782f-d7d2-45f8-bff5-ef62c7a93111" /> If proxy_connector_http_status_code is enabled Hyperswitch resoponse status code will also be 400 <img width="825" height="277" alt="image" src="https://github.com/user-attachments/assets/518446a8-5989-4862-b441-81c20c8dab1a" /> ## 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/payments.rs` - `crates/router/src/core/payments/flows/authorize_flow.rs` - `crates/router/src/core/payments/flows/psync_flow.rs` - ... and 4 more files **2. Configuration Files** - `config/config.example.toml` - `config/deployments/env_specific.toml` - `config/development.toml` - ... and 5 more files **3. Other** - `Cargo.lock` - `crates/router/src/compatibility/wrap.rs` - `crates/router/src/lib.rs` - ... and 1 more files **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (1 changes) - Extend existing types with new fields (5 changes) **Detailed Identifier Changes:** Commit 2adf6c83: Files to modify: **crates/router/src/compatibility/wrap.rs** Modify existing code **crates/router/src/configs/secrets_transformers.rs** Modify existing code **crates/router/src/configs/settings.rs** Add: - struct: pub::ProxyStatusMapping **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/flows/authorize_flow.rs** Modify existing code **crates/router/src/core/payments/flows/psync_flow.rs** Modify existing code **crates/router/src/core/payments/flows/setup_mandate_flow.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/core/unified_connector_service.rs** Modify existing code **crates/router/src/core/unified_connector_service/transformers.rs** Add: - function: pub::convert_connector_service_status_code **crates/router/src/lib.rs** Modify existing code **crates/router/src/services/api.rs** Modify existing code
{"pr_number": 8788, "pr_title": "feat(core): populate UCS status_code in response headers", "merged_at": "2025-08-05T09:02: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/flows/authorize_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/transformers.rs", "crates/router/src/core/unified_connector_service.rs", "crates/router/src/core/unified_connector_service/transformers.rs"], "config": ["config/config.example.toml", "config/deployments/env_specific.toml", "config/development.toml", "config/docker_compose.toml", "crates/external_services/Cargo.toml", "crates/router/Cargo.toml", "crates/router/src/configs/secrets_transformers.rs", "crates/router/src/configs/settings.rs"], "other": ["Cargo.lock", "crates/router/src/compatibility/wrap.rs", "crates/router/src/lib.rs", "crates/router/src/services/api.rs"]}, "change_types": {"structs_added": 1, "functions_added": 1, "fields_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(subscriptions): Invoice record back workflow ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This pull request introduces a comprehensive set of changes to add invoice management capabilities to the codebase. The changes include new data models and enums for invoices, database schema and query support, and integration with connectors and APIs for invoice-related workflows. **Invoice Data Model and Enums** - Added the `InvoiceStatus` enum to represent the various states an invoice can be in, such as `InvoiceCreated`, `PaymentPending`, `PaymentSucceeded`, etc. (`crates/common_enums/src/connector_enums.rs`) - Introduced the `InvoiceRecordBackTrackingData` struct for tracking invoice-related process data, along with a constructor. (`crates/api_models/src/process_tracker/invoice_record_back.rs`) - Created a new `InvoiceId` type and implemented associated methods and traits, including event metric integration. (`crates/common_utils/src/id_type/invoice.rs`) - Registered the new `InvoiceId` in the global ID types and exposed it for use. (`crates/common_utils/src/id_type.rs`) [[1]](diffhunk://#diff-d949a6c528436f8ab1a851147e7467d525cba63b395b253d1dec17101a971fa1R10) [[2]](diffhunk://#diff-d949a6c528436f8ab1a851147e7467d525cba63b395b253d1dec17101a971fa1R51) - Added `Invoice` to the `ApiEventsType` enum for event categorization. (`crates/common_utils/src/events.rs`) - Extended the `ProcessTrackerRunner` enum to include `InvoiceRecordBackflow`. (`crates/common_enums/src/enums.rs`) **Database Schema and Models** - Added a new `invoice` table to the Diesel ORM schema (both v1 and v2), including all necessary fields and indices. (`crates/diesel_models/src/schema.rs`, `crates/diesel_models/src/schema_v2.rs`) [[1]](diffhunk://#diff-b3de56db64ac930fe24b6b0acb45282191598a506d20732f70ef00192b4b18d5R718-R751) [[2]](diffhunk://#diff-b3de56db64ac930fe24b6b0acb45282191598a506d20732f70ef00192b4b18d5R1767) [[3]](diffhunk://#diff-22fdeee3005db31c44a9d40cd43c5a244e77a74e17d2e227d4c0b376f133f37eR732-R765) [[4]](diffhunk://#diff-22fdeee3005db31c44a9d40cd43c5a244e77a74e17d2e227d4c0b376f133f37eR1722) - Implemented the `Invoice`, `InvoiceNew`, and `InvoiceUpdate` structs for ORM mapping, along with constructors and update methods. (`crates/diesel_models/src/invoice.rs`) - Added query support for inserting, finding, and updating invoices in the database. (`crates/diesel_models/src/query/invoice.rs`) - Registered the new `invoice` module in the Diesel models and query modules. (`crates/diesel_models/src/lib.rs`, `crates/diesel_models/src/query.rs`) [[1]](diffhunk://#diff-7eb95277f166342b9ffb08398f8165f1498aa8ecb4ac3b967133e4d682c382a3R27) [[2]](diffhunk://#diff-a8ff468e437001f77b303a9f63b47a6204ffc99b25dd4e9d9a122d5093b69f1cR25) **Connector and API Integration** - Added support for the invoice record backflow in the Chargebee and Recurly connectors, including trait implementations and integration with request/response types. (`crates/hyperswitch_connectors/src/connectors/chargebee.rs`, `crates/hyperswitch_connectors/src/connectors/recurly.rs`) [[1]](diffhunk://#diff-805dd853d554bb072ad3427d6b5ed7dc7b9ed62ee278f5adbf389a08266996b0R688) [[2]](diffhunk://#diff-987be7b07b93a35ac0316f1eb8ad93ece84e5280d37e5566964238d1c969a3fdL12-R34) [[3]](diffhunk://#diff-987be7b07b93a35ac0316f1eb8ad93ece84e5280d37e5566964238d1c969a3fdR151) [[4]](diffhunk://#diff-987be7b07b93a35ac0316f1eb8ad93ece84e5280d37e5566964238d1c969a3fdR162-R171) - Updated the default connector implementations to support the new invoice record backflow and related API flows. (`crates/hyperswitch_connectors/src/default_implementations.rs`) [[1]](diffhunk://#diff-ee28a7003b898fbf15bb25eb102e2310a4c52ba46d3961e3f929f4cf6bd1f6beL46-R51) [[2]](diffhunk://#diff-ee28a7003b898fbf15bb25eb102e2310a4c52ba46d3961e3f929f4cf6bd1f6beL69-R75) [[3]](diffhunk://#diff-ee28a7003b898fbf15bb25eb102e2310a4c52ba46d3961e3f929f4cf6bd1f6beL133-R135) [[4]](diffhunk://#diff-ee28a7003b898fbf15bb25eb102e2310a4c52ba46d3961e3f929f4cf6bd1f6beR6946-R6956) **API Models** - Added a new module for `invoice_record_back` in the process tracker API models. (`crates/api_models/src/process_tracker.rs`) --- **Summary of Most Important Changes:** **Invoice Data Model and Enums** - Introduced the `InvoiceStatus` enum and the `InvoiceRecordBackTrackingData` struct for invoice state tracking and process workflows. [[1]](diffhunk://#diff-6b571cd80816c7f8efa676e546481b145ab156fe1f76b59a69796f218749aeb1R877-R889) [[2]](diffhunk://#diff-0358abeaeb311c146f922f8915a84016820331754f1e8cb6632dd6b48e3e2fceR1-R44) - Added a new `InvoiceId` type with associated methods and event metric integration. [[1]](diffhunk://#diff-dbf2199d67bff928fb938c82846a4e4c84e7fa9e077905ca3273556757f2675bR1-R21) [[2]](diffhunk://#diff-d949a6c528436f8ab1a851147e7467d525cba63b395b253d1dec17101a971fa1R10) [[3]](diffhunk://#diff-d949a6c528436f8ab1a851147e7467d525cba63b395b253d1dec17101a971fa1R51) [[4]](diffhunk://#diff-77f0e8abb88015b6a88d517bd4b0eb801b98ed2ac5a4a0fac5be92d4927ee780R89) - Extended process tracker and event enums for invoice support. [[1]](diffhunk://#diff-955707712c9bdbbd986dc29a9dd001579001580cf0a65e286ac8a2a25a2a49f2R9374) [[2]](diffhunk://#diff-77f0e8abb88015b6a88d517bd4b0eb801b98ed2ac5a4a0fac5be92d4927ee780R89) **Database Schema and Models** - Created a new `invoice` table in the Diesel schema, and implemented corresponding ORM structs and query methods for invoice creation, lookup, and updates. [[1]](diffhunk://#diff-b3de56db64ac930fe24b6b0acb45282191598a506d20732f70ef00192b4b18d5R718-R751) [[2]](diffhunk://#diff-b3de56db64ac930fe24b6b0acb45282191598a506d20732f70ef00192b4b18d5R1767) [[3]](diffhunk://#diff-22fdeee3005db31c44a9d40cd43c5a244e77a74e17d2e227d4c0b376f133f37eR732-R765) [[4]](diffhunk://#diff-22fdeee3005db31c44a9d40cd43c5a244e77a74e17d2e227d4c0b376f133f37eR1722) [[5]](diffhunk://#diff-cc8ce5ad039d65f1b8644286fe6abb6e8fae401fdb8e5f43f3984efdf2803696R1-R108) [[6]](diffhunk://#diff-d2c14bc247ee6cee7d5e45e9e967ff7d1cc3e98b98af02f7e5a4a8c6796f40fbR1-R41) [[7]](diffhunk://#diff-7eb95277f166342b9ffb08398f8165f1498aa8ecb4ac3b967133e4d682c382a3R27) [[8]](diffhunk://#diff-a8ff468e437001f77b303a9f63b47a6204ffc99b25dd4e9d9a122d5093b69f1cR25) **Connector and API Integration** - Added invoice record backflow support to Chargebee and Recurly connectors, and updated default connector implementations for new invoice-related flows. [[1]](diffhunk://#diff-805dd853d554bb072ad3427d6b5ed7dc7b9ed62ee278f5adbf389a08266996b0R688) [[2]](diffhunk://#diff-987be7b07b93a35ac0316f1eb8ad93ece84e5280d37e5566964238d1c969a3fdL12-R34) [[3]](diffhunk://#diff-987be7b07b93a35ac0316f1eb8ad93ece84e5280d37e5566964238d1c969a3fdR151) [[4]](diffhunk://#diff-987be7b07b93a35ac0316f1eb8ad93ece84e5280d37e5566964238d1c969a3fdR162-R171) [[5]](diffhunk://#diff-ee28a7003b898fbf15bb25eb102e2310a4c52ba46d3961e3f929f4cf6bd1f6beL46-R51) [[6]](diffhunk://#diff-ee28a7003b898fbf15bb25eb102e2310a4c52ba46d3961e3f929f4cf6bd1f6beL69-R75) [[7]](diffhunk://#diff-ee28a7003b898fbf15bb25eb102e2310a4c52ba46d3961e3f929f4cf6bd1f6beL133-R135) [[8]](diffhunk://#diff-ee28a7003b898fbf15bb25eb102e2310a4c52ba46d3961e3f929f4cf6bd1f6beR6946-R6956) **API Models** - Registered a new `invoice_record_back` module in the process tracker API models. ### 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+Confirm subscription ``` curl --location 'http://localhost:8080/subscriptions' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'X-Profile-Id: pro_2WzEeiNyj8fSCObXqo36' \ --header 'api-key: dev_Ske75Nx2J7qtHsP8cc7pFx5k4dccYBedM6UAExaLOdHCkji3uVWSqfmZ0Qz0Tnyj' \ --data '{ "item_price_id": "cbdemo_enterprise-suite-monthly", "customer_id": "cus_27J5gnsyKB4XrzyIxeoS", "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_qHATQ50oyNXU88ATREqE","merchant_reference_id":"mer_ref_1759334677","status":"active","plan_id":null,"price_id":null,"coupon":null,"profile_id":"pro_2WzEeiNyj8fSCObXqo36","payment":{"payment_id":"pay_i25XfiRs8BZhuVuKIMeZ","status":"succeeded","amount":14100,"currency":"INR","connector":"stripe","payment_method_id":"pm_MjezVPJ1fyh70zER6aNW","payment_experience":null,"error_code":null,"error_message":null,"payment_method_type":"credit"},"customer_id":"cus_27J5gnsyKB4XrzyIxeoS","invoice":{"id":"invoice_2xFn2gjrxUshLw0A3FwG","subscription_id":"sub_qHATQ50oyNXU88ATREqE","merchant_id":"merchant_1758626894","profile_id":"pro_2WzEeiNyj8fSCObXqo36","merchant_connector_id":"mca_eN6JxSK2NkuT0wSYAH5s","payment_intent_id":"pay_i25XfiRs8BZhuVuKIMeZ","payment_method_id":null,"customer_id":"cus_27J5gnsyKB4XrzyIxeoS","amount":14100,"currency":"INR","status":"payment_pending"},"billing_processor_subscription_id":"sub_qHATQ50oyNXU88ATREqE"} ``` <img width="927" height="394" alt="image" src="https://github.com/user-attachments/assets/8d7a713a-338c-434e-83e2-d34b83b51b4d" /> <img width="941" height="471" alt="image" src="https://github.com/user-attachments/assets/6caecd07-58ea-4348-b994-a8d4d32385a4" /> <img width="1369" height="939" alt="image" src="https://github.com/user-attachments/assets/0b3981cc-8a9b-44db-b3ed-1843df54a963" /> ## 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. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs` **3. Core Business Logic** - `crates/router/src/core/revenue_recovery/types.rs` - `crates/router/src/core/subscription.rs` - `crates/router/src/core/subscription/billing_processor_handler.rs` - ... and 1 more files **4. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/chargebee.rs` - `crates/hyperswitch_connectors/src/connectors/recurly.rs` - `crates/hyperswitch_connectors/src/connectors/stripebilling.rs` - ... and 1 more files **5. Type Definitions** - `crates/router/src/types/storage.rs` - `crates/router/src/types/storage/invoice_sync.rs` - `crates/scheduler/src/consumer/types/process_data.rs` **6. Utils** - `crates/scheduler/src/utils.rs` **7. Other** - `crates/common_enums/src/enums.rs` - `crates/hyperswitch_interfaces/src/api/subscriptions.rs` - `crates/hyperswitch_interfaces/src/api/subscriptions_v2.rs` - ... and 4 more files **Code Patterns Applied:** - Define new data structures (6 changes) - Implement new functions (23 changes) - Extend existing types with new fields (128 changes) - Add conditional logic for feature flags or filtering (3 changes) **Detailed Identifier Changes:** Commit 0a35c617: Files to modify: **crates/api_models/src/subscription.rs** Modify existing code **crates/common_enums/src/enums.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/chargebee.rs** Add: - impl: impl api::subscriptions::SubscriptionRecordBackFlow for Chargebee **crates/hyperswitch_connectors/src/connectors/recurly.rs** Add: - impl: impl api::subscriptions_v2::SubscriptionRecordBackV2 for Recurly - impl: impl ConnectorIntegrationV2< InvoiceRecordBack, InvoiceRecordBackData, InvoiceRecordBackRequest, InvoiceRecordBackResponse, > for Recurly **crates/hyperswitch_connectors/src/connectors/stripebilling.rs** Add: - impl: impl subscriptions_api::Subscriptions for Stripebilling - impl: impl subscriptions_api::GetSubscriptionPlansFlow for Stripebilling - impl: impl subscriptions_api::SubscriptionRecordBackFlow for Stripebilling - impl: impl subscriptions_api::SubscriptionCreate for Stripebilling - impl: impl ConnectorIntegration< subscription_flow_types::GetSubscriptionPlans, subscription_request_types::GetSubscriptionPlansRequest, subscription_response_types::GetSubscriptionPlansResponse, > for Stripebilling - impl: impl subscriptions_api::GetSubscriptionPlanPricesFlow for Stripebilling - impl: impl ConnectorIntegration< subscription_flow_types::GetSubscriptionPlanPrices, subscription_request_types::GetSubscriptionPlanPricesRequest, subscription_response_types::GetSubscriptionPlanPricesResponse, > for Stripebilling - impl: impl ConnectorIntegration< subscription_flow_types::SubscriptionCreate, subscription_request_types::SubscriptionCreateRequest, subscription_response_types::SubscriptionCreateResponse, > for Stripebilling - impl: impl subscriptions_api::GetSubscriptionEstimateFlow for Stripebilling - impl: impl ConnectorIntegration< subscription_flow_types::GetSubscriptionEstimate, subscription_request_types::GetSubscriptionEstimateRequest, subscription_response_types::GetSubscriptionEstimateResponse, > for Stripebilling - impl: impl ConnectorIntegration< recovery_router_flows::InvoiceRecordBack, recovery_request_types::InvoiceRecordBackRequest, recovery_response_types::InvoiceRecordBackResponse, > for Stripebilling **crates/hyperswitch_connectors/src/default_implementations.rs** Remove: - impl: impl ConnectorIntegration< InvoiceRecordBack, InvoiceRecordBackRequest, InvoiceRecordBackResponse > for $connector Add: - impl: impl SubscriptionRecordBackFlow for $connector - impl: impl ConnectorIntegration<InvoiceRecordBack, InvoiceRecordBackRequest, InvoiceRecordBackResponse> for $path::$connector #[cfg(feature = "dummy_connector")] impl<const T: u8> SubscriptionRecordBackFlow for connectors::DummyConnector<T> - impl: impl ConnectorIntegration<InvoiceRecordBack, InvoiceRecordBackRequest, InvoiceRecordBackResponse> for connectors::DummyConnector<T> **crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs** Remove: - struct: pub::InvoiceRecordBackData Add: - struct: pub::InvoiceRecordBackData **crates/hyperswitch_interfaces/src/api/subscriptions.rs** Remove: - trait: pub::GetSubscriptionPlansFlow - trait: pub::GetSubscriptionPlanPricesFlow - trait: pub::ConnectorCustomer - trait: pub::SubscriptionCreate - trait: pub::GetSubscriptionEstimateFlow Add: - trait: pub::SubscriptionRecordBackFlow **crates/hyperswitch_interfaces/src/api/subscriptions_v2.rs** Add: - trait: private::SubscriptionRecordBackV2 **crates/hyperswitch_interfaces/src/conversion_impls.rs** Modify existing code **crates/router/src/bin/scheduler.rs** Modify existing code **crates/router/src/core/revenue_recovery/types.rs** Modify existing code **crates/router/src/core/subscription.rs** Modify existing code **crates/router/src/core/subscription/billing_processor_handler.rs** Add: - function: pub::record_back_to_billing_processor **crates/router/src/core/subscription/invoice_handler.rs** Add: - function: pub::new - function: pub::get_invoice_by_id **crates/router/src/types/storage.rs** Add: - mod: pub::invoice_sync **crates/router/src/types/storage/invoice_sync.rs** Add: - function: private::from - function: pub::new - function: pub::new - function: private::from - function: private::from - struct: pub::InvoiceSyncTrackingData - struct: pub::InvoiceSyncRequest - enum: pub::InvoiceSyncPaymentStatus - impl: impl From<InvoiceSyncRequest> for InvoiceSyncTrackingData - impl: impl InvoiceSyncRequest - impl: impl InvoiceSyncTrackingData - impl: impl From<common_enums::IntentStatus> for InvoiceSyncPaymentStatus - impl: impl From<InvoiceSyncPaymentStatus> for common_enums::connector_enums::InvoiceStatus **crates/router/src/workflows.rs** Add: - mod: pub::invoice_sync **crates/router/src/workflows/invoice_sync.rs** Add: - function: pub::create - function: private::finish_process_with_business_status - function: pub::perform_payments_sync - function: pub::perform_billing_processor_record_back - function: pub::transition_workflow_state - function: private::execute_workflow - function: private::error_handler - function: private::execute_workflow - function: private::perform_subscription_invoice_sync - function: pub::create_invoice_sync_job - function: pub::get_subscription_invoice_sync_process_schedule_time - function: pub::retry_subscription_invoice_sync_task - struct: pub::InvoiceSyncWorkflow - struct: pub::InvoiceSyncHandler - impl: impl InvoiceSyncHandler<'a> - impl: impl ProcessTrackerWorkflow<SessionState> for InvoiceSyncWorkflow **crates/scheduler/src/consumer/types/process_data.rs** Add: - function: private::default - struct: pub::SubscriptionInvoiceSyncPTMapping - impl: impl Default for SubscriptionInvoiceSyncPTMapping **crates/scheduler/src/utils.rs** Add: - function: pub::get_subscription_invoice_sync_retry_schedule_time
{"pr_number": 9529, "pr_title": "feat(subscriptions): Invoice record back workflow", "merged_at": "2025-10-03T19:49:18Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/subscription.rs"], "domain": ["crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs"], "core_business": ["crates/router/src/core/revenue_recovery/types.rs", "crates/router/src/core/subscription.rs", "crates/router/src/core/subscription/billing_processor_handler.rs", "crates/router/src/core/subscription/invoice_handler.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/chargebee.rs", "crates/hyperswitch_connectors/src/connectors/recurly.rs", "crates/hyperswitch_connectors/src/connectors/stripebilling.rs", "crates/hyperswitch_connectors/src/default_implementations.rs"], "types": ["crates/router/src/types/storage.rs", "crates/router/src/types/storage/invoice_sync.rs", "crates/scheduler/src/consumer/types/process_data.rs"], "utils": ["crates/scheduler/src/utils.rs"], "other": ["crates/common_enums/src/enums.rs", "crates/hyperswitch_interfaces/src/api/subscriptions.rs", "crates/hyperswitch_interfaces/src/api/subscriptions_v2.rs", "crates/hyperswitch_interfaces/src/conversion_impls.rs", "crates/router/src/bin/scheduler.rs", "crates/router/src/workflows.rs", "crates/router/src/workflows/invoice_sync.rs"]}, "change_types": {"structs_added": 6, "functions_added": 23, "enums_added": 1, "fields_added": 128, "imports_added": 14, "conditionals_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [ADYEN ] Consume transaction id for PaymentsPreProcessing error ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description To consume transaction id for some error cases , where currently its not consumed for Adyen, Worldpay. This PR addresses this 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)? --> Could not manually trigger error ## 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/adyen.rs` **Code Patterns Applied:** - Extend existing types with new fields (1 changes) **Detailed Identifier Changes:** Commit 199d1764: Files to modify: **crates/router/src/connector/adyen.rs** Modify existing code
{"pr_number": 7061, "pr_title": "feat(connector): [ADYEN ] Consume transaction id for PaymentsPreProcessing error", "merged_at": "2025-01-22T07:01:32Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["transaction"]}, "hierarchy": {"connectors": ["crates/router/src/connector/adyen.rs"]}, "change_types": {"fields_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(connector): [WorldPay] propagate refusal codes as error code and messages ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Described in #6316 (point # 2) ### 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 Helps in error code unification for understanding the errors better. ## How did you test it? Tested locally using test cards and magic values for intentionally returning a refused response - https://developer.worldpay.com/products/access/card-payments/testing#test-card-numbers Things to test 1. Non 3DS payments 2. 3DS payments <details> <summary>1. Non 3DS payments</summary> Use magic values for cardHolderName - https://developer.worldpay.com/products/access/card-payments/testing#issuer-response-test-values cURL curl --location --request POST 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_sMl3D9efytjSoXznSOKCv5PHyql50M1BMhU8e7qsa5m6mXxHvyROVg7cER7AWue9' \ --data-raw '{"amount":6500,"currency":"USD","confirm":true,"capture_method":"automatic","capture_on":"2022-09-10T10:11:12Z","customer_id":"cus_5A3VgopTFe8q83EEHgTq_4","email":"guest@example.com","name":"John Doe","phone":"999999999","profile_id":"pro_OodaMoJ1Y9nlnegU4soR","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":["worldpay"],"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":"REFUSED17","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 {"payment_id":"pay_EFdpMNQuatKoPldR0A5r","merchant_id":"merchant_1728979001","status":"failed","amount":6500,"net_amount":6500,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"worldpay","client_secret":"pay_EFdpMNQuatKoPldR0A5r_secret_65zcOrh22VbhmfdHcj5a","created":"2024-10-22T11:00:07.527Z","currency":"USD","customer_id":"cus_5A3VgopTFe8q83EEHgTq_4","customer":{"id":"cus_5A3VgopTFe8q83EEHgTq_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":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"555555","card_extended_bin":null,"card_exp_month":"08","card_exp_year":"2025","card_holder_name":null,"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":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":"17","error_message":"ANNULATION BY CLIENT","unified_code":"UE_000","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":{"customer_id":"cus_5A3VgopTFe8q83EEHgTq_4","created_at":1729594807,"expires":1729598407,"secret":"epk_d27b564c47824d8fb87ad42da0dc5c65"},"manual_retry_allowed":true,"connector_transaction_id":"34a61c15-d8ab-4da2-b6f1-fa4ffdb494ee","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_OodaMoJ1Y9nlnegU4soR","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_omabWO9B7CSmaCMuT6eh","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2024-10-22T11:15:07.527Z","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-10-22T11:00:09.158Z","charges":null,"frm_metadata":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null} </details> <details> <summary>2. 3DS payments</summary> Use test card numbers - https://developer.worldpay.com/products/access/3ds/testing#test-card-number cURL curl --location --request POST 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_sMl3D9efytjSoXznSOKCv5PHyql50M1BMhU8e7qsa5m6mXxHvyROVg7cER7AWue9' \ --data-raw '{"authentication_type":"three_ds","capture_method":"manual","customer_id":"cus_5A3VgopTFe8q83EEHgTq","profile_id":"pro_OodaMoJ1Y9nlnegU4soR","amount":100,"currency":"USD","confirm":true,"connector":["worldpay"],"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"}},"email":"john.doe@example.com","session_expiry":10000,"return_url":"https://example.com","off_session":true,"payment_method":"card","payment_method_type":"credit","payment_method_data":{"card":{"card_number":"4000000000001125","card_exp_month":"12","card_exp_year":"2030","card_holder_name":"John Doe","card_cvc":"123"}},"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-US","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"},"statement_descriptor_name":"John","statement_descriptor_suffix":"JD","metadata":{"udf1":"value1","new_customer":"true","login_date":"2019-09-10T10:11:12Z"}}' Response {"payment_id":"pay_ff5lUcN6X1lg5f2PBtyv","merchant_id":"merchant_1728979001","status":"requires_customer_action","amount":100,"net_amount":100,"shipping_cost":null,"amount_capturable":100,"amount_received":null,"connector":"worldpay","client_secret":"pay_ff5lUcN6X1lg5f2PBtyv_secret_6iktmiNQwi8DAsIRNn4i","created":"2024-10-21T11:03:31.227Z","currency":"USD","customer_id":"cus_sH6s3hf1uukqvYlAGkj5","customer":{"id":"cus_sH6s3hf1uukqvYlAGkj5","name":"John Doe","email":"john.doe@example.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":"manual","payment_method":"card","payment_method_data":{"card":{"last4":"1096","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"520000","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":"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},"order_details":null,"email":"john.doe@example.com","name":"John Doe","phone":"999999999","return_url":"https://example.com/","authentication_type":"three_ds","statement_descriptor_name":"John","statement_descriptor_suffix":"JD","next_action":{"type":"redirect_to_url","redirect_to_url":"http://localhost:8080/payments/redirect/pay_ff5lUcN6X1lg5f2PBtyv/merchant_1728979001/pay_ff5lUcN6X1lg5f2PBtyv_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":"cus_sH6s3hf1uukqvYlAGkj5","created_at":1729508611,"expires":1729512211,"secret":"epk_739c58c7f7384fac89c7099e1cdae436"},"manual_retry_allowed":null,"connector_transaction_id":"eyJrIjoxLCJkIjoiQTRKMWZFZXlONnFqdGhHTWlmWDdYY2RzUVlIUzI2dEdLcEFPak9GRzNaczJJRGpBeDR3ekZaWWVqNDJzOTJkWiJ9","frm_message":null,"metadata":{"udf1":"value1","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":null,"feature_metadata":null,"reference_id":"5b1cdf1c-26ea-42b1-b6e0-a02453ebf21f","payment_link":null,"profile_id":"pro_OodaMoJ1Y9nlnegU4soR","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_omabWO9B7CSmaCMuT6eh","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2024-10-21T13:50:11.227Z","fingerprint":null,"browser_info":{"language":"en-US","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":"2024-10-21T11:03:31.677Z","charges":null,"frm_metadata":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null} PSync cURL curl --location --request GET 'http://localhost:8080/payments/pay_ICCmG6L9CNloIx7jEXYF?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_sMl3D9efytjSoXznSOKCv5PHyql50M1BMhU8e7qsa5m6mXxHvyROVg7cER7AWue9' Response {"payment_id":"pay_ICCmG6L9CNloIx7jEXYF","merchant_id":"merchant_1728979001","status":"failed","amount":100,"net_amount":100,"shipping_cost":null,"amount_capturable":100,"amount_received":null,"connector":"worldpay","client_secret":"pay_ICCmG6L9CNloIx7jEXYF_secret_vo2mImXCVS5wBe4bek01","created":"2024-10-22T11:02:56.638Z","currency":"USD","customer_id":"cus_5A3VgopTFe8q83EEHgTq","customer":{"id":"cus_5A3VgopTFe8q83EEHgTq","name":"John Doe","email":"john.doe@example.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":"manual","payment_method":"card","payment_method_data":{"card":{"last4":"1125","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"400000","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":"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},"order_details":null,"email":"john.doe@example.com","name":"John Doe","phone":"999999999","return_url":"https://example.com/","authentication_type":"three_ds","statement_descriptor_name":"John","statement_descriptor_suffix":"JD","next_action":null,"cancellation_reason":null,"error_code":"3dsUnavailable","error_message":"3DS authentication unavailable from issuer","unified_code":"UE_000","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":true,"connector_transaction_id":"01944733-3110-4dab-afed-144d8021f76b","frm_message":null,"metadata":{"udf1":"value1","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":null,"feature_metadata":null,"reference_id":"1ac1c0be-7a6a-4309-b3e5-3df7a7de06e7","payment_link":null,"profile_id":"pro_OodaMoJ1Y9nlnegU4soR","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_omabWO9B7CSmaCMuT6eh","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2024-10-22T13:49:36.638Z","fingerprint":null,"browser_info":{"language":"en-US","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":"2024-10-22T11:03:11.537Z","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 `just 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/worldpay.rs` - `crates/router/src/connector/worldpay/response.rs` - `crates/router/src/connector/worldpay/transformers.rs` **Code Patterns Applied:** - Implement new functions (5 changes) - Extend existing types with new fields (30 changes) **Detailed Identifier Changes:** Commit 3d1a3cdc: Files to modify: **crates/router/src/connector/worldpay.rs** Add: - function: private::get_5xx_error_response - function: private::get_5xx_error_response - function: private::get_5xx_error_response - function: private::get_5xx_error_response - function: private::get_5xx_error_response **crates/router/src/connector/worldpay/response.rs** Modify existing code **crates/router/src/connector/worldpay/transformers.rs** Modify existing code
{"pr_number": 6392, "pr_title": "refactor(connector): [WorldPay] propagate refusal codes as error code and messages", "merged_at": "2024-10-22T13:03:52Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/router/src/connector/worldpay.rs", "crates/router/src/connector/worldpay/response.rs", "crates/router/src/connector/worldpay/transformers.rs"]}, "change_types": {"functions_added": 5, "fields_added": 30}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): Add first_name and last_name as Secret<String> Types. ## 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 --> Bumped up the UCS Client dependency in order to bring in the latest changes of having first_name and last_name as SecretString types. ### 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). --> Bumped up the UCS Client dependency in order to bring in the latest changes of having first_name and last_name as SecretString types. ## 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 Tests** -Request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_2sNDWM7tQ74dZIqGZeA2alVCBDBImYmamcnQBvAeG71TIJCY9ope0SaZjyAzCwMI' \ --data '{ "amount": 300, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 300, "customer_id": "StripeCustomer", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "profile_id": "pro_C4bbikZORyrPhXxE3giN", "authentication_type": "no_three_ds", "return_url": "https://google.com", "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": "joseph Doe", "card_cvc": "737", "card_network": "Visa" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "browser_info": { "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36", "accept_header": "text\\/html,application\\/xhtml+xml,application\\/xml;q=0.9,image\\/webp,image\\/apng,*\\/*;q=0.8", "language": "en-GB", "color_depth": 30, "screen_height": 1117, "screen_width": 1728, "time_zone": -330, "java_enabled": true, "java_script_enabled": true } }' ``` -Response ``` { "payment_id": "pay_3fFty3UZ9qptdUYXn3zz", "merchant_id": "merchant_1752766461", "status": "succeeded", "amount": 300, "net_amount": 300, "shipping_cost": null, "amount_capturable": 0, "amount_received": 300, "connector": "adyen", "client_secret": "pay_3fFty3UZ9qptdUYXn3zz_secret_foQcu0jMTPbZbP73DKHn", "created": "2025-09-10T00:58:49.656Z", "currency": "USD", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": null, "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": "1111", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "411111", "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": null, "billing": { "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 }, "order_details": null, "email": null, "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": 1757465929, "expires": 1757469529, "secret": "epk_98a46cd4be004c968979379b32778a35" }, "manual_retry_allowed": false, "connector_transaction_id": "PSGBGW5GSX824WV5", "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": "unified_connector_service" }, "reference_id": "pay_3fFty3UZ9qptdUYXn3zz_1", "payment_link": null, "profile_id": "pro_C4bbikZORyrPhXxE3giN", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_Hy9HAyMjCXQPYhT0LjL8", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-10T01:13:49.656Z", "fingerprint": null, "browser_info": { "language": "en-GB", "time_zone": -330, "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36", "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": null, "network_transaction_id": "270466062265778", "payment_method_status": null, "updated": "2025-09-10T00:58:52.846Z", "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, "enable_overcapture": null, "is_overcapture_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
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/unified_connector_service/transformers.rs` **2. Configuration Files** - `crates/external_services/Cargo.toml` - `crates/router/Cargo.toml` **3. Other** - `Cargo.lock` **Code Patterns Applied:** - Extend existing types with new fields (3 changes) **Detailed Identifier Changes:** Commit 08ca156b: Files to modify: **crates/router/src/core/unified_connector_service/transformers.rs** Modify existing code
{"pr_number": 9326, "pr_title": "feat(core): Add first_name and last_name as Secret<String> Types. ", "merged_at": "2025-09-11T12:14:35Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/unified_connector_service/transformers.rs"], "config": ["crates/external_services/Cargo.toml", "crates/router/Cargo.toml"], "other": ["Cargo.lock"]}, "change_types": {"fields_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [JPMORGAN] add Payment flows 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 --> ### 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 https://developer.payments.jpmorgan.com/docs/commerce/online-payments/capabilities/online-payments/how-to/auth-and-capture-payment https://developer.payments.jpmorgan.com/api/commerce/online-payments/online-payments#/operations/V2PaymentPost ## How did you test it? ### Cypress Tests Test Passes for **1. No3DSAutoCapture** <img width="1723" alt="No3DSAutoCapture" src="https://github.com/user-attachments/assets/6d44f16c-f245-4e3f-b874-9037beaf4aa2"> **2. 3DSAutoCapture** <img width="1723" alt="3DSAutoCapture" src="https://github.com/user-attachments/assets/43c84de3-9974-41b2-a7be-ab8245d13873"> **3. No3DSManualCapture** <img width="1723" alt="No3DSManualCapture" src="https://github.com/user-attachments/assets/fd12fe82-6d60-4405-85ed-ba8c265bcd44"> **4. VoidPayment** <img width="1723" alt="Void Payment" src="https://github.com/user-attachments/assets/dab948e5-ce01-4cf2-902b-533fcef603b9"> **5. SyncPayment** <img width="1723" alt="Sync Payment" src="https://github.com/user-attachments/assets/72bc8061-dc9d-4217-a437-c28122654811"> **6. RefundPayment** <img width="1723" alt="Refund" src="https://github.com/user-attachments/assets/8925f0ad-11d3-448d-97ae-861f1ce99f16"> **7. SyncRefund** <img width="1723" alt="Sync Refund" src="https://github.com/user-attachments/assets/28e20a4c-b06e-4595-9024-692a957337b6"> Test Cases failing for **1. RefundPayment** : The connector currently sends the same transaction ID for every request in the sandbox environment, causing refund failures. While the refund flow has been implemented in the code, it has been commented out, and an error message is thrown by default until the connector resolves this issue. **2. SyncRefund** : Since refunds are not being processed, the sync refund functionality is expected to fail. To address this, the TRIGGER_FLAG is used in Cypress tests to prevent failures. However, the Sync Refund logic has already been implemented in the code. Following flows need to be tested for card payments for new connector Jpmorgan: **1. Authorize (Manual)** - Request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_VwPwlCTqgrrBU4OPlPTDHZz89LN0GpcHQRx7iV49U090zNugXvDd8gKK8UWl7Ipl' \ --data '{ "amount": 90, "currency": "USD", "confirm": true, "capture_method":"manual", "profile_id": null, "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4200000000000000", "card_exp_month": "10", "card_exp_year": "2026", "card_holder_name": "joseph Doe", "card_cvc": "123" } } }' ``` - Response ``` { "payment_id": "pay_xgDIyzRE05vHzo2y2dcj", "merchant_id": "merchant_1732504948", "status": "requires_capture", "amount": 90, "net_amount": 90, "shipping_cost": null, "amount_capturable": 90, "amount_received": null, "connector": "jpmorgan", "client_secret": "pay_xgDIyzRE05vHzo2y2dcj_secret_rXfBN5zk3nyQCTrBvipQ", "created": "2024-11-25T03:57:19.367Z", "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": "manual", "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": "10", "card_exp_year": "2026", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": 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": null, "manual_retry_allowed": false, "connector_transaction_id": "cdf62f90-6440-496f-817c-c05dd3b7b01a", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "cdf62f90-6440-496f-817c-c05dd3b7b01a", "payment_link": null, "profile_id": "pro_5RER4wWpKHIE29BnX5Sc", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_MCfRyvSkAZajaTZO5V9g", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-11-25T04:12:19.366Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2024-11-25T03:57:22.367Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` **2. Capture (Manual)** - Request ``` curl --location 'http://localhost:8080/payments/pay_xgDIyzRE05vHzo2y2dcj/capture' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_VwPwlCTqgrrBU4OPlPTDHZz89LN0GpcHQRx7iV49U090zNugXvDd8gKK8UWl7Ipl' \ --data '{ "amount_to_capture": 90, "statement_descriptor_name": "Joseph", "statement_descriptor_prefix" :"joseph", "statement_descriptor_suffix": "JS" }' ``` - Response ``` { "payment_id": "pay_xgDIyzRE05vHzo2y2dcj", "merchant_id": "merchant_1732504948", "status": "succeeded", "amount": 90, "net_amount": 90, "shipping_cost": null, "amount_capturable": 0, "amount_received": 90, "connector": "jpmorgan", "client_secret": "pay_xgDIyzRE05vHzo2y2dcj_secret_rXfBN5zk3nyQCTrBvipQ", "created": "2024-11-25T03:57:19.367Z", "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": "manual", "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": "10", "card_exp_year": "2026", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": 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": null, "manual_retry_allowed": false, "connector_transaction_id": "cdf62f90-6440-496f-817c-c05dd3b7b01a", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "cdf62f90-6440-496f-817c-c05dd3b7b01a", "payment_link": null, "profile_id": "pro_5RER4wWpKHIE29BnX5Sc", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_MCfRyvSkAZajaTZO5V9g", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-11-25T04:12:19.366Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2024-11-25T03:59:41.611Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` **3. Authorize + Capture** - Request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_VwPwlCTqgrrBU4OPlPTDHZz89LN0GpcHQRx7iV49U090zNugXvDd8gKK8UWl7Ipl' \ --data '{ "amount": 29, "currency": "USD", "confirm": true, "capture_method":"automatic", "profile_id": null, "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4200000000000000", "card_exp_month": "10", "card_exp_year": "2026", "card_holder_name": "joseph Doe", "card_cvc": "123" } } }' ``` - Response ``` { "payment_id": "pay_rNoRS0s4cL5sKIpKx9Mc", "merchant_id": "merchant_1732504948", "status": "succeeded", "amount": 29, "net_amount": 29, "shipping_cost": null, "amount_capturable": 0, "amount_received": 29, "connector": "jpmorgan", "client_secret": "pay_rNoRS0s4cL5sKIpKx9Mc_secret_VdFa9Ka56kCCggZd2JNs", "created": "2024-11-25T04:02:26.242Z", "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": "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": "10", "card_exp_year": "2026", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": 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": null, "manual_retry_allowed": false, "connector_transaction_id": "cdf62f90-6440-496f-817c-c05dd3b7b01a", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "cdf62f90-6440-496f-817c-c05dd3b7b01a", "payment_link": null, "profile_id": "pro_5RER4wWpKHIE29BnX5Sc", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_MCfRyvSkAZajaTZO5V9g", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-11-25T04:17:26.242Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2024-11-25T04:02:27.807Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` **4. PSync** - Request ``` curl --location 'http://localhost:8080/payments/pay_rNoRS0s4cL5sKIpKx9Mc?force_sync=true&expand_captures=true&expand_attempts=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_VwPwlCTqgrrBU4OPlPTDHZz89LN0GpcHQRx7iV49U090zNugXvDd8gKK8UWl7Ipl' \ --data '' ``` - Response ``` { "payment_id": "pay_rNoRS0s4cL5sKIpKx9Mc", "merchant_id": "merchant_1732504948", "status": "succeeded", "amount": 29, "net_amount": 29, "shipping_cost": null, "amount_capturable": 0, "amount_received": 29, "connector": "jpmorgan", "client_secret": "pay_rNoRS0s4cL5sKIpKx9Mc_secret_VdFa9Ka56kCCggZd2JNs", "created": "2024-11-25T04:02:26.242Z", "currency": "USD", "customer_id": null, "customer": null, "description": null, "refunds": null, "disputes": null, "attempts": [ { "attempt_id": "pay_rNoRS0s4cL5sKIpKx9Mc_1", "status": "charged", "amount": 29, "currency": "USD", "connector": "jpmorgan", "error_message": null, "payment_method": "card", "connector_transaction_id": "cdf62f90-6440-496f-817c-c05dd3b7b01a", "capture_method": "automatic", "authentication_type": "no_three_ds", "created_at": "2024-11-25T04:02:26.242Z", "modified_at": "2024-11-25T04:02:27.806Z", "cancellation_reason": null, "mandate_id": null, "error_code": null, "payment_token": null, "connector_metadata": null, "payment_experience": null, "payment_method_type": "credit", "reference_id": "cdf62f90-6440-496f-817c-c05dd3b7b01a", "unified_code": null, "unified_message": null, "client_source": null, "client_version": 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": "0000", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "420000", "card_extended_bin": null, "card_exp_month": "10", "card_exp_year": "2026", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": 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": null, "manual_retry_allowed": false, "connector_transaction_id": "cdf62f90-6440-496f-817c-c05dd3b7b01a", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "cdf62f90-6440-496f-817c-c05dd3b7b01a", "payment_link": null, "profile_id": "pro_5RER4wWpKHIE29BnX5Sc", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_MCfRyvSkAZajaTZO5V9g", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-11-25T04:17:26.242Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2024-11-25T04:02:27.807Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` **5. Refund** (Issue in the refund flow, because the connector sends the same transaction id for every hit on sandbox, hence conflicting) - Request ``` curl --location 'http://localhost:8080/refunds' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_UrUqvKI4VJryn9DBhpNn28eNR8xKKKX6wgUAzBgkZS6JxPTL02KWowsVVBLWKKLB' \ --data '{ "payment_id": "pay_LSvriAUkv1EQ7H0IiCtj", "reason": "Customer returned product", "refund_type": "instant", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` - Response ``` { "refund_id": "ref_pf6FYPvh9OReebKK6lr0", "payment_id": "pay_LSvriAUkv1EQ7H0IiCtj", "amount": 128, "currency": "USD", "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, "created_at": "2024-11-25T04:15:14.312Z", "updated_at": "2024-11-25T04:15:14.914Z", "connector": "jpmorgan", "profile_id": "pro_ReWjg2xQYvoCCp6Aedli", "merchant_connector_id": "mca_xn15JFYJguLAd1PB45jr", "charges": null } ``` **6. RSync** - Request ``` curl --location 'http://localhost:8080/refunds/ref_pf6FYPvh9OReebKK6lr0' \ --header 'Accept: application/json' \ --header 'api-key: dev_UrUqvKI4VJryn9DBhpNn28eNR8xKKKX6wgUAzBgkZS6JxPTL02KWowsVVBLWKKLB' \ --data '' ``` - Response ``` { "refund_id": "ref_pf6FYPvh9OReebKK6lr0", "payment_id": "pay_LSvriAUkv1EQ7H0IiCtj", "amount": 128, "currency": "USD", "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, "created_at": "2024-11-25T04:15:14.312Z", "updated_at": "2024-11-25T04:15:14.914Z", "connector": "jpmorgan", "profile_id": "pro_ReWjg2xQYvoCCp6Aedli", "merchant_connector_id": "mca_xn15JFYJguLAd1PB45jr", "charges": null } ``` **7. Cancel/Void** - Request ``` curl --location 'http://localhost:8080/payments/pay_Bxl3iUqyNMHkUXfqdL0E/cancel' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_VwPwlCTqgrrBU4OPlPTDHZz89LN0GpcHQRx7iV49U090zNugXvDd8gKK8UWl7Ipl' \ --data '{ "cancellation_reason": "requested_by_customer" }' ``` - Response ``` { "payment_id": "pay_Bxl3iUqyNMHkUXfqdL0E", "merchant_id": "merchant_1732504948", "status": "cancelled", "amount": 128, "net_amount": 128, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "jpmorgan", "client_secret": "pay_Bxl3iUqyNMHkUXfqdL0E_secret_6t6Ersg5ctM0YMqHP4IZ", "created": "2024-11-25T04:12:12.347Z", "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": "manual", "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": "10", "card_exp_year": "2026", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": 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": "requested_by_customer", "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": "cdf62f90-6440-496f-817c-c05dd3b7b01a", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "cdf62f90-6440-496f-817c-c05dd3b7b01a", "payment_link": null, "profile_id": "pro_5RER4wWpKHIE29BnX5Sc", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_MCfRyvSkAZajaTZO5V9g", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-11-25T04:27:12.347Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2024-11-25T04:12:58.939Z", "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. API Request/Response Models** - `crates/api_models/src/connector_enums.rs` **2. Core Business Logic** - `crates/router/src/core/admin.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.rs` - `crates/router/src/types/transformers.rs` **5. Tests** - `config/deployments/integration_test.toml` - `cypress-tests/cypress/e2e/PaymentUtils/Jpmorgan.js` - `cypress-tests/cypress/e2e/PaymentUtils/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** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` **Code Patterns Applied:** - Define new data structures (29 changes) - Implement new functions (29 changes) - Extend existing types with new fields (384 changes) - Add conditional logic for feature flags or filtering (2 changes) - Modify database queries (4 changes) **Detailed Identifier Changes:** Commit adcddd64: Files to modify: **crates/api_models/src/connector_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/jpmorgan.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs** Add: - function: private::from - function: private::try_from - function: private::try_from - function: private::map_capture_method - function: private::try_from - function: private::try_from - function: private::try_from - function: pub::refund_status_from_transaction_state - function: private::try_from - struct: pub::JpmorganAuthUpdateRequest - struct: pub::JpmorganAuthUpdateResponse - struct: pub::JpmorganPaymentMethodType - struct: pub::Expiry - struct: pub::JpmorganMerchantSoftware - struct: pub::JpmorganMerchant - struct: pub::JpmorganCaptureRequest - struct: pub::JpmorganCaptureResponse - struct: pub::PaymentMethodTypeCapRes - struct: pub::CardCapRes - struct: pub::JpmorganPSyncResponse - struct: pub::TransactionData - struct: pub::JpmorganRefundRequest - struct: pub::MerchantRefundReq - struct: pub::JpmorganRefundResponse - struct: pub::JpmorganRefundSyncResponse - struct: pub::JpmorganCancelRequest - struct: pub::JpmorganCancelResponse - struct: pub::JpmorganPaymentMethodTypeCancelResponse - struct: pub::CardCancelResponse - enum: pub::JpmorganResponseStatus - impl: impl TryFrom<&RefreshTokenRouterData> for JpmorganAuthUpdateRequest - impl: impl TryFrom<ResponseRouterData<F, JpmorganAuthUpdateResponse, T, AccessToken>> for RouterData<F, T, AccessToken> - impl: impl TryFrom<ResponseRouterData<F, JpmorganCaptureResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData> - impl: impl TryFrom<&JpmorganRouterData<&RefundsRouterData<F>>> for JpmorganRefundRequest - impl: impl From<RefundStatus> for common_enums::RefundStatus - impl: impl TryFrom<RefundsResponseRouterData<Execute, JpmorganRefundResponse>> for RefundsRouterData<Execute> - impl: impl TryFrom<RefundsResponseRouterData<RSync, JpmorganRefundSyncResponse>> for RefundsRouterData<RSync> - impl: impl TryFrom<JpmorganRouterData<&PaymentsCancelRouterData>> for JpmorganCancelRequest **crates/hyperswitch_connectors/src/constants.rs** Modify existing code **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 **crates/test_utils/src/connector_auth.rs** Modify existing code
{"pr_number": 6668, "pr_title": "feat(connector): [JPMORGAN] add Payment flows for cards", "merged_at": "2024-12-22T18:18:07Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/connector_enums.rs"], "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/jpmorgan.rs", "crates/hyperswitch_connectors/src/connectors/jpmorgan/transformers.rs", "crates/hyperswitch_connectors/src/constants.rs", "crates/router/tests/connectors/sample_auth.toml", "crates/test_utils/src/connector_auth.rs"], "types": ["crates/router/src/types/api.rs", "crates/router/src/types/transformers.rs"], "tests": ["config/deployments/integration_test.toml", "cypress-tests/cypress/e2e/PaymentUtils/Jpmorgan.js", "cypress-tests/cypress/e2e/PaymentUtils/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": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json"]}, "change_types": {"structs_added": 29, "functions_added": 29, "enums_added": 4, "fields_added": 384, "imports_added": 7, "conditionals_added": 2, "database_queries": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): Add support to update card exp in update payment methods api ## 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 --> We can update card expiry in payments method data of payment methods table using batch pm update API> Added support to pass multiple mca ids for updating payment methods entry. ### 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)? --> Curls: ``` curl --location 'http://localhost:8080/payment_methods/update-batch' \ --header 'api-key: test_admin' \ --form 'file=@"/Users/mrudul.vajpayee/Downloads/update_check.csv"' \ --form 'merchant_id="merchant_1759727351"' ``` Response: ``` [{"payment_method_id":"pm_lGbP1ZvFLblFT3DafY5L","status":"active","network_transaction_id":null,"connector_mandate_details":{"payouts":{"mca_5hGHfrn1BYGHjse3VT6f":{"transfer_method_id":"yPNWMjhW4h5LmWJYYY"}},"mca_pwD3i1oyHLxzcu9cq1xR":{"mandate_metadata":null,"payment_method_type":"credit","connector_mandate_id":"yPNWMjhW4h5LmWJYYY","connector_mandate_status":"active","original_payment_authorized_amount":3545,"original_payment_authorized_currency":"EUR","connector_mandate_request_reference_id":"LtkxiLx5mDw1p8uLmD"}},"update_status":"Success","updated_payment_method_data":true,"line_number":1}] ``` File used for above: [update_check.csv](https://github.com/user-attachments/files/22723044/update_check.csv) ## 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. API Request/Response Models** - `crates/api_models/src/payment_methods.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/payment_method.rs` **3. Core Business Logic** - `crates/payment_methods/src/core/migration.rs` - `crates/router/src/core/payment_methods/migration.rs` **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (1 changes) - Extend existing types with new fields (22 changes) - Add conditional logic for feature flags or filtering (7 changes) **Detailed Identifier Changes:** Commit ad374997: Files to modify: **crates/api_models/src/payment_methods.rs** Modify existing code **crates/diesel_models/src/payment_method.rs** Modify existing code **crates/payment_methods/src/core/migration.rs** Remove: - struct: private::MerchantConnectorValidator Add: - struct: pub::MerchantConnectorValidator **crates/router/src/core/payment_methods/migration.rs** Modify existing code
{"pr_number": 9688, "pr_title": "feat(core): Add support to update card exp in update payment methods api", "merged_at": "2025-10-07T12:54:46Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"api_models": ["crates/api_models/src/payment_methods.rs"], "database": ["crates/diesel_models/src/payment_method.rs"], "core_business": ["crates/payment_methods/src/core/migration.rs", "crates/router/src/core/payment_methods/migration.rs"]}, "change_types": {"structs_added": 1, "functions_added": 1, "fields_added": 22, "imports_added": 3, "conditionals_added": 7}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(constraint_graph): add setup_future_usage for mandate check in payments ## 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 --> Previously the `mandate_details` were enough to identify the payment as mandate payment but now it is optional so a payment can be mandate even if there is no `mandate_details` but the payment's `setup_future_usage` is `off-session`. ### 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)? --> This can be tested in the following way: 1. Connector create (Fiuu) ``` curl --location 'http://127.0.0.1:8080/account/merchant_1733312955/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "connector_type": "payment_processor", "connector_name": "fiuu", "connector_account_details": { "auth_type": "SignatureKey", "api_key": ".....", "key1": "......", "api_secret": "......" }, "test_mode": false, "disabled": false, "payment_methods_enabled": [ { "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 } ] } ], "connector_webhook_details": { "merchant_secret": ".....", "additional_secret": null } }' ``` 2. Payment (off-session) ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Cookie;' \ --header 'api-key: .....' \ --data-raw '{ "amount": 6540, "setup_future_usage": "off_session", "currency": "EUR", "confirm": false, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "uiuiuiui", "email": "guest@ehjhjxample.com", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "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": "example@example.com" }, "shipping": { "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": "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" } }' ``` 3. List payment methods ``` curl --location 'http://localhost:8080/account/payment_methods?client_secret=......' \ --header 'Accept: application/json' \ --header 'api-key: .....' \ --data '' ``` It shouldn't have any payment_method ## 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/cards.rs` - `crates/router/src/core/payment_methods/utils.rs` **Code Patterns Applied:** - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 1aa4ad60: Files to modify: **crates/router/src/core/payment_methods/cards.rs** Modify existing code **crates/router/src/core/payment_methods/utils.rs** Modify existing code
{"pr_number": 6744, "pr_title": "refactor(constraint_graph): add setup_future_usage for mandate check in payments", "merged_at": "2024-12-10T12:12:50Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payment_methods/cards.rs", "crates/router/src/core/payment_methods/utils.rs"]}, "change_types": {"conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
ci(cypress): Fix Iatapay Zero Auth Mandates Flow ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description Handled zero auth mandates for Iatapay connector in cypress automation ### 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 Zero auth payments test cases were failing for Iatapay ## How did you test it? - Iatapay <img width="710" alt="image" src="https://github.com/user-attachments/assets/268d1aae-9cbd-49c9-bdd5-93e9dd72890d"> ## 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/PaymentUtils/Iatapay.js` **Code Patterns Applied:** - Extend existing types with new fields (29 changes)
{"pr_number": 6552, "pr_title": "ci(cypress): Fix Iatapay Zero Auth Mandates Flow", "merged_at": "2024-11-14T08:07:59Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "connector"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/PaymentUtils/Iatapay.js"]}, "change_types": {"fields_added": 29}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(process_tracker): Task implementation for psync payments ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description - This PR consists of the process tracker flow for Psync and Review Tasks - **Psync Task** is created if a payment’s status is Processing with an active attempt_id > Action: match attempt status and update the process tracker status based on that. > Finish the current task - This PR also includes changes in the execute_payment workflow where , we record an attempt first and then call the proxy api to perform the payments <img width="1728" alt="Screenshot 2025-03-12 at 6 25 37 PM" src="https://github.com/user-attachments/assets/2be62b23-1be6-4bc2-a3b9-68e864097c94" /> - if the payment fails it would retry in a given interval for given number of default retries <img width="1700" alt="Screenshot 2025-03-13 at 2 07 42 PM" src="https://github.com/user-attachments/assets/8276fdf5-d52d-4ce5-bdfc-8ed39be11d78" /> - If thePayment goes to processing , a PSYNC_WORKFLOW Is Scheduled ### 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? - Create a MA and a MCA for payments and an MCA for billing connectors with a threshold to retry the payments - When a failure webhook is received a payment intent is created and multiple attempts are created for the external failed payments - Once the threshold is reached the payment is inserted to the Process tracker, which is picked after the schedule time - A payment attempt is created, which could either be Succeed or Failed - iF payment is processing a `Psync-Workflow` is to be created ## 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/payments.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/process_tracker.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/lib.rs` - `crates/hyperswitch_domain_models/src/merchant_connector_account.rs` - `crates/hyperswitch_domain_models/src/payments.rs` - ... and 2 more files **4. Core Business Logic** - `crates/router/src/core/errors.rs` - `crates/router/src/core/payments/operations/payment_attempt_record.rs` - `crates/router/src/core/payments/operations/proxy_payments_intent.rs` - ... and 6 more files **5. Type Definitions** - `crates/router/src/types/storage/revenue_recovery.rs` **6. Other** - `crates/router/src/workflows/revenue_recovery.rs` - `crates/storage_impl/src/errors.rs` **Code Patterns Applied:** - Define new data structures (2 changes) - Implement new functions (15 changes) - Extend existing types with new fields (125 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 9e9a9229: Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/diesel_models/src/process_tracker.rs** Modify existing code **crates/hyperswitch_domain_models/src/lib.rs** Add: - function: private::from - impl: impl From<&payments::payment_attempt::AttemptAmountDetailsSetter> for api_models::payments::PaymentAttemptAmountDetails **crates/hyperswitch_domain_models/src/merchant_connector_account.rs** Add: - function: pub::get_account_reference_id_using_payment_merchant_connector_account_id **crates/hyperswitch_domain_models/src/payments.rs** Add: - function: pub::create_revenue_recovery_attempt_data **crates/hyperswitch_domain_models/src/payments/payment_attempt.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_intent.rs** Modify existing code **crates/router/src/core/errors.rs** Modify existing code **crates/router/src/core/payments/operations/payment_attempt_record.rs** Modify existing code **crates/router/src/core/payments/operations/proxy_payments_intent.rs** Modify existing code **crates/router/src/core/revenue_recovery.rs** Add: - mod: pub::api **crates/router/src/core/revenue_recovery/api.rs** Add: - function: pub::call_psync_api - function: pub::call_proxy_api - function: pub::update_payment_intent_api - function: pub::record_internal_attempt_api **crates/router/src/core/revenue_recovery/transformers.rs** Remove: - impl: impl ForeignFrom<AttemptStatus> for PcrAttemptStatus Add: - impl: impl ForeignFrom<AttemptStatus> for RevenueRecoveryPaymentsAttemptStatus **crates/router/src/core/revenue_recovery/types.rs** Add: - function: private::payment_sync_call - enum: pub::RevenueRecoveryPaymentsAttemptStatus **crates/router/src/core/webhooks.rs** Remove: - mod: private::recovery_incoming Add: - mod: pub::recovery_incoming **crates/router/src/core/webhooks/recovery_incoming.rs** Add: - function: pub::get_revenue_recovery_attempt **crates/router/src/types/storage/revenue_recovery.rs** Add: - struct: pub::RevenueRecoveryWorkflowTrackingData **crates/router/src/workflows/revenue_recovery.rs** Modify existing code **crates/storage_impl/src/errors.rs** Modify existing code
{"pr_number": 7178, "pr_title": "feat(process_tracker): Task implementation for psync payments", "merged_at": "2025-04-30T08:25:32Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "connector"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs"], "database": ["crates/diesel_models/src/process_tracker.rs"], "domain": ["crates/hyperswitch_domain_models/src/lib.rs", "crates/hyperswitch_domain_models/src/merchant_connector_account.rs", "crates/hyperswitch_domain_models/src/payments.rs", "crates/hyperswitch_domain_models/src/payments/payment_attempt.rs", "crates/hyperswitch_domain_models/src/payments/payment_intent.rs"], "core_business": ["crates/router/src/core/errors.rs", "crates/router/src/core/payments/operations/payment_attempt_record.rs", "crates/router/src/core/payments/operations/proxy_payments_intent.rs", "crates/router/src/core/revenue_recovery.rs", "crates/router/src/core/revenue_recovery/api.rs", "crates/router/src/core/revenue_recovery/transformers.rs", "crates/router/src/core/revenue_recovery/types.rs", "crates/router/src/core/webhooks.rs", "crates/router/src/core/webhooks/recovery_incoming.rs"], "types": ["crates/router/src/types/storage/revenue_recovery.rs"], "other": ["crates/router/src/workflows/revenue_recovery.rs", "crates/storage_impl/src/errors.rs"]}, "change_types": {"structs_added": 2, "functions_added": 15, "enums_added": 1, "fields_added": 125, "imports_added": 10, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(payment_link): add support for hide card nickname field for open 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 --> add support for hide card nickname field for open payment links ### 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)? --> Hide card nickname field for open payment links **Test case 1 :** Update Business profile : ``` curl --location 'http://localhost:8080/account/merchant_1732812062/business_profile/pro_xfhW4Bgz6SgdBJudP8aH' \ --header 'Content-Type: application/json' \ --header 'api-key: test_admin' \ --data '{ "payment_link_config": { "allowed_domains": [ "*" ], "hide_card_nickname_field" : true, "enabled_saved_payment_method": true, "display_sdk_only" :true } }' ``` create payment links : ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Accept-Language: en' \ --header 'api-key: dev_tbCduVvExqcxwTFowfuDfAAzd3IUqJy9mLCR6exZlG17lnDVN7TU1IH1kGsBxdAr' \ --data '{ "customer_id": "cus_izAOZiynP5URGEvEfmgH", "amount": 100, "currency": "USD", "payment_link": true, "setup_future_usage" : "off_session", "session_expiry": 1000000, "return_url": "http://127.0.0.1:5500/src/pl_iframe.html" }' ``` card nickname should not be asked incase of customer initiated payments(setup future usage = offsession). <img width="1284" alt="Screenshot 2024-11-28 at 10 20 38 PM" src="https://github.com/user-attachments/assets/4df1738b-302c-4c08-9e90-78fc2254c526"> **Test case 2 :** - Incase of default and `hide_card_nickname_field` config value set to false, <img width="1254" alt="Screenshot 2024-11-28 at 10 19 57 PM" src="https://github.com/user-attachments/assets/c4bedb5c-e361-49f6-94b5-898c81a1ae16"> **Test case 3 :** setup_future_usage = on_session / null , if hide_card_nick_name field is set to false, nick name should not present in SDK <img width="1254" alt="Screenshot 2024-11-28 at 10 19 57 PM" src="https://github.com/user-attachments/assets/c4bedb5c-e361-49f6-94b5-898c81a1ae16"> ## 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_link/payment_link_initiate/payment_link_initiator.js` **Code Patterns Applied:** - Extend existing types with new fields (1 changes)
{"pr_number": 6700, "pr_title": "fix(payment_link): add support for hide card nickname field for open payment links", "merged_at": "2024-12-02T14:59:17Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payment_link/payment_link_initiate/payment_link_initiator.js"]}, "change_types": {"fields_added": 1}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat: add ci support for mock server ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> This PR adds support for running tests against mock server for alpha connectors. ### 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). --> The goal is to make sure that the implementation works. closes https://github.com/juspay/hyperswitch/issues/8798 ## 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 / work. ## 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 - [x] 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/hyperswitch_connectors/src/connectors/silverflow/transformers.rs` - ... and 3 more files **3. Tests** - `.github/workflows/cypress-tests-runner.yml` - `cypress-tests/cypress/e2e/configs/Payment/Silverflow.js` - `cypress-tests/cypress/e2e/configs/Payment/Utils.js` - ... and 3 more files **4. Other** - `api-reference/v1/openapi_spec_v1.json` - `api-reference/v2/openapi_spec_v2.json` **Code Patterns Applied:** - Extend existing types with new fields (1001 changes) - Add conditional logic for feature flags or filtering (24 changes) **Detailed Identifier Changes:** Commit 03bdcfea: 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/silverflow/transformers.rs** Modify existing code **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
{"pr_number": 8742, "pr_title": "feat: add ci support for mock server", "merged_at": "2025-08-01T12:56:53Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["connector"]}, "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/hyperswitch_connectors/src/connectors/silverflow/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"], "tests": [".github/workflows/cypress-tests-runner.yml", "cypress-tests/cypress/e2e/configs/Payment/Silverflow.js", "cypress-tests/cypress/e2e/configs/Payment/Utils.js", "cypress-tests/cypress/e2e/configs/mock-server/Silverflow.js", "cypress-tests/package-lock.json", "cypress-tests/package.json"], "other": ["api-reference/v1/openapi_spec_v1.json", "api-reference/v2/openapi_spec_v2.json"]}, "change_types": {"fields_added": 1001, "conditionals_added": 24}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): Fix Paybox 3DS failing issue ## 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 --> 1) Pass 3 Digit Numeric Code in CountryCode instead of the country alphaCode for Paybox 3DS Request ### 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? Request(Passing Afganistan country (CountryCode - 004) ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_iKUBW9o3CANJY9ComnkX7CuEjmzzz2jCDbAmyBJXR9P7hwo7CBi4dRnjn2GGFWJE' \ --data-raw '{ "amount": 500, "currency": "EUR", "confirm": true, "capture_method": "automatic", "authentication_type": "three_ds", "capture_on": "2022-09-10T10:11:12Z", "customer_id": "BamboraCustomer", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "payment_method": "card", "payment_method_type": "credit", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "AF", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "payment_method_data": { "card": { "card_number": "1111222233334444", "card_exp_month": "01", "card_exp_year": "26", "card_holder_name": "John Doe", "card_cvc": "123" } } }' ``` <img width="722" alt="Screenshot 2025-01-31 at 4 03 24 PM" src="https://github.com/user-attachments/assets/99ae1811-355c-4478-ac7d-9472bb379c34" /> Response ``` { "payment_id": "pay_aKjgWIifYZFLRwIjtbhh", "merchant_id": "postman_merchant_GHAction_e51ea646-b39c-414b-99da-da68d80d7045", "status": "requires_customer_action", "amount": 500, "net_amount": 500, "shipping_cost": null, "amount_capturable": 500, "amount_received": null, "connector": "paybox", "client_secret": "pay_aKjgWIifYZFLRwIjtbhh_secret_aUO6I6vJfEn2DHK3KCym", "created": "2025-01-31T10:28:58.317Z", "currency": "EUR", "customer_id": "BamboraCustomer", "customer": { "id": "BamboraCustomer", "name": "John Doe", "email": "guest@example.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": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4444", "card_type": "DEBIT", "card_network": "Visa", "card_issuer": null, "card_issuing_country": null, "card_isin": "111122", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "26", "card_holder_name": "John Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": "token_nzPbWyMuMs8hyroRaEqF", "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "AF", "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": 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_aKjgWIifYZFLRwIjtbhh/postman_merchant_GHAction_e51ea646-b39c-414b-99da-da68d80d7045/pay_aKjgWIifYZFLRwIjtbhh_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": { "customer_id": "BamboraCustomer", "created_at": 1738319338, "expires": 1738322938, "secret": "epk_dd0ccdd8afc3425eb566606e4ce3e5bc" }, "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_iHMjSjCk8knjnqbSB7fd", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_xR4q2hdv7RK55PirKNeo", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-01-31T10:43:58.317Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-01-31T10:28:59.879Z", "split_payments": 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/hyperswitch_connectors/src/connectors/paybox/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (2 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 52ed2906: Files to modify: **crates/hyperswitch_connectors/src/connectors/paybox/transformers.rs** Modify existing code Commit a614c200: Files to modify: **crates/hyperswitch_connectors/src/connectors/paybox/transformers.rs** Modify existing code
{"pr_number": 7153, "pr_title": "fix(connector): Fix Paybox 3DS failing issue", "merged_at": "2025-02-04T19:25:06Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/paybox/transformers.rs"]}, "change_types": {"fields_added": 2, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 2, "match_method": "pr_number"}
fix: updated the docker setup ## 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 --> Enhanced the script to pre-configure a user and a dummy connector in the control center for the local setup. replica of https://github.com/juspay/hyperswitch/pull/8093 on the main ### 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 #8094 ## 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` - `scripts/setup.sh` **Code Patterns Applied:** - Add conditional logic for feature flags or filtering (18 changes)
{"pr_number": 8092, "pr_title": "fix: updated the docker setup", "merged_at": "2025-05-22T09:46:58Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user", "connector"]}, "hierarchy": {"other": ["README.md", "scripts/setup.sh"]}, "change_types": {"conditionals_added": 18}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(routing): Integrate global success rates ## 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 --> Integrate global Success rates for dynamic routing ### 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. toggle success based routing with dynamic connector selection enabled ``` curl --location --request POST 'http://localhost:8080/account/sarthak2/business_profile/pro_F5mC1GGXHPLTtfcBnZEP/dynamic_routing/success_based/toggle?enable=dynamic_connector_selection' \ --header 'api-key: dev_RQxKf8JqHb5tTfTp13JMnI7TyWgXIHaa2AP5VkjLtst1CRJPArSfqasfGQI1oIAQ' ``` 2. Set volume split for dynamic routing ``` curl --location --request POST 'http://localhost:8080/account/sarthak2/business_profile/pro_F5mC1GGXHPLTtfcBnZEP/dynamic_routing/set_volume_split?split=80' \ --header 'api-key: dev_RQxKf8JqHb5tTfTp13JMnI7TyWgXIHaa2AP5VkjLtst1CRJPArSfqasfGQI1oIAQ' ``` 3. Make a payment 4. Global SR connector should be populated in DB <img width="639" alt="image" src="https://github.com/user-attachments/assets/1fadcb60-21d1-4958-8511-9a3872bb3daf" /> ## 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. API Request/Response Models** - `crates/api_models/src/routing.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/dynamic_routing_stats.rs` - `crates/diesel_models/src/schema.rs` - `crates/diesel_models/src/schema_v2.rs` **3. Core Business Logic** - `crates/router/src/core/routing/helpers.rs` **4. External Connector Integration** - `migrations/2025-01-07-101337_global_sr_connector_dynamic_routing/down.sql` - `migrations/2025-01-07-101337_global_sr_connector_dynamic_routing/up.sql` **5. Other** - `api-reference/openapi_spec.json` - `crates/external_services/src/grpc_client/dynamic_routing/success_rate_client.rs` - `crates/openapi/src/openapi.rs` - ... and 1 more files **Code Patterns Applied:** - Implement new functions (3 changes) - Extend existing types with new fields (26 changes) **Detailed Identifier Changes:** Commit 39d2d6c4: Files to modify: **crates/api_models/src/routing.rs** Add: - enum: pub::SuccessRateSpecificityLevel **crates/diesel_models/src/dynamic_routing_stats.rs** Modify existing code **crates/diesel_models/src/schema.rs** Modify existing code **crates/diesel_models/src/schema_v2.rs** Modify existing code **crates/external_services/src/grpc_client/dynamic_routing/success_rate_client.rs** Add: - function: private::calculate_entity_and_global_success_rate **crates/openapi/src/openapi.rs** Modify existing code **crates/router/src/core/routing/helpers.rs** Modify existing code
{"pr_number": 6950, "pr_title": "feat(routing): Integrate global success rates", "merged_at": "2025-01-21T12:16:06Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "connector"]}, "hierarchy": {"api_models": ["crates/api_models/src/routing.rs"], "database": ["crates/diesel_models/src/dynamic_routing_stats.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs"], "core_business": ["crates/router/src/core/routing/helpers.rs"], "connectors": ["migrations/2025-01-07-101337_global_sr_connector_dynamic_routing/down.sql", "migrations/2025-01-07-101337_global_sr_connector_dynamic_routing/up.sql"], "other": ["api-reference/openapi_spec.json", "crates/external_services/src/grpc_client/dynamic_routing/success_rate_client.rs", "crates/openapi/src/openapi.rs", "proto/success_rate.proto"]}, "change_types": {"functions_added": 3, "enums_added": 3, "fields_added": 26}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [Barclaycard] Add Apple Pay Flow ## 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/8884) ## Description <!-- Describe your changes in detail --> Added Apple Pay Flow for Barclaycard ### 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 <details> <summary>Hyperswitch Decryption Flow </summary> 1. Payment Connector - Create Request: ``` curl --location 'http://localhost:8080/account/merchant_1755085109/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_taZoWveMbydxSkllyD5IB1sPHXNYOLLR2iveHgisLDodWCnHUkaXOF5k8RS8jMFC' \ --data '{ "connector_type": "payment_processor", "connector_name": "barclaycard", "connector_account_details": { "auth_type":"SignatureKey", "api_secret": API_SECRET "api_key": API_KEY, "key1": KEY1 }, "test_mode": true, "disabled": false, "payment_methods_enabled": [ { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "apple_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 } ] } ], "metadata": { "apple_pay_combined": { "manual": { "session_token_data": { "initiative": "web", "certificate": CERTIFICATE, "display_name": "Applepay", "certificate_keys": CERTIFICATE_KEYS, "initiative_context": INITIATIVE_CONTEXT, "merchant_identifier": MERCHANT_IDENTIFIER "merchant_business_country": "US", "payment_processing_details_at": "Hyperswitch", "payment_processing_certificate": PAYMENT_PROCESSING_CERTIFICATE, "payment_processing_certificate_key": PAYMENT_PROCESSING_CERTIFICATE_KEY, }, "payment_request_data": { "label": "Applepay", "supported_networks": [ "visa", "masterCard", "amex", "discover" ], "merchant_capabilities": [ "supports3DS" ] } } } }, "business_country": "US", "business_label": "default" }' ``` Response: ``` { "connector_type": "payment_processor", "connector_name": "barclaycard", "connector_label": "barclaycard_US_default", "merchant_connector_id": "mca_eS9yhJMxUdKy4eZJ1Ea1", "profile_id": "pro_v4sNqtQqIhqC7zNvjBna", "connector_account_details": { "auth_type": "SignatureKey", "api_key": API_KEY, "key1": KEY1, "api_secret": API_SECRET }, "payment_methods_enabled": [ { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "apple_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 } ] } ], "connector_webhook_details": null, "metadata": { "apple_pay_combined": { "manual": { "session_token_data": { "initiative": "web", "certificate": CERTIFICATE, "display_name": "Applepay", "certificate_keys": CERTIFICATE_KEYS, "initiative_context": INITIATIVE_CONTEXT, "merchant_identifier": MERCHANT_IDENTIFIER, "merchant_business_country": "US", "payment_processing_details_at": "Hyperswitch", "payment_processing_certificate": PAYMENT_PROCESSING_CERTIFICATE, "payment_processing_certificate_key": PAYMENT_PROCESSING_CERTIFICATE_KEY }, "payment_request_data": { "label": "Applepay", "supported_networks": [ "visa", "masterCard", "amex", "discover" ], "merchant_capabilities": [ "supports3DS" ] } } } }, "test_mode": true, "disabled": false, "frm_configs": null, "business_country": "US", "business_label": "default", "business_sub_label": null, "applepay_verified_domains": null, "pm_auth_config": null, "status": "active", "additional_merchant_data": null, "connector_wallets_details": { "apple_pay_combined": { "manual": { "payment_request_data": { "supported_networks": [ "visa", "masterCard", "amex", "discover" ], "merchant_capabilities": [ "supports3DS" ], "label": "Applepay" }, "session_token_data": { "certificate": CERTIFICATE, "certificate_keys": CERTIFICATE_KEYS, "merchant_identifier": MERCHANT_IDENTIFIER, "display_name": "Applepay", "initiative": "web", "initiative_context": INITIATIVE_CONTEXT, "merchant_business_country": "US", "payment_processing_details_at": "Hyperswitch", "payment_processing_certificate": PAYMENT_PROCESSING_CERTIFICATE, "payment_processing_certificate_key": PAYMENT_PROCESSING_CERTIFICATE_KEY } } } } } ``` 2. Payments - Create Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_taZoWveMbydxSkllyD5IB1sPHXNYOLLR2iveHgisLDodWCnHUkaXOF5k8RS8jMFC' \ --data-raw '{ "amount": 650, "currency": "USD", "confirm": true, "business_country": "US", "business_label": "default", "amount_to_capture": 650, "customer_id": "cu_1752502119", "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", "billing": { "address": { "line1": "1467", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": NUMBER "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": "wallet", "payment_method_type": "apple_pay", "payment_method_data": { "wallet": { "apple_pay": { "payment_data": PAYMENT_DATA, "display_name": "MasterCard 0049", "network": "MasterCard", "type": "credit" }, "transaction_identifier": TRANSACTION_IDENTIFIER } } }, "shipping": { "phone": { "number": "4081234567" }, "email": EMAIL } }' ``` Response: ``` { "payment_id": "pay_ytnuQR2VsUo0pTAPUlvy", "merchant_id": "merchant_1755085109", "status": "succeeded", "amount": 650, "net_amount": 650, "shipping_cost": null, "amount_capturable": 0, "amount_received": 650, "connector": "barclaycard", "client_secret": "pay_ytnuQR2VsUo0pTAPUlvy_secret_pdWZPEULnUSv9XOzVUaF", "created": "2025-08-13T11:38:39.949Z", "currency": "USD", "customer_id": "cu_1752502119", "customer": { "id": "cu_1752502119", "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": "0049", "card_network": "MasterCard", "type": "credit" } }, "billing": null }, "payment_token": null, "shipping": { "address": null, "phone": { "number": "4081234567", "country_code": null }, "email": EMAIL }, "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": NUMBER, "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": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "apple_pay", "connector_label": "barclaycard_US_default", "business_country": "US", "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cu_1752502119", "created_at": 1755085119, "expires": 1755088719, "secret": "SECRET }, "manual_retry_allowed": false, "connector_transaction_id": "7550851222606001203813", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_ytnuQR2VsUo0pTAPUlvy_1", "payment_link": null, "profile_id": "pro_v4sNqtQqIhqC7zNvjBna", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_eS9yhJMxUdKy4eZJ1Ea1", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-13T11:53:39.949Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-13T11:38:43.164Z", "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 } ``` </details> <details> <summary>Connector Decryption Flow </summary> 1. Payment Connector - Create Request: ``` curl --location 'http://localhost:8080/account/merchant_1757312693/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_tO4QhL39rQMDHYzzbfwpngxQRd7PfKBjb3H9h0ngxbMUeLjNovXFBbIRDfRhBkKk' \ --data '{ "connector_type": "payment_processor", "connector_name": "barclaycard", "connector_account_details": { "auth_type": "SignatureKey", "api_secret": API_SECRET, "api_key": API_KEY, "key1": KEY1 }, "test_mode": true, "disabled": false, "payment_methods_enabled": [ { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "apple_pay", "payment_experience": "invoke_sdk_client", "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false } ] } ], "metadata": { "apple_pay_combined": { "manual": { "session_token_data": { "initiative": "ios", "certificate": CERTIFICATE, "display_name": "Barclaycard via Hyperswitch", "certificate_keys": CERTIFICATE_KEYS, "merchant_identifier": MERCHANT_IDENTIFIER, "merchant_business_country": MERCHANT_BUSINESS_COUNTRY, "payment_processing_details_at": "Connector" }, "payment_request_data": { "label": "Cybersource via Hyperswitch", "supported_networks": [ "visa", "masterCard", "amex", "discover" ], "merchant_capabilities": [ "supports3DS" ] } } } }, "connector_webhook_details": { "merchant_secret": "MyWebhookSecret" }, "business_country": "US", "business_label": "default" }' ``` Response: ``` { "connector_type": "payment_processor", "connector_name": "barclaycard", "connector_label": "barclaycard_US_default", "merchant_connector_id": "mca_dQAvxu5nKalC1YM9Nh4c", "profile_id": "pro_PbbZjjifqFiYwIXrlBjq", "connector_account_details": { "auth_type": "SignatureKey", "api_key": API_KEY, "key1": KEY1, "api_secret": API_SECRET }, "payment_methods_enabled": [ { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "apple_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 } ] } ], "connector_webhook_details": { "merchant_secret": "MyWebhookSecret", "additional_secret": null }, "metadata": { "apple_pay_combined": { "manual": { "session_token_data": { "initiative": "ios", "certificate": CERTIFICATE, "display_name": "Barclaycard via Hyperswitch", "certificate_keys": CERTIFICATE_KEYS, "merchant_identifier": MERCHANT_IDENTIFIER, "merchant_business_country": MERCHANT_BUSINESS_COUNTRY, "payment_processing_details_at": "Connector" }, "payment_request_data": { "label": "Barclaycard via Hyperswitch", "supported_networks": [ "visa", "masterCard", "amex", "discover" ], "merchant_capabilities": [ "supports3DS" ] } } } }, "test_mode": true, "disabled": false, "frm_configs": null, "business_country": "US", "business_label": "default", "business_sub_label": null, "applepay_verified_domains": null, "pm_auth_config": null, "status": "active", "additional_merchant_data": null, "connector_wallets_details": { "apple_pay_combined": { "manual": { "payment_request_data": { "supported_networks": [ "visa", "masterCard", "amex", "discover" ], "merchant_capabilities": [ "supports3DS" ], "label": "Barclaycard via Hyperswitch" }, "session_token_data": { "certificate": CERTIFICATE, "certificate_keys": CERTIFICATE_KEYS, "merchant_identifier": MERCHANT_IDENTIFIER, "display_name": MERCHANT_BUSINESS_COUNTRY, "initiative": "ios", "initiative_context": null, "merchant_business_country": MERCHANT_BUSINESS_COUNTRY, "payment_processing_details_at": "Connector" } } } } } ``` 2. Payments - Create Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_tO4QhL39rQMDHYzzbfwpngxQRd7PfKBjb3H9h0ngxbMUeLjNovXFBbIRDfRhBkKk' \ --data-raw '{ "amount": 2229, "currency": "USD", "confirm": true, "customer_id": "gmail", "email": "email@email.com", "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" }, "payment_method_data": { "wallet": { "apple_pay": { "payment_data": PAYMENT_DATA, "payment_method": { "display_name": "MasterCard 0049", "network": "MasterCard", "type": "credit" }, "transaction_identifier": TRANSACTION_IDENTIFIER } } }, "payment_method": "wallet", "payment_method_type": "apple_pay" }' ``` Response: ``` { "payment_id": "pay_PGO6Zpfp4QqUUVrcV69m", "merchant_id": "merchant_1757312693", "status": "succeeded", "amount": 2229, "net_amount": 2229, "shipping_cost": null, "amount_capturable": 0, "amount_received": 2229, "connector": "barclaycard", "client_secret": "pay_PGO6Zpfp4QqUUVrcV69m_secret_4NqlDHVTMiECtyKhMRgN", "created": "2025-09-08T06:25:44.739Z", "currency": "USD", "customer_id": "gmail", "customer": { "id": "gmail", "name": null, "email": "email@email.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": "wallet", "payment_method_data": { "wallet": { "apple_pay": { "last4": "0049", "card_network": "MasterCard", "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": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "order_details": null, "email": "email@email.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": "apple_pay", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "gmail", "created_at": 1757312744, "expires": 1757316344, "secret": "epk_972bbb09245349088a4f2eb20ffb472e" }, "manual_retry_allowed": false, "connector_transaction_id": "7573127477466909504807", "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": "pay_PGO6Zpfp4QqUUVrcV69m_1", "payment_link": null, "profile_id": "pro_PbbZjjifqFiYwIXrlBjq", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_dQAvxu5nKalC1YM9Nh4c", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-08T06:40:44.739Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-09-08T06:25:48.784Z", "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 } ``` </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/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - `crates/connector_configs/toml/sandbox.toml` - ... and 2 more files **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:** - Define new data structures (4 changes) - Implement new functions (1 changes) - Extend existing types with new fields (59 changes) **Detailed Identifier Changes:** Commit 77498ee5: Files to modify: **crates/hyperswitch_connectors/src/connectors/barclaycard.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs** Add: - function: private::try_from - struct: pub::TokenizedCard - struct: pub::ApplePayTokenizedCard - struct: pub::ApplePayTokenPaymentInformation - struct: pub::ApplePayPaymentInformation - impl: impl TryFrom<( &BarclaycardRouterData<&PaymentsAuthorizeRouterData>, Box<ApplePayPredecryptData>, ApplePayWalletData, )> for BarclaycardPaymentsRequest
{"pr_number": 8885, "pr_title": "feat(connector): [Barclaycard] Add Apple Pay Flow", "merged_at": "2025-09-09T09:45:21Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/hyperswitch_connectors/src/connectors/barclaycard.rs", "crates/hyperswitch_connectors/src/connectors/barclaycard/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": 4, "functions_added": 1, "enums_added": 1, "fields_added": 59, "imports_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [WISE] Changed error status to string ## 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 error status was previously being accepted as i32, which was causing Hyperswitch to throw an error because the connector returns the status as a String. The status has been changed to type String in this PR. ### 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). --> Issue Link: https://github.com/juspay/hyperswitch/issues/7469 ## 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 Tests** **1. Payouts Create** -Request ``` curl --location 'http://localhost:8080/payouts/create' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_gBOBAd2KdnQ2Sicn24ETzOLMqRjdMVtjSjy17FYmjQjmj26klfRIWLOnspqQX9YW' \ --data-raw '{ "amount": 10, "currency": "GBP", "customer_id": "cus_wtc11I3P4ObeIZk0FpBR", "email": "payout_customer@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payout request", "payout_type": "bank", "connector": [ "wise" ], "payout_method_data": { "bank": { "bank_sort_code": "231470", "bank_account_number": "28821822", "bank_name": "Deutsche Bank", "bank_country_code": "NL", "bank_city": "Amsterdam" } }, "billing": { "address": { "line1": "1467", "city": "San Fransico", "state": "CA", "zip": "94122", "country": "US", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "entity_type": "Individual", "recurring": true, "metadata": { "ref": "123" }, "confirm": true, "auto_fulfill": true, "profile_id": "pro_U84OKvi5otdXGYq6tjlx" }' ``` -Response ``` { "payout_id": "5f7ac2b0-69cb-4916-9ad5-a901770bbc72", "merchant_id": "merchant_1741598972", "amount": 10, "currency": "GBP", "connector": "wise", "payout_type": "bank", "payout_method_data": { "bank": { "bank_sort_code": "23**70", "bank_account_number": "****1822", "bank_name": "Deutsche Bank", "bank_country_code": "NL", "bank_city": "Amsterdam" } }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": null, "line3": null, "zip": "94122", "state": "CA", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "auto_fulfill": true, "customer_id": "cus_wtc11I3P4ObeIZk0FpBR", "customer": { "id": "cus_wtc11I3P4ObeIZk0FpBR", "name": "John Doe", "email": "payout_customer@example.com", "phone": "999999999", "phone_country_code": "+65" }, "client_secret": "payout_5f7ac2b0-69cb-4916-9ad5-a901770bbc72_secret_B0h34yZciT2HwmmcHKgu", "return_url": null, "business_country": null, "business_label": null, "description": "Its my first payout request", "entity_type": "Individual", "recurring": true, "metadata": { "ref": "123" }, "merchant_connector_id": "mca_d6VH9HeZfA07bVki7LMf", "status": "failed", "error_message": "", "error_code": "REJECTED", "profile_id": "pro_U84OKvi5otdXGYq6tjlx", "created": "2025-03-10T09:48:10.143Z", "connector_transaction_id": "54879667", "priority": null, "payout_link": null, "email": "payout_customer@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "unified_code": null, "unified_message": null, "payout_method_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/wise/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (1 changes) **Detailed Identifier Changes:** Commit fa7971f5: Files to modify: **crates/router/src/connector/wise/transformers.rs** Modify existing code
{"pr_number": 7468, "pr_title": "fix(connector): [WISE] Changed error status to string", "merged_at": "2025-04-02T06:41:10Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "merchant", "connector"]}, "hierarchy": {"connectors": ["crates/router/src/connector/wise/transformers.rs"]}, "change_types": {"fields_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): Add masking support for form-data types request ## 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 --> Connectors which accept FormData type request, their `raw_connector_request` weren't being logged. Added masking support and logging form-data type requests. ### 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. Fiuu Payments Create cURL: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_GRihX98pcCHFjnBaR1LBMxTLCNAk8Fx214kdchJz984QzWNAZ2ss8esm5XmbSU6u' \ --data-raw '{ "amount": 2500, "currency": "CNY", "connector": ["fiuu"], "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 2500, "customer_id": "abcdef", "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://duck.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "5105105105105100", "card_exp_month": "12", "card_exp_year": "2030", "card_holder_name": "Max Mustermann", "card_cvc": "444" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "CN", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "9123456789", "country_code": "+91" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "CN", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "9123456789", "country_code": "+91" } }, "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": "109.71.40.0" } }' ``` Response: ``` { "payment_id": "pay_aBsJoG8wjpfpbKggSOGN", "merchant_id": "merchant_1758103920", "status": "succeeded", "amount": 2500, "net_amount": 2500, "shipping_cost": null, "amount_capturable": 0, "amount_received": 2500, "connector": "fiuu", "client_secret": "pay_aBsJoG8wjpfpbKggSOGN_secret_14HaB2sRpkebckvhM3EJ", "created": "2025-09-22T14:50:06.204Z", "currency": "CNY", "customer_id": "abcdef", "customer": { "id": "abcdef", "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": "5100", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "510510", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2030", "card_holder_name": "Max Mustermann", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "CN", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "9123456789", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "CN", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "9123456789", "country_code": "+91" }, "email": null }, "order_details": null, "email": "guest@example.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": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "abcdef", "created_at": 1758552606, "expires": 1758556206, "secret": "epk_396a50e651dc40e0b35a0f22b82cbc5c" }, "manual_retry_allowed": null, "connector_transaction_id": "31048173", "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_gIzlvTGmHkBZQFOCtbwq", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_aloyWgEymQftBd1JXETx", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-22T15:05:06.204Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "109.71.40.0", "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-22T14:50:07.527Z", "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 } ``` <img width="1337" height="83" alt="Screenshot 2025-09-22 at 7 13 06 PM" src="https://github.com/user-attachments/assets/9d1f6c44-3c5e-4f20-94fb-0d6d0d16bf4b" /> ## 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` **2. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/checkout.rs` - `crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/fiuu.rs` - ... and 3 more files **3. Utils** - `crates/common_utils/src/request.rs` **4. Other** - `crates/external_services/src/http_client.rs` - `crates/injector/src/vault_metadata.rs` - `crates/router/src/services/api.rs` **Code Patterns Applied:** - Define new data structures (2 changes) - Implement new functions (4 changes) - Extend existing types with new fields (18 changes) **Detailed Identifier Changes:** Commit 1af7f427: Files to modify: **crates/common_utils/src/request.rs** Modify existing code **crates/external_services/src/http_client.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/checkout.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs** Add: - struct: pub::CheckoutFileRequest **crates/hyperswitch_connectors/src/connectors/fiuu.rs** Remove: - function: pub::build_form_from_struct Add: - function: pub::build_form_from_struct **crates/hyperswitch_connectors/src/connectors/hipay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/stripe.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs** Add: - struct: pub::StripeFileRequest **crates/router/src/core/payment_methods.rs** Modify existing code **crates/router/src/services/api.rs** Modify existing code
{"pr_number": 9496, "pr_title": "feat(core): Add masking support for form-data types request", "merged_at": "2025-10-07T17:32:55Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payment_methods.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/checkout.rs", "crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs", "crates/hyperswitch_connectors/src/connectors/fiuu.rs", "crates/hyperswitch_connectors/src/connectors/hipay.rs", "crates/hyperswitch_connectors/src/connectors/stripe.rs", "crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs"], "utils": ["crates/common_utils/src/request.rs"], "other": ["crates/external_services/src/http_client.rs", "crates/injector/src/vault_metadata.rs", "crates/router/src/services/api.rs"]}, "change_types": {"structs_added": 2, "functions_added": 4, "fields_added": 18, "imports_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): Implement capture and webhook flow, fix some issues in ACI ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD closes this [issue](https://github.com/juspay/hyperswitch/issues/8348) ## Description <!-- Describe your changes in detail --> Implemented capture and webhook flow, fix some issues in ACI ### 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)? --> **NOTE**: This PR adds test cases for the ACI capture flow. Currently, the capture-related tests are failing with the error: `Cannot capture (PA value exceeded, PA reverted or invalid workflow?)` I've already raised this issue with the ACI team and am awaiting their response. Once resolved, we can revalidate the flow accordingly. We will follow up with validation once ACI provides the necessary support and access. Additionally, we do not have dashboard access for ACI to test webhook functionality end-to-end. Postman Test (For capture flow): Payments - Create (Confirm: true): Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_Zc8oIJUK0i4PD7sOckK3GefgrZrPYR7B0yHsazdUVemSff6GLX4O6rhOEDMtcrUI' \ --data-raw ' { "amount": 1000, "currency": "USD", "confirm": true, "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 1000, "customer_id": "StripeCustomer", "email": "abcdef123@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", "billing": { "address": { "first_name": "John", "last_name": "Doe", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "AT" } }, "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "11", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "card_cvc": "276" } }, "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" }, "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" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` Response: ``` { "payment_id": "pay_IiHYDvxclZJ4UZEr9irY", "merchant_id": "merchant_1751352542", "status": "requires_capture", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 1000, "amount_received": null, "connector": "aci", "client_secret": "pay_IiHYDvxclZJ4UZEr9irY_secret_kvCV7sR0WZkxpOAFHOgt", "created": "2025-07-01T06:51:50.527Z", "currency": "USD", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "abcdef123@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": "manual", "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": "11", "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": "John", "last_name": "Doe" }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "AT", "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": "abcdef123@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": "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": 1751352710, "expires": 1751356310, "secret": "epk_27f6d5062c894d2eada4b67c4eae1abc" }, "manual_retry_allowed": false, "connector_transaction_id": "8ac7a4a297c2d96a0197c4c19aca4810", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "8ac7a4a297c2d96a0197c4c19aca4810", "payment_link": null, "profile_id": "pro_sPevIjlEfalGATQpyx0N", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_cBSc84vPxAVKJqfS3Db3", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-01T07:06:50.527Z", "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-01T06:51:52.447Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` Payments - Capture: Request: ``` curl --location 'http://localhost:8080/payments/pay_IiHYDvxclZJ4UZEr9irY/capture' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_Zc8oIJUK0i4PD7sOckK3GefgrZrPYR7B0yHsazdUVemSff6GLX4O6rhOEDMtcrUI' \ --data '{ "amount_to_capture": 1000, "statement_descriptor_name": "Joseph", "statement_descriptor_prefix" :"joseph", "statement_descriptor_suffix": "JS" }' ``` Response: ``` { "payment_id": "pay_IiHYDvxclZJ4UZEr9irY", "merchant_id": "merchant_1751352542", "status": "failed", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 1000, "amount_received": null, "connector": "aci", "client_secret": "pay_IiHYDvxclZJ4UZEr9irY_secret_kvCV7sR0WZkxpOAFHOgt", "created": "2025-07-01T06:51:50.527Z", "currency": "USD", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "abcdef123@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": "manual", "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": "11", "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": "John", "last_name": "Doe" }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "AT", "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": "abcdef123@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": "700.400.100", "error_message": "cannot capture (PA value exceeded, PA reverted or invalid workflow?)", "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": true, "connector_transaction_id": "8ac7a4a297c2d96a0197c4c19aca4810", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "8ac7a4a297c2d96a0197c4c19aca4810", "payment_link": null, "profile_id": "pro_sPevIjlEfalGATQpyx0N", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_cBSc84vPxAVKJqfS3Db3", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-01T07:06:50.527Z", "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-01T06:53:15.846Z", "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. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/aci.rs` - `crates/hyperswitch_connectors/src/connectors/aci/transformers.rs` **2. Utils** - `crates/common_utils/src/errors.rs` **3. Tests** - `loadtest/config/development.toml` **4. Configuration Files** - `config/deployments/production.toml` - `config/development.toml` **Code Patterns Applied:** - Define new data structures (10 changes) - Implement new functions (19 changes) - Extend existing types with new fields (116 changes) - Add conditional logic for feature flags or filtering (9 changes) **Detailed Identifier Changes:** Commit 1ae30247: Files to modify: **crates/common_utils/src/errors.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/aci.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 - function: private::decrypt_aci_webhook_payload - function: private::get_webhook_source_verification_algorithm - function: private::get_webhook_source_verification_signature - function: private::get_webhook_source_verification_message **crates/hyperswitch_connectors/src/connectors/aci/transformers.rs** Add: - function: private::get_capture_method - function: private::get_capture_method - function: private::get_capture_method - trait: private::GetCaptureMethod - impl: impl GetCaptureMethod for PaymentsAuthorizeData - impl: impl GetCaptureMethod for PaymentsSyncData - impl: impl GetCaptureMethod for PaymentsCancelData
{"pr_number": 8349, "pr_title": "feat(connector): Implement capture and webhook flow, fix some issues in ACI", "merged_at": "2025-07-01T09:53:19Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/aci.rs", "crates/hyperswitch_connectors/src/connectors/aci/transformers.rs"], "utils": ["crates/common_utils/src/errors.rs"], "tests": ["loadtest/config/development.toml"], "config": ["config/deployments/production.toml", "config/development.toml"]}, "change_types": {"structs_added": 10, "functions_added": 19, "enums_added": 2, "fields_added": 116, "imports_added": 1, "conditionals_added": 9}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [Wise] send uuid as connector_transaction_id ## 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 --> connector_transaction_id of wise only support UUID format. reference_id wont be required as value since we store the wise's transaction id. We only send UUID to make the transaction without any error. Hotfix raised against: https://github.com/juspay/hyperswitch/pull/8836 ### 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 an MCA with Wise, do a payout transaction with below body: ``` { "amount": 100, "currency": "USD", "customer_id": "{{customer_id}}", "email": "payout_customer@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payout request", "payout_type": "bank", "payout_method_data": { "bank": { "bank_account_number": "40000000000", "bank_routing_number": "064000020", "bank_name": "Deutsche Bank", "bank_country_code": "US", "bank_city": "NewYork" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "NY", "zip": "94122", "country": "US", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "entity_type": "Individual", "recurring": false, "priority": "instant", "metadata": { "ref": "123" }, "confirm": true, "auto_fulfill": true } ``` Below should be the response: ``` { "payout_id": "payout_kzRK3VXXZlUnCr1EnD0I", "merchant_id": "merchant_1754377291", "merchant_order_reference_id": null, "amount": 100, "currency": "USD", "connector": "wise", "payout_type": "bank", "payout_method_data": { "bank": { "bank_account_number": "*******0000", "bank_routing_number": "064***020", "bank_name": "Deutsche Bank", "bank_country_code": "US", "bank_city": "NewYork" } }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "NY", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "auto_fulfill": true, "customer_id": "cus_dLXANQ4lA5rPO9ILVMIU", "customer": { "id": "cus_dLXANQ4lA5rPO9ILVMIU", "name": "John Doe", "email": "payout_customer@example.com", "phone": "999999999", "phone_country_code": "+65" }, "client_secret": "payout_payout_kzRK3VXXZlUnCr1EnD0I_secret_aUlO2tVNNnSwCpwtT2BI", "return_url": null, "business_country": null, "business_label": null, "description": "Its my first payout request", "entity_type": "Individual", "recurring": false, "metadata": { "ref": "123" }, "merchant_connector_id": "mca_X32sex8t8YBX0yuIS77v", "status": "success", "error_message": null, "error_code": null, "profile_id": "pro_AlDa1vQRvtDEN6zUests", "created": "2025-08-05T07:01:49.063Z", "connector_transaction_id": "55301412", "priority": "instant", "payout_link": null, "email": "payout_customer@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "unified_code": null, "unified_message": null, "payout_method_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/hyperswitch_connectors/src/connectors/wise/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (1 changes) **Detailed Identifier Changes:** Commit 5b31b0ed: Files to modify: **crates/hyperswitch_connectors/src/connectors/wise/transformers.rs** Modify existing code
{"pr_number": 8837, "pr_title": "fix(connector): [Wise] send uuid as connector_transaction_id", "merged_at": "2025-08-05T10:18:31Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "merchant", "order"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/wise/transformers.rs"]}, "change_types": {"fields_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix: script for one click docker setup ## 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 --> Script for one click docker setup, to minimise issues faced by users. >Run the whole setup with simple command >Show output with localhost links for different setups ### 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). --> Script for one click docker setup, to minimise issues faced by users. Closes #7761 ## 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 ss of test on local. <img width="466" alt="Screenshot 2025-04-08 at 4 12 13 PM" src="https://github.com/user-attachments/assets/003ce4e1-aadc-4ad2-abde-763728f51ad1" /> ## 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` - `scripts/docker_output.sh` **Code Patterns Applied:** - Add conditional logic for feature flags or filtering (1 changes)
{"pr_number": 7762, "pr_title": "fix: script for one click docker setup", "merged_at": "2025-04-13T21:08:39Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"other": ["README.md", "scripts/docker_output.sh"]}, "change_types": {"conditionals_added": 1}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(connector): [STRIPE] Populate Error Message in Incremental Authorization Flow ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD Closes these issues - [Issue 1](https://github.com/juspay/hyperswitch/issues/9003) [Issue 2](https://github.com/juspay/hyperswitch/issues/9004) ## Description <!-- Describe your changes in detail --> Populated Error Message in Incremental Authorization Flow. Added check for same amount in incremental authorization requests. ### 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 1. Payments - Create Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_jVOnDLj6Q2nOHSSL8NIMQUws6P8WIRE9QNZ6toLt4gB7DqXuObIkVwPiXLJsY16n' \ --data-raw '{ "amount": 6500, "currency": "USD", "confirm": true, "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6500, "customer_id": "StripeCustomer", "email": "abcdef123@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", "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" } }, "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": "joseph Doe", "card_cvc": "737" } }, "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" }, "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" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2025-07-25T11:46:12Z" }, "request_incremental_authorization": true }' ``` Response: ``` { "payment_id": "pay_fXzLwsUeDagw7Cdyp8Sh", "merchant_id": "merchant_1755689870", "status": "requires_capture", "amount": 6500, "net_amount": 6500, "shipping_cost": null, "amount_capturable": 6500, "amount_received": 0, "connector": "stripe", "client_secret": "pay_fXzLwsUeDagw7Cdyp8Sh_secret_Uoa82RaRfj6xcV3MnUtO", "created": "2025-08-20T12:16:31.560Z", "currency": "USD", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "abcdef123@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": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "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": "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": "abcdef123@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": "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": 1755692191, "expires": 1755695791, "secret": "epk_c558a24e699a4b9db808d953a8df38f5" }, "manual_retry_allowed": false, "connector_transaction_id": "pi_3RyAwOE9cSvqiivY17rwXSCJ", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2025-07-25T11:46:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "pi_3RyAwOE9cSvqiivY17rwXSCJ", "payment_link": null, "profile_id": "pro_PMx2Y9TaHmSY8wUiC8kP", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_7VMxMHsmscuHwnVdYZPE", "incremental_authorization_allowed": true, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-20T12:31:31.560Z", "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_channel": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-08-20T12:16:32.579Z", "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 - Incremental Authorization (with same amount) Request: ``` curl --location 'http://localhost:8080/payments/pay_fXzLwsUeDagw7Cdyp8Sh/incremental_authorization' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_jVOnDLj6Q2nOHSSL8NIMQUws6P8WIRE9QNZ6toLt4gB7DqXuObIkVwPiXLJsY16n' \ --data '{ "amount": 6500 }' ``` Response: ``` { "error": { "type": "invalid_request", "message": "Amount should be greater than original authorized amount", "code": "IR_16" } } ``` 3. Payments - Incremental Authorization (exceeding the maximum amount of time the flow can be called in Stripe) Request: ``` curl --location 'http://localhost:8080/payments/pay_gIQKmooikg2npSvaM9xZ/incremental_authorization' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_jVOnDLj6Q2nOHSSL8NIMQUws6P8WIRE9QNZ6toLt4gB7DqXuObIkVwPiXLJsY16n' \ --data '{ "amount": 6511 }' ``` Response: ``` { "payment_id": "pay_gIQKmooikg2npSvaM9xZ", "merchant_id": "merchant_1755689870", "status": "requires_capture", "amount": 6510, "net_amount": 6510, "shipping_cost": null, "amount_capturable": 6510, "amount_received": null, "connector": "stripe", "client_secret": "pay_gIQKmooikg2npSvaM9xZ_secret_cmcrBTpMQL6Prbvudezo", "created": "2025-08-20T13:28:31.692Z", "currency": "USD", "customer_id": null, "customer": { "id": null, "name": "John Doe", "email": "abcdef123@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": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "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": null, "billing": null, "order_details": null, "email": null, "name": null, "phone": null, "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": "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_3RyC44E9cSvqiivY14N3VxbQ", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2025-07-25T11:46: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": "pi_3RyC44E9cSvqiivY14N3VxbQ", "payment_link": null, "profile_id": "pro_PMx2Y9TaHmSY8wUiC8kP", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_7VMxMHsmscuHwnVdYZPE", "incremental_authorization_allowed": true, "authorization_count": 11, "incremental_authorizations": [ { "authorization_id": "auth_RI9tMBRwaju7LpkDhNrT_1", "amount": 6501, "status": "success", "error_code": null, "error_message": null, "previously_authorized_amount": 6500 }, { "authorization_id": "auth_BoyLq9eHomflrMn5f2kD_2", "amount": 6502, "status": "success", "error_code": null, "error_message": null, "previously_authorized_amount": 6501 }, { "authorization_id": "auth_LZZQWDEHw57lbLcqqKv2_3", "amount": 6503, "status": "success", "error_code": null, "error_message": null, "previously_authorized_amount": 6502 }, { "authorization_id": "auth_RQeNDy0sdQnaLEW7f4Rm_4", "amount": 6504, "status": "success", "error_code": null, "error_message": null, "previously_authorized_amount": 6503 }, { "authorization_id": "auth_2MRj0ANmGIW6BvFARHAe_5", "amount": 6505, "status": "success", "error_code": null, "error_message": null, "previously_authorized_amount": 6504 }, { "authorization_id": "auth_egVuyLWfl6jGIZKdgLrt_6", "amount": 6506, "status": "success", "error_code": null, "error_message": null, "previously_authorized_amount": 6505 }, { "authorization_id": "auth_M33NayFU2GQicIGYMMkU_7", "amount": 6507, "status": "success", "error_code": null, "error_message": null, "previously_authorized_amount": 6506 }, { "authorization_id": "auth_UHtSahoOk1wVd8yacnJx_8", "amount": 6508, "status": "success", "error_code": null, "error_message": null, "previously_authorized_amount": 6507 }, { "authorization_id": "auth_IejW3q4wdP5LcRouVvGs_9", "amount": 6509, "status": "success", "error_code": null, "error_message": null, "previously_authorized_amount": 6508 }, { "authorization_id": "auth_sZNDStbUEPdqMMEZMlOV_10", "amount": 6510, "status": "success", "error_code": null, "error_message": null, "previously_authorized_amount": 6509 }, { "authorization_id": "auth_33dxNtWv6DiOdu3kGC4l_11", "amount": 6511, "status": "failure", "error_code": "No error code", "error_message": "The PaymentIntent has reached the maximum number of 10 allowed increments and cannot be incremented further.", "previously_authorized_amount": 6510 } ], "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-20T13:43:31.691Z", "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_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-20T13:29:27.355Z", "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 } ``` ## 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/payments_incremental_authorization.rs` **2. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/stripe.rs` **Code Patterns Applied:** - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 8d398c62: Files to modify: **crates/hyperswitch_connectors/src/connectors/stripe.rs** Modify existing code **crates/router/src/core/payments/operations/payments_incremental_authorization.rs** Modify existing code
{"pr_number": 9006, "pr_title": "fix(connector): [STRIPE] Populate Error Message in Incremental Authorization Flow", "merged_at": "2025-08-21T14:20:35Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/operations/payments_incremental_authorization.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/stripe.rs"]}, "change_types": {"conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [CYBERSOURCE] Add extra field for Cybersource MIT payment for acquirer CMCIC …IT payments ## Type of Change <!-- Put an `x` in the boxes that apply --> - [X] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description For acquirer CMCIC, Cybersource MIT payments needs the following field `paymentInformation.card.typeSelectionIndicator` This PR addresses the same ### 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>Create MIT for cards via cybersource</summary> **MIT curl** ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_jEdNDCtQGso72keWEtypBWmXAKaYNLmAcTTsutLbPwa8CY4p2I36w4wVkZziDTuK' \ --data-raw '{ "recurring_details": { "type": "payment_method_id", "data": "pm_TjN8SPmxPhH9HMUG1QRT" }, "authentication_type": "no_three_ds", "customer": { "id": "StripeCustomer", "email": "guest@example.com" }, "description": "This is the test payment made through Mule API", "currency": "USD", "amount": 126, "confirm": true, "capture_method": "automatic", "off_session": true, "metadata": { "businessUnit": "ZG_GL_Group", "country": "US", "clientId": "N/A", "productName": "Travel insurance", "orderReference": "order-040724-001" } }' ``` **Response** ``` {"payment_id":"pay_IwxJCwYyfgVs2dmuJEGV","merchant_id":"merchant_1756212829","status":"succeeded","amount":126,"net_amount":126,"shipping_cost":null,"amount_capturable":0,"amount_received":126,"connector":"cybersource","client_secret":"pay_IwxJCwYyfgVs2dmuJEGV_secret_vrVfkIHFXMHTjV15kPvX","created":"2025-09-03T13:03:09.431Z","currency":"USD","customer_id":"StripeCustomer","customer":{"id":"StripeCustomer","name":"John Doe","email":"guest@example.com","phone":"999999999","phone_country_code":"+1"},"description":"This is the test payment made through Mule API","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":"1091","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"400000","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"2025","card_holder_name":"Max Mustermann","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":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":"StripeCustomer","created_at":1756904589,"expires":1756908189,"secret":"epk_98623acc878f40c58dec97f2ccd8b2c9"},"manual_retry_allowed":false,"connector_transaction_id":"7569045896736796904805","frm_message":null,"metadata":{"country":"US","clientId":"N/A","productName":"Travel insurance","businessUnit":"ZG_GL_Group","orderReference":"order-040724-001"},"connector_metadata":null,"feature_metadata":{"redirect_response":null,"search_tags":null,"apple_pay_recurring_details":null,"gateway_system":"direct"},"reference_id":"pay_IwxJCwYyfgVs2dmuJEGV_1","payment_link":null,"profile_id":"pro_LDyaQED9dZ5fgu7cmTQ0","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_xal1vas6DVUdGb6LDbro","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-09-03T13:18:09.431Z","fingerprint":null,"browser_info":null,"payment_channel":null,"payment_method_id":"pm_TjN8SPmxPhH9HMUG1QRT","network_transaction_id":"123456789619999","payment_method_status":"active","updated":"2025-09-03T13:03:09.995Z","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":"3DE62376C727E833E063AF598E0A2728","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} ``` Screenshot of logs: `type_selection_indicator` is passed as 1 <img width="1721" height="252" alt="Screenshot 2025-09-03 at 6 32 25 PM" src="https://github.com/user-attachments/assets/8b2f4abb-80dd-415f-960e-413b0ecc7ebc" /> </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/cybersource/transformers.rs` **Code Patterns Applied:** - Define new data structures (1 changes) - Extend existing types with new fields (4 changes) **Detailed Identifier Changes:** Commit b45ddc9a: Files to modify: **crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs** Add: - struct: pub::MandateCard
{"pr_number": 9265, "pr_title": "fix(connector): [CYBERSOURCE] Add extra field for Cybersource MIT payment for acquirer CMCIC", "merged_at": "2025-09-07T14:39:12Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs"]}, "change_types": {"structs_added": 1, "fields_added": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}