prompt
stringlengths
83
247k
response
stringlengths
121
36.1k
metadata
stringlengths
314
42.3k
docs(openapi): improve `rust_locker_open_api_spec` ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [x] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Improved wording in the edit files. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide 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). --> Fixes #6321. ## 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)? --> Manually inspected the changed files. ## 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-v2/rust_locker_open_api_spec.yml` - `api-reference/rust_locker_open_api_spec.yml` **Code Patterns Applied:** - Extend existing types with new fields (6 changes)
{"pr_number": 6322, "pr_title": "docs(openapi): improve `rust_locker_open_api_spec`", "merged_at": "2024-10-24T13:31:41Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"config": ["api-reference-v2/rust_locker_open_api_spec.yml", "api-reference/rust_locker_open_api_spec.yml"]}, "change_types": {"fields_added": 6}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(connector): [facilitapay] cpf is a required 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 --> This PR fixes the required fields error in SDK. ### 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). --> SDK throws `Missing Required Param: cpf`. Closes https://github.com/juspay/hyperswitch/issues/8275 ## 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)? --> CPF now gets populated: ```curl curl --location 'http://localhost:8080/account/payment_methods?client_secret=pay_1iYxKKzKMLFXthlD6iAO_secret_i2gpOEtZadPHnlUpKR1Z' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_9caa65826ff740e78fcf292b7d96f31f' ``` ```json { "redirect_url": "https://duck.com/", "currency": "BRL", "payment_methods": [ { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ { "card_network": "Interac", "surcharge_details": null, "eligible_connectors": [ "facilitapay" ] }, { "card_network": "Discover", "surcharge_details": null, "eligible_connectors": [ "facilitapay" ] }, { "card_network": "AmericanExpress", "surcharge_details": null, "eligible_connectors": [ "facilitapay" ] }, { "card_network": "JCB", "surcharge_details": null, "eligible_connectors": [ "facilitapay" ] }, { "card_network": "Visa", "surcharge_details": null, "eligible_connectors": [ "facilitapay" ] }, { "card_network": "DinersClub", "surcharge_details": null, "eligible_connectors": [ "facilitapay" ] }, { "card_network": "Mastercard", "surcharge_details": null, "eligible_connectors": [ "facilitapay" ] }, { "card_network": "UnionPay", "surcharge_details": null, "eligible_connectors": [ "facilitapay" ] }, { "card_network": "RuPay", "surcharge_details": null, "eligible_connectors": [ "facilitapay" ] } ], "bank_names": null, "bank_debits": null, "bank_transfers": null, "required_fields": null, "surcharge_details": null, "pm_auth_connector": null }, { "payment_method_type": "debit", "payment_experience": null, "card_networks": [ { "card_network": "AmericanExpress", "surcharge_details": null, "eligible_connectors": [ "facilitapay" ] }, { "card_network": "Interac", "surcharge_details": null, "eligible_connectors": [ "facilitapay" ] }, { "card_network": "JCB", "surcharge_details": null, "eligible_connectors": [ "facilitapay" ] }, { "card_network": "Visa", "surcharge_details": null, "eligible_connectors": [ "facilitapay" ] }, { "card_network": "Discover", "surcharge_details": null, "eligible_connectors": [ "facilitapay" ] }, { "card_network": "Mastercard", "surcharge_details": null, "eligible_connectors": [ "facilitapay" ] }, { "card_network": "UnionPay", "surcharge_details": null, "eligible_connectors": [ "facilitapay" ] }, { "card_network": "DinersClub", "surcharge_details": null, "eligible_connectors": [ "facilitapay" ] }, { "card_network": "RuPay", "surcharge_details": null, "eligible_connectors": [ "facilitapay" ] } ], "bank_names": null, "bank_debits": null, "bank_transfers": null, "required_fields": null, "surcharge_details": null, "pm_auth_connector": null } ] }, { "payment_method": "bank_transfer", "payment_method_types": [ { "payment_method_type": "pix", "payment_experience": null, "card_networks": null, "bank_names": null, "bank_debits": null, "bank_transfers": { "eligible_connectors": [ "facilitapay" ] }, "required_fields": { "billing.address.country": { "required_field": "payment_method_data.billing.address.country", "display_name": "country", "field_type": { "user_address_country": { "options": [ "BR" ] } }, "value": "BR" }, "payment_method_data.bank_transfer.pix.source_bank_account_id": { "required_field": "payment_method_data.bank_transfer.pix.source_bank_account_id", "display_name": "source_bank_account_id", "field_type": "user_source_bank_account_id", "value": null }, "payment_method_data.bank_transfer.pix.destination_bank_account_id": { "required_field": "payment_method_data.bank_transfer.pix.destination_bank_account_id", "display_name": "destination_bank_account_id", "field_type": "user_destination_bank_account_id", "value": null }, "payment_method_data.bank_transfer.pix.cpf": { "required_field": "payment_method_data.bank_transfer.pix.cpf", "display_name": "cpf", "field_type": "user_cpf", "value": null }, "billing.address.last_name": { "required_field": "payment_method_data.billing.address.last_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": "THE" }, "billing.address.first_name": { "required_field": "payment_method_data.billing.address.first_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": "PiX" } }, "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 `just clippy && just clippy_v2` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/payment_methods/src/configs/payment_connector_required_fields.rs` **Detailed Identifier Changes:** Commit 65acf598: Files to modify: **crates/payment_methods/src/configs/payment_connector_required_fields.rs** Modify existing code
{"pr_number": 8274, "pr_title": "fix(connector): [facilitapay] cpf is a required field", "merged_at": "2025-06-06T12:30:50Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"connectors": ["crates/payment_methods/src/configs/payment_connector_required_fields.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(events): adding infra level components to api-events ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> main PR https://github.com/juspay/hyperswitch/pull/8214 Adding infra level information to `ApiEvent` based on config from deployment config under `infra_values` ### 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` --> ```bash [infra_values] cluster = "CLUSTER" # value of CLUSTER from deployment version = "HOSTNAME" # value of HOSTNAME from deployment which tells its version ``` ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> This is required for comparing events generation and their status code for comparing success rate of 2 different versions of router ## 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="985" alt="Screenshot 2025-06-03 at 11 18 29 AM" src="https://github.com/user-attachments/assets/8cc863c5-f948-4232-969f-7a6d44be1dac" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/webhooks/incoming.rs` - `crates/router/src/core/webhooks/incoming_v2.rs` **2. Configuration Files** - `config/config.example.toml` - `config/development.toml` - `config/docker_compose.toml` - ... and 2 more files **3. Other** - `crates/router/src/events/api_logs.rs` - `crates/router/src/routes/app.rs` - `crates/router/src/services/api.rs` **Code Patterns Applied:** - Implement new functions (1 changes) - Extend existing types with new fields (9 changes) - Add conditional logic for feature flags or filtering (1 changes) - Modify database queries (1 changes) **Detailed Identifier Changes:** Commit dd89c37d: Files to modify: **crates/router/src/configs/secrets_transformers.rs** Modify existing code **crates/router/src/configs/settings.rs** Modify existing code **crates/router/src/core/webhooks/incoming.rs** Modify existing code **crates/router/src/core/webhooks/incoming_v2.rs** Modify existing code **crates/router/src/events/api_logs.rs** Modify existing code **crates/router/src/routes/app.rs** Add: - function: pub::process_env_mappings **crates/router/src/services/api.rs** Modify existing code
{"pr_number": 8258, "pr_title": "feat(events): adding infra level components to api-events", "merged_at": "2025-06-05T08:34:11Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"core_business": ["crates/router/src/core/webhooks/incoming.rs", "crates/router/src/core/webhooks/incoming_v2.rs"], "config": ["config/config.example.toml", "config/development.toml", "config/docker_compose.toml", "crates/router/src/configs/secrets_transformers.rs", "crates/router/src/configs/settings.rs"], "other": ["crates/router/src/events/api_logs.rs", "crates/router/src/routes/app.rs", "crates/router/src/services/api.rs"]}, "change_types": {"functions_added": 1, "fields_added": 9, "conditionals_added": 1, "database_queries": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connectors): [Nexixpay] MIT & order_id fix ## 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 --> Use same order_id or max length 18 for all payment calls associated with an merchant order. We need to store connector_metadata in case of MIT payments also so that MIT payments can be manually captured or cancelled later. ### 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 for testing with response: Payments create: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_n5vnntb0V5gRjNMdwTnPXweumExJV6vYon3lVNzW2BoA3F4S4V0PXDHK3lW7gWHh' \ --data-raw '{ "amount": 3545, "currency": "EUR", "profile_id":"pro_QEwjCvFhpcLC2azRNZEf", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4111 1111 1111 1111", "card_exp_month": "03", "card_exp_year": "30", "card_cvc": "737" } }, "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "three_ds", "setup_future_usage": "off_session", "customer": { "id": "customerssh", "name": "John Doe", "email": "customerssh@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "phone_country_code": "+1", "description": "Its my first payment request", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "country": "BR", "zip": "94122", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "BR", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "guest@example.com" }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "order_details": [ { "product_name": "Apple iphone 15", "quantity": 1, "amount": 3545, "account_name": "transaction_processing" } ], "browser_info": { "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "128.0.0.1" }, "customer_acceptance": { "acceptance_type": "online", "accepted_at":"1963-05-03T04:07:52.723Z", "online": { "ip_address":"127.0.0.1", "user_agent": "amet irure esse" } }, "connector_metadata": { "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_cfn9IZqdJU58r5Hc5A8T","merchant_id":"merchant_1759144749","status":"requires_customer_action","amount":3545,"net_amount":3545,"shipping_cost":null,"amount_capturable":3545,"amount_received":null,"connector":"nexixpay","client_secret":"pay_cfn9IZqdJU58r5Hc5A8T_secret_SXeMcpBgyEL2zoVijZ9E","created":"2025-10-01T12:45:53.600Z","currency":"EUR","customer_id":"customerssh","customer":{"id":"customerssh","name":"John Doe","email":"customerssh@gmail.com","phone":"9999999999","phone_country_code":"+1"},"description":"Its my first payment request","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":"off_session","off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"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":"30","card_holder_name":null,"payment_checks":null,"authentication_data":null},"billing":null},"payment_token":"token_nVp5RBRCLCFnQQH82Y5F","shipping":{"address":{"city":"San Fransico","country":"BR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":"guest@example.com"},"billing":{"address":{"city":"San Fransico","country":"BR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":"guest@example.com"},"order_details":[{"sku":null,"upc":null,"brand":null,"amount":3545,"category":null,"quantity":1,"tax_rate":null,"product_id":null,"description":null,"product_name":"Apple iphone 15","product_type":null,"sub_category":null,"total_amount":null,"commodity_code":null,"unit_of_measure":null,"product_img_link":null,"product_tax_code":null,"total_tax_amount":null,"requires_shipping":null,"unit_discount_amount":null}],"email":"customerssh@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_cfn9IZqdJU58r5Hc5A8T/merchant_1759144749/pay_cfn9IZqdJU58r5Hc5A8T_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":"customerssh","created_at":1759322753,"expires":1759326353,"secret":"epk_dfc71e93bf654eaabccbfcbcf83fa3e0"},"manual_retry_allowed":null,"connector_transaction_id":"pay_cfn9IZqdJU58r5","frm_message":null,"metadata":null,"connector_metadata":{"apple_pay":null,"airwallex":null,"noon":{"order_category":"pay"},"braintree":null,"adyen":null},"feature_metadata":{"redirect_response":null,"search_tags":null,"apple_pay_recurring_details":null,"gateway_system":"direct"},"reference_id":"pay_cfn9IZqdJU58r5","payment_link":null,"profile_id":"pro_QEwjCvFhpcLC2azRNZEf","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_lJPT4aN2CbXmgSAFDmCT","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-10-01T13:00:53.600Z","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":"pm_AHMtQP8Qp9y1L8wy2hNi","network_transaction_id":null,"payment_method_status":"inactive","updated":"2025-10-01T12:45:56.426Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"request_extended_authorization":null,"capture_before":null,"merchant_order_reference_id":"test_ord","order_tax_amount":null,"connector_mandate_id":"qAhdJaa3HvEeMxexwg","card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null,"enable_partial_authorization":null,"enable_overcapture":null,"is_overcapture_enabled":null,"network_details":null} ``` Payments retrieve Response: ``` {"payment_id":"pay_cfn9IZqdJU58r5Hc5A8T","merchant_id":"merchant_1759144749","status":"succeeded","amount":3545,"net_amount":3545,"shipping_cost":null,"amount_capturable":0,"amount_received":3545,"connector":"nexixpay","client_secret":"pay_cfn9IZqdJU58r5Hc5A8T_secret_SXeMcpBgyEL2zoVijZ9E","created":"2025-10-01T12:45:53.600Z","currency":"EUR","customer_id":"customerssh","customer":{"id":"customerssh","name":"John Doe","email":"customerssh@gmail.com","phone":"9999999999","phone_country_code":"+1"},"description":"Its my first payment request","refunds":null,"disputes":null,"attempts":[{"attempt_id":"pay_cfn9IZqdJU58r5Hc5A8T_1","status":"charged","amount":3545,"order_tax_amount":null,"currency":"EUR","connector":"nexixpay","error_message":null,"payment_method":"card","connector_transaction_id":"pay_cfn9IZqdJU58r5","capture_method":"automatic","authentication_type":"three_ds","created_at":"2025-10-01T12:45:53.601Z","modified_at":"2025-10-01T12:46:51.867Z","cancellation_reason":null,"mandate_id":null,"error_code":null,"payment_token":"token_nVp5RBRCLCFnQQH82Y5F","connector_metadata":{"psyncFlow":"Authorize","cancelOperationId":null,"threeDSAuthResult":{"authenticationValue":"AAkBBzglVwAAAA3Zl4J0dQAAAAA="},"captureOperationId":"804610282286352749","threeDSAuthResponse":"notneeded","authorizationOperationId":"804610282286352749"},"payment_experience":null,"payment_method_type":"credit","reference_id":"pay_cfn9IZqdJU58r5","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":"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":"30","card_holder_name":null,"payment_checks":null,"authentication_data":null},"billing":null},"payment_token":"token_nVp5RBRCLCFnQQH82Y5F","shipping":{"address":{"city":"San Fransico","country":"BR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":"guest@example.com"},"billing":{"address":{"city":"San Fransico","country":"BR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":"guest@example.com"},"order_details":[{"sku":null,"upc":null,"brand":null,"amount":3545,"category":null,"quantity":1,"tax_rate":null,"product_id":null,"description":null,"product_name":"Apple iphone 15","product_type":null,"sub_category":null,"total_amount":null,"commodity_code":null,"unit_of_measure":null,"product_img_link":null,"product_tax_code":null,"total_tax_amount":null,"requires_shipping":null,"unit_discount_amount":null}],"email":"customerssh@gmail.com","name":"John Doe","phone":"9999999999","return_url":"https://google.com/","authentication_type":"three_ds","statement_descriptor_name":"joseph","statement_descriptor_suffix":"JS","next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":null,"connector_transaction_id":"pay_cfn9IZqdJU58r5","frm_message":null,"metadata":null,"connector_metadata":{"apple_pay":null,"airwallex":null,"noon":{"order_category":"pay"},"braintree":null,"adyen":null},"feature_metadata":{"redirect_response":null,"search_tags":null,"apple_pay_recurring_details":null,"gateway_system":"direct"},"reference_id":"pay_cfn9IZqdJU58r5","payment_link":null,"profile_id":"pro_QEwjCvFhpcLC2azRNZEf","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_lJPT4aN2CbXmgSAFDmCT","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-10-01T13:00:53.600Z","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":"pm_AHMtQP8Qp9y1L8wy2hNi","network_transaction_id":null,"payment_method_status":"active","updated":"2025-10-01T12:46:51.868Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"request_extended_authorization":null,"capture_before":null,"merchant_order_reference_id":"test_ord","order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null,"enable_partial_authorization":null,"enable_overcapture":null,"is_overcapture_enabled":null,"network_details":null} ``` MIT call: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_n5vnntb0V5gRjNMdwTnPXweumExJV6vYon3lVNzW2BoA3F4S4V0PXDHK3lW7gWHh' \ --data '{ "amount": 3545, "currency": "EUR", "confirm": true, "customer_id": "customerssh", "capture_method": "manual", "recurring_details": { "type": "payment_method_id", "data": "pm_AHMtQP8Qp9y1L8wy2hNi" }, "off_session": true }' ``` Response: ``` {"payment_id":"pay_qBDBW4zQXKiwHnhTRX0Q","merchant_id":"merchant_1759144749","status":"requires_capture","amount":3545,"net_amount":3545,"shipping_cost":null,"amount_capturable":3545,"amount_received":null,"connector":"nexixpay","client_secret":"pay_qBDBW4zQXKiwHnhTRX0Q_secret_yvNWTrkL2gCyNEJGNa29","created":"2025-10-01T12:49:57.717Z","currency":"EUR","customer_id":"customerssh","customer":{"id":"customerssh","name":"John Doe","email":"customerssh@gmail.com","phone":"9999999999","phone_country_code":"+1"},"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":"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":"30","card_holder_name":"joseph Doe","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":"customerssh@gmail.com","name":"John Doe","phone":"9999999999","return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"customerssh","created_at":1759322997,"expires":1759326597,"secret":"epk_f372c1555499482683008ee1d2de5fe9"},"manual_retry_allowed":null,"connector_transaction_id":"pay_qBDBW4zQXKiwHn","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_qBDBW4zQXKiwHn","payment_link":null,"profile_id":"pro_QEwjCvFhpcLC2azRNZEf","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_lJPT4aN2CbXmgSAFDmCT","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-10-01T13:04:57.717Z","fingerprint":null,"browser_info":null,"payment_channel":null,"payment_method_id":"pm_AHMtQP8Qp9y1L8wy2hNi","network_transaction_id":null,"payment_method_status":"active","updated":"2025-10-01T12:49:59.679Z","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":"qAhdJaa3HvEeMxexwg","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} ``` Cancel Call: ``` curl --location 'http://localhost:8080/payments/pay_qBDBW4zQXKiwHnhTRX0Q/cancel' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_n5vnntb0V5gRjNMdwTnPXweumExJV6vYon3lVNzW2BoA3F4S4V0PXDHK3lW7gWHh' \ --data '{ "cancellation_reason": "requested_by_customer" }' ``` Response: ``` {"payment_id":"pay_qBDBW4zQXKiwHnhTRX0Q","merchant_id":"merchant_1759144749","status":"processing","amount":3545,"net_amount":3545,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"nexixpay","client_secret":"pay_qBDBW4zQXKiwHnhTRX0Q_secret_yvNWTrkL2gCyNEJGNa29","created":"2025-10-01T12:49:57.717Z","currency":"EUR","customer_id":"customerssh","customer":{"id":"customerssh","name":"John Doe","email":"customerssh@gmail.com","phone":"9999999999","phone_country_code":"+1"},"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":"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":"30","card_holder_name":"joseph Doe","payment_checks":null,"authentication_data":null},"billing":{"address":{"city":"San Fransico","country":"BR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":"guest@example.com"}},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":"customerssh@gmail.com","name":"John Doe","phone":"9999999999","return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":"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":null,"connector_transaction_id":"pay_qBDBW4zQXKiwHn","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_qBDBW4zQXKiwHn","payment_link":null,"profile_id":"pro_QEwjCvFhpcLC2azRNZEf","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_lJPT4aN2CbXmgSAFDmCT","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-10-01T13:04:57.717Z","fingerprint":null,"browser_info":null,"payment_channel":null,"payment_method_id":"pm_AHMtQP8Qp9y1L8wy2hNi","network_transaction_id":null,"payment_method_status":null,"updated":"2025-10-01T12:51:38.055Z","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} ``` Payments retrieve Response: ``` {"payment_id":"pay_qBDBW4zQXKiwHnhTRX0Q","merchant_id":"merchant_1759144749","status":"cancelled","amount":3545,"net_amount":3545,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"nexixpay","client_secret":"pay_qBDBW4zQXKiwHnhTRX0Q_secret_yvNWTrkL2gCyNEJGNa29","created":"2025-10-01T12:49:57.717Z","currency":"EUR","customer_id":"customerssh","customer":{"id":"customerssh","name":"John Doe","email":"customerssh@gmail.com","phone":"9999999999","phone_country_code":"+1"},"description":null,"refunds":null,"disputes":null,"attempts":[{"attempt_id":"pay_qBDBW4zQXKiwHnhTRX0Q_1","status":"pending","amount":3545,"order_tax_amount":null,"currency":"EUR","connector":"nexixpay","error_message":null,"payment_method":"card","connector_transaction_id":"pay_qBDBW4zQXKiwHn","capture_method":"manual","authentication_type":"no_three_ds","created_at":"2025-10-01T12:49:57.717Z","modified_at":"2025-10-01T12:51:38.055Z","cancellation_reason":"requested_by_customer","mandate_id":null,"error_code":null,"payment_token":null,"connector_metadata":{"psyncFlow":"Cancel","cancelOperationId":"6dc6af6b-37b9-4aa6-8bf1-0d52ae064e8d","threeDSAuthResult":null,"captureOperationId":null,"threeDSAuthResponse":null,"authorizationOperationId":"486536903848752749"},"payment_experience":null,"payment_method_type":"credit","reference_id":"pay_qBDBW4zQXKiwHn","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":"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":"03","card_exp_year":"30","card_holder_name":"joseph Doe","payment_checks":null,"authentication_data":null},"billing":{"address":{"city":"San Fransico","country":"BR","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":"guest@example.com"}},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":"customerssh@gmail.com","name":"John Doe","phone":"9999999999","return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":"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":null,"connector_transaction_id":"pay_qBDBW4zQXKiwHn","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_qBDBW4zQXKiwHn","payment_link":null,"profile_id":"pro_QEwjCvFhpcLC2azRNZEf","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_lJPT4aN2CbXmgSAFDmCT","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-10-01T13:04:57.717Z","fingerprint":null,"browser_info":null,"payment_channel":null,"payment_method_id":"pm_AHMtQP8Qp9y1L8wy2hNi","network_transaction_id":null,"payment_method_status":"active","updated":"2025-10-01T12:52:35.250Z","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":"CEivq9z9Q2r87ktZQG","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} ``` Authorize call <img width="1728" height="474" alt="image" src="https://github.com/user-attachments/assets/f58993b2-549f-4d70-9230-03dd03895b3c" /> Complete authorize call: <img width="1728" height="474" alt="image" src="https://github.com/user-attachments/assets/c9245cf3-1714-4b6a-8bca-c836c819f821" /> ## 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/nexixpay/transformers.rs` **Code Patterns Applied:** - Implement new functions (1 changes) - Extend existing types with new fields (10 changes) - Add conditional logic for feature flags or filtering (3 changes) **Detailed Identifier Changes:** Commit cc4eaed5: Files to modify: **crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs** Remove: - function: private::get_random_string Add: - function: private::get_nexi_order_id
{"pr_number": 9644, "pr_title": "fix(connectors): [Nexixpay] MIT & order_id fix", "merged_at": "2025-10-07T07:49:15Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/nexixpay/transformers.rs"]}, "change_types": {"functions_added": 1, "fields_added": 10, "conditionals_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): Add support for get plans for Chargebee ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR adds support for the get plans endpoint for Chargebee ### 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 #9053 ## 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)? --> Since the API handler is being implemented in a separate PR, this connector integration code cannot be called directly and was tested only by successful compilation of code <img width="2105" height="587" alt="image" src="https://github.com/user-attachments/assets/3fa654b2-c486-4ede-8938-f02c046e0257" /> <img width="858" height="454" alt="image" src="https://github.com/user-attachments/assets/0c179871-9cca-4498-a4f8-0505c97b6baa" /> <img width="1115" height="536" alt="image" src="https://github.com/user-attachments/assets/0a930b66-d88c-4bfb-9779-59d24e04d0ec" /> ## 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_data_v2/flow_common_types.rs` - `crates/hyperswitch_domain_models/src/router_flow_types.rs` - `crates/hyperswitch_domain_models/src/router_flow_types/subscriptions.rs` - ... and 5 more files **2. Core Business Logic** - `crates/router/src/core/connector_validation.rs` **3. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/chargebee.rs` - `crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/recurly.rs` - ... and 3 more files **4. Type Definitions** - `crates/hyperswitch_interfaces/src/types.rs` **5. Other** - `crates/hyperswitch_interfaces/src/api.rs` - `crates/hyperswitch_interfaces/src/api/subscriptions.rs` - `crates/hyperswitch_interfaces/src/api/subscriptions_v2.rs` - ... and 2 more files **Code Patterns Applied:** - Define new data structures (8 changes) - Implement new functions (10 changes) - Extend existing types with new fields (47 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit f3ab3d63: Files to modify: **crates/hyperswitch_connectors/src/connectors/chargebee.rs** Add: - function: private::get_chargebee_plans_query_params - function: private::get_headers - function: private::get_url - function: private::get_content_type - function: private::build_request - function: private::handle_response - function: private::get_error_response - impl: impl api::subscriptions::Subscriptions for Chargebee - impl: impl api::subscriptions::GetSubscriptionPlansFlow for Chargebee - impl: impl ConnectorIntegration< GetSubscriptionPlans, GetSubscriptionPlansRequest, GetSubscriptionPlansResponse, > for Chargebee - impl: impl GetSubscriptionPlansV2 for Chargebee - impl: impl ConnectorIntegrationV2< GetSubscriptionPlans, hyperswitch_domain_models::router_data_v2::flow_common_types::GetSubscriptionPlansData, GetSubscriptionPlansRequest, GetSubscriptionPlansResponse, > for Chargebee **crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs** Add: - function: private::try_from - struct: pub::ChargebeeListPlansResponse - struct: pub::ChargebeeItemList - struct: pub::ChargebeeItem - impl: impl TryFrom<ResponseRouterData<F, ChargebeeListPlansResponse, T, GetSubscriptionPlansResponse>> for RouterData<F, T, GetSubscriptionPlansResponse> **crates/hyperswitch_connectors/src/connectors/recurly.rs** Add: - impl: impl api::subscriptions_v2::SubscriptionsV2 for Recurly - impl: impl api::subscriptions_v2::GetSubscriptionPlansV2 for Recurly - impl: impl ConnectorIntegrationV2< GetSubscriptionPlans, GetSubscriptionPlansData, GetSubscriptionPlansRequest, GetSubscriptionPlansResponse, > for Recurly **crates/hyperswitch_connectors/src/constants.rs** Modify existing code **crates/hyperswitch_connectors/src/default_implementations.rs** Add: - impl: impl GetSubscriptionPlansFlow for connectors::DummyConnector<T> - impl: impl ConnectorIntegration< GetSubscriptionPlans, GetSubscriptionPlansRequest, GetSubscriptionPlansResponse, > for connectors::DummyConnector<T> - impl: impl Subscriptions for connectors::DummyConnector<T> **crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs** Add: - struct: pub::GetSubscriptionPlansData **crates/hyperswitch_domain_models/src/router_flow_types.rs** Add: - mod: pub::subscriptions **crates/hyperswitch_domain_models/src/router_flow_types/subscriptions.rs** Add: - struct: pub::GetSubscriptionPlans **crates/hyperswitch_domain_models/src/router_request_types.rs** Add: - mod: pub::subscriptions **crates/hyperswitch_domain_models/src/router_request_types/subscriptions.rs** Add: - struct: pub::GetSubscriptionPlansRequest **crates/hyperswitch_domain_models/src/router_response_types.rs** Add: - mod: pub::subscriptions **crates/hyperswitch_domain_models/src/router_response_types/subscriptions.rs** Add: - struct: pub::GetSubscriptionPlansResponse - struct: pub::SubscriptionPlans **crates/hyperswitch_domain_models/src/types.rs** Modify existing code **crates/hyperswitch_interfaces/src/api.rs** Add: - mod: pub::subscriptions - mod: pub::subscriptions_v2 **crates/hyperswitch_interfaces/src/api/subscriptions.rs** Add: - trait: pub::GetSubscriptionPlansFlow - trait: pub::Subscriptions - trait: pub::Subscriptions - trait: pub::GetSubscriptionPlansFlow **crates/hyperswitch_interfaces/src/api/subscriptions_v2.rs** Add: - trait: pub::SubscriptionsV2 - trait: pub::GetSubscriptionPlansV2 **crates/hyperswitch_interfaces/src/connector_integration_v2.rs** Modify existing code **crates/hyperswitch_interfaces/src/conversion_impls.rs** Add: - function: private::from_old_router_data - function: private::to_old_router_data - impl: impl RouterDataConversion<T, Req, Resp> for GetSubscriptionPlansData **crates/hyperswitch_interfaces/src/types.rs** Modify existing code **crates/router/src/core/connector_validation.rs** Modify existing code **crates/router/src/services/api.rs** Modify existing code
{"pr_number": 9281, "pr_title": "feat(connector): Add support for get plans for Chargebee", "merged_at": "2025-09-16T12:57:45Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user", "connector"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs", "crates/hyperswitch_domain_models/src/router_flow_types.rs", "crates/hyperswitch_domain_models/src/router_flow_types/subscriptions.rs", "crates/hyperswitch_domain_models/src/router_request_types.rs", "crates/hyperswitch_domain_models/src/router_request_types/subscriptions.rs", "crates/hyperswitch_domain_models/src/router_response_types.rs", "crates/hyperswitch_domain_models/src/router_response_types/subscriptions.rs", "crates/hyperswitch_domain_models/src/types.rs"], "core_business": ["crates/router/src/core/connector_validation.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/chargebee.rs", "crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs", "crates/hyperswitch_connectors/src/connectors/recurly.rs", "crates/hyperswitch_connectors/src/constants.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/hyperswitch_interfaces/src/connector_integration_v2.rs"], "types": ["crates/hyperswitch_interfaces/src/types.rs"], "other": ["crates/hyperswitch_interfaces/src/api.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/services/api.rs"]}, "change_types": {"structs_added": 8, "functions_added": 10, "fields_added": 47, "imports_added": 5, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore: bump cypress to `v14.0.0` ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [x] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> closes #7103 - video recording - video recording gets around the race condition that resulted in parallel tests to fail when a payment failed at the same time - connector specific recording - store only failed payment recording - version bump - cypress to `v14.0.0` (changelog: https://docs.cypress.io/app/references/changelog) - this is a major change. explained below*. - eslint to `v9.19.0` - fix multiple credential wrongly picking `connector_1` for trustpay resulting in `refund` test to fail. logic is as follows: - `determineConnectorConfig` is where the problem existed - we have 2 objects and 5 values - connector credential takes in 3 values -- either next connector (boolean) or value with or without spec name - if connector credential is null or it does not exist, default to `connector_1` - if connector credential has `next connector` boolean set to `true`, check if multiple connector status is `true` and count is greater than `1`. if `true`, return `connector_2`, else default to using `connector_1` - if connector credential has spec name with value, return value only for that spec name (this will affect config only in that respective `spec`), else, just return value that affects the config in every flow - add security headers - cypress v14 specific changes* - use camelCase in redirection flow - sub domains will now require us to be passed within `cy.origin()` effectively making it impossible to work with redirection tests without below mentioned changes - once the url is visited, wait until redirection is completed (wait until domain is changed to connector's domain) - use `cy.url()` to get redirected url (connector's url), which is a promise and it cannot be accessed outside of that promise, and is then passed to `cy.origin()` that enables us to interact with the ui elements - in verify url function, wait until redirection is completed and we're back to `hyperswitch.io` website by verifying the host - once, on the returned url, access the present url (returned url) with `cy.url` which is then passed to `cy.origin()` so that we can access the elements just so that we can verify that there's no errors like `4xx` - access the url and then verify the terminal payment status - bug fixes - fix przelwey24 and eps bank redirect in adyen - fix upi in adyen - uncaught exception resulting in abrupt failure in adyen tests (happens only in ui) ```js __all:1 Uncaught (in promise) Event {isTrusted: true, Symbol(ERR_PREPARED_FOR_SERIALIZATION): true, type: 'error', target: null, currentTarget: null, …} isTrusted: true Symbol(ERR_PREPARED_FOR_SERIALIZATION): true bubbles: false cancelBubble: false cancelable: false composed: false currentTarget: null defaultPrevented: false eventPhase: 0 returnValue: true srcElement: null target: null timeStamp: 298220.2000000002 type: "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). --> just keeping up-to-date. ## 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. especially the redirections. ![image](https://github.com/user-attachments/assets/ffa781f0-99a9-481c-8ee4-8fc7b2767106) ## 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. Utils** - `cypress-tests/cypress/utils/featureFlags.js` **2. Tests** - `cypress-tests/cypress.config.js` - `cypress-tests/cypress/e2e/configs/Payment/Nmi.js` - `cypress-tests/cypress/e2e/configs/Payment/Stripe.js` - ... and 6 more files **Code Patterns Applied:** - Extend existing types with new fields (48 changes) - Add conditional logic for feature flags or filtering (17 changes) - Modify database queries (3 changes)
{"pr_number": 7102, "pr_title": "chore: bump cypress to `v14.0.0`", "merged_at": "2025-02-03T13:52:14Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "refund"]}, "hierarchy": {"utils": ["cypress-tests/cypress/utils/featureFlags.js"], "tests": ["cypress-tests/cypress.config.js", "cypress-tests/cypress/e2e/configs/Payment/Nmi.js", "cypress-tests/cypress/e2e/configs/Payment/Stripe.js", "cypress-tests/cypress/e2e/configs/Payment/Utils.js", "cypress-tests/cypress/support/commands.js", "cypress-tests/cypress/support/e2e.js", "cypress-tests/cypress/support/redirectionHandler.js", "cypress-tests/package-lock.json", "cypress-tests/package.json"]}, "change_types": {"fields_added": 48, "conditionals_added": 17, "database_queries": 3}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(ucs): add gateway system {Direct | UnifiedConnectorSystem} in feature metadata for v1 ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates ## Description This change adds gateway system tracking in the feature metadata to enable routing stickiness and improve payment flow routing decisions. The implementation includes: - Adding a new `GatewaySystem` enum to track whether payments are processed through Direct routing (hyperswitch) or Unified Connector Service (UCS) - Storing the gateway system information in payment intent's feature metadata for routing stickiness - Implementing routing logic that considers previous gateway system usage when making routing decisions - Adding comprehensive logging for payment routing decisions for better observability - Updating all payment update operations to preserve feature metadata consistency ### Additional Changes - [x] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context Previously, payment routing decisions between Direct routing and UCS were made independently for each payment operation, which could lead to inconsistent routing for the same payment intent across different operations (confirm, capture, sync, etc.). This lack of stickiness could cause issues with: 1. Payment state consistency across different operations 2. Potential routing conflicts when different operations use different gateway systems 3. Difficulty in tracking and debugging payment flows that span multiple operations This change ensures that once a payment intent is routed through a specific gateway system (Direct or UCS), all subsequent operations for that payment maintain the same routing decision. ## How did you test it? - Tested payment creation, confirmation, and sync operations with both Direct and UCS routing - Verified that routing decisions are properly logged and persisted in feature metadata - Confirmed that stickiness logic correctly routes subsequent operations through the same gateway system - Tested error scenarios to ensure graceful fallback when metadata is corrupted or missing ##### Authorize ```bash curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: ***************' \ --data-raw '{ "amount": 1000, "currency": "INR", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 1000, "customer_id": "Uzzu54523", "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://google.com", "payment_method": "upi", "payment_method_type": "upi_collect", "payment_method_data": { "upi": { "upi_collect": { "vpa_id": "success@razorpay" } }, "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" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "46282", "country": "IN", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "swangi.kumari@juspay.in" }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "46282", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "swangi.kumari@juspay.in" }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "all_keys_required": true }' ``` ```json { "payment_id": "pay_1NzPXUQFRkXlvHOIW3Jq", "merchant_id": "merchant_1754554769", "status": "requires_customer_action", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 1000, "amount_received": null, "connector": "razorpay", "client_secret": "pay_1NzPXUQFRkXlvHOIW3Jq_secret_bhXTPfgXbwB11rmrC0DR", "created": "2025-08-08T10:58:58.767Z", "currency": "INR", "customer_id": "Uzzu54523", "customer": { "id": "Uzzu54523", "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": "upi", "payment_method_data": { "upi": { "upi_collect": { "vpa_id": "su*****@razorpay" } }, "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", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "swangi.kumari@juspay.in" } }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "46282", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "swangi.kumari@juspay.in" }, "billing": { "address": { "city": "San Fransico", "country": "IN", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "46282", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "swangi.kumari@juspay.in" }, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "upi_collect", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "Uzzu54523", "created_at": 1754650738, "expires": 1754654338, "secret": "epk_7a28f568d1834cf983b36bc50e45970f" }, "manual_retry_allowed": null, "connector_transaction_id": "pay_R2odTWpZA226ue", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "order_R2odSokuwuMexQ", "payment_link": null, "profile_id": "pro_NkNnZmnjCEuoOKyqoev5", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_JtzW87JrlcfmX6fssydo", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-08T11:13:58.767Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-08T10:59:02.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": 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": "{\"razorpay_payment_id\":\"pay_R2odTWpZA226ue\"}", "enable_partial_authorization": null } ``` ##### Psync ```bash curl --location 'http://localhost:8080/payments/pay_1NzPXUQFRkXlvHOIW3Jq?force_sync=true&expand_captures=true&expand_attempts=true' \ --header 'Accept: application/json' \ --header 'api-key: *****************************' ``` ```json { "payment_id": "pay_4dezIe3S2nraarfCsnly", "merchant_id": "merchant_1754554769", "status": "succeeded", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 1000, "connector": "razorpay", "client_secret": "pay_4dezIe3S2nraarfCsnly_secret_fPafwmfIQcGWTr96zQtm", "created": "2025-08-07T11:07:00.954Z", "currency": "INR", "customer_id": "Uzzu54523", "customer": { "id": "Uzzu54523", "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_4dezIe3S2nraarfCsnly_1", "status": "authentication_pending", "amount": 1000, "order_tax_amount": null, "currency": "INR", "connector": "razorpay", "error_message": null, "payment_method": "upi", "connector_transaction_id": "pay_R2QErM6QamRIFx", "capture_method": "automatic", "authentication_type": "no_three_ds", "created_at": "2025-08-07T11:07:00.954Z", "modified_at": "2025-08-07T11:07:05.271Z", "cancellation_reason": null, "mandate_id": null, "error_code": null, "payment_token": null, "connector_metadata": null, "payment_experience": null, "payment_method_type": "upi_collect", "reference_id": "order_R2QEqgtrS7lSPD", "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": "upi", "payment_method_data": { "upi": { "upi_collect": { "vpa_id": "su*****@razorpay" } }, "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", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "swangi.kumari@juspay.in" } }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "46282", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "swangi.kumari@juspay.in" }, "billing": { "address": { "city": "San Fransico", "country": "IN", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "46282", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "swangi.kumari@juspay.in" }, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "upi_collect", "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_R2QErM6QamRIFx", "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": "order_R2QEqgtrS7lSPD", "payment_link": null, "profile_id": "pro_NkNnZmnjCEuoOKyqoev5", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_JtzW87JrlcfmX6fssydo", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-07T11:22:00.954Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-07T11:11:29.281Z", "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": "{\"entity\":\"collection\",\"count\":1,\"items\":[{\"id\":\"pay_R2QErM6QamRIFx\",\"entity\":\"payment\",\"amount\":1000,\"currency\":\"INR\",\"status\":\"captured\",\"order_id\":\"order_R2QEqgtrS7lSPD\",\"invoice_id\":null,\"international\":false,\"method\":\"upi\",\"amount_refunded\":0,\"refund_status\":null,\"captured\":true,\"description\":\"Payment via Razorpay\",\"card_id\":null,\"bank\":null,\"wallet\":null,\"vpa\":\"success@razorpay\",\"email\":\"swangi.kumari@juspay.in\",\"contact\":\"+918056594427\",\"notes\":{\"optimizer_provider_name\":\"razorpay\"},\"fee\":25,\"tax\":4,\"error_code\":null,\"error_description\":null,\"error_source\":null,\"error_step\":null,\"error_reason\":null,\"acquirer_data\":{\"rrn\":\"232178449311\",\"upi_transaction_id\":\"007AC04E0A02D40AA98FE252C69C7305\"},\"gateway_provider\":\"Razorpay\",\"created_at\":1754564823,\"upi\":{\"vpa\":\"success@razorpay\"}}]}", "enable_partial_authorization": null } ``` #### What to look for? - in logs you will be able to see ```sh info:: Processing payment through Direct gateway system - payment_id=pay_4dezIe3S2nraarfCsnly, attempt_id=pay_4dezIe3S2nraarfCsnly_1 ``` ```sh info:: Payment gateway system decision: Direct (sticky) - payment intent previously used Direct ``` ###### Additional Note: This is also pushed to kafka topic for sessionizing <img width="1295" height="882" alt="Screenshot 2025-08-07 at 4 46 52 PM" src="https://github.com/user-attachments/assets/d4c69638-0191-4cda-96be-35cee3015e33" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed submitted code - [ ] I added unit tests for my changes where possible - [ ] I added a [CHANGELOG](/CHANGELOG.md) entry if applicable
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Database Layer (Queries & Schema)** - `crates/diesel_models/src/payment_intent.rs` - `crates/diesel_models/src/types.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/lib.rs` - `crates/hyperswitch_domain_models/src/payments/payment_intent.rs` **3. Core Business Logic** - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/operations/payment_cancel.rs` - `crates/router/src/core/payments/operations/payment_confirm.rs` - ... and 3 more files **4. External Connector Integration** - `crates/external_services/src/grpc_client/unified_connector_service.rs` **5. Other** - `crates/common_enums/src/enums.rs` - `crates/router/src/workflows/payment_sync.rs` **Code Patterns Applied:** - Implement new functions (4 changes) - Extend existing types with new fields (38 changes) - Add conditional logic for feature flags or filtering (4 changes) **Detailed Identifier Changes:** Commit d034fadb: Files to modify: **crates/common_enums/src/enums.rs** Add: - enum: pub::GatewaySystem **crates/diesel_models/src/payment_intent.rs** Modify existing code **crates/diesel_models/src/types.rs** Modify existing code **crates/external_services/src/grpc_client/unified_connector_service.rs** Modify existing code **crates/hyperswitch_domain_models/src/lib.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_intent.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/operations/payment_cancel.rs** Modify existing code **crates/router/src/core/payments/operations/payment_confirm.rs** Modify existing code **crates/router/src/core/payments/operations/payment_response.rs** Modify existing code **crates/router/src/core/payments/operations/payment_update.rs** Modify existing code **crates/router/src/core/unified_connector_service.rs** Add: - function: private::extract_gateway_system_from_payment_intent - function: pub::update_gateway_system_in_feature_metadata **crates/router/src/workflows/payment_sync.rs** Modify existing code
{"pr_number": 8854, "pr_title": "feat(ucs): add gateway system {Direct | UnifiedConnectorSystem} in feature metadata for v1", "merged_at": "2025-08-11T13:57:27Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"database": ["crates/diesel_models/src/payment_intent.rs", "crates/diesel_models/src/types.rs"], "domain": ["crates/hyperswitch_domain_models/src/lib.rs", "crates/hyperswitch_domain_models/src/payments/payment_intent.rs"], "core_business": ["crates/router/src/core/payments.rs", "crates/router/src/core/payments/operations/payment_cancel.rs", "crates/router/src/core/payments/operations/payment_confirm.rs", "crates/router/src/core/payments/operations/payment_response.rs", "crates/router/src/core/payments/operations/payment_update.rs", "crates/router/src/core/unified_connector_service.rs"], "connectors": ["crates/external_services/src/grpc_client/unified_connector_service.rs"], "other": ["crates/common_enums/src/enums.rs", "crates/router/src/workflows/payment_sync.rs"]}, "change_types": {"functions_added": 4, "enums_added": 1, "fields_added": 38, "imports_added": 4, "conditionals_added": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(euclid): update proto file for elimination routing ## 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 update the proto file for elimination routing to include the global rates. This is basically done in order to keep the proto file upto-date with dynamic routing 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)? --> Testing isn't required as this is only env change ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Other** - `proto/elimination_rate.proto`
{"pr_number": 7032, "pr_title": "refactor(euclid): update proto file for elimination routing", "merged_at": "2025-01-29T08:22:45Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["order"]}, "hierarchy": {"other": ["proto/elimination_rate.proto"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(payments): Add MIT payment functionality and update invoice handler ## 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 completes [9400](https://github.com/juspay/hyperswitch/pull/9400) This pr adds support to do MIT payment for subscription and adds an invoice sync job Created Mit payment handler in subscription invoice_handler.rs and added create_invoice_sync_job after updating the invoice with the payment 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). --> ``` Enable internal API key Auth by changing config/development.toml [internal_merchant_id_profile_id_auth] enabled = true internal_api_key = "test_internal_api_key" ``` 1. Create Merchant, API key, Payment connector, Billing Connector 2. Update profile to set the billing processor Request ``` curl --location 'http://localhost:8080/account/merchant_1759125756/business_profile/pro_71jcERFiZERp44d8fuSJ' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_0RJW0cwZDeGfSkod0eJWOkfZHK0PCoZtDYJJ1FxeHqhHky1VNPU6nkgFQiTFSDvA' \ --data '{ "billing_processor_id": "mca_NLnCEvS2DfuHWHFVa09o" }' ``` Response ``` {"merchant_id":"merchant_1759125756","profile_id":"pro_71jcERFiZERp44d8fuSJ","profile_name":"US_default","return_url":"https://google.com/success","enable_payment_response_hash":true,"payment_response_hash_key":"ZFjTKSE1EYiXaPcRhacrwlNh4wieUorlmP7r2uSHI8fyHigGmNCKY2hqVtzAq51m","redirect_to_merchant_with_http_post":false,"webhook_details":{"webhook_version":"1.0.1","webhook_username":"ekart_retail","webhook_password":"password_ekart@123","webhook_url":null,"payment_created_enabled":true,"payment_succeeded_enabled":true,"payment_failed_enabled":true,"payment_statuses_enabled":null,"refund_statuses_enabled":null,"payout_statuses_enabled":null},"metadata":null,"routing_algorithm":null,"intent_fulfillment_time":900,"frm_routing_algorithm":null,"payout_routing_algorithm":null,"applepay_verified_domains":null,"session_expiry":900,"payment_link_config":null,"authentication_connector_details":null,"use_billing_as_payment_method_billing":true,"extended_card_info_config":null,"collect_shipping_details_from_wallet_connector":false,"collect_billing_details_from_wallet_connector":false,"always_collect_shipping_details_from_wallet_connector":false,"always_collect_billing_details_from_wallet_connector":false,"is_connector_agnostic_mit_enabled":false,"payout_link_config":null,"outgoing_webhook_custom_http_headers":null,"tax_connector_id":null,"is_tax_connector_enabled":false,"is_network_tokenization_enabled":false,"is_auto_retries_enabled":false,"max_auto_retries_enabled":null,"always_request_extended_authorization":null,"is_click_to_pay_enabled":false,"authentication_product_ids":null,"card_testing_guard_config":{"card_ip_blocking_status":"disabled","card_ip_blocking_threshold":3,"guest_user_card_blocking_status":"disabled","guest_user_card_blocking_threshold":10,"customer_id_blocking_status":"disabled","customer_id_blocking_threshold":5,"card_testing_guard_expiry":3600},"is_clear_pan_retries_enabled":false,"force_3ds_challenge":false,"is_debit_routing_enabled":false,"merchant_business_country":null,"is_pre_network_tokenization_enabled":false,"acquirer_configs":null,"is_iframe_redirection_enabled":null,"merchant_category_code":null,"merchant_country_code":null,"dispute_polling_interval":null,"is_manual_retry_enabled":null,"always_enable_overcapture":null,"is_external_vault_enabled":"skip","external_vault_connector_details":null,"billing_processor_id":"mca_NLnCEvS2DfuHWHFVa09o"} ``` 3. Create Customer Request ``` curl --location 'http://localhost:8080/customers' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_0RJW0cwZDeGfSkod0eJWOkfZHK0PCoZtDYJJ1FxeHqhHky1VNPU6nkgFQiTFSDvA' \ --data-raw '{ "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "First customer", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` Response ``` { "customer_id": "cus_OYy3hzTTt04Enegu3Go3", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+65", "description": "First customer", "address": null, "created_at": "2025-09-29T14:45:14.430Z", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "default_payment_method_id": null, "tax_registration_id": null } ``` 7. Subscription create and confirm Request ``` curl --location 'http://localhost:8080/subscriptions' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'X-Profile-Id: pro_MiKOgwbj84jJ095MoWdj' \ --header 'api-key: dev_I62cGvBVijteiN61aMcAOeYvXpO8s36gT8BFvPznYYDXF4GFtVtjzgiel9oIpvUK' \ --data '{ "item_price_id": "cbdemo_enterprise-suite-monthly", "customer_id": "cus_efEv4nqfrYEo8wSKZ10C", "description": "Hello this is description", "merchant_reference_id": "mer_ref_1759334677", "shipping": { "address": { "state": "zsaasdas", "city": "Banglore", "country": "US", "line1": "sdsdfsdf", "line2": "hsgdbhd", "line3": "alsksoe", "zip": "571201", "first_name": "joseph", "last_name": "doe" }, "phone": { "number": "123456789", "country_code": "+1" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "123456789", "country_code": "+1" } }, "payment_details": { "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "CLBRW dffdg", "card_cvc": "737" } }, "authentication_type": "no_three_ds", "setup_future_usage": "off_session", "capture_method": "automatic", "return_url": "https://google.com", "customer_acceptance": { "acceptance_type": "online", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "127.0.0.1", "user_agent": "amet irure esse" } } } }' ``` Response ``` { "id": "sub_CkPzNaFAyxzX2WwdKFCr", "merchant_reference_id": "mer_ref_1759334529", "status": "active", "plan_id": null, "price_id": null, "coupon": null, "profile_id": "pro_MiKOgwbj84jJ095MoWdj", "payment": { "payment_id": "sub_pay_KXEtoTxvu0EsadB5wxNn", "status": "succeeded", "amount": 14100, "currency": "INR", "connector": "stripe", "payment_method_id": "pm_bDPHgNaP7UZGjtZ7QPrS", "payment_experience": null, "error_code": null, "error_message": null }, "customer_id": "cus_uBtUJLSVSICr8ctmoL8i", "invoice": { "id": "invoice_Ht72m0Enqy4YOGRKAtbZ", "subscription_id": "sub_CkPzNaFAyxzX2WwdKFCr", "merchant_id": "merchant_1759157014", "profile_id": "pro_MiKOgwbj84jJ095MoWdj", "merchant_connector_id": "mca_oMyzcBFcpfISftwDDVuG", "payment_intent_id": "sub_pay_KXEtoTxvu0EsadB5wxNn", "payment_method_id": null, "customer_id": "cus_uBtUJLSVSICr8ctmoL8i", "amount": 14100, "currency": "INR", "status": "payment_pending" }, "billing_processor_subscription_id": "sub_CkPzNaFAyxzX2WwdKFCr" } ``` incoming webhook for chargebee ``` curl --location 'http://localhost:8080/webhooks/merchant_1758710612/mca_YH3XxYGMv6IbKD0icBie' \ --header 'api-key: dev_5LNrrMNqyyFle8hvMssLob9pFq6OIEh0Vl3DqZttFXiDe7wrrScUePEYrIiYfSKT' \ --header 'Content-Type: application/json' \ --header 'authorization: Basic aHlwZXJzd2l0Y2g6aHlwZXJzd2l0Y2g=' \ --data-raw '{ "api_version": "v2", "content": { "invoice": { "adjustment_credit_notes": [], "amount_adjusted": 0, "amount_due": 14100, "amount_paid": 0, "amount_to_collect": 14100, "applied_credits": [], "base_currency_code": "INR", "channel": "web", "credits_applied": 0, "currency_code": "INR", "customer_id": "gaurav_test", "date": 1758711043, "deleted": false, "due_date": 1758711043, "dunning_attempts": [], "exchange_rate": 1.0, "first_invoice": false, "generated_at": 1758711043, "has_advance_charges": false, "id": "3", "is_gifted": false, "issued_credit_notes": [], "line_items": [ { "amount": 14100, "customer_id": "gaurav_test", "date_from": 1758711043, "date_to": 1761303043, "description": "Enterprise Suite Monthly", "discount_amount": 0, "entity_id": "cbdemo_enterprise-suite-monthly", "entity_type": "plan_item_price", "id": "li_169vD0Uxi8JBp46g", "is_taxed": false, "item_level_discount_amount": 0, "object": "line_item", "pricing_model": "flat_fee", "quantity": 1, "subscription_id": "169vD0Uxi8JB746e", "tax_amount": 0, "tax_exempt_reason": "tax_not_configured", "unit_amount": 14100 } ], "linked_orders": [], "linked_payments": [], "net_term_days": 0, "new_sales_amount": 14100, "object": "invoice", "price_type": "tax_exclusive", "recurring": true, "reference_transactions": [], "resource_version": 1758711043846, "round_off_amount": 0, "site_details_at_creation": { "timezone": "Asia/Calcutta" }, "status": "payment_due", "sub_total": 14100, "subscription_id": "169vD0Uxi8JB746e", "tax": 0, "term_finalized": true, "total": 14100, "updated_at": 1758711043, "write_off_amount": 0 } }, "event_type": "invoice_generated", "id": "ev_169vD0Uxi8JDf46i", "object": "event", "occurred_at": 1758711043, "source": "admin_console", "user": "ankit.gupta.001@juspay.in", "webhook_status": "scheduled", "webhooks": [ { "id": "whv2_169mYOUxi3nvkZ8v", "object": "webhook", "webhook_status": "scheduled" } ] }' ``` response 200 ok ## 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)? --> invoice sync finished <img width="1504" height="463" alt="image" src="https://github.com/user-attachments/assets/13e1469d-bb39-4484-b350-5ee278c66a3a" /> Record back successful <img width="1200" height="115" alt="image" src="https://github.com/user-attachments/assets/d221b8da-44dc-4790-86be-70dfd9f601df" /> invoice table entry <img width="668" height="402" alt="image" src="https://github.com/user-attachments/assets/29e59bea-dd08-4ae1-8e88-495abdaf8735" /> ## 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/subscription.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/invoice.rs` **3. Core Business Logic** - `crates/router/src/core/subscription.rs` - `crates/router/src/core/subscription/invoice_handler.rs` - `crates/router/src/core/subscription/payments_api_client.rs` - ... and 1 more files **4. Other** - `crates/common_enums/src/enums.rs` - `crates/router/src/workflows/invoice_sync.rs` **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (4 changes) - Extend existing types with new fields (23 changes) **Detailed Identifier Changes:** Commit f2c2bd64: Files to modify: **crates/api_models/src/subscription.rs** Add: - struct: pub::CreateMitPaymentRequestData **crates/common_enums/src/enums.rs** Add: - function: private::from - impl: impl From<IntentStatus> for InvoiceStatus **crates/diesel_models/src/invoice.rs** Modify existing code **crates/router/src/core/subscription.rs** Modify existing code **crates/router/src/core/subscription/invoice_handler.rs** Add: - function: pub::create_mit_payment **crates/router/src/core/subscription/payments_api_client.rs** Add: - function: pub::create_mit_payment **crates/router/src/core/webhooks/incoming.rs** Modify existing code **crates/router/src/workflows/invoice_sync.rs** Modify existing code
{"pr_number": 9668, "pr_title": "feat(payments): Add MIT payment functionality and update invoice handler", "merged_at": "2025-10-07T13:03:02Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/subscription.rs"], "database": ["crates/diesel_models/src/invoice.rs"], "core_business": ["crates/router/src/core/subscription.rs", "crates/router/src/core/subscription/invoice_handler.rs", "crates/router/src/core/subscription/payments_api_client.rs", "crates/router/src/core/webhooks/incoming.rs"], "other": ["crates/common_enums/src/enums.rs", "crates/router/src/workflows/invoice_sync.rs"]}, "change_types": {"structs_added": 1, "functions_added": 4, "fields_added": 23}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix: incorrect payout_method_id in payouts table ## 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 --> Retrieving `payout_method_id` across various cases and updating it in the `payouts` table 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 <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> **Tested locally by connecting to the local Hyperswitch Card Vault** <img width="743" alt="Screenshot 2025-05-26 at 2 11 24 PM" src="https://github.com/user-attachments/assets/9e2f8b26-2ee8-4b9e-9ec5-03206567116b" /> Payout Create Request ``` curl --location 'http://localhost:8080/payouts/create' \ --header 'Content-Type: application/json' \ --header 'api-key: hidden' \ --data-raw '{ "amount": 21, "currency": "EUR", "profile_id": "pro_oG*****inD", "customer": { "id": "new_id", "email": "new_cust@example.com", "name": "John Doe", "phone": "99*****99", "phone_country_code": "+65" }, "connector": [ "adyen" ], "description": "Its my first payout request", "payout_type": "card", "payout_method_data": { "card": { "card_number": "4111 1111 1111 1111", "expiry_month": "03", "expiry_year": "2030", "card_holder_name": "John Doe" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "city": "San Fransico", "state": "CA", "zip": "94122", "country": "US", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "80*****27", "country_code": "+91" } }, "entity_type": "Individual", "recurring": true, "metadata": { "ref": "123" }, "confirm": true, "auto_fulfill": true }' ``` Payout Create Response ``` { "payout_id": "3c479b29-*****-ca06536a0f67", "merchant_id": "merchant_1748*****8", "amount": 21, "currency": "EUR", "connector": "adyen", "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": "John Doe" } }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": null, "zip": "94122", "state": "CA", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "805*****27", "country_code": "+91" }, "email": null }, "auto_fulfill": true, "customer_id": "new_id", "customer": { "id": "new_id", "name": "John Doe", "email": "new_cust@example.com", "phone": "99*****99", "phone_country_code": "+65" }, "client_secret": "payout_3c479b29-8a*****f67_secret_Swtw*****BfBb6j", "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_jmmK*****jm", "status": "success", "error_message": null, "error_code": null, "profile_id": "pro_oG*****inD", "created": "2025-05-26T08:46:58.731Z", "connector_transaction_id": "ZK*****75", "priority": null, "payout_link": null, "email": "new_cust@example.com", "name": "John Doe", "phone": "99*****9", "phone_country_code": "+65", "unified_code": null, "unified_message": null, "payout_method_id": "pm_qvu*****EN" } ``` Payout Sync Request ``` curl --location 'http://localhost:8080/payouts/3c479b29-*****-ca06536a0f67?force_sync=true' \ --header 'api-key: hidden' ``` Payout Sync Response ``` { "payout_id": "3c479b29-*****-ca06536a0f67", "merchant_id": "merchant_174*****8", "amount": 21, "currency": "EUR", "connector": "adyen", "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": "John Doe" } }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": null, "zip": "94122", "state": "CA", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "805*****27", "country_code": "+91" }, "email": null }, "auto_fulfill": true, "customer_id": "new_id", "customer": { "id": "new_id", "name": "John Doe", "email": "new_cust@example.com", "phone": "99*****99", "phone_country_code": "+65" }, "client_secret": "payout_3c479b29-*****-ca06536a0f67_secret_Sw*****b6j", "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_jmmK*****m", "status": "success", "error_message": null, "error_code": null, "profile_id": "pro_oGi*****nD", "created": "2025-05-26T08:46:58.731Z", "connector_transaction_id": "ZK*****75", "priority": null, "payout_link": null, "email": "new_cust@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "unified_code": null, "unified_message": null, "payout_method_id": "pm_qvue0o*****eEN" } ``` ## 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/payouts/helpers.rs` **Code Patterns Applied:** - Add conditional logic for feature flags or filtering (3 changes) - Modify database queries (3 changes) **Detailed Identifier Changes:** Commit e637b214: Files to modify: **crates/router/src/core/payouts/helpers.rs** Modify existing code
{"pr_number": 8107, "pr_title": "fix: incorrect payout_method_id in payouts table", "merged_at": "2025-05-27T11:00:53Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "merchant", "user"]}, "hierarchy": {"core_business": ["crates/router/src/core/payouts/helpers.rs"]}, "change_types": {"conditionals_added": 3, "database_queries": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [DLOCAL, MOLLIE, MIFINITY, RAZORPAY, VOLT] add in feature matrix api ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [X] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Add Dlocal, Mollie, Mifinity, Razorpay, Volt supported payment methods, currencies and countries in feature matrix ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? Feature API Call Request ``` curl --location 'http://localhost:8080/feature_matrix' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: ____' ``` Response ``` { "connector_count": 8, "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": "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": "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", "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 } ], "supported_webhook_flows": [] }, { "name": "DLOCAL", "display_name": "DLOCAL", "description": "Dlocal is a cross-border payment processor enabling businesses to accept and send payments in emerging markets worldwide.", "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", "UnionPay", "Interac", "CartesBancaires" ], "supported_countries": [ "CI", "UY", "VN", "MX", "BO", "HN", "ZM", "TR", "ZA", "RW", "AR", "UG", "CM", "GT", "CO", "CL", "GH", "MY", "PE", "NI", "KE", "SA", "ID", "CN", "SV", "BR", "IN", "MA", "PK", "BD", "PH", "JP", "TZ", "TH", "CR", "PY", "DO", "EC", "NG", "EG", "PA", "SN" ], "supported_currencies": [ "PKR", "HNL", "CNY", "DOP", "PHP", "KES", "ARS", "USD", "IDR", "THB", "UYU", "BRL", "EGP", "VND", "ZMW", "INR", "JPY", "PEN", "PYG", "XAF", "MYR", "SAR", "BDT", "BOB", "TRY", "CLP", "NGN", "COP", "NIO", "TZS", "RWF", "GHS", "MAD", "XOF", "MXN", "CRC", "GTQ", "UGX", "ZAR" ] }, { "payment_method": "card", "payment_method_type": "debit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard", "AmericanExpress", "Discover", "JCB", "DinersClub", "UnionPay", "Interac", "CartesBancaires" ], "supported_countries": [ "NG", "CL", "BD", "PE", "DO", "SV", "BO", "IN", "AR", "BR", "ID", "CN", "MY", "ZA", "UG", "UY", "CM", "VN", "TZ", "CO", "PY", "KE", "TH", "EC", "MX", "CI", "EG", "GH", "NI", "PK", "GT", "SA", "SN", "TR", "JP", "MA", "PH", "ZM", "CR", "HN", "PA", "RW" ], "supported_currencies": [ "JPY", "PEN", "UGX", "TRY", "ZMW", "CRC", "RWF", "DOP", "CNY", "BOB", "INR", "XOF", "CLP", "ARS", "BRL", "VND", "COP", "USD", "NGN", "BDT", "IDR", "KES", "XAF", "TZS", "UYU", "PKR", "HNL", "EGP", "MAD", "GTQ", "THB", "NIO", "PYG", "PHP", "GHS", "MXN", "SAR", "ZAR", "MYR" ] } ], "supported_webhook_flows": [] }, { "name": "MIFINITY", "display_name": "MIFINITY", "description": "Mifinity is a payment gateway empowering you to pay online, receive funds, and send money globally, the MiFinity eWallet supports super-low fees, offering infinite possibilities to do more of the things you love.", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "wallet", "payment_method_type": "mifinity", "mandates": "not_supported", "refunds": "not_supported", "supported_capture_methods": [ "automatic" ], "supported_countries": [ "MO", "BA", "PR", "AS", "IE", "DM", "LS", "EE", "PK", "MK", "KR", "BT", "TC", "TO", "FO", "TH", "HM", "IS", "BS", "RW", "SH", "ML", "LV", "SV", "SC", "CG", "UZ", "CK", "PS", "KW", "MG", "LC", "GB", "NL", "AU", "MA", "DO", "GP", "GR", "PW", "MZ", "DJ", "PL", "FM", "BR", "PF", "CX", "GW", "RE", "KN", "TN", "LI", "HK", "SE", "BW", "JP", "KZ", "BD", "VU", "MU", "LT", "ER", "CU", "PH", "NP", "CH", "NU", "AE", "SM", "AW", "RS", "LK", "VC", "PE", "IM", "TF", "GM", "SZ", "AD", "NO", "KH", "MH", "MN", "MF", "GY", "BJ", "EG", "QA", "TD", "SI", "BO", "AR", "WS", "RO", "VA", "SO", "BI", "ID", "JO", "MD", "MW", "UA", "CN", "VE", "ZA", "IO", "OM", "FR", "LA", "MS", "MX", "YT", "LU", "UG", "VN", "NI", "PM", "HT", "PT", "ME", "LB", "FK", "GT", "KG", "GD", "FJ", "NC", "ET", "MT", "AG", "CY", "BG", "SG", "BZ", "CZ", "GQ", "AT", "NA", "PG", "MR", "CF", "NZ", "KI", "SL", "GE", "BN", "GU", "NF", "MP", "IN", "TR", "SB", "FI", "DK", "TW", "NG", "SN", "EH", "CR", "AX", "TL", "UY", "CC", "BB", "CI", "SX", "GF", "AM", "CA", "TV", "CO", "CV", "ZM", "TM", "JE", "GS", "AO", "ES", "KM", "DZ", "BQ", "GH", "DE", "SK", "KE", "BM", "KY", "GG", "TK", "TG", "WF", "VI", "AZ", "CM", "BH", "SJ", "NR", "NE", "SR", "PA", "IT", "AL", "MY", "GL", "BL", "VG", "HR", "AI", "BF", "BE", "PN", "IL", "CL", "GN", "PY", "MC", "EC", "GA", "SA", "CW", "HN", "MQ", "TT", "ST", "GI", "RU", "MV" ], "supported_currencies": [ "SEK", "INR", "PLN", "GBP", "RUB", "UYU", "NOK", "AUD", "ZAR", "CAD", "EUR", "USD", "NZD", "EGP", "CZK", "UZS", "JPY", "CHF", "DKK", "CNY" ] } ], "supported_webhook_flows": [] }, { "name": "MOLLIE", "display_name": "MOLLIE", "description": "Mollie is a Developer-friendly processor providing simple and customizable payment solutions for businesses of all sizes.", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "wallet", "payment_method_type": "paypal", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "wallet", "payment_method_type": "apple_pay", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "card", "payment_method_type": "credit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard", "AmericanExpress", "Discover", "JCB", "DinersClub", "UnionPay", "Interac", "CartesBancaires" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "card", "payment_method_type": "debit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard", "AmericanExpress", "Discover", "JCB", "DinersClub", "UnionPay", "Interac", "CartesBancaires" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "bank_debit", "payment_method_type": "sepa", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "bank_redirect", "payment_method_type": "przelewy24", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "PL" ], "supported_currencies": [ "EUR", "PLN" ] }, { "payment_method": "bank_redirect", "payment_method_type": "bancontact_card", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "bank_redirect", "payment_method_type": "eps", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "AT" ], "supported_currencies": [ "EUR" ] }, { "payment_method": "bank_redirect", "payment_method_type": "ideal", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": [ "NL" ], "supported_currencies": [ "EUR" ] }, { "payment_method": "bank_redirect", "payment_method_type": "sofort", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "bank_redirect", "payment_method_type": "giropay", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null } ], "supported_webhook_flows": [] }, { "name": "RAZORPAY", "display_name": "RAZORPAY", "description": "Razorpay helps you accept online payments from customers across Desktop, Mobile web, Android & iOS. Additionally by using Razorpay Payment Links, you can collect payments across multiple channels like SMS, Email, Whatsapp, Chatbots & Messenger.", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "upi", "payment_method_type": "upi_collect", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic" ], "supported_countries": [ "IN" ], "supported_currencies": [ "INR" ] } ], "supported_webhook_flows": [] }, { "name": "VOLT", "display_name": "VOLT", "description": "Volt is a payment gateway operating in China, specializing in facilitating local bank transfers", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "bank_redirect", "payment_method_type": "open_banking_uk", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic" ], "supported_countries": [ "PL", "SI", "SE", "LT", "NO", "LU", "HU", "DK", "SK", "GR", "ES", "LV", "DE", "IE", "BG", "RO", "CZ", "BE", "AU", "MT", "GB", "BR", "FR", "HR", "IT", "AT", "CY", "EE", "NL", "FI", "PT" ], "supported_currencies": [ "EUR", "NOK", "PLN", "SEK", "AUD", "GBP", "BRL", "DKK" ] } ], "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` - [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/dlocal.rs` - `crates/hyperswitch_connectors/src/connectors/mifinity.rs` - `crates/hyperswitch_connectors/src/connectors/mollie.rs` - ... 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 **Code Patterns Applied:** - Implement new functions (15 changes) - Extend existing types with new fields (88 changes) **Detailed Identifier Changes:** Commit eef1aeb0: Files to modify: **crates/hyperswitch_connectors/src/connectors/dlocal.rs** Remove: - function: private::validate_connector_against_payment_request - impl: impl ConnectorValidation for Dlocal - impl: impl ConnectorSpecifications for Dlocal Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorValidation for Dlocal - impl: impl ConnectorSpecifications for Dlocal **crates/hyperswitch_connectors/src/connectors/mifinity.rs** Remove: - impl: impl ConnectorSpecifications for Mifinity Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorSpecifications for Mifinity **crates/hyperswitch_connectors/src/connectors/mollie.rs** Remove: - impl: impl ConnectorSpecifications for Mollie Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorSpecifications for Mollie **crates/hyperswitch_connectors/src/connectors/razorpay.rs** Remove: - impl: impl ConnectorSpecifications for Razorpay Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorSpecifications for Razorpay **crates/hyperswitch_connectors/src/connectors/volt.rs** Remove: - impl: impl ConnectorSpecifications for Volt Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorSpecifications for Volt
{"pr_number": 7290, "pr_title": "feat(connector): [DLOCAL, MOLLIE, MIFINITY, RAZORPAY, VOLT] add in feature matrix api", "merged_at": "2025-02-25T20:21:47Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "order"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/dlocal.rs", "crates/hyperswitch_connectors/src/connectors/mifinity.rs", "crates/hyperswitch_connectors/src/connectors/mollie.rs", "crates/hyperswitch_connectors/src/connectors/razorpay.rs", "crates/hyperswitch_connectors/src/connectors/volt.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": 15, "fields_added": 88, "imports_added": 9}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): add hypersense integration api ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> #### Endpoints - GET `hypersense/token` (returns hypersense token). - POST `hypersense/verify_token` (verifies the token passed as payload). - POST `hypersense/signout` (invalidates the token). ### Additional Changes - [x] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables #### `external_service_auth` module and `ExternalToken` - `external_service_auth` is a generic service used to issue, verify and invalidate `ExternalToken`, which can be associated with an external service using the enum field `external_service_type: ExternalServiceType` in the `ExternalToken`. - Essentially a new service can be integrated by simply creating routes and handlers, and calling the same core functions specified in `external_service_auth` modules. <!-- 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). --> ### Hypersense #### Description: ##### An AI Ops tool build for Payments Cost Observability - Monitor your overall transaction payment-related costs across multiple regions, PSPs, and businesses. - Obtain actionable insights to optimise costs, track cost deviations, and effectively audit PSP invoices. Learn more: [Hypersense site](https://www.hypersense.io/) #### Purpose of Change To integrate hypersense with hyperswitch dashboard. ## Fixes #7217 ## 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. get the hypersense_token from the response by hitting this curl. ```sh curl --location '<BASE_URL>/hypersense/token' \ --header 'Authorization: Bearer <TOKEN>' ``` 2. using the token obtained above try hitting this to verify. ```sh curl --location '<BASE_URL>/hypersense/verify_token' \ --header 'Content-Type: application/json' \ --data '{ "token": "<HYPERSENSE_TOKEN>" }' ``` 3. signout to invalidate this token ```sh curl --location '<BASE_URL>//hypersense/signout' \ --header 'Content-Type: application/json' \ --data '{ "token": "<HYPERSENSE_TOKEN>" }' ``` ## 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/events.rs` - `crates/api_models/src/events/external_service_auth.rs` - `crates/api_models/src/external_service_auth.rs` - ... and 1 more files **2. Core Business Logic** - `crates/router/src/core.rs` - `crates/router/src/core/external_service_auth.rs` **3. Type Definitions** - `crates/router_env/src/logger/types.rs` **4. Utils** - `crates/common_utils/src/events.rs` - `crates/router/src/routes/lock_utils.rs` **5. Other** - `crates/router/src/lib.rs` - `crates/router/src/routes.rs` - `crates/router/src/routes/app.rs` - ... and 2 more files **Code Patterns Applied:** - Define new data structures (5 changes) - Implement new functions (14 changes) - Extend existing types with new fields (34 changes) **Detailed Identifier Changes:** Commit 22633be5: Files to modify: **crates/api_models/src/events.rs** Add: - mod: pub::external_service_auth **crates/api_models/src/events/external_service_auth.rs** Add: - function: private::get_api_event_type - function: private::get_api_event_type - function: private::get_api_event_type - function: private::get_api_event_type - impl: impl ApiEventMetric for ExternalTokenResponse - impl: impl ApiEventMetric for ExternalVerifyTokenRequest - impl: impl ApiEventMetric for ExternalVerifyTokenResponse - impl: impl ApiEventMetric for ExternalSignoutTokenRequest **crates/api_models/src/external_service_auth.rs** Add: - function: pub::get_user_id - struct: pub::ExternalTokenResponse - struct: pub::ExternalVerifyTokenRequest - struct: pub::ExternalSignoutTokenRequest - enum: pub::ExternalVerifyTokenResponse - impl: impl ExternalVerifyTokenResponse **crates/api_models/src/lib.rs** Add: - mod: pub::external_service_auth **crates/common_utils/src/events.rs** Modify existing code **crates/router/src/core.rs** Add: - mod: pub::external_service_auth **crates/router/src/core/external_service_auth.rs** Add: - function: pub::generate_external_token - function: pub::signout_external_token - function: pub::verify_external_token **crates/router/src/lib.rs** Modify existing code **crates/router/src/routes.rs** Add: - mod: pub::hypersense **crates/router/src/routes/app.rs** Add: - function: pub::server - struct: pub::Hypersense - impl: impl Hypersense **crates/router/src/routes/hypersense.rs** Add: - function: pub::get_hypersense_token - function: pub::signout_hypersense_token - function: pub::verify_hypersense_token **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/services/authentication.rs** Add: - function: pub::new_token - function: pub::check_service_type - struct: pub::ExternalToken - enum: pub::ExternalServiceType - impl: impl ExternalToken **crates/router_env/src/logger/types.rs** Modify existing code
{"pr_number": 7218, "pr_title": "feat(core): add hypersense integration api ", "merged_at": "2025-02-19T08:52:58Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "token", "transaction"]}, "hierarchy": {"api_models": ["crates/api_models/src/events.rs", "crates/api_models/src/events/external_service_auth.rs", "crates/api_models/src/external_service_auth.rs", "crates/api_models/src/lib.rs"], "core_business": ["crates/router/src/core.rs", "crates/router/src/core/external_service_auth.rs"], "types": ["crates/router_env/src/logger/types.rs"], "utils": ["crates/common_utils/src/events.rs", "crates/router/src/routes/lock_utils.rs"], "other": ["crates/router/src/lib.rs", "crates/router/src/routes.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/hypersense.rs", "crates/router/src/services/authentication.rs"]}, "change_types": {"structs_added": 5, "functions_added": 14, "enums_added": 2, "fields_added": 34, "imports_added": 15}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [Barclaycard] Implement Cards - Non 3DS 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/8067) ## Description <!-- Describe your changes in detail --> Added Authorize, Capture, Void, Refund, PSync and RSync flow for cards payment method for Barclaycard. Also added connector specifications for the same connector. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Postman Tests 1. Payment Connector - Create Request: ``` curl --location 'http://localhost:8080/account/merchant_1747726068/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: ••••••' \ --data '{ "connector_type": "payment_processor", "connector_name": "barclaycard", "connector_account_details": { "auth_type": auth_type, "api_secret": api_secret, "api_key": api_key, "key1": key1 }, "test_mode": false, "disabled": false, "business_country": "US", "business_label": "default", "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 } ] } ] }' ``` Response: ``` { "connector_type": "payment_processor", "connector_name": "barclaycard", "connector_label": "barclaycard_US_default", "merchant_connector_id": "mca_BSrgu17zDqS7EXYvqz9O", "profile_id": "pro_pehtYfNAEJUejck1GkP6", "connector_account_details": { "auth_type": auth_type, "api_key": "************************************", "key1": "*****************", "api_secret": "********************************************" }, "payment_methods_enabled": [ { "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 } ] } ], "connector_webhook_details": null, "metadata": null, "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 } ``` 2. Payments - Create Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: api-key' \ --data-raw '{ "amount": 6540, "currency": "USD", "confirm": true, "capture_method": "automatic", "customer_id": "customer_123", "email": "guest@example.com", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "payment_method": "card", "payment_method_data": { "card": { "card_number": "4347699988887777", "card_exp_month": "1", "card_exp_year": "26", "card_holder_name": "joseph Doe", "card_cvc": "555" } }, "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" } }, "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" }, "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" } }' ``` Response: ``` { "payment_id": "pay_U1YF8Oy30dykRHfSzRLz", "merchant_id": "merchant_1747726068", "status": "succeeded", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6540, "connector": "barclaycard", "client_secret": "pay_U1YF8Oy30dykRHfSzRLz_secret_9BQZ2PGg3e7ZIeIT6BAq", "created": "2025-05-20T07:31:28.562Z", "currency": "USD", "customer_id": "customer_123", "customer": { "id": "customer_123", "name": null, "email": "guest@example.com", "phone": null, "phone_country_code": null }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "7777", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "434769", "card_extended_bin": null, "card_exp_month": "1", "card_exp_year": "26", "card_holder_name": "joseph Doe", "payment_checks": { "eci": null, "cavv": null, "eci_raw": null, "avs_response": { "code": "Y", "codeRaw": "Y" }, "approval_code": "831000", "card_verification": { "resultCode": "M", "resultCodeRaw": "M" }, "consumer_authentication_response": { "code": "2", "codeRaw": "2" } }, "authentication_data": { "acs_transaction_id": null, "system_trace_audit_number": "149277", "retrieval_reference_number": "514007149277" } }, "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 Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": null, "email": null }, "order_details": null, "email": "guest@example.com", "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": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "customer_123", "created_at": 1747726288, "expires": 1747729888, "secret": "epk_8d2cca87e0544416b980cee5bb5a1ab3" }, "manual_retry_allowed": false, "connector_transaction_id": "7477262936786891604805", "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_U1YF8Oy30dykRHfSzRLz_1", "payment_link": null, "profile_id": "pro_pehtYfNAEJUejck1GkP6", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_BSrgu17zDqS7EXYvqz9O", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-05-20T07:46:28.562Z", "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-05-20T07:31:34.524Z", "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 } ``` 3. Payments - Retrieve Request: ``` curl --location 'http://localhost:8080/payments/pay_U1YF8Oy30dykRHfSzRLz?expand_captures=true&expand_attempts=true&all_keys_required=true&force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_zH1HhEd5Y4Nybo7VUkUC55IO7p9hNkJPiSSuBTBuLLWzhn7CsNdR5jZEyXzP41b1' ``` Response: ``` { "payment_id": "pay_U1YF8Oy30dykRHfSzRLz", "merchant_id": "merchant_1747726068", "status": "succeeded", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6540, "connector": "barclaycard", "client_secret": "pay_U1YF8Oy30dykRHfSzRLz_secret_9BQZ2PGg3e7ZIeIT6BAq", "created": "2025-05-20T07:31:28.562Z", "currency": "USD", "customer_id": "customer_123", "customer": { "id": "customer_123", "name": null, "email": "guest@example.com", "phone": null, "phone_country_code": null }, "description": "Its my first payment request", "refunds": null, "disputes": null, "attempts": [ { "attempt_id": "pay_U1YF8Oy30dykRHfSzRLz_1", "status": "charged", "amount": 6540, "order_tax_amount": null, "currency": "USD", "connector": "barclaycard", "error_message": null, "payment_method": "card", "connector_transaction_id": "7477262936786891604805", "capture_method": "automatic", "authentication_type": "no_three_ds", "created_at": "2025-05-20T07:31:28.562Z", "modified_at": "2025-05-20T07:31:34.524Z", "cancellation_reason": null, "mandate_id": null, "error_code": null, "payment_token": null, "connector_metadata": null, "payment_experience": null, "payment_method_type": null, "reference_id": "pay_U1YF8Oy30dykRHfSzRLz_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": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "7777", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "434769", "card_extended_bin": null, "card_exp_month": "1", "card_exp_year": "26", "card_holder_name": "joseph Doe", "payment_checks": { "eci": null, "cavv": null, "eci_raw": null, "avs_response": { "code": "Y", "codeRaw": "Y" }, "approval_code": "831000", "card_verification": { "resultCode": "M", "resultCodeRaw": "M" }, "consumer_authentication_response": { "code": "2", "codeRaw": "2" } }, "authentication_data": { "acs_transaction_id": null, "system_trace_audit_number": "149277", "retrieval_reference_number": "514007149277" } }, "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 Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": null, "email": null }, "order_details": null, "email": "guest@example.com", "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": 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": "7477262936786891604805", "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_U1YF8Oy30dykRHfSzRLz_1", "payment_link": null, "profile_id": "pro_pehtYfNAEJUejck1GkP6", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_BSrgu17zDqS7EXYvqz9O", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-05-20T07:46:28.562Z", "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-05-20T07:33:57.427Z", "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\":\"7477262936786891604805\",\"rootId\":\"7477262936786891604805\",\"reconciliationId\":\"7477262936786891604805\",\"submitTimeUTC\":\"2025-05-20T07:31:33Z\",\"merchantId\":\"juspay_us_sandbox\",\"applicationInformation\":{\"status\":\"PENDING\",\"reasonCode\":100,\"applications\":[{\"name\":\"ics_auth\",\"reasonCode\":\"100\",\"rCode\":\"1\",\"rFlag\":\"SOK\",\"reconciliationId\":\"7477262936786891604805\",\"rMessage\":\"Request was processed successfully.\",\"returnCode\":1010000},{\"name\":\"ics_bill\",\"status\":\"PENDING\",\"reasonCode\":\"100\",\"rCode\":\"1\",\"rFlag\":\"SOK\",\"reconciliationId\":\"7477262936786891604805\",\"rMessage\":\"Request was processed successfully.\",\"returnCode\":1260000},{\"name\":\"ics_decision\",\"reasonCode\":\"100\",\"rCode\":\"1\",\"rFlag\":\"SOK\",\"rMessage\":\"Service processed successfully\",\"returnCode\":1320000},{\"name\":\"ics_decision_early\",\"reasonCode\":\"100\",\"rCode\":\"1\",\"returnCode\":9999999}]},\"buyerInformation\":{},\"clientReferenceInformation\":{\"code\":\"pay_U1YF8Oy30dykRHfSzRLz_1\",\"applicationName\":\"REST API\",\"applicationVersion\":\"1.0\",\"partner\":{}},\"consumerAuthenticationInformation\":{\"eciRaw\":\"7\",\"strongAuthentication\":{}},\"deviceInformation\":{},\"errorInformation\":{\"message\":\"Request was processed successfully.\"},\"installmentInformation\":{},\"fraudMarkingInformation\":{},\"merchantDefinedInformation\":[{\"key\":\"1\",\"value\":\"login_date=\\\"2019-09-10T10:11:12Z\\\"\"},{\"key\":\"2\",\"value\":\"new_customer=\\\"true\\\"\"},{\"key\":\"3\",\"value\":\"udf1=\\\"value1\\\"\"}],\"merchantInformation\":{\"merchantDescriptor\":{\"name\":\"juspay_us_sandbox\"}},\"orderInformation\":{\"billTo\":{\"firstName\":\"JOSEPH\",\"lastName\":\"DOE\",\"address1\":\"1467\",\"locality\":\"San Fransico\",\"administrativeArea\":\"CA\",\"postalCode\":\"94122\",\"email\":\"guest@example.com\",\"country\":\"US\"},\"shipTo\":{},\"amountDetails\":{\"totalAmount\":\"65.4\",\"currency\":\"USD\",\"taxAmount\":\"0\",\"authorizedAmount\":\"65.4\"},\"shippingDetails\":{},\"invoiceDetails\":{},\"lineItems\":[{\"productCode\":\"default\",\"taxAmount\":0,\"quantity\":1,\"unitPrice\":65.4}]},\"paymentInformation\":{\"customer\":{},\"paymentInstrument\":{},\"instrumentIdentifier\":{},\"shippingAddress\":{},\"paymentType\":{\"name\":\"vdcvantiv\",\"type\":\"credit card\",\"method\":\"VI\"},\"card\":{\"suffix\":\"7777\",\"prefix\":\"434769\",\"expirationMonth\":\"1 \",\"expirationYear\":\"26 \",\"type\":\"001\"},\"invoice\":{},\"accountFeatures\":{},\"fluidData\":{},\"issuerInformation\":{\"country\":\"US\"},\"paymentAccountInformation\":{\"card\":{},\"features\":{},\"network\":{}}},\"paymentInsightsInformation\":{\"responseInsights\":{},\"ruleResults\":{}},\"payoutInformation\":{\"pushFunds\":{},\"pullFunds\":{}},\"payoutOptions\":{},\"processingInformation\":{\"paymentSolution\":\"Visa\",\"commerceIndicator\":\"7\",\"commerceIndicatorLabel\":\"internet\",\"authorizationOptions\":{\"authType\":\"O\",\"initiator\":{\"merchantInitiatedTransaction\":{}},\"cardVerificationIndicator\":false},\"bankTransferOptions\":{},\"japanPaymentOptions\":{},\"fundingOptions\":{\"firstRecurringPayment\":false},\"ecommerceIndicator\":\"7\",\"reconciliationId\":\"7477262936786891604805\",\"captureOptions\":{}},\"processorInformation\":{\"processor\":{\"name\":\"vdcvantiv\"},\"networkTransactionId\":\"016153570198200\",\"approvalCode\":\"831000\",\"responseCode\":\"00\",\"avs\":{\"code\":\"Y\",\"codeRaw\":\"Y\"},\"cardVerification\":{\"resultCode\":\"M\"},\"achVerification\":{\"resultCodeRaw\":\"00\"},\"electronicVerificationResults\":{},\"systemTraceAuditNumber\":\"149277\",\"eventStatus\":\"Pending\",\"retrievalReferenceNumber\":\"514007149277\"},\"pointOfSaleInformation\":{},\"riskInformation\":{\"profile\":{\"name\":\"Standard mid-market profile\",\"decision\":\"ACCEPT\"},\"rules\":[{\"name\":\"Fraud Score - Monitor\",\"decision\":\"IGNORE\"},{\"name\":\"Fraud Score - Reject\",\"decision\":\"IGNORE\"},{\"name\":\"Fraud Score - Review\",\"decision\":\"IGNORE\"},{\"name\":\"Invalid Address\",\"decision\":\"IGNORE\"}],\"score\":{\"factorCodes\":[\"H\",\"P\"],\"result\":3}},\"recipientInformation\":{},\"senderInformation\":{\"account\":{},\"paymentInformation\":{\"customer\":{},\"paymentType\":{\"name\":\"vdcvantiv\",\"type\":\"credit card\",\"method\":\"VI\"},\"card\":{\"suffix\":\"7777\",\"expirationMonth\":\"1 \",\"expirationYear\":\"26 \",\"type\":\"001\"},\"invoice\":{},\"accountFeatures\":{},\"fluidData\":{},\"issuerInformation\":{},\"paymentAccountInformation\":{}}},\"tokenInformation\":{},\"_links\":{\"self\":{\"href\":\"https://api.smartpayfuse-test.barclaycard/tss/v2/transactions/7477262936786891604805\",\"method\":\"GET\"}},\"recurringPaymentInformation\":{},\"unscheduledPaymentInformation\":{}}" } ``` 4. Refunds - Create Request: ``` curl --location 'http://localhost:8080/refunds' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: api-key' \ --data '{ "payment_id": "pay_U1YF8Oy30dykRHfSzRLz", "amount": 6540, "reason": "Customer returned product", "refund_type": "instant" }' ``` Response: ``` { "refund_id": "ref_9KXjMEdZ4PZDcFWAwNmC", "payment_id": "pay_U1YF8Oy30dykRHfSzRLz", "amount": 6540, "currency": "USD", "status": "pending", "reason": "Customer returned product", "metadata": null, "error_message": null, "error_code": null, "unified_code": null, "unified_message": null, "created_at": "2025-05-20T07:35:51.909Z", "updated_at": "2025-05-20T07:35:53.786Z", "connector": "barclaycard", "profile_id": "pro_pehtYfNAEJUejck1GkP6", "merchant_connector_id": "mca_BSrgu17zDqS7EXYvqz9O", "split_refunds": null, "issuer_error_code": null, "issuer_error_message": null } ``` 5. Refunds - Retrieve Request: ``` curl --location 'http://localhost:8080/refunds/ref_9KXjMEdZ4PZDcFWAwNmC' \ --header 'Accept: application/json' \ --header 'api-key: api-key' ``` Response: ``` { "refund_id": "ref_9KXjMEdZ4PZDcFWAwNmC", "payment_id": "pay_U1YF8Oy30dykRHfSzRLz", "amount": 6540, "currency": "USD", "status": "pending", "reason": "Customer returned product", "metadata": null, "error_message": null, "error_code": null, "unified_code": null, "unified_message": null, "created_at": "2025-05-20T07:35:51.909Z", "updated_at": "2025-05-20T07:37:20.756Z", "connector": "barclaycard", "profile_id": "pro_pehtYfNAEJUejck1GkP6", "merchant_connector_id": "mca_BSrgu17zDqS7EXYvqz9O", "split_refunds": null, "issuer_error_code": null, "issuer_error_message": null } ``` 6. Feature Matrix Request: ``` curl --location 'http://localhost:8080/feature_matrix' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: api-key' ``` Response: ``` { "connector_count": 1, "connectors": [ { "name": "BARCLAYCARD", "display_name": "BarclayCard SmartPay Fuse", "description": "Barclaycard, part of Barclays Bank UK PLC, is a leading global payment business that helps consumers, retailers and businesses to make and take payments flexibly, and to access short-term credit and point of sale finance.", "category": "bank_acquirer", "supported_payment_methods": [ { "payment_method": "card", "payment_method_type": "credit", "payment_method_type_display_name": "Credit Card", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "not_supported", "no_three_ds": "supported", "supported_card_networks": [ "Mastercard", "Visa", "AmericanExpress", "JCB", "Discover", "Maestro", "Interac", "DinersClub", "CartesBancaires", "UnionPay" ], "supported_countries": null, "supported_currencies": null, }, { "payment_method": "card", "payment_method_type": "debit", "payment_method_type_display_name": "Debit Card", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "not_supported", "no_three_ds": "supported", "supported_card_networks": [ "Mastercard", "Visa", "AmericanExpress", "JCB", "Discover", "Maestro", "Interac", "DinersClub", "CartesBancaires", "UnionPay" ], "supported_countries": null, "supported_currencies": null, } ], "supported_webhook_flows": [] } ] } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. 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` - `loadtest/config/development.toml` **5. Configuration Files** - `config/config.example.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 2 more files **6. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` **Code Patterns Applied:** - Define new data structures (56 changes) - Implement new functions (44 changes) - Extend existing types with new fields (400 changes) - Add conditional logic for feature flags or filtering (11 changes) **Detailed Identifier Changes:** Commit 01af4742: 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/barclaycard.rs** Remove: - struct: pub::Barclaycard - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Barclaycard - impl: impl ConnectorSpecifications for Barclaycard Add: - function: pub::generate_digest - function: private::get_5xx_error_response - function: private::get_http_method - function: private::get_5xx_error_response - 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_5xx_error_response - function: private::get_http_method - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - struct: pub::Barclaycard - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Barclaycard - impl: impl ConnectorSpecifications for Barclaycard **crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs** Remove: - struct: pub::BarclaycardAuthType Add: - function: private::try_from - function: private::build_bill_to - function: private::get_barclaycard_card_type - function: private::from - function: private::try_from - function: private::from - function: private::convert_metadata_to_merchant_defined_info - function: private::try_from - function: private::map_barclaycard_attempt_status - function: private::map_error_response - function: private::get_error_response_if_failure - function: private::get_payment_response - struct: pub::BarclaycardAuthType - struct: pub::ProcessingInformation - struct: pub::MerchantDefinedInformation - struct: pub::BarclaycardConsumerAuthInformation - struct: pub::CardPaymentInformation - struct: pub::Card - struct: pub::OrderInformationWithBill - struct: pub::Amount - struct: pub::BillTo - struct: pub::ClientReferenceInformation - struct: pub::ClientProcessorInformation - struct: pub::MerchantAdvice - struct: pub::ConsumerAuthenticationResponse - struct: pub::AchVerification - struct: pub::ProcessorResponse - struct: pub::CardVerification - struct: pub::ClientRiskInformation - struct: pub::InfoCodes - struct: pub::Score - struct: pub::Profile - struct: pub::ClientRiskInformationRules - struct: pub::Avs - struct: pub::BarclaycardClientReferenceResponse - struct: pub::ConsumerAuthenticationInformation - struct: pub::SenderInformation - struct: pub::PaymentInsightsInformation - struct: pub::ResponseInsights - struct: pub::RuleResults - struct: pub::PaymentInformationResponse - struct: pub::CustomerResponseObject - struct: pub::PaymentAccountInformation - struct: pub::PaymentAccountFeatureInformation - struct: pub::PaymentAccountCardInformation - struct: pub::ProcessingInformationResponse - struct: pub::IssuerInformation - struct: pub::CardResponseObject - struct: pub::BarclaycardErrorInformationResponse - struct: pub::BarclaycardErrorInformation - enum: pub::PaymentInformation - enum: pub::RiskResult - enum: pub::BarclaycardPaymentStatus - enum: pub::BarclaycardPaymentsResponse - impl: impl TryFrom<&ConnectorAuthType> for BarclaycardAuthType - impl: impl From<( &BarclaycardRouterData<&PaymentsAuthorizeRouterData>, Option<BillTo>, )> for OrderInformationWithBill - impl: impl TryFrom<( &BarclaycardRouterData<&PaymentsAuthorizeRouterData>, Option<String>, )> for ProcessingInformation - impl: impl From<&BarclaycardRouterData<&PaymentsAuthorizeRouterData>> for ClientReferenceInformation **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/router/tests/connectors/barclaycard.rs** Modify existing code
{"pr_number": 8068, "pr_title": "feat(connector): [Barclaycard] Implement Cards - Non 3DS flow", "merged_at": "2025-05-27T10:28:04Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/admin.rs"], "connectors": ["crates/common_enums/src/connector_enums.rs", "crates/connector_configs/src/connector.rs", "crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/hyperswitch_connectors/src/connectors/barclaycard.rs", "crates/hyperswitch_connectors/src/connectors/barclaycard/transformers.rs", "crates/router/tests/connectors/barclaycard.rs"], "types": ["crates/router/src/types/api.rs", "crates/router/src/types/transformers.rs"], "tests": ["config/deployments/integration_test.toml", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json"]}, "change_types": {"structs_added": 56, "functions_added": 44, "enums_added": 7, "fields_added": 400, "imports_added": 12, "conditionals_added": 11}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(payouts): populate additional payout method data during recurring payouts ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Hotfix for https://github.com/juspay/hyperswitch/pull/9426 ### 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. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payment_method_data.rs` **2. Core Business Logic** - `crates/router/src/core/payouts.rs` **Code Patterns Applied:** - Implement new functions (1 changes) - Extend existing types with new fields (11 changes) **Detailed Identifier Changes:** Commit d1a2b245: Files to modify: **crates/hyperswitch_domain_models/src/payment_method_data.rs** Add: - function: pub::get_additional_payout_method_data **crates/router/src/core/payouts.rs** Modify existing code
{"pr_number": 9514, "pr_title": "fix(payouts): populate additional payout method data during recurring payouts", "merged_at": "2025-09-23T17:50:58Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/payment_method_data.rs"], "core_business": ["crates/router/src/core/payouts.rs"]}, "change_types": {"functions_added": 1, "fields_added": 11}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [REDSYS] add Connector Template Code ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Template code added for new connector Inespay This PR is related to issue: https://github.com/juspay/hyperswitch-cloud/issues/7572 ### 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. This PR is related to issue: https://github.com/juspay/hyperswitch/issues/6673 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 is related to issue: https://github.com/juspay/hyperswitch/issues/6673 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Only template PR, hence no testing required. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. 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/redsys.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 (153 changes) **Detailed Identifier Changes:** Commit 19cbcdd9: 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::redsys **crates/hyperswitch_connectors/src/connectors/redsys.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::Redsys - impl: impl Redsys - impl: impl api::Payment for Redsys - impl: impl api::PaymentSession for Redsys - impl: impl api::ConnectorAccessToken for Redsys - impl: impl api::MandateSetup for Redsys - impl: impl api::PaymentAuthorize for Redsys - impl: impl api::PaymentSync for Redsys - impl: impl api::PaymentCapture for Redsys - impl: impl api::PaymentVoid for Redsys - impl: impl api::Refund for Redsys - impl: impl api::RefundExecute for Redsys - impl: impl api::RefundSync for Redsys - impl: impl api::PaymentToken for Redsys - impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for Redsys - impl: impl ConnectorCommonExt<Flow, Request, Response> for Redsys - impl: impl ConnectorCommon for Redsys - impl: impl ConnectorValidation for Redsys - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Redsys - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Redsys - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Redsys - impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Redsys - impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Redsys - impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Redsys - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Redsys - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Redsys - impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Redsys - impl: impl webhooks::IncomingWebhook for Redsys - mod: pub::transformers **crates/hyperswitch_connectors/src/connectors/redsys/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::RedsysRouterData - struct: pub::RedsysPaymentsRequest - struct: pub::RedsysCard - struct: pub::RedsysAuthType - struct: pub::RedsysPaymentsResponse - struct: pub::RedsysRefundRequest - struct: pub::RefundResponse - struct: pub::RedsysErrorResponse - enum: pub::RedsysPaymentStatus - enum: pub::RefundStatus - impl: impl From<(StringMinorUnit, T)> for RedsysRouterData<T> - impl: impl TryFrom<&RedsysRouterData<&PaymentsAuthorizeRouterData>> for RedsysPaymentsRequest - impl: impl TryFrom<&ConnectorAuthType> for RedsysAuthType - impl: impl From<RedsysPaymentStatus> for common_enums::AttemptStatus - impl: impl TryFrom<ResponseRouterData<F, RedsysPaymentsResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData> - impl: impl TryFrom<&RedsysRouterData<&RefundsRouterData<F>>> for RedsysRefundRequest - 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::redsys **crates/router/tests/connectors/redsys.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::RedsysTest - impl: impl ConnectorActions for RedsysTest - impl: impl utils::Connector for RedsysTest **crates/test_utils/src/connector_auth.rs** Modify existing code
{"pr_number": 6659, "pr_title": "feat(connector): [REDSYS] add Connector Template Code", "merged_at": "2024-11-29T10:40:23Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["connector"]}, "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/redsys.rs", "crates/hyperswitch_connectors/src/connectors/redsys/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/redsys.rs", "crates/router/tests/connectors/sample_auth.toml", "crates/test_utils/src/connector_auth.rs", "scripts/add_connector.sh"], "types": ["crates/router/src/types/api.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": 153, "imports_added": 20}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore(webhooks): add metric to track failed webhooks acknowledged with 200 ## 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 adds a metric `WEBHOOK_FLOW_FAILED_BUT_ACKNOWLEDGED` to track incoming webhooks that failed processing but were acknowledged with 200 status to prevent queueing in connector systems. The metric includes the following attributes: - connector - merchant_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 In some scenarios, applications need to acknowledge webhook requests with 200 even though the resource was not found, to avoid webhooks queueing in connector systems. This metric provides visibility into the volume of such scenarios, enabling better monitoring and alerting (if needed). ## How did you test it? Cannot be tested. Metrics will be visible on Grafana. Can be queried using: ```promql webhook_flow_failed_but_acknowledged_total{connector="adyen",merchant_id="merchant_123"} ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/metrics.rs` - `crates/router/src/core/webhooks/incoming.rs` **Code Patterns Applied:** - Extend existing types with new fields (1 changes) **Detailed Identifier Changes:** Commit b3a4eb91: Files to modify: **crates/router/src/core/metrics.rs** Modify existing code **crates/router/src/core/webhooks/incoming.rs** Modify existing code
{"pr_number": 9763, "pr_title": "chore(webhooks): add metric to track failed webhooks acknowledged with 200", "merged_at": "2025-10-10T07:29:08Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant", "connector", "webhook"]}, "hierarchy": {"core_business": ["crates/router/src/core/metrics.rs", "crates/router/src/core/webhooks/incoming.rs"]}, "change_types": {"fields_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(router): adding generic tokenization endpoint ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [x] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Create a new set of endpoints for giving tokenization as a service for generic usage, current motivation of the service is to be used in proxy payment service. ### 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)? --> **Create a token** ```bash curl --location 'http: //localhost:8080/v2/tokenize' \ --header 'x-profile-id: pro_neU1Qn8gnIich0LAaQXm' \ --header 'Authorization: publishable-key=PUBLISHABLE_KEY,client-secret=CLIENT_SECRET' \ --header 'Content-Type: application/json' \ --data '{ "customer_id": customer_id, "token_request": { "payment_method_data": { "card": { "card_holder_name": "Narayan Bhat" } } } }' ``` Response ```json { "id": "12345_tok_01966c6515157c3193db1c2502435ad5", "created_at": "2025-04-25 10:01:26.037519", "flag": "enabled" } ``` ## 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/Cargo.toml` - `crates/api_models/src/events.rs` - `crates/api_models/src/lib.rs` - ... and 2 more files **2. Database Layer (Queries & Schema)** - `crates/diesel_models/Cargo.toml` - `crates/diesel_models/src/enums.rs` - `crates/diesel_models/src/lib.rs` - ... and 7 more files **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/Cargo.toml` - `crates/hyperswitch_domain_models/src/lib.rs` - `crates/hyperswitch_domain_models/src/payment_methods.rs` - ... and 1 more files **4. Core Business Logic** - `crates/router/src/core.rs` - `crates/router/src/core/payment_methods.rs` - `crates/router/src/core/payment_methods/transformers.rs` - ... and 2 more files **5. Type Definitions** - `crates/common_types/Cargo.toml` - `crates/router/src/types/payment_methods.rs` - `crates/router_env/src/logger/types.rs` **6. Utils** - `crates/common_utils/Cargo.toml` - `crates/common_utils/src/consts.rs` - `crates/common_utils/src/events.rs` - ... and 6 more files **7. Configuration Files** - `config/development.toml` - `crates/openapi/Cargo.toml` - `crates/router/Cargo.toml` - ... and 1 more files **8. Other** - `api-reference-v2/api-reference/tokenization/tokenization--create.mdx` - `api-reference-v2/mint.json` - `api-reference-v2/openapi_spec.json` - ... and 17 more files **Code Patterns Applied:** - Define new data structures (9 changes) - Implement new functions (30 changes) - Extend existing types with new fields (168 changes) - Add conditional logic for feature flags or filtering (4 changes) - Modify database queries (1 changes) **Detailed Identifier Changes:** Commit 49a178ed: Files to modify: **crates/api_models/src/events.rs** Add: - impl: impl ApiEventMetric for tokenization::GenericTokenizationRequest - impl: impl ApiEventMetric for tokenization::GenericTokenizationResponse **crates/api_models/src/lib.rs** Add: - mod: pub::tokenization **crates/api_models/src/payment_methods.rs** Modify existing code **crates/api_models/src/tokenization.rs** Add: - struct: pub::GenericTokenizationResponse - struct: pub::GenericTokenizationRequest **crates/common_enums/src/enums.rs** Add: - enum: pub::TokenizationFlag **crates/common_utils/src/consts.rs** Modify existing code **crates/common_utils/src/events.rs** Modify existing code **crates/common_utils/src/id_type.rs** Modify existing code **crates/common_utils/src/id_type/global_id.rs** Add: - mod: pub::token **crates/common_utils/src/id_type/global_id/token.rs** Add: - function: pub::get_string_repr - function: pub::generate - function: private::get_api_event_type - impl: impl GlobalTokenId - impl: impl crate::events::ApiEventMetric for GlobalTokenId **crates/common_utils/src/lib.rs** Add: - mod: pub::tokenization **crates/common_utils/src/tokenization.rs** Add: - function: pub::generate_token **crates/diesel_models/src/enums.rs** Modify existing code **crates/diesel_models/src/lib.rs** Add: - mod: pub::tokenization **crates/diesel_models/src/mod.rs** Add: - mod: pub::tokenization **crates/diesel_models/src/payment_methods_session.rs** Modify existing code **crates/diesel_models/src/query.rs** Add: - mod: pub::tokenization **crates/diesel_models/src/query/tokenization.rs** Add: - function: pub::insert - function: pub::find_by_id - impl: impl tokenization_diesel::Tokenization **crates/diesel_models/src/schema_v2.rs** Modify existing code **crates/diesel_models/src/tokenization.rs** Add: - struct: pub::Tokenization - struct: pub::TokenizationNew - struct: pub::TokenizationUpdate **crates/diesel_models/src/types.rs** Modify existing code **crates/hyperswitch_domain_models/src/lib.rs** Add: - mod: pub::tokenization **crates/hyperswitch_domain_models/src/payment_methods.rs** Modify existing code **crates/hyperswitch_domain_models/src/tokenization.rs** Add: - function: private::from - function: private::convert - function: private::convert_back - function: private::construct_new - struct: pub::Tokenization - struct: pub::TokenizationNew - struct: pub::TokenizationResponse - impl: impl From<Tokenization> for TokenizationResponse - impl: impl super::behaviour::Conversion for Tokenization **crates/masking/src/lib.rs** Modify existing code **crates/masking/src/secret.rs** Add: - function: private::fmt - function: private::test_json_mask_strategy - enum: pub::JsonMaskStrategy - impl: impl Strategy<serde_json::Value> for JsonMaskStrategy - mod: private::tests **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/openapi/src/routes.rs** Add: - mod: pub::tokenization **crates/openapi/src/routes/tokenization.rs** Add: - function: pub::create_token_vault_api **crates/router/src/core.rs** Add: - mod: pub::tokenization **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** Add: - function: pub::retrive_value_from_vault **crates/router/src/core/tokenization.rs** Add: - function: pub::create_vault_token_core - function: pub::get_token_vault_core **crates/router/src/db.rs** Modify existing code **crates/router/src/db/kafka_store.rs** Add: - function: private::insert_tokenization - function: private::get_entity_id_vault_id_by_token_id - impl: impl TokenizationInterface for KafkaStore - impl: impl TokenizationInterface for KafkaStore **crates/router/src/lib.rs** Modify existing code **crates/router/src/routes.rs** Add: - mod: pub::tokenization **crates/router/src/routes/app.rs** Add: - function: pub::server - struct: pub::Tokenization - impl: impl Tokenization **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/tokenization.rs** Add: - function: pub::create_token_vault_api **crates/router/src/types/payment_methods.rs** Modify existing code **crates/router_env/src/logger/types.rs** Modify existing code **crates/storage_impl/src/lib.rs** Add: - function: private::unique_constraints - function: private::table_name - impl: impl UniqueConstraints for diesel_models::tokenization::Tokenization - mod: pub::tokenization **crates/storage_impl/src/mock_db.rs** Modify existing code **crates/storage_impl/src/tokenization.rs** Add: - function: private::insert_tokenization - function: private::get_entity_id_vault_id_by_token_id - function: private::insert_tokenization - function: private::get_entity_id_vault_id_by_token_id - function: private::insert_tokenization - function: private::get_entity_id_vault_id_by_token_id - trait: pub::TokenizationInterface - trait: pub::TokenizationInterface - impl: impl TokenizationInterface for RouterStore<T> - impl: impl TokenizationInterface for KVRouterStore<T> - impl: impl TokenizationInterface for MockDb - impl: impl TokenizationInterface for MockDb - impl: impl TokenizationInterface for KVRouterStore<T> - impl: impl TokenizationInterface for RouterStore<T>
{"pr_number": 7905, "pr_title": "feat(router): adding generic tokenization endpoint", "merged_at": "2025-05-27T06:42:17Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "token"]}, "hierarchy": {"api_models": ["crates/api_models/Cargo.toml", "crates/api_models/src/events.rs", "crates/api_models/src/lib.rs", "crates/api_models/src/payment_methods.rs", "crates/api_models/src/tokenization.rs"], "database": ["crates/diesel_models/Cargo.toml", "crates/diesel_models/src/enums.rs", "crates/diesel_models/src/lib.rs", "crates/diesel_models/src/mod.rs", "crates/diesel_models/src/payment_methods_session.rs", "crates/diesel_models/src/query.rs", "crates/diesel_models/src/query/tokenization.rs", "crates/diesel_models/src/schema_v2.rs", "crates/diesel_models/src/tokenization.rs", "crates/diesel_models/src/types.rs"], "domain": ["crates/hyperswitch_domain_models/Cargo.toml", "crates/hyperswitch_domain_models/src/lib.rs", "crates/hyperswitch_domain_models/src/payment_methods.rs", "crates/hyperswitch_domain_models/src/tokenization.rs"], "core_business": ["crates/router/src/core.rs", "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/tokenization.rs"], "types": ["crates/common_types/Cargo.toml", "crates/router/src/types/payment_methods.rs", "crates/router_env/src/logger/types.rs"], "utils": ["crates/common_utils/Cargo.toml", "crates/common_utils/src/consts.rs", "crates/common_utils/src/events.rs", "crates/common_utils/src/id_type.rs", "crates/common_utils/src/id_type/global_id.rs", "crates/common_utils/src/id_type/global_id/token.rs", "crates/common_utils/src/lib.rs", "crates/common_utils/src/tokenization.rs", "crates/router/src/routes/lock_utils.rs"], "config": ["config/development.toml", "crates/openapi/Cargo.toml", "crates/router/Cargo.toml", "crates/storage_impl/Cargo.toml"], "other": ["api-reference-v2/api-reference/tokenization/tokenization--create.mdx", "api-reference-v2/mint.json", "api-reference-v2/openapi_spec.json", "crates/common_enums/src/enums.rs", "crates/masking/src/lib.rs", "crates/masking/src/secret.rs", "crates/openapi/src/openapi_v2.rs", "crates/openapi/src/routes.rs", "crates/openapi/src/routes/tokenization.rs", "crates/router/src/db.rs", "crates/router/src/db/kafka_store.rs", "crates/router/src/lib.rs", "crates/router/src/routes.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/tokenization.rs", "crates/storage_impl/src/lib.rs", "crates/storage_impl/src/mock_db.rs", "crates/storage_impl/src/tokenization.rs", "v2_migrations/2025-04-25-105138_tokenization_service_creation/down.sql", "v2_migrations/2025-04-25-105138_tokenization_service_creation/up.sql"]}, "change_types": {"structs_added": 9, "functions_added": 30, "enums_added": 2, "fields_added": 168, "imports_added": 77, "conditionals_added": 4, "database_queries": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(router): Update request body for migrate-batch api ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Introduced new fields in migrate batch api - `merchant_id` and `merchant_connector_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). --> ## 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)? --> req - ``` curl --location 'http://localhost:8080/payment_methods/migrate-batch' \ --header 'api-key: api-key' \ --form 'file=@"path_to_csv_file"' \ --form 'merchant_id="merchant_id"' \ --form 'merchant_connector_id="merchant_connector_id"' ``` <img width="914" alt="Screenshot 2024-10-25 at 3 46 46 PM" src="https://github.com/user-attachments/assets/1506051b-f99b-496c-bc74-4eb231e0f350"> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/payment_methods.rs` **2. Core Business Logic** - `crates/router/src/core/payment_methods/migration.rs` **3. Other** - `crates/router/src/routes/payment_methods.rs` **Code Patterns Applied:** - Implement new functions (2 changes) - Extend existing types with new fields (16 changes) **Detailed Identifier Changes:** Commit 53075792: Files to modify: **crates/api_models/src/payment_methods.rs** Modify existing code **crates/router/src/core/payment_methods/migration.rs** Modify existing code **crates/router/src/routes/payment_methods.rs** Modify existing code
{"pr_number": 6429, "pr_title": "fix(router): Update request body for migrate-batch api", "merged_at": "2024-10-25T13:31:16Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"api_models": ["crates/api_models/src/payment_methods.rs"], "core_business": ["crates/router/src/core/payment_methods/migration.rs"], "other": ["crates/router/src/routes/payment_methods.rs"]}, "change_types": {"functions_added": 2, "fields_added": 16, "imports_added": 2}, "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 > 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": "worldpayxml", "business_country": "US", "business_label": "default", "connector_account_details": { "auth_type": "SignatureKey", "api_key": "**************", "key1": "*************", "api_secret": "*************"//T }, "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` - [ ] 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 b8b68af4: 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": 8076, "pr_title": "feat(connector): [Worldpayxml] add card payment", "merged_at": "2025-05-27T09:42: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"}
fix(users): fallback to fresh lineage context if cached role_id no longer matches ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR fixes an issue where a stale `role_id` from the cached `lineage_context` was being used to generate the JWT token during sign-in, even if the actual user role was modified (e.g., role deleted and recreated with a different `role_id` but same lineage). Previously, we only validated if a user role existed for the lineage (`user_id`, `tenant_id`, `org_id`, `merchant_id`, `profile_id`), but **did not verify that the `role_id` matched** the current assigned role. This led to JWTs being issued with outdated `role_id` values. ### Changes Made - During sign-in, added a strict match check for `role_id` in the fetched user role. - If the `role_id` from cached `lineage_context` does not match the current role fetched from DB (v2 fallback to v1), we now **resolve the lineage afresh from the current `user_role` object**. - Logged errors for failed role fetch attempts for better traceability. ### 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). --> In systems where roles can be modified dynamically (e.g., deleted and recreated), relying on cached `lineage_context.role_id` without validating it introduces a silent inconsistency. This can lead to: - Unexpected authorization behavior - Hard-to-debug permission issues - Stale tokens being issued This fix ensures that JWTs are always generated using valid and current `role_id` information associated with the user role. ## 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)? --> #### Scenario: Validate fallback when `role_id` has changed 1. **Initial Setup** - Log in as an `org_admin` of **Org A**. - Invite **User X** to **Org A** with the role `org_admin`. - Ensure **User X** is also part of another organization (**Org B**) and has a valid user role there. 2. **Initial Sign-In** - Sign in as **User X** to **Org A**, selecting a specific merchant and profile. - This populates and stores the `lineage_context` based on the selected values. 3. **Modify Role Assignment** - Log back in as the original `org_admin` of **Org A**. - Delete the current user role (`org_admin`) of **User X** in **Org A**. - Create a new role in **Org A** named `profile_admin` using the **same merchant and profile** from the stored `lineage_context`. - Re-invite **User X** to **Org A** with this new `profile_admin` role. 4. **Re-Sign-In Validation** - Now sign in again as **User X**. - Since the original role (`org_admin`) no longer exists, the cached lineage context will fail validation. - The system should fall back to the default sign-in flow and pick a valid user role for JWT construction. 5. **Verify Correct Role Assignment** - If sign-in occurs into a **different organization**, it's acceptable. - If signed into **Org A**, validate the `role_id`: - Check the response from `/user` API. - OR decode the JWT token. - The `role_id` should now correctly reflect `profile_admin`. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [x] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Type Definitions** - `crates/router/src/types/domain/user/decision_manager.rs` **Detailed Identifier Changes:** Commit aaa4fca5: Files to modify: **crates/router/src/types/domain/user/decision_manager.rs** Modify existing code
{"pr_number": 8593, "pr_title": "fix(users): fallback to fresh lineage context if cached role_id no longer matches", "merged_at": "2025-07-14T10:42:09Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant", "user", "token"]}, "hierarchy": {"types": ["crates/router/src/types/domain/user/decision_manager.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(router): fixed ctp bug calling confirmation when UAS is eligible even though CTP is disabled ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix ## Description <!-- Describe your changes in detail --> fixed ctp bug calling confirmation when UAS is eligible even though CTP is disabled ## 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). --> Currently normal card transaction with Click to Pay is failing, With error `Something Went Wrong`, This PR fixes that ## 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)? --> Try setting up CTP mastercard Add config to make the merchant eligible for authentication service ```shell curl --location 'http://localhost:8080/configs/' \ --header 'Content-Type: application/json' \ --header 'api-key: test_admin' \ --data '{ "key": "merchants_eligible_for_authentication_service", "value": "[\"sahkal\", \"cewqcewc\", \"dqwdwljildwduoqwhduwqcqwjd\"]" }' ``` Create merchant connector account for Ctp_mastercard ```shell { "connector_type": "authentication_processor", "connector_name": "ctp_mastercard", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "b6e06cc6-3018-4c4c-bbf5-9fb232615090" }, "test_mode": true, "disabled": false, "payment_methods_enabled": [ { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "card_networks": [ "Visa", "Mastercard" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "debit", "card_networks": [ "Visa", "Mastercard" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "connector_webhook_details": { "merchant_secret": "556B655EBE2F2F0912F6DBC893C23C8A30F5F5293746B80114844AB30549E2AB" }, "business_country": "US", "business_label": "default", "metadata": { "dpa_id": "b6e06cc6-3018-4c4c-bbf5-9fb232615090",//"498WCF39JVQVH1UK4TGG21leLAj_MJQoapP5f12IanfEYaSno", "dpa_name": "TestMerchant", "locale": "en_AU", "card_brands": ["mastercard", "visa"], "acquirer_bin": "545301", "acquirer_merchant_id": "SRC3DS", "merchant_category_code": "0001", "merchant_country_code": "US" } } ' ``` Adyen ```shell curl --location 'http://localhost:8080/account/dqwdwljildwduoqwhduwqcqwjd/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data ' { "connector_type": "payment_processor", "connector_name": "adyen", "connector_account_details": { "auth_type": "SignatureKey", "api_key": "API-KEY", "key1": "KEY-1", "api_secret": "API-SECRET" }, "test_mode": true, "disabled": false, "payment_methods_enabled": [ { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "card_networks": [ "Visa", "Mastercard" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "debit", "card_networks": [ "Visa", "Mastercard" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "metadata": { "city": "NY", "unit": "245", "live_endpoint_prefix": "vsfbjh" }, "connector_webhook_details": { "merchant_secret": "MERCHANT SECRET" }, "business_country": "US", "business_label": "default" } ' ``` update business profile with ctp_visa mca_id ```shell curl --location 'http://localhost:8080/account/dqwdwljildwduoqwhduwqcqwjd/business_profile/pro_KCTRv8sFQfC0r65CZxrn' \ --header 'Content-Type: application/json' \ --header 'api-key: test_admin' \ --data '{ "is_click_to_pay_enabled": true, "authentication_product_ids": {"click_to_pay": "mca_XAXUpel8ABbpoGNF8lGz"} }' ``` do payments create+confirm normal card payment ```shell { "amount": 100, "currency": "USD", "confirm": true, "payment_method": "card", "payment_method_data": { "card": { "card_number": "4917610000000000", "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "card_cvc": "737" } }, } ' ``` The transaction should succeed ## 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. Core Business Logic** - `crates/router/src/core/payments/helpers.rs` **Code Patterns Applied:** - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit d349a50b: Files to modify: **crates/router/src/core/payments/helpers.rs** Modify existing code
{"pr_number": 7654, "pr_title": "fix(router): fixed ctp bug calling confirmation when UAS is eligible even though CTP is disabled", "merged_at": "2025-03-27T14:56:18Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["payment", "merchant", "connector"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/helpers.rs"]}, "change_types": {"conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
ci(cypress): add testcases for nti based mit flow ## 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 --> [Reference pr](https://github.com/juspay/hyperswitch/pull/6245) Add test cases MIT flow using the recurring_details of type `network_transaction_id_and_card_details`. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## 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)? --> Cypress tests <img width="442" alt="image" src="https://github.com/user-attachments/assets/c871d675-1d44-49f9-9dd9-94cc3b58b9c0"> ## 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** - `cypress-tests/cypress/e2e/PaymentTest/00020-MandatesUsingNTID.cy.js` - `cypress-tests/cypress/e2e/PaymentTest/00020-UPI.cy.js` - `cypress-tests/cypress/e2e/PaymentTest/00021-Variations.cy.js` - ... and 5 more files **Code Patterns Applied:** - Extend existing types with new fields (5 changes) - Add conditional logic for feature flags or filtering (13 changes)
{"pr_number": 6567, "pr_title": "ci(cypress): add testcases for nti based mit flow", "merged_at": "2024-11-26T09:35:20Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user", "card", "transaction"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/PaymentTest/00020-MandatesUsingNTID.cy.js", "cypress-tests/cypress/e2e/PaymentTest/00020-UPI.cy.js", "cypress-tests/cypress/e2e/PaymentTest/00021-Variations.cy.js", "cypress-tests/cypress/e2e/PaymentTest/00022-PaymentMethods.cy.js", "cypress-tests/cypress/e2e/PaymentTest/00023-ConnectorAgnostic.cy.js", "cypress-tests/cypress/fixtures/create-ntid-mit.json", "cypress-tests/cypress/fixtures/imports.js", "cypress-tests/cypress/support/commands.js"]}, "change_types": {"fields_added": 5, "conditionals_added": 13}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(connector): handle unexpected error response from bluesnap connector ## 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 code ensures any unexpected responses from the connector are appropriately logged and handled, providing meaningful and actionable error information to the caller. ### 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 Bluesnap Connector propagates errors received from its cloud service (Cloudflare). Cloudflare returns these errors in HTML format, and Bluesnap forwards them in the same HTML format. When an error is received in HTML format, the backend's deserialization fails because it expects the response to be in JSON format. ## 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)? --> Unable to test 5xx error codes Normal testing done through postman 1. Payment Connector - Create Request - ``` curl --location 'http://localhost:8080/account/merchant_1737978930/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", "api_key":"Hyperswitch_P4yments", "key1":"API_16769616681841700433194" }, "test_mode": false, "disabled": false, "payment_methods_enabled": [ { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "card_networks": [ "Visa", "Mastercard", "Interac", "AmericanExpress", "JCB", "DinersClub", "Discover", "CartesBancaires", "UnionPay" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "debit", "card_networks": [ "AmericanExpress", "Visa", "Mastercard", "Discover", "Interac", "JCB", "DinersClub", "UnionPay", "RuPay" ], "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": "redirect_to_url", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "apple_pay", "payment_experience": "redirect_to_url", "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", "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" }' ``` Response - ``` { "connector_type": "payment_processor", "connector_name": "bluesnap", "connector_label": "bluesnap_US_default", "merchant_connector_id": "mca_thvNFxLqnEvxlCuNYHHd", "profile_id": "pro_y9tlfRoNqyKFoTv0jV7q", "connector_account_details": { "auth_type": "BodyKey", "api_key": "Hy****************ts", "key1": "AP***********************94" }, "payment_methods_enabled": [ { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ "Visa", "Mastercard", "Interac", "AmericanExpress", "JCB", "DinersClub", "Discover", "CartesBancaires", "UnionPay" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "debit", "payment_experience": null, "card_networks": [ "AmericanExpress", "Visa", "Mastercard", "Discover", "Interac", "JCB", "DinersClub", "UnionPay", "RuPay" ], "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": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "apple_pay", "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_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_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 } ] } ], "connector_webhook_details": { "merchant_secret": "MyWebhookSecret", "additional_secret": null }, "metadata": { "city": "NY", "unit": "245" }, "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 } ``` 2A. Payments - Create (Successful Transaction) Request - ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_5KAXSZnLdrlEc2TqZsnrEfcnQqo6DfAQssC12bYyQ446NkHIfrF9eS9D5zHGcNQd' \ --data-raw '{ "amount": 6540, "currency": "USD", "confirm": true, "capture_method": "automatic", "customer_id": "bluesnapsavecard_123", "email": "guest@example.com", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "payment_method": "card", "payment_method_data": { "card": { "card_number": "4263982640269299", "card_exp_month": "4", "card_exp_year": "26", "card_holder_name": "joseph Doe", "card_cvc": "738" } }, "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" } }, "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" } }' ``` Response - ``` { "payment_id": "pay_GlBb0QHBglMPzrs7KUFH", "merchant_id": "merchant_1737978930", "status": "succeeded", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6540, "connector": "bluesnap", "client_secret": "pay_GlBb0QHBglMPzrs7KUFH_secret_EjtASO8UyEF7lbwqbBp3", "created": "2025-01-27T12:14:05.253Z", "currency": "USD", "customer_id": "bluesnapsavecard_123", "customer": { "id": "bluesnapsavecard_123", "name": null, "email": "guest@example.com", "phone": null, "phone_country_code": null }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "9299", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "426398", "card_extended_bin": null, "card_exp_month": "4", "card_exp_year": "26", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": "token_Nf1u8P35zmlUmjQeySy1", "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 Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": null, "email": null }, "order_details": null, "email": "guest@example.com", "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": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "bluesnapsavecard_123", "created_at": 1737980045, "expires": 1737983645, "secret": "epk_986f5561194a4f0099af0a64b111798c" }, "manual_retry_allowed": false, "connector_transaction_id": "1072270280", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "1072270280", "payment_link": null, "profile_id": "pro_y9tlfRoNqyKFoTv0jV7q", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_thvNFxLqnEvxlCuNYHHd", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-01-27T12:29:05.253Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-01-27T12:14:09.598Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` 2B. Payments - Create (Failed Transaction, producing error) Request - ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_5KAXSZnLdrlEc2TqZsnrEfcnQqo6DfAQssC12bYyQ446NkHIfrF9eS9D5zHGcNQd' \ --data-raw '{ "amount": 6540, "currency": "USD", "confirm": true, "capture_method": "automatic", "customer_id": "bluesnapsavecard_123", "email": "guest@example.com", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "payment_method": "card", "payment_method_data": { "card": { "card_number": "4347699988887777", "card_exp_month": "1", "card_exp_year": "26", "card_holder_name": "joseph Doe", "card_cvc": "555" } }, "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" } }, "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" } }' ``` Response - ``` { "amount": 6540, "currency": "USD", "confirm": true, "capture_method": "automatic", "customer_id": "bluesnapsavecard_123", "email": "guest@example.com", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "payment_method": "card", "payment_method_data": { "card": { "card_number": "4347699988887777", "card_exp_month": "1", "card_exp_year": "26", "card_holder_name": "joseph Doe", "card_cvc": "555" } }, "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" } }, "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" } } ``` Cypress Test <img width="842" alt="Screenshot 2025-01-30 at 13 02 43" src="https://github.com/user-attachments/assets/e81ccafb-1f51-44db-9199-d4b97405050d" /> ## 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/bluesnap.rs` **Code Patterns Applied:** - Extend existing types with new fields (17 changes) **Detailed Identifier Changes:** Commit 8ae5267b: Files to modify: **crates/hyperswitch_connectors/src/connectors/bluesnap.rs** Modify existing code
{"pr_number": 7120, "pr_title": "fix(connector): handle unexpected error response from bluesnap connector", "merged_at": "2025-02-06T14:38:20Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/bluesnap.rs"]}, "change_types": {"fields_added": 17, "imports_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(router): add flag to wait for post message in `threeDSMethodData` for `three_ds_invoke` next action in Payments Confirm ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> add `consume_post_message_for_three_ds_method_completion` to three_ds_method_data for the three_ds_invoke next action in Payments Confirm `consume_post_message_for_three_ds_method_completion` - indicates whether to wait for a post message on client after 3DS method data submission ### 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. Perform External 3DS flow and observer 3DS method data block in next_action of payments confirm call CURL ``` curl --location '{{BASE_URL}}/payments/{{PAYMENT_ID}}/confirm' \ --header 'api-key: {{API_KEY}}' \ --header 'Content-Type: application/json' \ --data '{ "payment_method": "card", "payment_method_data": { "card": { "card_number": "4000000000001091", "card_exp_month": "01", "card_exp_year": "2050", "card_holder_name": "John Smith", "card_cvc": "349", "card_network": "Visa" }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "CA", "zip": "94122", "country": "US", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } } }, "browser_info": { "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "125.0.0.1" }, "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "125.0.0.1", "user_agent": "amet irure esse" } } }' ``` Response (next_action) block ``` "next_action": { "type": "three_ds_invoke", "three_ds_data": { "three_ds_authentication_url": "http://localhost:8080/payments/pay_DyM9Vetpxryw1lMbvmaQ/3ds/authentication", "three_ds_authorize_url": "http://localhost:8080/payments/pay_DyM9Vetpxryw1lMbvmaQ/merchant_1758201128/authorize/cybersource", "three_ds_method_details": { "three_ds_method_data_submission": true, "three_ds_method_data": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiI2ODZlMzRhMjk4OGVlMTc3MzUyNjQzYWEiLCJqdGkiOiI1YzMwYmNkOC1mOGFhLTQ0NDItOWJjZi0wMGU3ZjVlNGQyZWMiLCJpYXQiOjE3NTgyODc3MTIsIk9yZ1VuaXRJZCI6IjY4NmQ3OGMyYWRmMGNmNGM4ZjQ1MDNlYiIsIlJlZmVyZW5jZUlkIjoiMTQyM2UzOGEtMjllYi00MmM3LWJhZmItZjJiNzEwOTM5YzhlIn0.D_gB4n_y3Qp8EM_dFvbIfoEjtNxruwC9gQvZEmavivM", "three_ds_method_url": "https://cas.client.cardinaltrusted.com/centinelapi/V2/Cruise/Collect", "three_ds_method_key": "JWT", "consume_post_message_for_three_ds_method_completion": true }, "poll_config": { "poll_id": "external_authentication_pay_DyM9Vetpxryw1lMbvmaQ", "delay_in_secs": 2, "frequency": 5 }, "message_version": "2.1.0", "directory_server_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/payments.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/authentication.rs` **3. Core Business Logic** - `crates/router/src/core/payments/transformers.rs` **4. Other** - `api-reference/v1/openapi_spec_v1.json` - `api-reference/v2/openapi_spec_v2.json` - `crates/common_enums/src/enums.rs` - ... and 2 more files **Code Patterns Applied:** - Implement new functions (2 changes) - Extend existing types with new fields (7 changes) **Detailed Identifier Changes:** Commit 0b263179: Files to modify: **crates/api_models/src/payments.rs** Add: - enum: pub::ThreeDsMethodKey **crates/common_enums/src/enums.rs** Add: - function: pub::is_jwt_flow **crates/diesel_models/src/authentication.rs** Add: - function: pub::is_jwt_flow **crates/openapi/src/openapi.rs** Modify existing code **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code
{"pr_number": 9454, "pr_title": "feat(router): add flag to wait for post message in `threeDSMethodData` for `three_ds_invoke` next action in Payments Confirm", "merged_at": "2025-09-20T07:38:16Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs"], "database": ["crates/diesel_models/src/authentication.rs"], "core_business": ["crates/router/src/core/payments/transformers.rs"], "other": ["api-reference/v1/openapi_spec_v1.json", "api-reference/v2/openapi_spec_v2.json", "crates/common_enums/src/enums.rs", "crates/openapi/src/openapi.rs", "crates/openapi/src/openapi_v2.rs"]}, "change_types": {"functions_added": 2, "enums_added": 1, "fields_added": 7, "imports_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore(connector): [Fiuu] log keys in the PSync response ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Hotfix for https://github.com/juspay/hyperswitch/pull/7189 ### 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? - ## 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/fiuu.rs` **Code Patterns Applied:** - Implement new functions (2 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit 9a25e88b: Files to modify: **crates/hyperswitch_connectors/src/connectors/fiuu.rs** Add: - function: pub::parse_and_log_keys_in_url_encoded_response
{"pr_number": 7206, "pr_title": "chore(connector): [Fiuu] log keys in the PSync response", "merged_at": "2025-02-07T07:20:19Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/fiuu.rs"]}, "change_types": {"functions_added": 2, "imports_added": 1, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [Peach Payments] fix connector metadata deserialization ## 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 --> fix connector metadata deserialization Currently we deserialize to camelCase. but dashboard always sends in snake_case. main pr - #9826 ### 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="836" height="924" alt="Screenshot 2025-10-14 at 2 13 20 PM" src="https://github.com/user-attachments/assets/15635e0c-128d-4bb6-80bb-6bfa38bcc424" /> <img width="938" height="935" alt="Screenshot 2025-10-14 at 2 13 38 PM" src="https://github.com/user-attachments/assets/20d7197f-f5e6-4adf-911b-67e80663ca7f" /> ## 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/peachpayments/transformers.rs` **Detailed Identifier Changes:** Commit e66bc8ba: Files to modify: **crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs** Modify existing code
{"pr_number": 9827, "pr_title": "fix(connector): [Peach Payments] fix connector metadata deserialization", "merged_at": "2025-10-14T11:48:24Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user", "connector"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/peachpayments/transformers.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [UNIFIED_AUTHENTICATION_SERVICE] change url path to `pre_authentication_processing` in pre-auth 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 --> change url path to `pre_authentication_processing` in pre-auth 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). --> ## 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)? --> Compiler guided ## 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/unified_authentication_service.rs` **2. Configuration Files** - `.typos.toml` **Detailed Identifier Changes:** Commit f219b74c: Files to modify: **crates/hyperswitch_connectors/src/connectors/unified_authentication_service.rs** Modify existing code
{"pr_number": 6885, "pr_title": "fix(connector): [UNIFIED_AUTHENTICATION_SERVICE] change url path to `pre_authentication_processing` in pre-auth flow", "merged_at": "2024-12-19T14:06:21Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/unified_authentication_service.rs"], "config": [".typos.toml"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [noon] address `next_action_url` being `null` for cards in 3ds payment ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> previously, when making a 3ds card transaction via noon connector, we would get `next_action` as `null` which is not intended. and that is because, paypal response would override the transaction data. this pr fixes this by unifying both of them. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> 3ds transactions are expected to have an object in next action while at present, we are getting it as null for card payments and this is not intended. closes #7831 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> 3ds card payment: ```curl curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_dSMvDZeLPCEUIv7ZV4JQxAQIoTuE0kdlKZEhxK7gn15IY7WkcKKAgbvSEG8FEuOY' \ --data-raw '{ "amount": 390, "currency": "AED", "confirm": true, "capture_method": "automatic", "customer_id": "sammantest2722", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "three_ds", "return_url": "https://google.com", "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4000000000002701", "card_exp_month": "01", "card_exp_year": "2035", "card_holder_name": "joseph Doe", "card_cvc": "100" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "AE", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "browser_info": { "user_agent": "Mozilla\/5.0 (iPhone NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "128.0.0.1" }, "connector_metadata": { "noon": { "order_category": "pay" } }, "order_details": [ { "product_name": "Apple iphone 15", "quantity": 1, "amount": 390, "account_name": "transaction_processing" } ] }' ``` ```json { "payment_id": "pay_kgxQFsLwpvRE5DN7pOjF", "merchant_id": "postman_merchant_GHAction_7ec10174-0196-450e-a39a-4f9b61a32def", "status": "requires_customer_action", "amount": 390, "net_amount": 390, "shipping_cost": null, "amount_capturable": 390, "amount_received": null, "connector": "noon", "client_secret": "pay_kgxQFsLwpvRE5DN7pOjF_secret_JwwEA4oIyoD2w8lyNkuw", "created": "2025-04-16T12:07:18.695Z", "currency": "AED", "customer_id": "sammantest2722", "customer": { "id": "sammantest2722", "name": "Joseph Doe", "email": "something@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "2701", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "INTL HDQTRS-CENTER OWNED", "card_issuing_country": "UNITEDSTATES", "card_isin": "400000", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "2035", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "AE", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": [ { "brand": null, "amount": 390, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null } ], "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "three_ds", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "next_action": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_kgxQFsLwpvRE5DN7pOjF/postman_merchant_GHAction_7ec10174-0196-450e-a39a-4f9b61a32def/pay_kgxQFsLwpvRE5DN7pOjF_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "sammantest2722", "created_at": 1744805238, "expires": 1744808838, "secret": "epk_77e21be22ea44e7cbc97ea1893092c71" }, "manual_retry_allowed": null, "connector_transaction_id": "783189382167", "frm_message": null, "metadata": null, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "pay" }, "braintree": null }, "feature_metadata": null, "reference_id": "pay_kgxQFsLwpvRE5DN7pOjF_1", "payment_link": null, "profile_id": "pro_x1xo34goINdpBDkYDEhK", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_bPPkbMzjo94rCiHfRJyu", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-04-16T12:22:18.695Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "128.0.0.1", "user_agent": "Mozilla/5.0 (iPhone NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-04-16T12:07:21.111Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null } ``` paypal payment: ```curl curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_dSMvDZeLPCEUIv7ZV4JQxAQIoTuE0kdlKZEhxK7gn15IY7WkcKKAgbvSEG8FEuOY' \ --data-raw '{ "amount": 1000, "currency": "USD", "confirm": true, "capture_method": "automatic", "customer_id": "sammantest2722", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "three_ds", "return_url": "https://google.com", "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "payment_method": "wallet", "payment_method_type": "paypal", "payment_method_data": { "wallet": { "paypal_redirect": {} } }, "browser_info": { "user_agent": "Mozilla\/5.0 (iPhone NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "128.0.0.1" }, "connector_metadata": { "noon": { "order_category": "pay" } }, "order_details": [ { "product_name": "Apple iphone 15", "quantity": 1, "amount": 390, "account_name": "transaction_processing" } ] }' ``` ```json { "payment_id": "pay_ZMSscM4kmOOYEGrwuRoC", "merchant_id": "postman_merchant_GHAction_7ec10174-0196-450e-a39a-4f9b61a32def", "status": "requires_customer_action", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 1000, "amount_received": null, "connector": "noon", "client_secret": "pay_ZMSscM4kmOOYEGrwuRoC_secret_I9V3GqB1X1emQncgY8Bt", "created": "2025-04-16T12:02:55.230Z", "currency": "USD", "customer_id": "sammantest2722", "customer": { "id": "sammantest2722", "name": "Joseph Doe", "email": "something@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "wallet", "payment_method_data": { "wallet": {}, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": [ { "brand": null, "amount": 390, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null } ], "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "three_ds", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "next_action": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_ZMSscM4kmOOYEGrwuRoC/postman_merchant_GHAction_7ec10174-0196-450e-a39a-4f9b61a32def/pay_ZMSscM4kmOOYEGrwuRoC_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "paypal", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "sammantest2722", "created_at": 1744804975, "expires": 1744808575, "secret": "epk_2483fa5baf0a4b91b294a5a8df1da3d6" }, "manual_retry_allowed": null, "connector_transaction_id": "493715212829", "frm_message": null, "metadata": null, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "pay" }, "braintree": null }, "feature_metadata": null, "reference_id": "pay_ZMSscM4kmOOYEGrwuRoC_1", "payment_link": null, "profile_id": "pro_x1xo34goINdpBDkYDEhK", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_bPPkbMzjo94rCiHfRJyu", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-04-16T12:17:55.230Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "128.0.0.1", "user_agent": "Mozilla/5.0 (iPhone NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-04-16T12:02:57.669Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null } ``` in 3ds card payment, we now get the next action url and it works as intended. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `just clippy && just clippy_v2` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/noon.rs` - `crates/hyperswitch_connectors/src/connectors/noon/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (5 changes) **Detailed Identifier Changes:** Commit 662e45f0: Files to modify: **crates/hyperswitch_connectors/src/connectors/noon.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/noon/transformers.rs** Remove: - function: private::try_from - struct: pub::NoonPaypalResponse - struct: pub::NoonPaypalResponseResult - enum: pub::NoonAuthPaymentResponse - impl: impl TryFrom<ResponseRouterData<F, NoonPaypalResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData>
{"pr_number": 7832, "pr_title": "fix(connector): [noon] address `next_action_url` being `null` for cards in 3ds payment", "merged_at": "2025-04-21T08:20:04Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/noon.rs", "crates/hyperswitch_connectors/src/connectors/noon/transformers.rs"]}, "change_types": {"fields_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(users): remove force cookie for docker setup ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Users not able to login using local setup. This PR removes force cookie option for docker setup. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context Closes [#6931](https://github.com/juspay/hyperswitch/issues/6931) ## How did you test it? Tested locally with updated docker configs, and re run the container. <img width="1728" alt="Screenshot 2024-12-23 at 12 40 17 AM" src="https://github.com/user-attachments/assets/54a4b06a-d4c1-4e64-b5f7-33f55de5edc9" /> ## 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/docker_compose.toml`
{"pr_number": 6932, "pr_title": "fix(users): remove force cookie for docker setup", "merged_at": "2024-12-24T12:07:34Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"config": ["config/docker_compose.toml"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(connector): [Worldpay] use 4 digit expiry year ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Described in #6316 point # 7 ### 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 transforming expiry date format into a 4 digit value for card payments for worldpay connector! ## How did you test it? <details> <summary>1. Create a payment using 2 digit expiry year</summary> cURL curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_vK8vdO0cS4wec9MP0W3K8eR0GfgrVoY0oxuhJrx4rCBJm7wxoH16bOdx9fLKvYSc' \ --data-raw '{"amount":6500,"currency":"USD","confirm":true,"capture_method":"automatic","capture_on":"2022-09-10T10:11:12Z","customer_id":"cus_L8pJ8g0mnsdHmS0FPqrH_4","email":"guest@example.com","name":"John Doe","phone":"999999999","profile_id":"pro_1frLOUlLMVZWSYwOz3En","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":"25","card_holder_name":"John Doe","card_cvc":"123"}},"billing":{"address":{"line1":"1467","line2":"Harrison Street","line3":"Harrison Street","city":"San Fransico","state":"California","zip":"94122","country":"US","first_name":"John"}},"statement_descriptor_name":"joseph","statement_descriptor_suffix":"JS","metadata":{"udf1":"value1","new_customer":"true","login_date":"2019-09-10T10:11:12Z"},"browser_info":{"ip_address":"129.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","language":"en-US","color_depth":32,"screen_height":1117,"screen_width":1728,"time_zone":-330,"java_enabled":true,"java_script_enabled":true}}' Response {"payment_id":"pay_YaS6joNtZ9HBVpj9MeBc","merchant_id":"merchant_1731407657","status":"processing","amount":6500,"net_amount":6500,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"worldpay","client_secret":"pay_YaS6joNtZ9HBVpj9MeBc_secret_hKl5jcvcPvtajzBOoKFt","created":"2024-11-12T10:53:30.637Z","currency":"USD","customer_id":"cus_L8pJ8g0mnsdHmS0FPqrH_4","customer":{"id":"cus_L8pJ8g0mnsdHmS0FPqrH_4","name":"John Doe","email":"guest@example.com","phone":"999999999","phone_country_code":"+65"},"description":"Its my first payment request","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":"on_session","off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"4444","card_type":"CREDIT","card_network":"Mastercard","card_issuer":"MASTERCARD INTERNATIONAL","card_issuing_country":"BRAZIL","card_isin":"555555","card_extended_bin":null,"card_exp_month":"08","card_exp_year":"25","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":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"debit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"cus_L8pJ8g0mnsdHmS0FPqrH_4","created_at":1731408810,"expires":1731412410,"secret":"epk_e83ffd4da9e542ef90d16ce72cf6ac9c"},"manual_retry_allowed":false,"connector_transaction_id":"eyJrIjoiazNhYjYzMiIsImxpbmtWZXJzaW9uIjoiNS4wLjAifQ==.sN:g8wd64bwkbrp0md+bPxcanBnk2zLdsIqSa1pR99GGg8fCNQpPLoWNslSzWNPFBM5Tpa8tW7EFI5onKINsgChMHeJVoeH2lrBWCRyjZYT6h+lbqfJa+1BSoKFSY8HLge3KVdfHweTSyJ5K44EVLaxYshRzFR5L:3DblLntpx6mfgF9Uk2Www3mSVoKRxeIXIe9pic4l22Rveu3MW0qp:7+4GYJYOg3e9WdLnxDKf8zDOVuNV9Smp3TrKAPuNF+mGHv+EpbUsv07dKPa3jQZMZkSLOAGYpq4tIxEOnFazFMnNixp9xnyekZxhsndH6QYG9PvEiRYH4jvUN3Rj+v30knvWcoLtqA6gq4131NoZaq1HEMk0Or2+rYD5MFugS490qxbGU5BlL+g0uitRgZrQ==","frm_message":null,"metadata":{"udf1":"value1","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":null,"feature_metadata":null,"reference_id":"3a722672-4625-45bd-ab45-0393d9be067b","payment_link":null,"profile_id":"pro_1frLOUlLMVZWSYwOz3En","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_4VLjE6cyJN8rQeR7yhYV","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2024-11-12T11:08:30.637Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"129.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","color_depth":32,"java_enabled":true,"screen_width":1728,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":1117,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2024-11-12T10:53:32.161Z","charges":null,"frm_metadata":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null} </details> Cypress <img width="432" alt="Screenshot 2024-11-14 at 9 52 42 AM" src="https://github.com/user-attachments/assets/1cb75376-0b5f-4ae4-9f2a-f214c619b7ee"> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `just clippy && just clippy_v2` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/worldpay/transformers.rs` - `crates/hyperswitch_connectors/src/utils.rs` **2. Tests** - `cypress-tests/cypress/e2e/PaymentUtils/WorldPay.js` **Code Patterns Applied:** - Implement new functions (2 changes) - Extend existing types with new fields (19 changes) **Detailed Identifier Changes:** Commit e730a2ee: Files to modify: **crates/hyperswitch_connectors/src/connectors/worldpay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Add: - function: private::get_expiry_year_as_4_digit_i32
{"pr_number": 6543, "pr_title": "fix(connector): [Worldpay] use 4 digit expiry year", "merged_at": "2024-11-19T15:34:37Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/worldpay/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs"], "tests": ["cypress-tests/cypress/e2e/PaymentUtils/WorldPay.js"]}, "change_types": {"functions_added": 2, "fields_added": 19}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
ci(cypress): add test cases for duplicate requests ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description Added test cases for adding duplicaten ID's like `payment_id` , `refund_id` and `customer_id` in the 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 Enhancement of test cases ## How did you test it? Variation test cases <img width="905" alt="image" src="https://github.com/user-attachments/assets/05bf196c-e392-49ec-a74e-c42cfa93c990" /> <img width="741" alt="image" src="https://github.com/user-attachments/assets/55acaeec-75e7-413e-9e26-c6d7314bbffe" /> ## 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/Commons.js` - `cypress-tests/cypress/e2e/spec/Payment/00022-Variations.cy.js` - `cypress-tests/cypress/support/commands.js` **Code Patterns Applied:** - Extend existing types with new fields (26 changes) - Add conditional logic for feature flags or filtering (9 changes)
{"pr_number": 7220, "pr_title": "ci(cypress): add test cases for duplicate requests", "merged_at": "2025-02-12T18:45:12Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "user"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/configs/Payment/Commons.js", "cypress-tests/cypress/e2e/spec/Payment/00022-Variations.cy.js", "cypress-tests/cypress/support/commands.js"]}, "change_types": {"fields_added": 26, "conditionals_added": 9}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(router): add `start_redirection` api for three_ds flow in 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 --> add start_redirection api for three_ds flow in v2 1. store the redirection_data sent by the connector flows in payment_attempt 2. introduce next_action block in confirm intent response and add support for three_ds flow of card payments 3. add start_redirection api to support three ds flow for card payments in v2 ### Additional Changes - [x] This PR modifies the API contract - [x] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 4. `crates/router/src/configs` 5. `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. create a payment with authentication_type: three_ds CURL ``` curl --location '{{BASE_URL}}/v2/payments/create-intent' \ --header 'api-key: {{API_KEY}}' \ --header 'X-Profile-Id: {{PROFILE_ID}}' \ --header 'Content-Type: application/json' \ --data '{ "amount_details": { "order_amount": 100, "currency": "USD" }, "authentication_type": "three_ds" }' ``` Response ``` { "id": "12345_pay_0192dd8aae0b7050af8ff8849326fefb", "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_0192dd8aae0b7050af8ff8849326fefb_secret_0192dd8aae0b7050af8ff896254521c8", "merchant_reference_id": null, "routing_algorithm_id": null, "capture_method": "automatic", "authentication_type": "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-10-30T13:23:26.251Z", "frm_metadata": null, "request_external_three_ds_authentication": "Skip" } ``` 2. confirm a payment and get the next_action block for redirect_url CURL ``` curl --location '{{BASE_URL}}/v2/payments/{{PAYMENT_ID}}/confirm-intent' \ --header 'Content-Type: application/json' \ --header 'X-Profile-Id: {{PROFILE_ID}}' \ --header 'X-Client-Secret: {{CLIENT_SECRET}}' \ --data '{ "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "01", "card_exp_year": "2097", "card_holder_name": "John Doe", "card_cvc": "100" } }, "payment_method_type": "card", "payment_method_subtype": "credit", "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: ``` { "id": "12345_pay_0192dd8aae0b7050af8ff8849326fefb", "status": "requires_customer_action", "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": null }, "connector": "checkout", "client_secret": "12345_pay_0192dd8aae0b7050af8ff8849326fefb_secret_0192dd8aae0b7050af8ff896254521c8", "created": "2024-10-30T13:08:26.251Z", "payment_method_data": 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_0192dd8aae0b7050af8ff8849326fefb/start_redirection?merchant_id=cloth_seller1_CLporg83u4dFG54nP7z3" }, "connector_transaction_id": "pay_zwj4ebatyseeppxcqv7fsjkz7u", "connector_reference_id": null, "merchant_connector_id": "mca_uxXfZhmnm6sRI6fOgDiw", "browser_info": null, "error": null } ``` 3. click on the redirect_url to see the redirection going to connector page ![image](https://github.com/user-attachments/assets/423d2985-dcca-43c3-b9d5-e32829e26ead) ## 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/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` **4. Core Business Logic** - `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` - ... and 1 more files **5. Type Definitions** - `crates/router_env/src/logger/types.rs` **6. Utils** - `crates/router/src/routes/lock_utils.rs` **7. Other** - `api-reference-v2/openapi_spec.json` - `crates/router/src/routes/app.rs` - `crates/router/src/routes/payments.rs` - ... and 3 more files **Code Patterns Applied:** - Define new data structures (3 changes) - Implement new functions (5 changes) - Extend existing types with new fields (57 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 6f24bb4e: Files to modify: **crates/api_models/src/events/payment.rs** Add: - function: private::get_api_event_type - impl: impl ApiEventMetric for PaymentStartRedirectionRequest **crates/api_models/src/payments.rs** Add: - struct: pub::PaymentStartRedirectionRequest - struct: pub::PaymentStartRedirectionParams **crates/diesel_models/src/payment_attempt.rs** Modify existing code **crates/diesel_models/src/payment_intent.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments.rs** Add: - function: pub::create_start_redirection_url **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/payments.rs** Add: - function: pub::payment_start_redirection **crates/router/src/core/payments/operations/payment_confirm_intent.rs** Modify existing code **crates/router/src/core/payments/operations/payment_response.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/payments.rs** Add: - function: pub::payments_start_redirection **crates/router/src/services/authentication.rs** Add: - function: private::authenticate_and_fetch - struct: pub::PublishableKeyAndProfileIdAuth - impl: impl AuthenticateAndFetch<AuthenticationData, A> for PublishableKeyAndProfileIdAuth **crates/router_env/src/logger/types.rs** Modify existing code
{"pr_number": 6470, "pr_title": "feat(router): add `start_redirection` api for three_ds flow in v2", "merged_at": "2024-11-08T14:57:43Z", "intent": {"feature_type": "search_filter", "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"], "core_business": ["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/transformers.rs"], "types": ["crates/router_env/src/logger/types.rs"], "utils": ["crates/router/src/routes/lock_utils.rs"], "other": ["api-reference-v2/openapi_spec.json", "crates/router/src/routes/app.rs", "crates/router/src/routes/payments.rs", "crates/router/src/services/authentication.rs", "v2_migrations/2024-08-28-081838_update_v2_primary_key_constraints/down.sql", "v2_migrations/2024-08-28-081838_update_v2_primary_key_constraints/up.sql"]}, "change_types": {"structs_added": 3, "functions_added": 5, "fields_added": 57, "imports_added": 1, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(subscription): Add endpoint to get Subscription estimate ## 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 --> Add support in subscription to get an estimate for the provided plan_price ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> 1. Create merchant, API Key, billing processor 2. GET subscription estimate Request ``` curl --location 'http://localhost:8080/subscriptions/estimate?item_price_id=standard-plan-USD-Monthly' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'X-Profile-Id: pro_BSjmSsJE4oqVfDdiJViI' \ --header 'api-key: dev_4IM0uzCEoKQ9lkSaTUEceuErgHTSnZhcc0CsjiSc1P2jVv5W4p9nYumBWwnJLqLb' ``` Response ``` { "amount": 1200, "currency": "USD", "plan_id": null, "item_price_id": null, "coupon_code": null, "customer_id": "Azyd6UUz25MpkdBC", "line_items": [ { "item_id": "standard-plan-USD-Monthly", "item_type": "plan_item_price", "description": "Standard Plan", "amount": 1200, "currency": "USD", "quantity": 1 } ] } ``` ## 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/lib.rs` - `crates/api_models/src/subscription.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs` - `crates/hyperswitch_domain_models/src/router_response_types/subscriptions.rs` **3. Core Business Logic** - `crates/router/src/core/subscription.rs` - `crates/router/src/core/subscription/billing_processor_handler.rs` **4. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/chargebee.rs` - `crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs` **5. Type Definitions** - `crates/router_env/src/logger/types.rs` **6. Utils** - `crates/router/src/routes/lock_utils.rs` **7. Other** - `crates/hyperswitch_interfaces/src/conversion_impls.rs` - `crates/router/src/routes/app.rs` - `crates/router/src/routes/subscription.rs` **Code Patterns Applied:** - Define new data structures (4 changes) - Implement new functions (6 changes) - Extend existing types with new fields (55 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit 15bc0a3b: Files to modify: **crates/api_models/src/lib.rs** Modify existing code **crates/api_models/src/subscription.rs** Add: - struct: pub::EstimateSubscriptionQuery - struct: pub::EstimateSubscriptionResponse - struct: pub::SubscriptionLineItem - impl: impl ApiEventMetric for EstimateSubscriptionQuery - impl: impl ApiEventMetric for EstimateSubscriptionResponse **crates/hyperswitch_connectors/src/connectors/chargebee.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs** Remove: - struct: pub::GetSubscriptionEstimateData Add: - struct: pub::GetSubscriptionEstimateData **crates/hyperswitch_domain_models/src/router_response_types/subscriptions.rs** Add: - function: private::from - function: private::from - impl: impl From<GetSubscriptionEstimateResponse> for api_models::subscription::EstimateSubscriptionResponse - impl: impl From<SubscriptionLineItem> for api_models::subscription::SubscriptionLineItem **crates/hyperswitch_interfaces/src/conversion_impls.rs** Modify existing code **crates/router/src/core/subscription.rs** Add: - function: pub::get_estimate **crates/router/src/core/subscription/billing_processor_handler.rs** Add: - function: pub::get_subscription_estimate **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/subscription.rs** Add: - function: pub::get_estimate **crates/router_env/src/logger/types.rs** Modify existing code
{"pr_number": 9637, "pr_title": "feat(subscription): Add endpoint to get Subscription estimate", "merged_at": "2025-10-08T14:07:33Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/lib.rs", "crates/api_models/src/subscription.rs"], "domain": ["crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs", "crates/hyperswitch_domain_models/src/router_response_types/subscriptions.rs"], "core_business": ["crates/router/src/core/subscription.rs", "crates/router/src/core/subscription/billing_processor_handler.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/chargebee.rs", "crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs"], "types": ["crates/router_env/src/logger/types.rs"], "utils": ["crates/router/src/routes/lock_utils.rs"], "other": ["crates/hyperswitch_interfaces/src/conversion_impls.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/subscription.rs"]}, "change_types": {"structs_added": 4, "functions_added": 6, "fields_added": 55, "imports_added": 1, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(router): store `network_transaction_id` for `off_session` payments irrespective of the `is_connector_agnostic_mit_enabled` config ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Currently, we store the `network_transaction_id` for the setup_mandate/off_session payments only if the `is_connector_agnostic_mit_enabled` config is enabled. During the MITs, we refer to this flag to decide whether to use the `connector_mandate_id` or the `network_transaction_id` for the MIT. Instead of using the flag for multiple purposes, it should be used solely to determine whether to use the `connector_mandate_id` or the `network_transaction_id` for the MIT. Therefore, this change will ensure that the `network_transaction_id` is always stored for off-session payments if it is present in the connector response. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Instead of using the `is_connector_agnostic_mit_enabled` flag for multiple purposes, it should be used solely to determine whether to use the `connector_mandate_id` or the `network_transaction_id` for the MIT. And is the connector is returning the `network_transaction_id` for the `off_session` payment it should always be stored. ## 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 business profile and `is_connector_agnostic_mit_enabled` disabled. #### Initial CIT -> Make an off_session payment. Even though the `is_connector_agnostic_mit_enabled` is false `network_transaction_id` should be stored in the payment methods table. ``` curl --location 'http://localhost:8080/payments' \ --header 'Accept: application/json' \ --header 'api-key: <api-key>' \ --header 'Content-Type: application/json' \ --data-raw '{ "amount": 500, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "customer_id": "cu_1737523971", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "name name", "card_cvc": "737" } }, "setup_future_usage": "off_session", "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "in sit", "user_agent": "amet irure esse" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX", "last_name": "ss" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "browser_info": { "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "125.0.0.1" }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": {}, "order_details": [ { "product_name": "Apple iphone 15", "quantity": 1, "amount": 0, "account_name": "transaction_processing" } ] }' ``` ``` { "payment_id": "pay_WdSrWb2Xf2kDegvEULPM", "merchant_id": "merchant_1737523864", "status": "succeeded", "amount": 500, "net_amount": 500, "shipping_cost": null, "amount_capturable": 0, "amount_received": 500, "connector": "stripe", "client_secret": "pay_WdSrWb2Xf2kDegvEULPM_secret_VpuAJ51okhFJZG8TmQ0c", "created": "2025-01-22T05:32:47.192Z", "currency": "USD", "customer_id": "cu_1737523967", "customer": { "id": "cu_1737523967", "name": "John Doe", "email": "guest@example.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "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": "name name", "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": { "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": "PiX", "last_name": "ss" }, "phone": null, "email": null }, "order_details": [ { "brand": null, "amount": 0, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null } ], "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "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": "cu_1737523967", "created_at": 1737523967, "expires": 1737527567, "secret": "epk_e06fef83ccd64ff8b38d5c9955b09a25" }, "manual_retry_allowed": false, "connector_transaction_id": "pi_3QjwYWEOqOywnAIx0lOiWYTn", "frm_message": null, "metadata": {}, "connector_metadata": null, "feature_metadata": null, "reference_id": "pi_3QjwYWEOqOywnAIx0lOiWYTn", "payment_link": null, "profile_id": "pro_L5I6p61FJYPyguLsk4W7", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_OrorUGWr12wrEyKfTPBT", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-01-22T05:47:47.192Z", "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_MtvoUeVqyzRigXnRA3B8", "payment_method_status": "active", "updated": "2025-01-22T05:32:49.202Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": "pm_1QjwYWEOqOywnAIx6kk4d3Cf" } ``` -> Db screenshot shown `network_transaction_id` being stored in the payment methods table. <img width="1259" alt="image" src="https://github.com/user-attachments/assets/a108e721-41ce-46e5-a0dc-0a327a812742" /> #### Recurring MIT -> Create a payment for the same customer with confirm false ``` curl --location 'http://localhost:8080/payments' \ --header 'Accept: application/json' \ --header 'api-key: <api-key>' \ --header 'Content-Type: application/json' \ --data '{ "amount": 10000, "currency": "USD", "capture_method": "automatic", "authentication_type": "three_ds", "confirm": false, "customer_id": "cu_1737523967" }' ``` ``` { "payment_id": "pay_i04r0cC5OTVNrNBbWHLk", "merchant_id": "merchant_1737523864", "status": "requires_payment_method", "amount": 10000, "net_amount": 10000, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_i04r0cC5OTVNrNBbWHLk_secret_WsYRWkHY7vxbD2AOt1tL", "created": "2025-01-22T05:37:20.683Z", "currency": "USD", "customer_id": "cu_1737523967", "customer": { "id": "cu_1737523967", "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": null, "payment_method_data": 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": "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": "cu_1737523967", "created_at": 1737524240, "expires": 1737527840, "secret": "epk_5036d7ff60ff4b76a31e2a12bf758273" }, "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_L5I6p61FJYPyguLsk4W7", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": null, "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-01-22T05:52:20.683Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-01-22T05:37:20.704Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` -> List payment methods using the above client_secret ``` curl --location 'http://localhost:8080/customers/payment_methods?client_secret=pay_i04r0cC5OTVNrNBbWHLk_secret_WsYRWkHY7vxbD2AOt1tL' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_2075ddba1e634912bd68c04d912b9da4' ``` ``` { "customer_payment_methods": [ { "payment_token": "token_4LrYcGKdvscFoqp6OzWZ", "payment_method_id": "pm_MtvoUeVqyzRigXnRA3B8", "customer_id": "cu_1737523967", "payment_method": "card", "payment_method_type": "credit", "payment_method_issuer": null, "payment_method_issuer_code": null, "recurring_enabled": true, "installment_payment_enabled": false, "payment_experience": [ "redirect_to_url" ], "card": { "scheme": null, "issuer_country": null, "last4_digits": "1111", "expiry_month": "03", "expiry_year": "2030", "card_token": null, "card_holder_name": "name name", "card_fingerprint": null, "nick_name": null, "card_network": null, "card_isin": "411111", "card_issuer": null, "card_type": null, "saved_to_locker": true }, "metadata": null, "created": "2025-01-22T05:32:49.170Z", "bank": null, "surcharge_details": null, "requires_cvv": true, "last_used_at": "2025-01-22T05:32:49.170Z", "default_payment_method_set": true, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "name", "last_name": "name" }, "phone": null, "email": null } } ], "is_guest_customer": false } ``` -> Confirm the payment with the above listed token. Even though `network_transaction_id` is present, as the `is_connector_agnostic_mit_enabled` is false the MIT should be processed by using `connector_mandate_id`. ``` curl --location 'http://localhost:8080/payments/pay_i04r0cC5OTVNrNBbWHLk/confirm' \ --header 'api-key: pk_dev_2075ddba1e634912bd68c04d912b9da4' \ --header 'Content-Type: application/json' \ --data-raw '{ "payment_token": "token_4LrYcGKdvscFoqp6OzWZ", "payment_method_type": "credit", "payment_method": "card", "setup_future_usage": "off_session", "client_secret": "pay_i04r0cC5OTVNrNBbWHLk_secret_WsYRWkHY7vxbD2AOt1tL", "billing": { "address": { "city": "test", "country": "US", "line1": "here", "line2": "there", "line3": "anywhere", "zip": "560095", "state": "Washington", "first_name": "One", "last_name": "Two" }, "phone": { "number": "1234567890", "country_code": "+1" }, "email": "guest@example.com" } }' ``` ``` { "payment_id": "pay_i04r0cC5OTVNrNBbWHLk", "merchant_id": "merchant_1737523864", "status": "succeeded", "amount": 10000, "net_amount": 10000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 10000, "connector": "stripe", "client_secret": "pay_i04r0cC5OTVNrNBbWHLk_secret_WsYRWkHY7vxbD2AOt1tL", "created": "2025-01-22T05:37:20.683Z", "currency": "USD", "customer_id": "cu_1737523967", "customer": { "id": "cu_1737523967", "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": "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": "03", "card_exp_year": "2030", "card_holder_name": "name name", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": "token_4LrYcGKdvscFoqp6OzWZ", "shipping": null, "billing": { "address": { "city": "test", "country": "US", "line1": "here", "line2": "there", "line3": "anywhere", "zip": "560095", "state": "Washington", "first_name": "One", "last_name": "Two" }, "phone": { "number": "1234567890", "country_code": "+1" }, "email": "guest@example.com" }, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "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": "pi_3QjwfBEOqOywnAIx0lXPFXLq", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pi_3QjwfBEOqOywnAIx0lXPFXLq", "payment_link": null, "profile_id": "pro_L5I6p61FJYPyguLsk4W7", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_OrorUGWr12wrEyKfTPBT", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-01-22T05:52:20.683Z", "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, "java_script_enabled": null }, "payment_method_id": "pm_MtvoUeVqyzRigXnRA3B8", "payment_method_status": "active", "updated": "2025-01-22T05:39:42.150Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": "pm_1QjwYWEOqOywnAIx6kk4d3Cf" } ``` -> Logs showing `connector_mandate_id` is used for the MIT <img width="1426" alt="image" src="https://github.com/user-attachments/assets/7ec05d70-a8a7-416f-9792-f875c0c689eb" /> #### Recurring MIT by passing different connector in the routing. -> Create a `network_transaction_id` support connector (stripe, adyen or cybersource) -> Create a payment for the same customer ``` curl --location 'http://localhost:8080/payments' \ --header 'Accept: application/json' \ --header 'api-key: <api-key>' \ --header 'Content-Type: application/json' \ --data '{ "amount": 10000, "currency": "USD", "capture_method": "automatic", "authentication_type": "three_ds", "confirm": false, "customer_id": "cu_1737523967" }' ``` ``` { "payment_id": "pay_Bi0rNupobukz2roRumXE", "merchant_id": "merchant_1737523864", "status": "requires_payment_method", "amount": 10000, "net_amount": 10000, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_Bi0rNupobukz2roRumXE_secret_5p8bU6yvNJeims5isKKM", "created": "2025-01-22T05:43:24.656Z", "currency": "USD", "customer_id": "cu_1737523967", "customer": { "id": "cu_1737523967", "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": null, "payment_method_data": 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": "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": "cu_1737523967", "created_at": 1737524604, "expires": 1737528204, "secret": "epk_b8b07628bfa247d395517dbdc54c26b1" }, "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_L5I6p61FJYPyguLsk4W7", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": null, "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-01-22T05:58:24.656Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-01-22T05:43:24.666Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` -> List payment methods using the above client_secret ``` curl --location 'http://localhost:8080/customers/payment_methods?client_secret=pay_Bi0rNupobukz2roRumXE_secret_5p8bU6yvNJeims5isKKM' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_2075ddba1e634912bd68c04d912b9da4' ``` ``` { "customer_payment_methods": [ { "payment_token": "token_1nBgsEHUEWZbafeYF91S", "payment_method_id": "pm_MtvoUeVqyzRigXnRA3B8", "customer_id": "cu_1737523967", "payment_method": "card", "payment_method_type": "credit", "payment_method_issuer": null, "payment_method_issuer_code": null, "recurring_enabled": true, "installment_payment_enabled": false, "payment_experience": [ "redirect_to_url" ], "card": { "scheme": null, "issuer_country": null, "last4_digits": "1111", "expiry_month": "03", "expiry_year": "2030", "card_token": null, "card_holder_name": "name name", "card_fingerprint": null, "nick_name": null, "card_network": null, "card_isin": "411111", "card_issuer": null, "card_type": null, "saved_to_locker": true }, "metadata": null, "created": "2025-01-22T05:32:49.170Z", "bank": null, "surcharge_details": null, "requires_cvv": true, "last_used_at": "2025-01-22T05:39:42.140Z", "default_payment_method_set": true, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "name", "last_name": "name" }, "phone": null, "email": null } } ], "is_guest_customer": false } ``` -> Confirm the payment by pass the newly configured connector (the connector that was not used in the initially CIT). Even though cybersource was sent in the routing input, the payment was processed with stripe as the `is_connector_agnostic_mit_enabled` is false and `connector_mandate_id` that is present is of stripe. ``` curl --location 'http://localhost:8080/payments/pay_Bi0rNupobukz2roRumXE/confirm' \ --header 'api-key: pk_dev_2075ddba1e634912bd68c04d912b9da4' \ --header 'Content-Type: application/json' \ --data-raw '{ "payment_token": "token_1nBgsEHUEWZbafeYF91S", "payment_method_type": "credit", "payment_method": "card", "setup_future_usage": "off_session", "client_secret": "pay_Bi0rNupobukz2roRumXE_secret_5p8bU6yvNJeims5isKKM", "routing": { "type": "single", "data": { "connector": "cybersource", "merchant_connector_id": "mca_Z8Jdk0UIzjgZHVlOHjuX" } }, "billing": { "address": { "city": "test", "country": "US", "line1": "here", "line2": "there", "line3": "anywhere", "zip": "560095", "state": "Washington", "first_name": "One", "last_name": "Two" }, "phone": { "number": "1234567890", "country_code": "+1" }, "email": "guest@example.com" } }' ``` ``` { "payment_id": "pay_Bi0rNupobukz2roRumXE", "merchant_id": "merchant_1737523864", "status": "succeeded", "amount": 10000, "net_amount": 10000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 10000, "connector": "stripe", "client_secret": "pay_Bi0rNupobukz2roRumXE_secret_5p8bU6yvNJeims5isKKM", "created": "2025-01-22T05:43:24.656Z", "currency": "USD", "customer_id": "cu_1737523967", "customer": { "id": "cu_1737523967", "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": "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": "03", "card_exp_year": "2030", "card_holder_name": "name name", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": "token_1nBgsEHUEWZbafeYF91S", "shipping": null, "billing": { "address": { "city": "test", "country": "US", "line1": "here", "line2": "there", "line3": "anywhere", "zip": "560095", "state": "Washington", "first_name": "One", "last_name": "Two" }, "phone": { "number": "1234567890", "country_code": "+1" }, "email": "guest@example.com" }, "order_details": null, "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "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": "pi_3QjwjAEOqOywnAIx1JaY1wKs", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pi_3QjwjAEOqOywnAIx1JaY1wKs", "payment_link": null, "profile_id": "pro_L5I6p61FJYPyguLsk4W7", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_OrorUGWr12wrEyKfTPBT", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-01-22T05:58:24.656Z", "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, "java_script_enabled": null }, "payment_method_id": "pm_MtvoUeVqyzRigXnRA3B8", "payment_method_status": "active", "updated": "2025-01-22T05:43:49.519Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": "pm_1QjwYWEOqOywnAIx6kk4d3Cf" } ``` -> Log showing routing order is `[Cybersource, Stripe]` and `connector_mandate_id` was used to process the MIT <img width="1427" alt="image" src="https://github.com/user-attachments/assets/e4fdde89-891c-4c15-83fd-d428e029bb29" /> NTID cypress test for stripe <img width="1436" alt="image" src="https://github.com/user-attachments/assets/30ada514-d65a-4302-9c79-df0426e48622" /> <img width="816" alt="image" src="https://github.com/user-attachments/assets/ed17de24-643c-44d7-b6de-6e2ae6e09ed0" /> NTID cypress test for cybersource <img width="1436" alt="image" src="https://github.com/user-attachments/assets/f36d444a-8123-4577-a0e8-df9dc7762c89" /> <img width="816" alt="image" src="https://github.com/user-attachments/assets/51568fcd-ccb3-424d-b11f-9d4db468bb39" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/payments/operations/payment_response.rs` - `crates/router/src/core/payments/tokenization.rs` **2. Tests** - `cypress-tests/cypress/e2e/spec/Payment/00024-ConnectorAgnosticNTID.cy.js` **Code Patterns Applied:** - Extend existing types with new fields (4 changes) - Add conditional logic for feature flags or filtering (15 changes) **Detailed Identifier Changes:** Commit f9a4713a: Files to modify: **crates/router/src/core/payments/operations/payment_response.rs** Modify existing code **crates/router/src/core/payments/tokenization.rs** Modify existing code
{"pr_number": 7083, "pr_title": "refactor(router): store `network_transaction_id` for `off_session` payments irrespective of the `is_connector_agnostic_mit_enabled` config", "merged_at": "2025-02-06T11:46:08Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/operations/payment_response.rs", "crates/router/src/core/payments/tokenization.rs"], "tests": ["cypress-tests/cypress/e2e/spec/Payment/00024-ConnectorAgnosticNTID.cy.js"]}, "change_types": {"fields_added": 4, "conditionals_added": 15}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(recovery): Populate connector request reference id in revenue recovery record attempt 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 --> Previously there was no restriction in confirmData to connector request reference id to be mandatory. Recovery internally uses proxy flow, which internally uses confirmData where connector request reference id was hardcoded to none. This Pr adds supports to generate connector request reference to merchant reference id. This Pr also has changes of adding support for jwt auth to payment get for dashboard use case. Previously payment sync was used in dashboard to retrieve payment details, but this would fail now in v2 because if there are no attempts created payment get would return 4xx since active attempt is mandotory. To solve this now dashboard is relying on payment get and payment get attempt list api's . ### 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 1 : **step 1 :** create a profile in hyperswitch and wait for 8 mins to move it from monitering to cascading , this would only get updated when webhooks are triggered . **step 2 :** create payment mca ``` curl --location 'http://localhost:8080/v2/connector-accounts' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-merchant-id: test_seller_AGZCJiHwUNV1seyoepOE' \ --header 'x-profile-id: pro_kYmv4lQjIZFbAqoOVY4M' \ --header 'Authorization: admin-api-key=test_admin' \ --data '{ "connector_type": "payment_processor", "connector_name": "stripe", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "stripe-api-key" }, "profile_id": "pro_kYmv4lQjIZFbAqoOVY4M" }' ``` **step 4 : ** configure stripe billing connector. ``` curl --location 'http://localhost:8080/v2/connector-accounts' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-merchant-id: test_seller_AGZCJiHwUNV1seyoepOE' \ --header 'x-profile-id: pro_kYmv4lQjIZFbAqoOVY4M' \ --header 'Authorization: admin-api-key=test_admin' \ --data '{ "connector_type": "billing_processor", "connector_name": "stripebilling", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "{{stripe-api-key}}" }, "connector_webhook_details": { "merchant_secret": "{{stripe-webhook-key}}", "additional_secret": "password" }, "feature_metadata": { "revenue_recovery": { "max_retry_count": 7, "billing_connector_retry_threshold": 2, "billing_account_reference": { "{{payment_connector_mca_created_in_last_step}}": "stripebilling" } } }, "profile_id": "pro_kYmv4lQjIZFbAqoOVY4M" }' ``` step 5 : Trigger failed invoice from stripe billing by creating new subscription and move the test clock to 1 week. This would trigger few external payments. once it exhausts retry threshold it will create process tracker entry. Follwed by 2 mins it would create all retries by hyperswitch as shown below. <img width="935" alt="Screenshot 2025-06-23 at 7 00 57 PM" src="https://github.com/user-attachments/assets/d51d3d9e-82ff-4385-b318-dbb37230cee8" /> ## 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/payments/payment_attempt.rs` **2. Core Business Logic** - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/operations/proxy_payments_intent.rs` **3. Other** - `crates/router/src/routes/payments.rs` - `crates/router/src/services/authentication.rs` **Code Patterns Applied:** - Implement new functions (2 changes) - Extend existing types with new fields (10 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit f1c53366: Files to modify: **crates/hyperswitch_domain_models/src/payments/payment_attempt.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/operations/proxy_payments_intent.rs** Add: - function: private::populate_payment_data **crates/router/src/routes/payments.rs** Modify existing code **crates/router/src/services/authentication.rs** Add: - function: pub::api_or_client_or_jwt_auth
{"pr_number": 8434, "pr_title": "fix(recovery): Populate connector request reference id in revenue recovery record attempt flow.", "merged_at": "2025-06-26T10:54:44Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/payments/payment_attempt.rs"], "core_business": ["crates/router/src/core/payments.rs", "crates/router/src/core/payments/operations/proxy_payments_intent.rs"], "other": ["crates/router/src/routes/payments.rs", "crates/router/src/services/authentication.rs"]}, "change_types": {"functions_added": 2, "fields_added": 10, "imports_added": 1, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore: change payment method files ownership to `hyperswitch-payment-methods` ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [x] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Ownership for files related to payment methods are changed from `hyperswitch-routing` to `hyperswitch-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). --> ## 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 Test 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. Other** - `.github/CODEOWNERS`
{"pr_number": 7808, "pr_title": "chore: change payment method files ownership to `hyperswitch-payment-methods`", "merged_at": "2025-04-16T14:40:36Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment"]}, "hierarchy": {"other": [".github/CODEOWNERS"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(core): Add uas framework support ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] New feature ## Description <!-- Describe your changes in detail --> Add uas framework support This is a template PR which enables new authentication flows for UAS, currently we cannot test it since these functions are not being invoked from core. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## 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 **authentication** feature, you'll need to modify these architectural layers: **1. Database Layer (Queries & Schema)** - `crates/diesel_models/src/authentication.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/router_data.rs` - `crates/hyperswitch_domain_models/src/router_data_v2.rs` - `crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs` - ... and 2 more files **3. Core Business Logic** - `crates/router/src/core.rs` - `crates/router/src/core/authentication/transformers.rs` - `crates/router/src/core/fraud_check/flows/checkout_flow.rs` - ... and 36 more files **4. External Connector Integration** - `crates/router/src/types/api/verify_connector.rs` - `crates/router/tests/connectors/aci.rs` - `crates/router/tests/connectors/utils.rs` **5. Type Definitions** - `crates/router/src/types.rs` - `crates/router/src/types/api.rs` - `crates/router/src/types/api/unified_authentication_service.rs` - ... and 1 more files **6. Other** - `crates/router/src/services/api.rs` - `crates/router/src/services/conversion_impls.rs` - `crates/router_derive/src/macros/operation.rs` **Code Patterns Applied:** - Define new data structures (12 changes) - Implement new functions (15 changes) - Extend existing types with new fields (243 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit 9466ced8: Files to modify: **crates/diesel_models/src/authentication.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_data.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_data_v2.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs** Add: - struct: pub::UasFlowData **crates/hyperswitch_domain_models/src/router_request_types.rs** Add: - mod: pub::unified_authentication_service **crates/hyperswitch_domain_models/src/router_request_types/unified_authentication_service.rs** Add: - struct: pub::UasPreAuthenticationRequestData - struct: pub::ServiceDetails - struct: pub::ServiceSessionIds - struct: pub::TransactionDetails - struct: pub::UasPostAuthenticationRequestData - struct: pub::PostAuthenticationDetails - struct: pub::TokenDetails - struct: pub::DynamicData - enum: pub::UasAuthenticationResponseData **crates/router/src/core.rs** Add: - mod: pub::unified_authentication_service **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/payments.rs** Modify existing code **crates/router/src/core/payments/connector_integration_v2_impls.rs** Modify existing code **crates/router/src/core/payments/flows.rs** Add: - impl: impl api::UasPreAuthentication for connector::DummyConnector<T> - impl: impl api::UnifiedAuthenticationService for connector::DummyConnector<T> - impl: impl services::ConnectorIntegration< api::PreAuthenticate, types::UasPreAuthenticationRequestData, types::UasAuthenticationResponseData, > for connector::DummyConnector<T> - impl: impl api::UasPostAuthentication for connector::DummyConnector<T> - impl: impl services::ConnectorIntegration< api::PostAuthenticate, types::UasPostAuthenticationRequestData, types::UasAuthenticationResponseData, > for connector::DummyConnector<T> **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payments/operations.rs** Add: - function: private::call_unified_authentication_service_if_eligible **crates/router/src/core/payments/operations/payment_approve.rs** Remove: - impl: impl GetTracker<F, PaymentData<F>, api::PaymentsCaptureRequest> Add: - impl: impl GetTracker<F, PaymentData<F>, api::PaymentsCaptureRequest> **crates/router/src/core/payments/operations/payment_cancel.rs** Modify existing code **crates/router/src/core/payments/operations/payment_capture.rs** Remove: - impl: impl GetTracker<F, payments::PaymentData<F>, api::PaymentsCaptureRequest> - impl: impl UpdateTracker<F, payments::PaymentData<F>, api::PaymentsCaptureRequest> - impl: impl ValidateRequest<F, api::PaymentsCaptureRequest, payments::PaymentData<F>> for PaymentCapture Add: - impl: impl GetTracker<F, payments::PaymentData<F>, api::PaymentsCaptureRequest> - impl: impl UpdateTracker<F, payments::PaymentData<F>, api::PaymentsCaptureRequest> - impl: impl ValidateRequest<F, api::PaymentsCaptureRequest, payments::PaymentData<F>> for PaymentCapture **crates/router/src/core/payments/operations/payment_complete_authorize.rs** Modify existing code **crates/router/src/core/payments/operations/payment_confirm.rs** Add: - function: private::call_unified_authentication_service_if_eligible **crates/router/src/core/payments/operations/payment_confirm_intent.rs** Remove: - impl: impl ValidateRequest<F, PaymentsConfirmIntentRequest, PaymentConfirmData<F>> - impl: impl GetTracker<F, PaymentConfirmData<F>, PaymentsConfirmIntentRequest> - impl: impl Domain<F, PaymentsConfirmIntentRequest, PaymentConfirmData<F>> Add: - impl: impl ValidateRequest<F, PaymentsConfirmIntentRequest, PaymentConfirmData<F>> - impl: impl GetTracker<F, PaymentConfirmData<F>, PaymentsConfirmIntentRequest> - impl: impl Domain<F, PaymentsConfirmIntentRequest, PaymentConfirmData<F>> **crates/router/src/core/payments/operations/payment_create.rs** Modify existing code **crates/router/src/core/payments/operations/payment_create_intent.rs** Remove: - impl: impl GetTracker<F, payments::PaymentIntentData<F>, PaymentsCreateIntentRequest> - impl: impl UpdateTracker<F, payments::PaymentIntentData<F>, PaymentsCreateIntentRequest> Add: - impl: impl GetTracker<F, payments::PaymentIntentData<F>, PaymentsCreateIntentRequest> - impl: impl UpdateTracker<F, payments::PaymentIntentData<F>, PaymentsCreateIntentRequest> **crates/router/src/core/payments/operations/payment_get.rs** Remove: - impl: impl ValidateRequest<F, PaymentsRetrieveRequest, PaymentStatusData<F>> Add: - impl: impl ValidateRequest<F, PaymentsRetrieveRequest, PaymentStatusData<F>> **crates/router/src/core/payments/operations/payment_get_intent.rs** Remove: - impl: impl GetTracker<F, payments::PaymentIntentData<F>, PaymentsGetIntentRequest> - impl: impl UpdateTracker<F, payments::PaymentIntentData<F>, PaymentsGetIntentRequest> - impl: impl ValidateRequest<F, PaymentsGetIntentRequest, payments::PaymentIntentData<F>> Add: - impl: impl GetTracker<F, payments::PaymentIntentData<F>, PaymentsGetIntentRequest> - impl: impl UpdateTracker<F, payments::PaymentIntentData<F>, PaymentsGetIntentRequest> - impl: impl ValidateRequest<F, PaymentsGetIntentRequest, payments::PaymentIntentData<F>> **crates/router/src/core/payments/operations/payment_post_session_tokens.rs** Remove: - impl: impl GetTracker<F, PaymentData<F>, api::PaymentsPostSessionTokensRequest> - impl: impl Domain<F, api::PaymentsPostSessionTokensRequest, PaymentData<F>> - impl: impl UpdateTracker<F, PaymentData<F>, api::PaymentsPostSessionTokensRequest> - impl: impl ValidateRequest<F, api::PaymentsPostSessionTokensRequest, PaymentData<F>> Add: - impl: impl GetTracker<F, PaymentData<F>, api::PaymentsPostSessionTokensRequest> - impl: impl Domain<F, api::PaymentsPostSessionTokensRequest, PaymentData<F>> - impl: impl UpdateTracker<F, PaymentData<F>, api::PaymentsPostSessionTokensRequest> - impl: impl ValidateRequest<F, api::PaymentsPostSessionTokensRequest, PaymentData<F>> **crates/router/src/core/payments/operations/payment_reject.rs** Modify existing code **crates/router/src/core/payments/operations/payment_session.rs** Remove: - impl: impl GetTracker<F, PaymentData<F>, api::PaymentsSessionRequest> Add: - impl: impl GetTracker<F, PaymentData<F>, api::PaymentsSessionRequest> **crates/router/src/core/payments/operations/payment_session_intent.rs** Remove: - impl: impl GetTracker<F, payments::PaymentIntentData<F>, PaymentsSessionRequest> - impl: impl ValidateRequest<F, PaymentsSessionRequest, payments::PaymentIntentData<F>> Add: - impl: impl GetTracker<F, payments::PaymentIntentData<F>, PaymentsSessionRequest> - impl: impl ValidateRequest<F, PaymentsSessionRequest, payments::PaymentIntentData<F>> **crates/router/src/core/payments/operations/payment_start.rs** Modify existing code **crates/router/src/core/payments/operations/payment_status.rs** Remove: - impl: impl GetTracker<F, PaymentData<F>, api::PaymentsRetrieveRequest> Add: - impl: impl GetTracker<F, PaymentData<F>, api::PaymentsRetrieveRequest> **crates/router/src/core/payments/operations/payment_update.rs** Modify existing code **crates/router/src/core/payments/operations/payments_incremental_authorization.rs** Remove: - impl: impl impl<F: Clone> UpdateTracker<F, payments::PaymentData<F>, PaymentsIncrementalAuthorizationRequest> - impl: impl impl<F: Clone + Send> Domain<F, PaymentsIncrementalAuthorizationRequest, payments::PaymentData<F>> Add: - impl: impl impl<F: Clone + Sync> UpdateTracker<F, payments::PaymentData<F>, PaymentsIncrementalAuthorizationRequest> - impl: impl impl<F: Clone + Send + Sync> Domain<F, PaymentsIncrementalAuthorizationRequest, payments::PaymentData<F>> **crates/router/src/core/payments/operations/tax_calculation.rs** Remove: - impl: impl GetTracker<F, PaymentData<F>, api::PaymentsDynamicTaxCalculationRequest> - impl: impl Domain<F, api::PaymentsDynamicTaxCalculationRequest, PaymentData<F>> - impl: impl UpdateTracker<F, PaymentData<F>, api::PaymentsDynamicTaxCalculationRequest> - impl: impl ValidateRequest<F, api::PaymentsDynamicTaxCalculationRequest, PaymentData<F>> Add: - impl: impl GetTracker<F, PaymentData<F>, api::PaymentsDynamicTaxCalculationRequest> - impl: impl Domain<F, api::PaymentsDynamicTaxCalculationRequest, PaymentData<F>> - impl: impl UpdateTracker<F, PaymentData<F>, api::PaymentsDynamicTaxCalculationRequest> - impl: impl ValidateRequest<F, api::PaymentsDynamicTaxCalculationRequest, PaymentData<F>> **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/core/unified_authentication_service.rs** Add: - function: private::pre_authentication - function: private::post_authentication - function: private::confirmation - function: pub::create_new_authentication - impl: impl UnifiedAuthenticationService<F> for ClickToPay - mod: pub::transformers - mod: pub::types - mod: pub::utils **crates/router/src/core/unified_authentication_service/transformers.rs** Add: - function: private::try_from - impl: impl TryFrom<PaymentData<F>> for UasPreAuthenticationRequestData **crates/router/src/core/unified_authentication_service/types.rs** Add: - struct: pub::ClickToPay - trait: pub::UnifiedAuthenticationService **crates/router/src/core/unified_authentication_service/utils.rs** Add: - function: pub::update_trackers - function: pub::do_auth_connector_call - function: pub::construct_uas_router_data **crates/router/src/core/utils.rs** Modify existing code **crates/router/src/core/webhooks/utils.rs** Modify existing code **crates/router/src/services/api.rs** Modify existing code **crates/router/src/services/conversion_impls.rs** Add: - function: private::from_old_router_data - function: private::to_old_router_data - impl: impl RouterDataConversion<T, Req, Resp> for UasFlowData **crates/router/src/types.rs** Modify existing code **crates/router/src/types/api.rs** Add: - mod: pub::unified_authentication_service - mod: pub::unified_authentication_service_v2 **crates/router/src/types/api/unified_authentication_service.rs** Add: - struct: pub::PreAuthenticate - struct: pub::PostAuthenticate - trait: pub::UnifiedAuthenticationService - trait: pub::UasPreAuthentication - trait: pub::UasPostAuthentication **crates/router/src/types/api/unified_authentication_service_v2.rs** Add: - trait: pub::UnifiedAuthenticationServiceV2 - trait: pub::UasPreAuthenticationV2 - trait: pub::UasPostAuthenticationV2 **crates/router/src/types/api/verify_connector.rs** Modify existing code **crates/router/tests/connectors/aci.rs** Modify existing code **crates/router/tests/connectors/utils.rs** Modify existing code **crates/router_derive/src/macros/operation.rs** Modify existing code
{"pr_number": 6743, "pr_title": "feat(core): Add uas framework support", "merged_at": "2024-12-11T12:29:33Z", "intent": {"feature_type": "authentication", "action": "add_feature", "entities": []}, "hierarchy": {"database": ["crates/diesel_models/src/authentication.rs"], "domain": ["crates/hyperswitch_domain_models/src/router_data.rs", "crates/hyperswitch_domain_models/src/router_data_v2.rs", "crates/hyperswitch_domain_models/src/router_data_v2/flow_common_types.rs", "crates/hyperswitch_domain_models/src/router_request_types.rs", "crates/hyperswitch_domain_models/src/router_request_types/unified_authentication_service.rs"], "core_business": ["crates/router/src/core.rs", "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/payments.rs", "crates/router/src/core/payments/connector_integration_v2_impls.rs", "crates/router/src/core/payments/flows.rs", "crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/operations.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_confirm_intent.rs", "crates/router/src/core/payments/operations/payment_create.rs", "crates/router/src/core/payments/operations/payment_create_intent.rs", "crates/router/src/core/payments/operations/payment_get.rs", "crates/router/src/core/payments/operations/payment_get_intent.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_session_intent.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", "crates/router/src/core/unified_authentication_service.rs", "crates/router/src/core/unified_authentication_service/transformers.rs", "crates/router/src/core/unified_authentication_service/types.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/router/src/types/api/verify_connector.rs", "crates/router/tests/connectors/aci.rs", "crates/router/tests/connectors/utils.rs"], "types": ["crates/router/src/types.rs", "crates/router/src/types/api.rs", "crates/router/src/types/api/unified_authentication_service.rs", "crates/router/src/types/api/unified_authentication_service_v2.rs"], "other": ["crates/router/src/services/api.rs", "crates/router/src/services/conversion_impls.rs", "crates/router_derive/src/macros/operation.rs"]}, "change_types": {"structs_added": 12, "functions_added": 15, "enums_added": 1, "fields_added": 243, "imports_added": 26, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(core): payments - map billing first and last name to card holder name ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Hotfix for https://github.com/juspay/hyperswitch/pull/6791 ### 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/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/payment_methods/vault.rs` - `crates/router/src/core/payments/helpers.rs` **4. External Connector Integration** - `crates/router/src/utils/verify_connector.rs` - `crates/router/tests/connectors/aci.rs` - `crates/router/tests/connectors/adyen.rs` - ... and 5 more files **5. Tests** - `cypress-tests/cypress/e2e/PaymentUtils/Cybersource.js` - `cypress-tests/cypress/e2e/PaymentUtils/Stripe.js` **Code Patterns Applied:** - Extend existing types with new fields (28 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 46e21753: Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/hyperswitch_domain_models/src/payment_method_data.rs** Modify existing code **crates/router/src/core/payment_methods/vault.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/utils/verify_connector.rs** Modify existing code **crates/router/tests/connectors/aci.rs** Modify existing code **crates/router/tests/connectors/adyen.rs** Modify existing code **crates/router/tests/connectors/airwallex.rs** Modify existing code **crates/router/tests/connectors/fiserv.rs** Modify existing code **crates/router/tests/connectors/rapyd.rs** Modify existing code **crates/router/tests/connectors/utils.rs** Modify existing code **crates/router/tests/connectors/worldline.rs** Modify existing code
{"pr_number": 6817, "pr_title": "fix(core): payments - map billing first and last name to card holder name", "merged_at": "2024-12-12T06:39:49Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "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/payment_methods/vault.rs", "crates/router/src/core/payments/helpers.rs"], "connectors": ["crates/router/src/utils/verify_connector.rs", "crates/router/tests/connectors/aci.rs", "crates/router/tests/connectors/adyen.rs", "crates/router/tests/connectors/airwallex.rs", "crates/router/tests/connectors/fiserv.rs", "crates/router/tests/connectors/rapyd.rs", "crates/router/tests/connectors/utils.rs", "crates/router/tests/connectors/worldline.rs"], "tests": ["cypress-tests/cypress/e2e/PaymentUtils/Cybersource.js", "cypress-tests/cypress/e2e/PaymentUtils/Stripe.js"]}, "change_types": {"fields_added": 28, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat: dockerfile for building migration runner image ## 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 --> Adding a new `dockerfile` for building a `hyperswitch-migration-runner` image. This dockerfile, `docker/migration-runner.Dockerfile`, contains the respective router version's: 1. Migration files 2. diesel.toml along with diesel cli installed. This helps us run db migrations inside `air-gapped` clusters without the need to pull the migration files from github. ### 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). --> When deploying hyperswitch helm charts in Kubernetes cluster, we use a init pod to pull the migration files from the github and run db migrations. But in case of an air-gapped cluster, which doesn't have access to internet, this process is not feasible. Building and releasing the migration-runner image for each stable release along with the other standalone builds will solve this issue. ## 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. Built image locally: <img width="1198" height="297" alt="Screenshot 2025-09-17 at 3 20 20 PM" src="https://github.com/user-attachments/assets/7832572d-2f5a-4901-8e30-497b0830c200" /> 2. Run the image with local `pg` url, and migrations ran successfully: <img width="660" height="59" alt="Screenshot 2025-09-17 at 3 33 42 PM" src="https://github.com/user-attachments/assets/12c5cf42-a861-45f5-983c-d1754220e16b" /> ## 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** - `docker-compose-development.yml` - `docker-compose.yml` **2. Other** - `docker/migration-runner.Dockerfile` - `scripts/migration_runner_entrypoint.sh` **Code Patterns Applied:** - Extend existing types with new fields (8 changes) - Add conditional logic for feature flags or filtering (2 changes)
{"pr_number": 9417, "pr_title": "feat: dockerfile for building migration runner image", "merged_at": "2025-10-01T13:05:56Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"config": ["docker-compose-development.yml", "docker-compose.yml"], "other": ["docker/migration-runner.Dockerfile", "scripts/migration_runner_entrypoint.sh"]}, "change_types": {"fields_added": 8, "conditionals_added": 2}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(connector): [Breadpay]Add support for Breadpay connector ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Add support for breadpay. Breadpay is buy now paylater payment/connector. This PR have both changes for adding as payment method and connector. Reference for their [doc](https://web.archive.org/web/20210422022335/https://docs.breadpayments.com/api/api/#single-collapse-2) <img width="375" height="288" alt="Screenshot 2025-07-21 at 12 18 36 PM" src="https://github.com/user-attachments/assets/328ffcae-64e0-4ba8-84d5-246748163540" /> ### 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)? --> Cannot test this connector since we don't have credentials. Can test this till merchant connector account create, can't test payment that would 5xx. ## 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/connector_validation.rs` **4. External Connector Integration** - `crates/common_enums/src/connector_enums.rs` - `crates/connector_configs/src/connector.rs` - `crates/connector_configs/toml/development.toml` - ... and 19 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` - `crates/payment_methods/src/helpers.rs` **7. 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 (5 changes) - Implement new functions (17 changes) - Extend existing types with new fields (84 changes) **Detailed Identifier Changes:** Commit 0d9750cd: Files to modify: **crates/api_models/src/payments.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/connector_configs/src/connector.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/breadpay.rs** Remove: - function: private::validate_mandate_payment - function: private::validate_psync_reference_id - impl: impl ConnectorValidation for Breadpay - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Breadpay Add: - impl: impl api::PaymentsCompleteAuthorize for Breadpay - impl: impl ConnectorValidation for Breadpay **crates/hyperswitch_connectors/src/connectors/breadpay/transformers.rs** Remove: - struct: pub::BreadpayPaymentsRequest Add: - function: private::try_from - struct: pub::BreadpayCartRequest - struct: pub::CallBackResponse **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/nuvei/transformers.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/square/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/default_implementations.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/helpers.rs** Modify existing code **crates/router/src/connector/utils.rs** Modify existing code **crates/router/src/core/connector_validation.rs** Modify existing code **crates/router/src/types/api/connector_mapping.rs** Modify existing code **crates/router/src/types/connector_transformers.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code
{"pr_number": 8676, "pr_title": "feat(connector): [Breadpay]Add support for Breadpay connector", "merged_at": "2025-07-24T14:55:45Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "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/connector_validation.rs"], "connectors": ["crates/common_enums/src/connector_enums.rs", "crates/connector_configs/src/connector.rs", "crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/hyperswitch_connectors/src/connectors/adyen.rs", "crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs", "crates/hyperswitch_connectors/src/connectors/breadpay.rs", "crates/hyperswitch_connectors/src/connectors/breadpay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/klarna.rs", "crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs", "crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs", "crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs", "crates/hyperswitch_connectors/src/connectors/square/transformers.rs", "crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs", "crates/hyperswitch_connectors/src/connectors/zen/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/router/src/connector/utils.rs", "crates/router/src/types/api/connector_mapping.rs", "crates/router/src/types/connector_transformers.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"], "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": 5, "functions_added": 17, "enums_added": 2, "fields_added": 84, "imports_added": 7}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(webhooks): Provide outgoing webhook support for revenue recovery ## 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 enables outgoing webhook support for revenue recovery. When the retries get succeeded that are done using the revenue recovery system, an outgoing webhook needs to be triggered to the url in business profile. This pr adds that support. ### 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. PaymentResponse -> added modified at in api_models 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? 1. create a billing profile with webhook.site url to monitor the webhooks. 2. Create an payment mca using this ``` curl --location 'http://localhost:8080/v2/connector-accounts' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-merchant-id: {{merchant-id}}' --header 'x-profile-id: {{profile-id}}' \ --header 'Authorization: {{api-key}}' --header 'api-key:{{api-key}}' \ --data '{ "connector_type": "payment_processor", "connector_name": "stripe", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "{{api_key}}" }, "payment_methods_enabled": [ { "payment_method_type": "card", "payment_method_subtypes": [ { "payment_method_subtype": "credit", "payment_experience": null, "card_networks": [ "Visa", "Mastercard" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "debit", "payment_experience": null, "card_networks": [ "Visa", "Mastercard" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "card", "payment_experience": null, "card_networks": [ "Visa", "Mastercard" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "frm_configs": null, "connector_webhook_details": { "merchant_secret": "" }, "metadata": { "report_group": "Hello", "merchant_config_currency": "USD" }, "profile_id": "{{profile_id}}" }' ``` 3. create an billing mca ``` curl --location 'http://localhost:8080/v2/connector-accounts' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-merchant-id: {{merchant-id}}' --header 'x-profile-id: {{profile-id}}' \ --header 'Authorization: {{api-key}}' --header 'api-key:{{api-key}}' \ --data '{ "connector_type": "billing_processor", "connector_name": "custombilling", "connector_account_details": { "auth_type": "NoKey" }, "feature_metadata" : { "revenue_recovery" : { "max_retry_count" : 9, "billing_connector_retry_threshold" : 0, "billing_account_reference" :{ "{{payment_mca}}" : "{{payment_mca}}" }, "switch_payment_method_config" : { "retry_threshold" : 0, "time_threshold_after_creation": 0 } } }, "profile_id": "{{profile_id}}" }' ``` 4. switch revenue recovery config to cascading ``` curl --location --request PUT 'http://localhost:8080/v2/profiles/pro_DD6ZRORqBtEwR3ITjseM' \ --header 'x-merchant-id: {{erchant-id}}' \ --header 'Authorization: {{api-key}}' \ --header 'Content-Type: application/json' \ --header 'api-key: {{api-key}}' \ --data '{ "revenue_recovery_retry_algorithm_type": "cascading" } ' ``` 5. Go to stripe dashboard and create a customer and attach a card for that customer 6. Hit this recovery api with that customer_id and payment_method_id ``` curl --location 'http://localhost:8080/v2/payments/recovery' \ --header 'Authorization: {{api-key}}' --header 'x-profile-id: {{profile-id}} --header 'x-merchant-id: {{merchant-id}}' --header 'Content-Type: application/json' \ --header 'api-key:{{api_key}}' \ --data '{ "amount_details": { "order_amount": 2250, "currency": "USD" }, "merchant_reference_id": "test_ffhgfewf3476f5", "connector_transaction_id": "1831984", "connector_customer_id": "{{customer_id_from_stripe}}", "error": { "code": "110", "message": "Insufficient Funds" }, "billing": { "address": { "state": "CA", "country": "US" } }, "payment_method_type": "card", "payment_method_sub_type": "credit", "payment_method_data": { "primary_processor_payment_method_token": "{{payment_method_id_from_stripe}}", "additional_payment_method_info": { "card_exp_month": "12", "card_exp_year": "25", "last_four_digits": 1997, "card_network": "Visa", "card_issuer": "Wells Fargo NA", "card_type": "credit" } }, "billing_started_at": "2024-05-29T08:10:58Z", "transaction_created_at": "2024-05-29T08:10:58Z", "attempt_status": "failure", "action": "schedule_failed_payment", "billing_merchant_connector_id": "{{billing_mca}} "payment_merchant_connector_id": "{{payment_mca}}" }' ``` 7. There will be a process tracker entry now and wait till it get triggered. Based on the test card if we mentioned a successful card's payment method id then we will get a webhook to webhook.site url. Sample screen shot and sample webhook body are mentioned below <img width="1727" height="951" alt="Screenshot 2025-09-08 at 1 55 58 AM" src="https://github.com/user-attachments/assets/77c67c1b-ba07-4d48-8109-be0de40837d6" /> Sample body of the webhook ``` { "merchant_id": "cloth_seller_I7nS4iwZnxRDJtGfiNTy", "event_id": "evt_019925c838c877c282d3eaf5b86e9036", "event_type": "payment_succeeded", "content": { "type": "payment_details", "object": { "id": "12345_pay_019925c5959a79418301a9460b92edb1", "status": "succeeded", "amount": { "order_amount": 2250, "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": 2250, "amount_to_capture": null, "amount_capturable": 0, "amount_captured": 2250 }, "customer_id": null, "connector": "stripe", "created": "2025-09-07T20:02:09.947Z", "modified_at": "2025-09-07T20:05:02.777Z", "payment_method_data": { "billing": null }, "payment_method_type": "card", "payment_method_subtype": "credit", "connector_transaction_id": "pi_3S4opd2KXBHSNjod0tD34Dmw", "connector_reference_id": "pi_3S4opd2KXBHSNjod0tD34Dmw", "merchant_connector_id": "mca_MbQwWzi4tFItmgYAmshC", "browser_info": null, "error": null, "shipping": null, "billing": null, "attempts": null, "connector_token_details": { "token": "pm_1S4olu2KXBHSNjodBbiedqY9", "connector_token_request_reference_id": null }, "payment_method_id": null, "next_action": null, "return_url": "https://google.com/success", "authentication_type": "no_three_ds", "authentication_type_applied": "no_three_ds", "is_iframe_redirection_enabled": null, "merchant_reference_id": "test_ffhgfewf3476f5", "raw_connector_response": null, "feature_metadata": { "redirect_response": null, "search_tags": null, "apple_pay_recurring_details": null, "revenue_recovery": { "total_retry_count": 2, "payment_connector_transmission": "ConnectorCallSucceeded", "billing_connector_id": "mca_ppEVMjRWgTiGyCiwFtg9", "active_attempt_payment_connector_id": "mca_MbQwWzi4tFItmgYAmshC", "billing_connector_payment_details": { "payment_processor_token": "pm_1S4olu2KXBHSNjodBbiedqY9", "connector_customer_id": "cus_T0qSE723C5Xxic" }, "payment_method_type": "card", "payment_method_subtype": "credit", "connector": "stripe", "billing_connector_payment_method_details": { "type": "card", "value": { "card_network": "Visa", "card_issuer": "Wells Fargo NA" } }, "invoice_next_billing_time": null, "invoice_billing_started_at_time": null, "first_payment_attempt_pg_error_code": "resource_missing", "first_payment_attempt_network_decline_code": null, "first_payment_attempt_network_advice_code": null } } } }, "timestamp": "2025-09-07T20:05:02.792Z" } ``` ## 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/payments.rs` - `crates/hyperswitch_domain_models/src/revenue_recovery.rs` **3. Core Business Logic** - `crates/router/src/core/payments/transformers.rs` - `crates/router/src/core/revenue_recovery.rs` - `crates/router/src/core/revenue_recovery/api.rs` - ... and 2 more files **4. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs` **5. Type Definitions** - `crates/router/src/types/storage/revenue_recovery.rs` **6. Other** - `api-reference/v2/openapi_spec_v2.json` - `crates/router/src/workflows/revenue_recovery.rs` - `crates/storage_impl/src/errors.rs` **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (3 changes) - Extend existing types with new fields (43 changes) **Detailed Identifier Changes:** Commit 2db61538: Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments.rs** Modify existing code **crates/hyperswitch_domain_models/src/revenue_recovery.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/core/revenue_recovery.rs** Add: - function: pub::get_payment_response_using_payment_get_operation - function: pub::reset_connector_transmission_and_active_attempt_id_before_pushing_to_execute_workflow **crates/router/src/core/revenue_recovery/api.rs** Modify existing code **crates/router/src/core/revenue_recovery/transformers.rs** Modify existing code **crates/router/src/core/revenue_recovery/types.rs** Add: - function: pub::send_outgoing_webhook_based_on_revenue_recovery_status - struct: private::RevenueRecoveryOutgoingWebhook - impl: impl RevenueRecoveryOutgoingWebhook **crates/router/src/types/storage/revenue_recovery.rs** Modify existing code **crates/router/src/workflows/revenue_recovery.rs** Modify existing code **crates/storage_impl/src/errors.rs** Modify existing code
{"pr_number": 9294, "pr_title": "feat(webhooks): Provide outgoing webhook support for revenue recovery", "merged_at": "2025-09-11T17:13:31Z", "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/payments.rs", "crates/hyperswitch_domain_models/src/revenue_recovery.rs"], "core_business": ["crates/router/src/core/payments/transformers.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"], "connectors": ["crates/hyperswitch_connectors/src/connectors/chargebee/transformers.rs", "crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs"], "types": ["crates/router/src/types/storage/revenue_recovery.rs"], "other": ["api-reference/v2/openapi_spec_v2.json", "crates/router/src/workflows/revenue_recovery.rs", "crates/storage_impl/src/errors.rs"]}, "change_types": {"structs_added": 1, "functions_added": 3, "fields_added": 43, "imports_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [Facilitapay] Add support for Pix Bank Transfers ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> This PR does the following: - Adds Facilitapay Connector configs - Enables Facilitapay Connector in Core - Feature Matrix - Pix Bank Transfer (QRCode flow) - Does not support `Manual` capture - AccessToken flow - Requires Connector Customer to be created prior to make a payment - Adds Cypress test coverage for Facilitapay Pix Bank transfer Also, this PR involves a small core change which is explained [here](https://github.com/juspay/hyperswitch/pull/7704#discussion_r2037127714). Quoted below: > Previously, `updated_customer` was called before constructing the `router_data`. `updated_customer` returns us the `connector_customer` in `payment_data` that then gets updated in the `router_data` while it gets constructed. > > Facilitapay requires us to pass `access_token` to create the `connectorCustomer` but `access_token` is available only in the `router_data`. This creates a cyclical dependency between `updated_customer` and `router_data`. > > To comes overcome this, we need to move `updated_customer` after `router_data`. > > `updated_customer` returns us the `connector_customer` value and it never gets updated in the `router_data` since it is called before calling `updated_customer` which results in `connector_customer_id` to go missing resulting in all payments that rely on `connector_customer_id` to fail. > > Hence, we need to update the `router_data` with `connector_customer` value that we get from `payment_data` returned by the `updated_customer` and the above lines does 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). --> New connector integration. Closes #7732 ## 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>Authorize call</summary> ```curl curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Accept-Language: ja' \ --header 'api-key: dev_ptC2LQhN7u066v4fCKUcOEAWodGDoMl3We9YxN0cM4d7dal16ZSmt9EOdSJ0C6I4' \ --data-raw '{ "amount": 10400, "currency": "BRL", "confirm": false, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 10400, "email": "guesjhvghht@example.com", "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": "BR", "first_name": "PiX" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "BR", "first_name": "PiX" } }, "browser_info": { "ip_address": "192.168.0.1", "user_agent": "MY LAPTOP RUNS ON m0z://a" }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` ```json { "payment_id": "pay_HqjCP9OWtYlxg0KYwPMU", "merchant_id": "postman_merchant_GHAction_1744364064", "status": "requires_payment_method", "amount": 10400, "net_amount": 10400, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_HqjCP9OWtYlxg0KYwPMU_secret_VZlpnxNdhvw9MExKApxo", "created": "2025-04-11T11:27:27.560Z", "currency": "BRL", "customer_id": null, "customer": { "id": null, "name": null, "email": "guesjhvghht@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": null, "payment_method_data": null, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "BR", "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 Fransico", "country": "BR", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": null }, "phone": null, "email": 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": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": null, "connector_transaction_id": null, "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_d88fTeKAHe2MonTWe8Dk", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": null, "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-04-11T11:42:27.560Z", "fingerprint": null, "browser_info": { "ip_address": "192.168.0.1", "user_agent": "MY LAPTOP RUNS ON m0z://a" }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-04-11T11:27:27.583Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null } ``` </details> <details> <summary>Confirm call</summary> ```curl curl --location 'http://localhost:8080/payments/pay_HqjCP9OWtYlxg0KYwPMU/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_e765522f7c7543b9844fbcb1ab283a71' \ --data '{ "payment_method": "bank_transfer", "payment_method_type": "pix", "payment_method_data": { "bank_transfer": { "pix": { "cpf": "866.656.235-80", "source_bank_account_id": "739d6b0a-e92a-40fd-9f58-6d4cdeb699bb", "destination_bank_account_id": "91f5cac1-9058-44b7-80e1-80c6f4a6f0bc", "pix_qr_expiry": "2025-04-11T19:53:54.807Z" } } }, "client_secret": "pay_HqjCP9OWtYlxg0KYwPMU_secret_VZlpnxNdhvw9MExKApxo" }' ``` ```json { "payment_id": "pay_HqjCP9OWtYlxg0KYwPMU", "merchant_id": "postman_merchant_GHAction_1744364064", "status": "requires_customer_action", "amount": 10400, "net_amount": 10400, "shipping_cost": null, "amount_capturable": 10400, "amount_received": null, "connector": "facilitapay", "client_secret": "pay_HqjCP9OWtYlxg0KYwPMU_secret_VZlpnxNdhvw9MExKApxo", "created": "2025-04-11T11:27:27.560Z", "currency": "BRL", "customer_id": null, "customer": { "id": null, "name": null, "email": "guesjhvghht@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": { "pix": { "pix_key": null, "cpf": "866.***.**5-80", "cnpj": null, "source_bank_account_id": "739d****-****-****-****-********99bb", "destination_bank_account_id": "91f5****-****-****-****-********f0bc" } }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "BR", "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 Fransico", "country": "BR", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": null }, "phone": null, "email": 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": { "type": "qr_code_information", "image_data_url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAegAAAHoCAAAAACnOyPQAAAUIklEQVR4Ae3gAZAkSZIkSRKLqpm7R0REZmZmVlVVVVV3d3d3d/fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMdHd3d3dXV1VVVVVmZkZGRIS7m5kKz0xmV3d1d3dPz8zMzMxMYjVX/T9A5ar/D6hc9f8Blav+P6By1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/AypX/X9A5ar/D6hc9f8Blav+P6By1f8HVK76/4DKVf8fULnq/wMq/wLxb2NeNOIK85zEFeY5iRfOXCGuMFeI5888J3GFeU7ihTNXiOdknpO4wjx/4t/GvFBUrvr/gMpV/x9Quer/AypX/X9A5ar/D6hc9f8Blav+P6DyIjIvGvH8iedkrjBXiCvMFeYK8ZzMFeI5medknpO5QlxhnpN4/sQV5gpxhblCXCGek7lCPH/iCvP8mReNeJFQuer/AypX/X9A5ar/D6hc9f8Blav+P6By1f8HVK76/4DKv5J4/szzJ56TuUI8J/OvY56TeP7MFeL5Ey+cuUI8f+b5E1eY50+8aMTzZ/5VqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/AypX/X9A5b+IeU7mCnGFeE7mOZnnT7xw4grz/JkrxBXmhTNXiH8d8ZzMFeIK85+KylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wdU/ocx/zbmCnGFuUJcIV44c4W4wjx/4vkzV4h/HfNfgspV/x9Quer/AypX/X9A5ar/D6hc9f8Blav+P6By1f8HVP6VzL+NuMJcIZ6TuUJcYV44cYW5QlxhrhDPyTx/4vkTz8k8f+IK8fyJK8wV4l/H/IegctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVF5H49zFXiCvMFeJfR1xhrhBXmCvEFeYK8ZzEFeaFM1eI5ySuMM/JXCGuMFeIF05cYZ6T+A9F5ar/D6hc9f8Blav+P6By1f8HVK76/4DKVf8fULnq/wMq/wLzH8tcIa4wV4jnzzwn85zMFeI5iefPPH/iOYl/HXGFuUK8cOIK85zMfwoqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/HyDzwokrzBXiRWOek3jhzBXi+TNXiBfOXCH+dcxzEs+feU7iCnOFuMJcIa4wz0k8J3OFeNGYfxUqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1D5F5gXjXnhzBXihTNXiH8b8fyZK8QLJ64wL5x44cQV5jmJ52SuEFeYK8RzMs9JXGFeJFSu+v+AylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVq/4/QOaFE1eYF048f+YKcYV5/sQV5vkTz8k8J/GczHMSz8lcIZ6Tef7EFeY5iedkrhDPyVwhrjAvnHhO5jmJK8yLhMpV/x9Quer/AypX/X9A5ar/D6hc9f8Blav+P6By1f8HVP4F5jmJK8xzMs9JXCGuMFeIK8wV4grznMTzZ64Qz8k8f+IK85zEFeb5E1eYK8wV4grznMwV4gpzhXjRiCvMFeb5E/8mVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+g8i8Qz8lcIa4wV4jnZK4Qz594/sS/j7jCXGGuEM/JXCGuMFeIK8xzEleY509cYa4QL5x4TuYKcYW5QvyHoHLV/wdUrvr/gMpV/x9Quer/AypX/X9A5ar/D6hc9f8BMi+ceOHMi0ZcYa4QV5grxHMyV4jnZJ6TeE7mCnGFeU7i+TNXiCvMFeL5M8+fuMJcIa4wL5x4/sxzEleYK8QV5oWictX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVf4G5QlxhrhDPSTwnc4V4TuIK85zMFeI5medPPCfznMxzEleYK8QV5vkTV5jnJJ6TuMI8f+YKcYW5Qjwnc4V4/sQV5gpxhXmRULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v8AmRdOPH/mCvGczBXiCvP8iedkrhAvGnOFeE7mOYkrzBXiCvNvI54/8/yJK8y/jbjCPCdxhXmRULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+Ayr/AXCGuMM/JPCfxnMQLZ64QV5jnT1xhrhBXmCvE82euEM+fuMJcIV405vkTz8k8J/H8mReN+DehctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqFz1/wEyL5y4wjwncYV5/sQLZ144cYV5TuI5mSvEFeaFE1eY5088J3OFuMJcIZ6TuUJcYa4QV5jnTzwnc4V44cy/CpWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqLyIxPMnnj/znMRzEleYF424wjwn8fyJ589cIa4wz5+5QlxhnpN5TuIK85zMFeIK85zMFeIKcYW5QlxhrhDPSVxhXigqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/HyDzwokrzBXiOZkXTjx/5jmJK8wV4jmZ5ySuMC+ceNGY5ySuMFeIK8wV4grz/InnZJ6TuMJcIZ4/88KJK8wLReWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKv8C88KJ589cYV44cYW5Qlxhnj/x/IkrzPNnrhAvnLjCXCGuMM/JXCGuMM/JvGjEFeZfR/yrULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v8AmRdOPCfz/IkrzBXiCvP8iRfOXCGeP/PCiSvMFeIK86IRz5+5Qjx/5grxnMwV4jmZK8QV5oUTz595oahc9f8Blav+P6By1f8HVK76/4DKVf8fULnq/wMqV/1/gMyLRjx/5jmJK8xzEi8ac4W4wjwncYW5QlxhnpN4TuYK8ZzM8yeuMC+cuMI8J3GFuUI8J/P8iSvMFeI5mSvEFeZFQuWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKi8i86IxV4grzBXmOYnnZP5tzBXiCnOFuUI8J/OvI64wL5y4wrxw5vkTV5grxBXmCvHvQuWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKi8icYW5QrxoxBXm+TNXiP9Y4jmJF848J3OFeE7iCnOFuUJcIZ6TuMJcIV448ZzE82euEFeYF4rKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B8i8cOIKc4V4/szzJ54/85zEczJXiOfPvGjEFeb5E8/JPH/i+TPPSVxhnpN44czzJ64wz5+4wrxQVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+g8i8wV4grzBXi+RNXmOdkXjjz/JkrxBXmOYkrzItGXGGek7lCPCdzhblCPH/i+RNXmOcknj9xhXlO4vkzLxIqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1D5F4jnz1whnpP59xFXmOdknpO4wlwhnpN5/szzJ1405grx/JnnZK4Qz8lcIZ6Tef7MvwuVq/4/oHLV/wdUrvr/gMpV/x9Quer/AypX/X9A5ar/D5D51xH/Nub5E8/JvHDiP4d54cRzMleIF85cIa4wV4h/HXOFeE7mRULlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/Ayr/AnGFucJcIZ4/88KJF424wjx/5grx/JkrxHMyV4grzL+OuUJcYZ6TeP7MFeIK85zEFeb5E1eYK8S/CpWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqPw7meck/m3MFeI5iRfOXCFeOPOczHMSz8k8f+IK85zECyeuMM9JXGGek7jCPCfxb0Llqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/Ayr/SuIK8/yZ5ySek3nhzAsnXjTiCnOFuMJcIZ6TuUI8J/GczHMSz8k8J/GcxL+OuML8u1C56v8DKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMqLSFxhnpO4wlwhnpN5TuIKc4W4wjx/4oUTz5+5Qlxh/nOY5ySeP/PCiSvMczJXiOdk/lWoXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f4DMfwxxhXlO4grznMQV5jmJK8wLJ54/8/yJK8wLJ64wz0lcYZ6TuMJcIa4wz5+4wlwhnpN5TuIK8/yJK8wLReWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKv9G4gpzhblCvHDiOYkrzPMnrjBXiCvMFeIKc4W4wlwhrjBXiOdkXjTmCnGFucJcIZ6TuMJcIZ4/85zEFeYK8/yJK8yLhMpV/x9Quer/AypX/X9A5ar/D6hc9f8Blav+P6By1f8HVP4F4jmZK8xzEleY5ySek3nRiCvMFeIK88KZK8QV5jmZK8TzZ56TeE7mCnGFeU7m+TPPSVxhnpN54cS/CZWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PkPnXEVeY509cYZ6TeE7mCnGFuUI8J/OcxHMyV4grzItGPCdzhbjCvGjEFeYK8ZzMcxJXmOckrjDPn7jCXCGuMC8SKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Q+ReI52SuEFeYK8QV5vkzV4jnZK4QV5jnJJ4/c4W4wlwhrjBXiOfPXCGek7lCPH/mCvHCmRdOXGGek3j+zL8Llav+P6By1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+o/CuJK8wV4gpzhbjCXCGuMP825gpxhblCXGGeP/GczItGPCdzhXhO5vkzV4jnzzwn8aIRV5h/EypX/X9A5ar/D6hc9f8Blav+P6By1f8HVK76/4DKVf8fIPOiES8ac4X4j2GuEFeY50+8aMwV4gpzhXj+zPMnrjDPn3hO5grxnMxzEleYK8RzMleI52ReKCpX/X9A5ar/D6hc9f8Blav+P6By1f8HVK76/4DKVf8fUHkRmeckrjDPSTx/5gpxhblCvHDiCnOFeE7mCnOFeE7mOYnnJJ6TeeHEFeYK8ZzMczLPn7lCXGFeOPP8mRcJlav+P6By1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+QeeHEczLPSTwn85zEi8ZcIa4wV4grzAsnrjBXiH8d85zEFeYKcYW5QlxhnpN4Tub5E8+feU7iCvPvQuWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKv9G4vkTz5+5Qjwnc4V4TuI5iRfOvHDmCnGFuUJcIa4wV5grxBXmCvGcxHMyV4jnT1xhrhAvGvHCmReKylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wfIvGjEczIvGvGczHMSV5grxIvGXCGeP/OcxIvGXCFeOPP8iSvMcxJXmOdPPCdzhXhO5grxnMwLReWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKi8i85zEFeY5iSvMFebfxlwhnj/x/JnnJF405jmZ5088J/HCiRdOPH/iOZkrxL8Jlav+P6By1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+o/BuZ5888J3GFuUI8J3OF+Lcxz0lcYZ6Tef7Ei0ZcYZ4/8/yZ5ySuMM/JPH/iCnGFeU7iRULlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/Ayr/AvFvY64wV4grzBXi+TNXiCvMcxLPSTwn88KJK8zzJ64wV4grzAsnrjBXiCvMFeI5iedPXGGek3lO4grzIqFy1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZUXkXnRiOckrjDPyVwhrjBXiCvMcxLPyVwhrjDPSTx/5vkTz0k8J/GczHMyV4grzHMyV4gXzrxozBXiCvNCUbnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+Ayr+SeP7MCyeuMM+feE7iCvOiEVeY50+8cOaFE1eYK8QV5jmZK8S/jvi3MS8SKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Q+W8inpP51xFXmOfPvHDiCnOFuMI8J/H8mSvEFeYK8fyZK8QV5grxnMwV4grz/IkrzIuEylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wdU/puYF414TuaFE8/JPCfx/JkrxAsnrjDPSTx/5gpxhblCXGGeP3OFeE7m34TKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1T+lcy/jnlO4oUzV4grzPMnXjhzhXhO5grxnMQV5oUTz5+5QlxhrhDPSVxhnj/x/JkrxBXmX4XKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B8i8cOLfxlwhnpN5TuIK85zEczIvGnGFuUI8J/OcxBXmOYkrzBXiCvOiEVeYK8QV5t9GPH/mRULlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/A2Su+n+AylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/AypX/X9A5ar/D6hc9f8Blav+P6By1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wf8I0R1tG46Vec2AAAAAElFTkSuQmCC", "display_to_timestamp": 1744371750000, "qr_code_url": null, "display_text": null, "border_color": null }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "pix", "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": "aa3223d2-bd54-44d0-8816-fdbeae885c14", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "aa3223d2-bd54-44d0-8816-fdbeae885c14", "payment_link": null, "profile_id": "pro_d88fTeKAHe2MonTWe8Dk", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_uEuYQIIpwmhh2zZgfnCK", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-04-11T11:42:27.560Z", "fingerprint": null, "browser_info": { "os_type": null, "language": null, "time_zone": null, "ip_address": "::1", "os_version": null, "user_agent": null, "color_depth": null, "device_model": null, "java_enabled": null, "screen_width": null, "accept_header": null, "screen_height": null, "accept_language": "en", "java_script_enabled": null }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-04-11T11:27:32.090Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null } ``` </details> <details> <summary>QR Code</summary> <img width="691" alt="image" src="https://github.com/user-attachments/assets/5e088c40-aaea-4056-baf5-e81b1a88603d" /> <img width="704" alt="image" src="https://github.com/user-attachments/assets/b87e6a91-a4d7-4dfa-a846-1cf785e8b298" /> </details> <details> <summary>Retrieve Call</summary> ```curl curl --location 'http://localhost:8080/payments/pay_HqjCP9OWtYlxg0KYwPMU?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_ptC2LQhN7u066v4fCKUcOEAWodGDoMl3We9YxN0cM4d7dal16ZSmt9EOdSJ0C6I4' ``` ```json { "payment_id": "pay_HqjCP9OWtYlxg0KYwPMU", "merchant_id": "postman_merchant_GHAction_1744364064", "status": "requires_customer_action", "amount": 10400, "net_amount": 10400, "shipping_cost": null, "amount_capturable": 10400, "amount_received": null, "connector": "facilitapay", "client_secret": "pay_HqjCP9OWtYlxg0KYwPMU_secret_VZlpnxNdhvw9MExKApxo", "created": "2025-04-11T11:27:27.560Z", "currency": "BRL", "customer_id": null, "customer": { "id": null, "name": null, "email": "guesjhvghht@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": { "pix": { "pix_key": null, "cpf": "866.***.**5-80", "cnpj": null, "source_bank_account_id": "739d****-****-****-****-********99bb", "destination_bank_account_id": "91f5****-****-****-****-********f0bc" } }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "BR", "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 Fransico", "country": "BR", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": null }, "phone": null, "email": 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": { "type": "qr_code_information", "image_data_url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAegAAAHoCAAAAACnOyPQAAAUIklEQVR4Ae3gAZAkSZIkSRKLqpm7R0REZmZmVlVVVVV3d3d3d/fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMdHd3d3dXV1VVVVVmZkZGRIS7m5kKz0xmV3d1d3dPz8zMzMxMYjVX/T9A5ar/D6hc9f8Blav+P6By1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/AypX/X9A5ar/D6hc9f8Blav+P6By1f8HVK76/4DKVf8fULnq/wMq/wLxb2NeNOIK85zEFeY5iRfOXCGuMFeI5888J3GFeU7ihTNXiOdknpO4wjx/4t/GvFBUrvr/gMpV/x9Quer/AypX/X9A5ar/D6hc9f8Blav+P6DyIjIvGvH8iedkrjBXiCvMFeYK8ZzMFeI5medknpO5QlxhnpN4/sQV5gpxhblCXCGek7lCPH/iCvP8mReNeJFQuer/AypX/X9A5ar/D6hc9f8Blav+P6By1f8HVK76/4DKv5J4/szzJ56TuUI8J/OvY56TeP7MFeL5Ey+cuUI8f+b5E1eY50+8aMTzZ/5VqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/AypX/X9A5b+IeU7mCnGFeE7mOZnnT7xw4grz/JkrxBXmhTNXiH8d8ZzMFeIK85+KylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wdU/ocx/zbmCnGFuUJcIV44c4W4wjx/4vkzV4h/HfNfgspV/x9Quer/AypX/X9A5ar/D6hc9f8Blav+P6By1f8HVP6VzL+NuMJcIZ6TuUJcYV44cYW5QlxhrhDPyTx/4vkTz8k8f+IK8fyJK8wV4l/H/IegctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVF5H49zFXiCvMFeJfR1xhrhBXmCvEFeYK8ZzEFeaFM1eI5ySuMM/JXCGuMFeIF05cYZ6T+A9F5ar/D6hc9f8Blav+P6By1f8HVK76/4DKVf8fULnq/wMq/wLzH8tcIa4wV4jnzzwn85zMFeI5iefPPH/iOYl/HXGFuUK8cOIK85zMfwoqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/HyDzwokrzBXiRWOek3jhzBXi+TNXiBfOXCH+dcxzEs+feU7iCnOFuMJcIa4wz0k8J3OFeNGYfxUqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1D5F5gXjXnhzBXihTNXiH8b8fyZK8QLJ64wL5x44cQV5jmJ52SuEFeYK8RzMs9JXGFeJFSu+v+AylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVq/4/QOaFE1eYF048f+YKcYV5/sQV5vkTz8k8J/GczHMSz8lcIZ6Tef7EFeY5iedkrhDPyVwhrjAvnHhO5jmJK8yLhMpV/x9Quer/AypX/X9A5ar/D6hc9f8Blav+P6By1f8HVP4F5jmJK8xzMs9JXCGuMFeIK8wV4grznMTzZ64Qz8k8f+IK85zEFeb5E1eYK8wV4grznMwV4gpzhXjRiCvMFeb5E/8mVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+g8i8Qz8lcIa4wV4jnZK4Qz594/sS/j7jCXGGuEM/JXCGuMFeIK8xzEleY509cYa4QL5x4TuYKcYW5QvyHoHLV/wdUrvr/gMpV/x9Quer/AypX/X9A5ar/D6hc9f8BMi+ceOHMi0ZcYa4QV5grxHMyV4jnZJ6TeE7mCnGFeU7i+TNXiCvMFeL5M8+fuMJcIa4wL5x4/sxzEleYK8QV5oWictX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVf4G5QlxhrhDPSTwnc4V4TuIK85zMFeI5medPPCfznMxzEleYK8QV5vkTV5jnJJ6TuMI8f+YKcYW5Qjwnc4V4/sQV5gpxhXmRULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v8AmRdOPH/mCvGczBXiCvP8iedkrhAvGnOFeE7mOYkrzBXiCvNvI54/8/yJK8y/jbjCPCdxhXmRULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+Ayr/AXCGuMM/JPCfxnMQLZ64QV5jnT1xhrhBXmCvE82euEM+fuMJcIV405vkTz8k8J/H8mReN+DehctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqFz1/wEyL5y4wjwncYV5/sQLZ144cYV5TuI5mSvEFeaFE1eY5088J3OFuMJcIZ6TuUJcYa4QV5jnTzwnc4V44cy/CpWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqLyIxPMnnj/znMRzEleYF424wjwn8fyJ589cIa4wz5+5QlxhnpN5TuIK85zMFeIK85zMFeIKcYW5QlxhrhDPSVxhXigqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/HyDzwokrzBXiOZkXTjx/5jmJK8wV4jmZ5ySuMC+ceNGY5ySuMFeIK8wV4grz/InnZJ6TuMJcIZ4/88KJK8wLReWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKv8C88KJ589cYV44cYW5Qlxhnj/x/IkrzPNnrhAvnLjCXCGuMM/JXCGuMM/JvGjEFeZfR/yrULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v8AmRdOPCfz/IkrzBXiCvP8iRfOXCGeP/PCiSvMFeIK86IRz5+5Qjx/5grxnMwV4jmZK8QV5oUTz595oahc9f8Blav+P6By1f8HVK76/4DKVf8fULnq/wMqV/1/gMyLRjx/5jmJK8xzEi8ac4W4wjwncYW5QlxhnpN4TuYK8ZzM8yeuMC+cuMI8J3GFuUI8J/P8iSvMFeI5mSvEFeZFQuWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKi8i86IxV4grzBXmOYnnZP5tzBXiCnOFuUI8J/OvI64wL5y4wrxw5vkTV5grxBXmCvHvQuWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKi8icYW5QrxoxBXm+TNXiP9Y4jmJF848J3OFeE7iCnOFuUJcIZ6TuMJcIV448ZzE82euEFeYF4rKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B8i8cOIKc4V4/szzJ54/85zEczJXiOfPvGjEFeb5E8/JPH/i+TPPSVxhnpN44czzJ64wz5+4wrxQVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+g8i8wV4grzBXi+RNXmOdkXjjz/JkrxBXmOYkrzItGXGGek7lCPCdzhblCPH/i+RNXmOcknj9xhXlO4vkzLxIqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1D5F4jnz1whnpP59xFXmOdknpO4wlwhnpN5/szzJ1405grx/JnnZK4Qz8lcIZ6Tef7MvwuVq/4/oHLV/wdUrvr/gMpV/x9Quer/AypX/X9A5ar/D5D51xH/Nub5E8/JvHDiP4d54cRzMleIF85cIa4wV4h/HXOFeE7mRULlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/Ayr/AnGFucJcIZ4/88KJF424wjx/5grx/JkrxHMyV4grzL+OuUJcYZ6TeP7MFeIK85zEFeb5E1eYK8S/CpWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqPw7meck/m3MFeI5iRfOXCFeOPOczHMSz8k8f+IK85zECyeuMM9JXGGek7jCPCfxb0Llqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/Ayr/SuIK8/yZ5ySek3nhzAsnXjTiCnOFuMJcIZ6TuUI8J/GczHMSz8k8J/GcxL+OuML8u1C56v8DKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMqLSFxhnpO4wlwhnpN5TuIKc4W4wjx/4oUTz5+5Qlxh/nOY5ySeP/PCiSvMczJXiOdk/lWoXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f4DMfwxxhXlO4grznMQV5jmJK8wLJ54/8/yJK8wLJ64wz0lcYZ6TuMJcIa4wz5+4wlwhnpN5TuIK8/yJK8wLReWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKv9G4gpzhblCvHDiOYkrzPMnrjBXiCvMFeIKc4W4wlwhrjBXiOdkXjTmCnGFucJcIZ6TuMJcIZ4/85zEFeYK8/yJK8yLhMpV/x9Quer/AypX/X9A5ar/D6hc9f8Blav+P6By1f8HVP4F4jmZK8xzEleY5ySek3nRiCvMFeIK88KZK8QV5jmZK8TzZ56TeE7mCnGFeU7m+TPPSVxhnpN54cS/CZWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PkPnXEVeY509cYZ6TeE7mCnGFuUI8J/OcxHMyV4grzItGPCdzhbjCvGjEFeYK8ZzMcxJXmOckrjDPn7jCXCGuMC8SKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Q+ReI52SuEFeYK8QV5vkzV4jnZK4QV5jnJJ4/c4W4wlwhrjBXiOfPXCGek7lCPH/mCvHCmRdOXGGek3j+zL8Llav+P6By1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+o/CuJK8wV4gpzhbjCXCGuMP825gpxhblCXGGeP/GczItGPCdzhXhO5vkzV4jnzzwn8aIRV5h/EypX/X9A5ar/D6hc9f8Blav+P6By1f8HVK76/4DKVf8fIPOiES8ac4X4j2GuEFeY50+8aMwV4gpzhXj+zPMnrjDPn3hO5grxnMxzEleYK8RzMleI52ReKCpX/X9A5ar/D6hc9f8Blav+P6By1f8HVK76/4DKVf8fUHkRmeckrjDPSTx/5gpxhblCvHDiCnOFeE7mCnOFeE7mOYnnJJ6TeeHEFeYK8ZzMczLPn7lCXGFeOPP8mRcJlav+P6By1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+QeeHEczLPSTwn85zEi8ZcIa4wV4grzAsnrjBXiH8d85zEFeYKcYW5QlxhnpN4Tub5E8+feU7iCvPvQuWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKv9G4vkTz5+5Qjwnc4V4TuI5iRfOvHDmCnGFuUJcIa4wV5grxBXmCvGcxHMyV4jnT1xhrhAvGvHCmReKylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wfIvGjEczIvGvGczHMSV5grxIvGXCGeP/OcxIvGXCFeOPP8iSvMcxJXmOdPPCdzhXhO5grxnMwLReWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKi8i85zEFeY5iSvMFebfxlwhnj/x/JnnJF405jmZ5088J/HCiRdOPH/iOZkrxL8Jlav+P6By1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+o/BuZ5888J3GFuUI8J3OF+Lcxz0lcYZ6Tef7Ei0ZcYZ4/8/yZ5ySuMM/JPH/iCnGFeU7iRULlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/Ayr/AvFvY64wV4grzBXi+TNXiCvMcxLPSTwn88KJK8zzJ64wV4grzAsnrjBXiCvMFeI5iedPXGGek3lO4grzIqFy1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZUXkXnRiOckrjDPyVwhrjBXiCvMcxLPyVwhrjDPSTx/5vkTz0k8J/GczHMyV4grzHMyV4gXzrxozBXiCvNCUbnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+Ayr+SeP7MCyeuMM+feE7iCvOiEVeY50+8cOaFE1eYK8QV5jmZK8S/jvi3MS8SKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Q+W8inpP51xFXmOfPvHDiCnOFuMI8J/H8mSvEFeYK8fyZK8QV5grxnMwV4grz/IkrzIuEylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wdU/puYF414TuaFE8/JPCfx/JkrxAsnrjDPSTx/5gpxhblCXGGeP3OFeE7m34TKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1T+lcy/jnlO4oUzV4grzPMnXjhzhXhO5grxnMQV5oUTz5+5QlxhrhDPSVxhnj/x/JkrxBXmX4XKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B8i8cOLfxlwhnpN5TuIK85zEczIvGnGFuUI8J/OcxBXmOYkrzBXiCvOiEVeYK8QV5t9GPH/mRULlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/A2Su+n+AylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/AypX/X9A5ar/D6hc9f8Blav+P6By1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wf8I0R1tG46Vec2AAAAAElFTkSuQmCC", "display_to_timestamp": 1744371750000, "qr_code_url": null, "display_text": null, "border_color": null }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "pix", "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": "aa3223d2-bd54-44d0-8816-fdbeae885c14", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "aa3223d2-bd54-44d0-8816-fdbeae885c14", "payment_link": null, "profile_id": "pro_d88fTeKAHe2MonTWe8Dk", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_uEuYQIIpwmhh2zZgfnCK", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-04-11T11:42:27.560Z", "fingerprint": null, "browser_info": { "os_type": null, "language": null, "time_zone": null, "ip_address": "::1", "os_version": null, "user_agent": null, "color_depth": null, "device_model": null, "java_enabled": null, "screen_width": null, "accept_header": null, "screen_height": null, "accept_language": "en", "java_script_enabled": null }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-04-11T12:02:17.950Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null } ``` </details> <details> <summary>Refund call</summary> ```curl curl --location 'http://localhost:8080/refunds' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_ptC2LQhN7u066v4fCKUcOEAWodGDoMl3We9YxN0cM4d7dal16ZSmt9EOdSJ0C6I4' \ --data '{ "payment_id": "pay_HqjCP9OWtYlxg0KYwPMU", "amount": 600, "reason": "Customer returned product", "refund_type": "instant", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` ```json { "error": { "type": "invalid_request", "message": "This Payment could not be refund because it has a status of requires_customer_action. The expected state is succeeded, partially_captured", "code": "IR_14" } } ``` </details> <details> <summary>Void call</summary> Authorize ```curl curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Accept-Language: ja' \ --header 'api-key: dev_ptC2LQhN7u066v4fCKUcOEAWodGDoMl3We9YxN0cM4d7dal16ZSmt9EOdSJ0C6I4' \ --data-raw '{ "amount": 10400, "currency": "BRL", "confirm": false, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 10400, "email": "guesjhvghht@example.com", "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": "BR", "first_name": "PiX" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "BR", "first_name": "PiX" } }, "browser_info": { "ip_address": "192.168.0.1", "user_agent": "MY LAPTOP RUNS ON m0z://a" }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` ```json { "payment_id": "pay_oEMHiZFEcOnYfhKdCGkX", "merchant_id": "postman_merchant_GHAction_1744364064", "status": "requires_payment_method", "amount": 10400, "net_amount": 10400, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_oEMHiZFEcOnYfhKdCGkX_secret_4pCGB9AmNlBGvZUcT8La", "created": "2025-04-11T17:53:10.739Z", "currency": "BRL", "customer_id": null, "customer": { "id": null, "name": null, "email": "guesjhvghht@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": null, "payment_method_data": null, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "BR", "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 Fransico", "country": "BR", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": null }, "phone": null, "email": 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": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": null, "connector_transaction_id": null, "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_d88fTeKAHe2MonTWe8Dk", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": null, "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-04-11T18:08:10.739Z", "fingerprint": null, "browser_info": { "ip_address": "192.168.0.1", "user_agent": "MY LAPTOP RUNS ON m0z://a" }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-04-11T17:53:10.747Z", "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 } ``` Confirm ```curl curl --location 'http://localhost:8080/payments/pay_oEMHiZFEcOnYfhKdCGkX/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_e765522f7c7543b9844fbcb1ab283a71' \ --data '{ "payment_method": "bank_transfer", "payment_method_type": "pix", "payment_method_data": { "bank_transfer": { "pix": { "cpf": "866.656.235-80", "source_bank_account_id": "739d6b0a-e92a-40fd-9f58-6d4cdeb699bb", "destination_bank_account_id": "91f5cac1-9058-44b7-80e1-80c6f4a6f0bc", "pix_qr_expiry": "2025-04-11T19:53:54.807Z" } } }, "client_secret": "pay_oEMHiZFEcOnYfhKdCGkX_secret_4pCGB9AmNlBGvZUcT8La" }' ``` ```json { "payment_id": "pay_oEMHiZFEcOnYfhKdCGkX", "merchant_id": "postman_merchant_GHAction_1744364064", "status": "requires_customer_action", "amount": 10400, "net_amount": 10400, "shipping_cost": null, "amount_capturable": 10400, "amount_received": null, "connector": "facilitapay", "client_secret": "pay_oEMHiZFEcOnYfhKdCGkX_secret_4pCGB9AmNlBGvZUcT8La", "created": "2025-04-11T17:53:10.739Z", "currency": "BRL", "customer_id": null, "customer": { "id": null, "name": null, "email": "guesjhvghht@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": { "pix": { "pix_key": null, "cpf": "866.***.**5-80", "cnpj": null, "source_bank_account_id": "739d****-****-****-****-********99bb", "destination_bank_account_id": "91f5****-****-****-****-********f0bc" } }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "BR", "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 Fransico", "country": "BR", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": null }, "phone": null, "email": 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": { "type": "qr_code_information", "image_data_url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAegAAAHoCAAAAACnOyPQAAAUO0lEQVR4Ae3gAZAkSZIkSRKLqpm7R0REZmZmVlVVVVV3d3d3d/fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMdHd3d3dXV1VVVVVmZkZGRIS7m5kKz0xmV3d1d3dPz8zMzMxMYjVX/T9A5ar/D6hc9f8Blav+P6By1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/AypX/X9A5ar/D6hc9f8Blav+P6By1f8HVK76/4DKVf8fULnq/wMq/wLxb2OeP/GczHMSV5gXjbjCPH/iCvOcxBXmOYkrzHMSL5x5TuI5mSvEFeb5E/825oWictX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVF5F50YjnTzx/4vkTz5950YjnJK4wV5grxAsnrjBXiCvMFeL5M89JPCdxhXn+zItGvEioXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f0DlX0k8f+b5E8+fuUK8aMwV4gpzhblCPCdzhbjCPCdxhXnhzBXiP4a5QrxoxPNn/lWoXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlv4i5QlwhrjBXiCvMFeIKc4W4wlwhrjAvGnGFeU7iCvOiMVeIK8wV4jmZ52SuEFeYK8QV5j8Vlav+P6By1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+o/BcRLxpxhblCPCfx/JkrxAsnXjhxhXn+xHMSV5grxBXiCvPCmf8SVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+g8q9k/m3MFeIKc4W4wjx/5l/HXCGek3n+xBXiOYnnZJ6TuMJcIf5zmP8QVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+g8iIS/zXEFeYKcYW5QlxhrhBXmCvEFeYK8ZzEFeY5mSvEFeYK8ZzEFeYKcYW5QlxhrhBXmOdPXGGek/gPReWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DZP5ziRfOPH/iCnOFeOHM8yeuMM+feP7MFeJfx7xw4vkz/6moXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f4DMCyeuMFeIF4150YjnZJ4/8aIxV4h/HfPCiSvMCyeek3n+xBXmOYkXjflXoXLV/wdUrvr/gMpV/x9Quer/AypX/X9A5ar/D6hc9f8BlX8nc4W4wlwhrjBXiCvMFeIK88KJK8wLJ64QV5grxHMyz5+4wrxw4vkzz8k8f+IK85zEFeYK8ZzMcxJXmBcJlav+P6By1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+QedGIK8wV4jmZK8QV5vkT/z3MFeJFY64Qz5+5Qjwn88KJ5888J/GczHMSV5gXCZWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqPwLxBXmOZkrxBXiCnOFuMJcIa4wV4gXzlwhrjDPSTwn8/yJF85cIa4wz8k8f+IKc4W4QlxhrhBXmOdknpO4wlxhrhDPSfybULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+Ayr/AXCGek3lO5gpxhblCPH/mCvGczBXiOYnnz1whrjDPn3jhzBXiRWOek3lO4oUTV5grzBXiCvOcxL8Llav+P6By1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+Q+bcRz8k8J/GvY56TeP7MFeKFM89JXGGuEM/JXCGuMFeI52Sek7jCXCGuMFeIK8zzJ54/c4W4wjwn8ZzMC0Xlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/Ayr/AnGFuUK8cOI5meckrjBXiCvEFeY5mefPXCGek3nhxHMyL5y5Qjwn8ZzE82euEFeY589cIa4Qz0lcYZ6TeZFQuer/AypX/X9A5ar/D6hc9f8Blav+P6By1f8HVK76/4DKv5G5Qjwnc4V4TuKFMy+ceOHM8yeuMFeI5ySuMFeY5yReNOb5E1eY5ySuMFeIF848J3OFuMK8UFSu+v+AylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVq/4/oPJvJJ4/cYV5TuYK8fyJK8y/jrlCvHDiCvPCiSvM8yeuMM+feE7mhRMvGvGczBXmRULlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/Ayr/AvOczBXiCvOczHMSV5grzBXiOZnnZJ4/c4V44cwV4jmJ58+8aMwV4oUzV4grzBXiCnOFeP7McxJXmCvEFeZFQuWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DZF404grznMQV5grx/JkrxBXmCnGFuUJcYa4QV5jnT1xhrhDPn3lO4grznMQV5jmJ52Sek7jC/NuI52ReOHGFeZFQuer/AypX/X9A5ar/D6hc9f8Blav+P6By1f8HVK76/wCZF424wlwhrjDPn7jCXCFeOPP8iRfOXCGek7lCXGGuEM+feU7iCnOFuMJcIa4wz0lcYZ4/8ZzMcxLPyfyHoHLV/wdUrvr/gMpV/x9Quer/AypX/X9A5ar/D6hc9f8BMi+cuMJcIa4wV4grzBXihTNXiOdknpN4TuY5iedkrhBXmCvEi8ZcIa4wV4grzPMnrjDPSTwn85zEczJXiCvMcxLPyVwhrjAvFJWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqLyIxPNnnpN5TuIK85zM8yeuMFeIK8QV5vkTV5grxBXm+RNXmOdkrhDPSVxhrhAvnHn+xHMyL5y4wlwh/k2oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f4DMi0Y8f+Y5iedkrhDPn3nhxHMy/zriCnOFuMJcIV4488KJ589cIZ4/85zEczLPn3hO5kVC5ar/D6hc9f8Blav+P6By1f8HVK76/4DKVf8fULnq/wMq/wLxohFXmOfPXCGuMM9JPH/mOYkrzHMSV5grxBXm+RPPyTwncYW4wjx/5gpxhblCXGGuEFeYF424wlwhrjBXiH8VKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9QeRGZK8RzEs9JvGjE82eek3hO5grxwpkrxL+OuMJcIZ6TuMJcIZ6TeOHEFeYK8cKJK8wV4grzr0Llqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/AyovInGFeU7iCvP8iSvMFeIKc4V4TuIKc4V5TuIK88KJ52SeP/HCmSvEC2euEFeY589cIZ6Tef7EczLPSVxhXigqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1B5EZkrxBXm+RNXmOcknpN40YjnZJ6TuMK8aMQV5jmJK8wV4gpzhblCPH/iOYkrzBXmOZkrxHMSV5jnJJ4/8yKhctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVF5F4TuL5My+cuUL865jnzzwn8cKZ589cIa4wz0k8f+YKcYW5Qlwh/nXM82f+Xahc9f8Blav+P6By1f8HVK76/4DKVf8fULnq/wMqV/1/gMwLJ64wz0n825jnJJ6TedGI589cIf51zHMSz8k8f+Jfxzwn8aIxV4jnZF4kVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+g8m9knpO4wlwhnpN5TuIKc4V4TuIK85zEczIvnHlO4gpzhbhCXGGek7lCPCdzhXlO4jmZ5yReNOY5iSvMFeJfhcpV/x9Quer/AypX/X9A5ar/D6hc9f8Blav+P6By1f8HyLxw4jmZ5yReNOYK8ZzMFeIK85zE82euEFeYK8R/DPP8iReNeU7iCnOFeP7MFeIKc4V4/syLhMpV/x9Quer/AypX/X9A5ar/D6hc9f8Blav+P6By1f8HyLxoxHMyz0lcYZ6TeE7mCnGFeU7iOZnnJK4wV4grzHMSz8lcIa4wV4jnZF404grznMQV5grx/JnnJK4wV4jnZP5dqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/AypX/X+AzAsnnpN5TuKFM8+feE7mOYkXzjwncYV5/sQLZ56TeE7mCnGFuUJcYa4Qz595TuL5M1eIK8wV4jmZfxUqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1D5VxJXmCvMFeIKc4W4QlxhnpN50ZjnJJ6TeP7EczLPSVxhrhBXmCvMcxIvGvPCiedkrhDPyVwhnj9xhXmRULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+Ayr/APCdxhbjCPCdxhXn+xBXmOYnnZJ6TuMJcIa4wL5x5TuIKc4W4wlwhnpN5TuYKcYW5Qjx/5grxnMwV4gpzhbjCXGGeP/GvQuWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DZF44cYV5/sRzMs9J/McwV4grzHMSz595/sQV5vkTz5+5Qlxh/m3EFebfRjwn80JRuer/AypX/X9A5ar/D6hc9f8Blav+P6By1f8HVK76/4DKv8BcIa4wz8k8J/GczPMnnpN54cTzJ64wV4grzAtnnj9xhblCXGGek7lCXGGek7jCXCGuMM+fuMI8f+I5mX8VKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Q+ReIF424wjwn8ZzMFeY5iSvMFeJfR1xhrhD/OuYK85zMcxIvGvOczItGPCdzhXlO4jmZF4rKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B8i8aMRzMleI589cIa4wV4h/G/PCiSvMcxLPn7lCXGGuEC+cef7EFeYK8fyZK8S/jrlCPCfzIqFy1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/ATL/OuL5M89JXGGuEM/JXCFeOPNvI64wz5+4wjx/4grz/IkrzPMnrjDPSTwn85zEczLPn7jCvEioXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f0DlRSSek7lCPCfxwpl/G/H8mSvEFeYK88KZF848f+IKc4W4wlwhrjAvnLlCXGGuMP864grzQlG56v8DKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMq/QLxw5jmZ589cIa4wz8lcIZ6TuMJcIZ4/85zEczJXiCvMFeIK85zEFeYKcYW5QlxhnpO5Qlxhnj/x/IkrzBXi+TNXiBcJlav+P6By1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+QeeHEczJXiH8bc4W4wrxoxBXmOYkrzHMSz595TuI5meckrjBXiOfPvHDiCvOcxPNnrhBXmOckrjAvEipX/X9A5ar/D6hc9f8Blav+P6By1f8HVK76/4DKVf8fIPOiEc/JvHDi+TPPSVxhrhAvnLlCvHDm+RPPn7lC/OuY5ySuMFeIK8wV4grznMRzMleIK8zzJ64wLxSVq/4/oHLV/wdUrvr/gMpV/x9Quer/AypX/X9A5ar/D5D5txFXmOckXjTmCvH8mSvEv455TuJfx7xw4jmZK8QLZ54/8aIxV4jnz7xQVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+g8m9knj/znMRzMleIK8wV4grz/JnnTzx/4jmZ509cYV44cYW5QlwhrjDPn3hO4grznMzzJ64QV5jnJF4kVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+g8i8Q/zbmCvP8mSvEcxLPn7jCPCfznMQV5grxnMQV5jmJK8xzEleYF05cYa4QL5x4/sQV5jmZ5ySuMC8SKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9QeRGZF414TuIK8/yZK8RzMleI5ySuMM9JvGjM82eeP/P8medP/PuYF425QlxhXigqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1D5VxLPn/nXEc/JXCGek7lCvHDmCvH8iReNuMK8cOI5mSvMFeIKc4V44cS/jXmRULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+Ayn8x8fyJK8wV4grznMzzJ64wV4jnZK4Qz8lcIa4wz0k8J/PCiSvMczJXiCvMFeIKc4W4wrxw4grzIqFy1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZX/YuYKcYW5QlwhnpO4wlwhnpO5wjwnc4X41xHPyTwncYV5TuL5E8/JPCfznMzzJ64w/yZUrvr/gMpV/x9Quer/AypX/X9A5ar/D6hc9f8Blav+P6Dyr2T+dcwV4jmZ589cIZ4/c4V4TuI5mefPPH/mCvH8iRfOvGjEFeaFE1eYK8wV4grzr0Llqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/AyovIvFvI64wz0lcYa4wV4jnT1xhXjTiCvP8iSvMFeI5mefPPCfxnMwV4gpzhbjCXCGeP3OFuUI8f+IK8yKhctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqFz1/wEyV/0/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/AypX/X9A5ar/D6hc9f8Blav+P6By1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8D/hEoC75kZ7w7cwAAAABJRU5ErkJggg==", "display_to_timestamp": 1744394897000, "qr_code_url": null, "display_text": null, "border_color": null }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "pix", "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": "33fe7dc7-25a0-4ba5-a7d2-4245fc0b2127", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "33fe7dc7-25a0-4ba5-a7d2-4245fc0b2127", "payment_link": null, "profile_id": "pro_d88fTeKAHe2MonTWe8Dk", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_uEuYQIIpwmhh2zZgfnCK", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-04-11T18:08:10.739Z", "fingerprint": null, "browser_info": { "os_type": null, "language": null, "time_zone": null, "ip_address": "::1", "os_version": null, "user_agent": null, "color_depth": null, "device_model": null, "java_enabled": null, "screen_width": null, "accept_header": null, "screen_height": null, "accept_language": "en", "java_script_enabled": null }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-04-11T17:53:19.350Z", "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 } ``` Void ```curl curl --location 'http://localhost:8080/payments/pay_oEMHiZFEcOnYfhKdCGkX/cancel' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_ptC2LQhN7u066v4fCKUcOEAWodGDoMl3We9YxN0cM4d7dal16ZSmt9EOdSJ0C6I4' \ --data '{"cancellation_reason":"requested_by_customer"}' ``` ```json { "payment_id": "pay_oEMHiZFEcOnYfhKdCGkX", "merchant_id": "postman_merchant_GHAction_1744364064", "status": "cancelled", "amount": 10400, "net_amount": 10400, "shipping_cost": null, "amount_capturable": 10400, "amount_received": null, "connector": "facilitapay", "client_secret": "pay_oEMHiZFEcOnYfhKdCGkX_secret_4pCGB9AmNlBGvZUcT8La", "created": "2025-04-11T17:53:10.739Z", "currency": "BRL", "customer_id": null, "customer": { "id": null, "name": null, "email": "guesjhvghht@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": { "pix": { "pix_key": null, "cpf": "866.***.**5-80", "cnpj": null, "source_bank_account_id": "739d****-****-****-****-********99bb", "destination_bank_account_id": "91f5****-****-****-****-********f0bc" } }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "BR", "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 Fransico", "country": "BR", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": null }, "phone": null, "email": 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": { "type": "qr_code_information", "image_data_url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAegAAAHoCAAAAACnOyPQAAAUO0lEQVR4Ae3gAZAkSZIkSRKLqpm7R0REZmZmVlVVVVV3d3d3d/fMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMdHd3d3dXV1VVVVVmZkZGRIS7m5kKz0xmV3d1d3dPz8zMzMxMYjVX/T9A5ar/D6hc9f8Blav+P6By1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/AypX/X9A5ar/D6hc9f8Blav+P6By1f8HVK76/4DKVf8fULnq/wMq/wLxb2OeP/GczHMSV5gXjbjCPH/iCvOcxBXmOYkrzHMSL5x5TuI5mSvEFeb5E/825oWictX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVF5F50YjnTzx/4vkTz5950YjnJK4wV5grxAsnrjBXiCvMFeL5M89JPCdxhXn+zItGvEioXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f0DlX0k8f+b5E8+fuUK8aMwV4gpzhblCPCdzhbjCPCdxhXnhzBXiP4a5QrxoxPNn/lWoXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlv4i5QlwhrjBXiCvMFeIKc4W4wlwhrjAvGnGFeU7iCvOiMVeIK8wV4jmZ52SuEFeYK8QV5j8Vlav+P6By1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+o/BcRLxpxhblCPCfx/JkrxAsnXjhxhXn+xHMSV5grxBXiCvPCmf8SVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+g8q9k/m3MFeIKc4W4wjx/5l/HXCGek3n+xBXiOYnnZJ6TuMJcIf5zmP8QVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+g8iIS/zXEFeYKcYW5QlxhrhBXmCvEFeYK8ZzEFeY5mSvEFeYK8ZzEFeYKcYW5QlxhrhBXmOdPXGGek/gPReWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DZP5ziRfOPH/iCnOFeOHM8yeuMM+feP7MFeJfx7xw4vkz/6moXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f4DMCyeuMFeIF4150YjnZJ4/8aIxV4h/HfPCiSvMCyeek3n+xBXmOYkXjflXoXLV/wdUrvr/gMpV/x9Quer/AypX/X9A5ar/D6hc9f8BlX8nc4W4wlwhrjBXiCvMFeIK88KJK8wLJ64QV5grxHMyz5+4wrxw4vkzz8k8f+IK85zEFeYK8ZzMcxJXmBcJlav+P6By1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+QedGIK8wV4jmZK8QV5vkT/z3MFeJFY64Qz5+5Qjwn88KJ5888J/GczHMSV5gXCZWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqPwLxBXmOZkrxBXiCnOFuMJcIa4wV4gXzlwhrjDPSTwn8/yJF85cIa4wz8k8f+IKc4W4QlxhrhBXmOdknpO4wlxhrhDPSfybULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+Ayr/AXCGek3lO5gpxhblCPH/mCvGczBXiOYnnz1whrjDPn3jhzBXiRWOek3lO4oUTV5grzBXiCvOcxL8Llav+P6By1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+Q+bcRz8k8J/GvY56TeP7MFeKFM89JXGGuEM/JXCGuMFeI52Sek7jCXCGuMFeIK8zzJ54/c4W4wjwn8ZzMC0Xlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/Ayr/AnGFuUK8cOI5meckrjBXiCvEFeY5mefPXCGek3nhxHMyL5y5Qjwn8ZzE82euEFeY589cIa4Qz0lcYZ6TeZFQuer/AypX/X9A5ar/D6hc9f8Blav+P6By1f8HVK76/4DKv5G5Qjwnc4V4TuKFMy+ceOHM8yeuMFeI5ySuMFeY5yReNOb5E1eY5ySuMFeIF848J3OFuMK8UFSu+v+AylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVq/4/oPJvJJ4/cYV5TuYK8fyJK8y/jrlCvHDiCvPCiSvM8yeuMM+feE7mhRMvGvGczBXmRULlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/Ayr/AvOczBXiCvOczHMSV5grzBXiOZnnZJ4/c4V44cwV4jmJ58+8aMwV4oUzV4grzBXiCnOFeP7McxJXmCvEFeZFQuWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DZF404grznMQV5grx/JkrxBXmCnGFuUJcYa4QV5jnT1xhrhDPn3lO4grznMQV5jmJ52Sek7jC/NuI52ReOHGFeZFQuer/AypX/X9A5ar/D6hc9f8Blav+P6By1f8HVK76/wCZF424wlwhrjDPn7jCXCFeOPP8iRfOXCGek7lCXGGuEM+feU7iCnOFuMJcIa4wz0lcYZ4/8ZzMcxLPyfyHoHLV/wdUrvr/gMpV/x9Quer/AypX/X9A5ar/D6hc9f8BMi+cuMJcIa4wV4grzBXihTNXiOdknpN4TuY5iedkrhBXmCvEi8ZcIa4wV4grzPMnrjDPSTwn85zEczJXiCvMcxLPyVwhrjAvFJWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqLyIxPNnnpN5TuIK85zM8yeuMFeIK8QV5vkTV5grxBXm+RNXmOdkrhDPSVxhrhAvnHn+xHMyL5y4wlwh/k2oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f4DMi0Y8f+Y5iedkrhDPn3nhxHMy/zriCnOFuMJcIV4488KJ589cIZ4/85zEczLPn3hO5kVC5ar/D6hc9f8Blav+P6By1f8HVK76/4DKVf8fULnq/wMq/wLxohFXmOfPXCGuMM9JPH/mOYkrzHMSV5grxBXm+RPPyTwncYW4wjx/5gpxhblCXGGuEFeYF424wlwhrjBXiH8VKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9QeRGZK8RzEs9JvGjE82eek3hO5grxwpkrxL+OuMJcIZ6TuMJcIZ6TeOHEFeYK8cKJK8wV4grzr0Llqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/AyovInGFeU7iCvP8iSvMFeIKc4V4TuIKc4V5TuIK88KJ52SeP/HCmSvEC2euEFeY589cIZ6Tef7EczLPSVxhXigqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1B5EZkrxBXm+RNXmOcknpN40YjnZJ6TuMK8aMQV5jmJK8wV4gpzhblCPH/iOYkrzBXmOZkrxHMSV5jnJJ4/8yKhctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVF5F4TuL5My+cuUL865jnzzwn8cKZ589cIa4wz0k8f+YKcYW5Qlwh/nXM82f+Xahc9f8Blav+P6By1f8HVK76/4DKVf8fULnq/wMqV/1/gMwLJ64wz0n825jnJJ6TedGI589cIf51zHMSz8k8f+Jfxzwn8aIxV4jnZF4kVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+g8m9knpO4wlwhnpN5TuIKc4V4TuIK85zEczIvnHlO4gpzhbhCXGGek7lCPCdzhXlO4jmZ5yReNOY5iSvMFeJfhcpV/x9Quer/AypX/X9A5ar/D6hc9f8Blav+P6By1f8HyLxw4jmZ5yReNOYK8ZzMFeIK85zE82euEFeYK8R/DPP8iReNeU7iCnOFeP7MFeIKc4V4/syLhMpV/x9Quer/AypX/X9A5ar/D6hc9f8Blav+P6By1f8HyLxoxHMyz0lcYZ6TeE7mCnGFeU7iOZnnJK4wV4grzHMSz8lcIa4wV4jnZF404grznMQV5grx/JnnJK4wV4jnZP5dqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/AypX/X+AzAsnnpN5TuKFM8+feE7mOYkXzjwncYV5/sQLZ56TeE7mCnGFuUJcYa4Qz595TuL5M1eIK8wV4jmZfxUqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1D5VxJXmCvMFeIKc4W4QlxhnpN50ZjnJJ6TeP7EczLPSVxhrhBXmCvMcxIvGvPCiedkrhDPyVwhnj9xhXmRULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+Ayr/APCdxhbjCPCdxhXn+xBXmOYnnZJ6TuMJcIa4wL5x5TuIKc4W4wlwhnpN5TuYKcYW5Qjx/5grxnMwV4gpzhbjCXGGeP/GvQuWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DZF44cYV5/sRzMs9J/McwV4grzHMSz595/sQV5vkTz5+5Qlxh/m3EFebfRjwn80JRuer/AypX/X9A5ar/D6hc9f8Blav+P6By1f8HVK76/4DKv8BcIa4wz8k8J/GczPMnnpN54cTzJ64wV4grzAtnnj9xhblCXGGek7lCXGGek7jCXCGuMM+fuMI8f+I5mX8VKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Q+ReIF424wjwn8ZzMFeY5iSvMFeJfR1xhrhD/OuYK85zMcxIvGvOczItGPCdzhXlO4jmZF4rKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B8i8aMRzMleI589cIa4wV4h/G/PCiSvMcxLPn7lCXGGuEC+cef7EFeYK8fyZK8S/jrlCPCfzIqFy1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/ATL/OuL5M89JXGGuEM/JXCFeOPNvI64wz5+4wjx/4grz/IkrzPMnrjDPSTwn85zEczLPn7jCvEioXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f0DlRSSek7lCPCfxwpl/G/H8mSvEFeYK88KZF848f+IKc4W4wlwhrjAvnLlCXGGuMP864grzQlG56v8DKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMq/QLxw5jmZ589cIa4wz8lcIZ6TuMJcIZ4/85zEczJXiCvMFeIK85zEFeYKcYW5QlxhnpO5Qlxhnj/x/IkrzBXi+TNXiBcJlav+P6By1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+QeeHEczJXiH8bc4W4wrxoxBXmOYkrzHMSz595TuI5meckrjBXiOfPvHDiCvOcxPNnrhBXmOckrjAvEipX/X9A5ar/D6hc9f8Blav+P6By1f8HVK76/4DKVf8fIPOiEc/JvHDi+TPPSVxhrhAvnLlCvHDm+RPPn7lC/OuY5ySuMFeIK8wV4grznMRzMleIK8zzJ64wLxSVq/4/oHLV/wdUrvr/gMpV/x9Quer/AypX/X9A5ar/D5D5txFXmOckXjTmCvH8mSvEv455TuJfx7xw4jmZK8QLZ54/8aIxV4jnz7xQVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+g8m9knj/znMRzMleIK8wV4grz/JnnTzx/4jmZ509cYV44cYW5QlwhrjDPn3hO4grznMzzJ64QV5jnJF4kVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+g8i8Q/zbmCvP8mSvEcxLPn7jCPCfznMQV5grxnMQV5jmJK8xzEleYF05cYa4QL5x4/sQV5jmZ5ySuMC8SKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9QeRGZF414TuIK8/yZK8RzMleI5ySuMM9JvGjM82eeP/P8medP/PuYF425QlxhXigqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1D5VxLPn/nXEc/JXCGek7lCvHDmCvH8iReNuMK8cOI5mSvMFeIKc4V44cS/jXmRULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+Ayn8x8fyJK8wV4grznMzzJ64wV4jnZK4Qz8lcIa4wz0k8J/PCiSvMczJXiCvMFeIKc4W4wrxw4grzIqFy1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZX/YuYKcYW5QlwhnpO4wlwhnpO5wjwnc4X41xHPyTwncYV5TuL5E8/JPCfznMzzJ64w/yZUrvr/gMpV/x9Quer/AypX/X9A5ar/D6hc9f8Blav+P6Dyr2T+dcwV4jmZ589cIZ4/c4V4TuI5mefPPH/mCvH8iRfOvGjEFeaFE1eYK8wV4grzr0Llqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/AyovIvFvI64wz0lcYa4wV4jnT1xhXjTiCvP8iSvMFeI5mefPPCfxnMwV4gpzhbjCXCGeP3OFuUI8f+IK8yKhctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqFz1/wEyV/0/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8DKlf9f0Dlqv8PqFz1/wGVq/4/oHLV/wdUrvr/gMpV/x9Quer/AypX/X9A5ar/D6hc9f8Blav+P6By1f8HVK76/4DKVf8fULnq/wMqV/1/QOWq/w+oXPX/AZWr/j+gctX/B1Su+v+AylX/H1C56v8D/hEoC75kZ7w7cwAAAABJRU5ErkJggg==", "display_to_timestamp": 1744394897000, "qr_code_url": null, "display_text": null, "border_color": null }, "cancellation_reason": "requested_by_customer", "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "pix", "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": "33fe7dc7-25a0-4ba5-a7d2-4245fc0b2127", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "33fe7dc7-25a0-4ba5-a7d2-4245fc0b2127", "payment_link": null, "profile_id": "pro_d88fTeKAHe2MonTWe8Dk", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_uEuYQIIpwmhh2zZgfnCK", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-04-11T18:08:10.739Z", "fingerprint": null, "browser_info": { "os_type": null, "language": null, "time_zone": null, "ip_address": "::1", "os_version": null, "user_agent": null, "color_depth": null, "device_model": null, "java_enabled": null, "screen_width": null, "accept_header": null, "screen_height": null, "accept_language": "en", "java_script_enabled": null }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-04-11T17:53:20.936Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null } ``` </details> <details> <summary>Manual Capture</summary> Authorize ```curl curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Accept-Language: ja' \ --header 'api-key: dev_ptC2LQhN7u066v4fCKUcOEAWodGDoMl3We9YxN0cM4d7dal16ZSmt9EOdSJ0C6I4' \ --data-raw '{ "amount": 10400, "currency": "BRL", "confirm": false, "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 10400, "email": "guesjhvghht@example.com", "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": "BR", "first_name": "PiX" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "BR", "first_name": "PiX" } }, "browser_info": { "ip_address": "192.168.0.1", "user_agent": "MY LAPTOP RUNS ON m0z://a" }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` ```json { "payment_id": "pay_ytZ1ZAAsTwKK0F7uA2IH", "merchant_id": "postman_merchant_GHAction_1744364064", "status": "requires_payment_method", "amount": 10400, "net_amount": 10400, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_ytZ1ZAAsTwKK0F7uA2IH_secret_HjrEsQIrDAQunFZVLQY4", "created": "2025-04-11T17:55:46.411Z", "currency": "BRL", "customer_id": null, "customer": { "id": null, "name": null, "email": "guesjhvghht@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": "manual", "payment_method": null, "payment_method_data": null, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "BR", "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 Fransico", "country": "BR", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "PiX", "last_name": null }, "phone": null, "email": 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": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": null, "connector_transaction_id": null, "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_d88fTeKAHe2MonTWe8Dk", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": null, "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-04-11T18:10:46.411Z", "fingerprint": null, "browser_info": { "ip_address": "192.168.0.1", "user_agent": "MY LAPTOP RUNS ON m0z://a" }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-04-11T17:55:46.418Z", "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 } ``` Confirm ```curl curl --location 'http://localhost:8080/payments/pay_ytZ1ZAAsTwKK0F7uA2IH/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_e765522f7c7543b9844fbcb1ab283a71' \ --data '{ "payment_method": "bank_transfer", "payment_method_type": "pix", "payment_method_data": { "bank_transfer": { "pix": { "cpf": "866.656.235-80", "source_bank_account_id": "739d6b0a-e92a-40fd-9f58-6d4cdeb699bb", "destination_bank_account_id": "91f5cac1-9058-44b7-80e1-80c6f4a6f0bc", "pix_qr_expiry": "2025-04-11T19:53:54.807Z" } } }, "client_secret": "pay_ytZ1ZAAsTwKK0F7uA2IH_secret_HjrEsQIrDAQunFZVLQY4" }' ``` ```json { "error": { "type": "invalid_request", "message": "Payment method type not supported", "code": "IR_19", "reason": "manual is not supported by facilitapay" } } ``` </details> <details> <summary>Cypress tests</summary> <img width="889" alt="image" src="https://github.com/user-attachments/assets/09dd0c44-5ca4-4387-bcd4-0555bdc6a615" /> </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 - [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. API Request/Response Models** - `crates/api_models/src/enums.rs` - `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/admin.rs` - `crates/router/src/core/payments.rs` **4. 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 **5. Type Definitions** - `crates/router/src/types/api.rs` - `crates/router/src/types/transformers.rs` **6. Tests** - `config/deployments/integration_test.toml` - `cypress-tests/cypress/e2e/configs/Payment/Facilitapay.js` - `cypress-tests/cypress/e2e/configs/Payment/Modifiers.js` - ... and 3 more files **7. Configuration Files** - `config/config.example.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 2 more files **8. 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 (22 changes) - Implement new functions (35 changes) - Extend existing types with new fields (348 changes) - Add conditional logic for feature flags or filtering (6 changes) - Modify database queries (1 changes) **Detailed Identifier Changes:** Commit 639b8cba: Files to modify: **crates/api_models/src/enums.rs** Modify existing code **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** Add: - enum: pub::BrazilStatesAbbreviation **crates/connector_configs/src/connector.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/facilitapay.rs** Add: - function: private::build_error_response - function: private::get_headers - function: private::get_url - function: private::get_request_body - function: private::build_request - impl: impl api::ConnectorCustomer for Facilitapay - mod: private::requests - mod: private::responses **crates/hyperswitch_connectors/src/connectors/facilitapay/requests.rs** Add: - struct: pub::FacilitapayRouterData - struct: pub::FacilitapayAuthRequest - struct: pub::FacilitapayCredentials - struct: pub::FacilitapayCardDetails - struct: pub::CardTransactionRequest - struct: pub::PixTransactionRequest - struct: pub::FacilitapayPaymentsRequest - struct: pub::FacilitapayRefundRequest - struct: pub::FacilitapayCustomerRequest - struct: pub::FacilitapayPerson - enum: pub::FacilitapayTransactionRequest - enum: pub::DocumentType **crates/hyperswitch_connectors/src/connectors/facilitapay/responses.rs** Add: - struct: pub::FacilitapayAuthResponse - struct: pub::FacilitapaySubject - struct: pub::FacilitapayCustomerResponse - struct: pub::PixInfo - struct: pub::CreditCardResponseInfo - struct: pub::FacilitapayPaymentsResponse - struct: pub::OwnerCompany - struct: pub::BankInfo - struct: pub::BankAccountDetail - struct: pub::TransactionData - struct: pub::RefundData - struct: pub::FacilitapayRefundResponse - enum: pub::SubjectKycStatus - enum: pub::FacilitapayPaymentStatus **crates/hyperswitch_connectors/src/connectors/facilitapay/transformers.rs** Remove: - struct: pub::FacilitapayRouterData - struct: pub::FacilitapayPaymentsRequest - struct: pub::FacilitapayCard - impl: impl TryFrom<&FacilitapayRouterData<&PaymentsAuthorizeRouterData>> for PaymentMethodData::Card(req_card) Add: - function: private::from_auth_type - impl: impl TryFrom<&FacilitapayRouterData<&types::PaymentsAuthorizeRouterData>> for bank_transfer_data - impl: impl FacilitapayAuthRequest **crates/hyperswitch_connectors/src/connectors/itaubank/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code **crates/hyperswitch_connectors/src/default_implementations_v2.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Add: - function: private::foreign_try_from - impl: impl ForeignTryFrom<String> for BrazilStatesAbbreviation **crates/hyperswitch_domain_models/src/payment_method_data.rs** Modify existing code **crates/payment_methods/src/configs/payment_connector_required_fields.rs** Modify existing code **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/core/payments.rs** Add: - function: private::get_connector_customer_id **crates/router/src/types/api.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code
{"pr_number": 7704, "pr_title": "feat(connector): [Facilitapay] Add support for Pix Bank Transfers", "merged_at": "2025-04-23T08:48:37Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/enums.rs", "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/admin.rs", "crates/router/src/core/payments.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/facilitapay.rs", "crates/hyperswitch_connectors/src/connectors/facilitapay/requests.rs", "crates/hyperswitch_connectors/src/connectors/facilitapay/responses.rs", "crates/hyperswitch_connectors/src/connectors/facilitapay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/itaubank/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/hyperswitch_connectors/src/default_implementations_v2.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/payment_methods/src/configs/payment_connector_required_fields.rs", "crates/router/tests/connectors/sample_auth.toml"], "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/Facilitapay.js", "cypress-tests/cypress/e2e/configs/Payment/Modifiers.js", "cypress-tests/cypress/e2e/configs/Payment/Utils.js", "cypress-tests/cypress/support/redirectionHandler.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"]}, "change_types": {"structs_added": 22, "functions_added": 35, "enums_added": 5, "fields_added": 348, "imports_added": 26, "conditionals_added": 6, "database_queries": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): add apple pay decrypt support for Adyen ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This pull request introduces support for decrypting Apple Pay payment data in the Adyen connector. It includes updates to the `AdyenPaymentMethod` enum, new structures for handling decrypted Apple Pay data, and modifications to existing logic for processing payment tokens. The changes enhance functionality and improve flexibility in handling 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). --> ## 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 merchant connector account for adyen and enable apple pay ``` "apple_pay_combined": { "manual": { "session_token_data": { "initiative": "web", "certificate": "", "display_name": "apple pay", "certificate_keys": "", "initiative_context": "debuglab.basilisk-char.ts.net", "merchant_identifier": "", "merchant_business_country": "AU", "payment_processing_details_at": "", "payment_processing_certificate": "", "payment_processing_certificate_key": "" }, "payment_request_data": { "label": "applepay", "supported_networks": [ "visa", "masterCard", "amex", "discover" ], "merchant_capabilities": [ "supports3DS" ] } } }, ``` -> Make a apple pay payment ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: api-key' \ --data-raw '{ "amount": 650, "currency": "USD", "confirm": true, "business_country": "US", "business_label": "default", "amount_to_capture": 650, "customer_id": "cu_1752147534", "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "setup_future_usage": "off_session", "authentication_type": "no_three_ds", "return_url": "https://google.com", "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "payment_method": "wallet", "payment_method_type": "apple_pay", "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": "==", "payment_method": { "display_name": "Discover 9319", "network": "Discover", "type": "credit" }, "transaction_identifier": "c635c5b3af900d7bd81fecd7028f1262f9d030754ee65ec7afd988a678194751" } } } }' ``` ``` { "payment_id": "pay_dJrJVGuuuMcTx3ZMr3sn", "merchant_id": "merchant_1752143545", "status": "succeeded", "amount": 650, "net_amount": 650, "shipping_cost": null, "amount_capturable": 0, "amount_received": 650, "connector": "adyen", "client_secret": "pay_dJrJVGuuuMcTx3ZMr3sn_secret_uJD9kz6I3hUvC0333wj0", "created": "2025-07-10T11:38:51.845Z", "currency": "USD", "customer_id": "cu_1752147532", "customer": { "id": "cu_1752147532", "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": "Discover", "type": "credit" } }, "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" }, "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": "adyen_US_default", "business_country": "US", "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cu_1752147532", "created_at": 1752147531, "expires": 1752151131, "secret": "epk_29209a3a0b8744e78745fc53120e2606" }, "manual_retry_allowed": false, "connector_transaction_id": "FFRWLKGL9GMTT475", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_dJrJVGuuuMcTx3ZMr3sn_1", "payment_link": null, "profile_id": "pro_J2FnaaW4M2zfdqhM1pGa", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_r2IwjAwwrKATInMfX2Ga", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-10T11:53:51.845Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_GNhWI2uXCdrKCcNiZ9Cg", "payment_method_status": "active", "updated": "2025-07-10T11:38:53.596Z", "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": "QSJDL57GX6C68775", "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 } ``` -> connector request ``` { "amount": { "currency": "USD", "value": 650 }, "merchantAccount": "*** alloc::string::String ***", "paymentMethod": { "type": "scheme", "number": "*** alloc::string::String ***", "expiryMonth": "*** alloc::string::String ***", "expiryYear": "*** alloc::string::String ***", "brand": "applepay" }, "mpiData": { "directoryResponse": "Y", "authenticationResponse": "Y", "cavv": "*** alloc::string::String ***", "eci": "7" }, "reference": "pay_dJrJVGuuuMcTx3ZMr3sn_1", "returnUrl": "http://localhost:8080/payments/pay_dJrJVGuuuMcTx3ZMr3sn/merchant_1752143545/redirect/response/adyen", "shopperInteraction": "Ecommerce", "recurringProcessingModel": "UnscheduledCardOnFile", "shopperReference": "merchant_1752143545_cu_1752147532", "storePaymentMethod": true, "shopperStatement": "Juspay", "telephoneNumber": "*** alloc::string::String ***", "billingAddress": { "city": "San Fransico", "country": "US", "houseNumberOrName": "*** alloc::string::String ***", "postalCode": "*** alloc::string::String ***", "stateOrProvince": "*** alloc::string::String ***" } } ``` <img width="1426" height="973" alt="image" src="https://github.com/user-attachments/assets/544ca966-7267-46ae-869a-d6e5cdbe96b1" /> ### testing existing connector decryption flow ``` { "amount": 1, "currency": "EUR", "confirm": true, "business_country": "US", "business_label": "default", "amount_to_capture": 1, "customer_id": "cu_{{$timestamp}}", "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "setup_future_usage": "off_session", "authentication_type": "no_three_ds", "return_url": "https://google.com", "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "payment_method": "wallet", "payment_method_type": "apple_pay", "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": "eyJkYXRhIjoiK3NLL0trRWMvRXlFb203N2FJenFYMkNyNG1ldFlranRla1h3eEIyQTJYRzA4ekMwMFJwdFowU0xlSExabnRvZTZpeVNnbzFNVmUyWWVCRVk2b2VteUpwU053TE5PQVU0K3M2eU9zSXNJQ0VITTlMa3FjZGoyc0IwU2RzUHAyUklHVGp3TWozVGtsTFhQV295NlJ0NlZyVVFQemxldlRobE9OZ3piR2psd0I1OVlxN3J0VHFHN0h5eFd3WTJLaDBzcytySWpDbHdnQkRzSzNXMVJ2bzB2NVlDVEdFYWhHRUQxMlN1RTYxbzVOU1NmUjBGUHlDbWtEaTBBYm1XbXBHN0ZmSGMxTkY2MDRkMUtTcmlMclpUU2hYYnhxZVFGdjlxZXpibUVOck1CZXpsLzdFU2NvMU5GMFpyZ1h1Z29oa3JkQkpPeXlJc0I4Qmw5QTl1emFJL2RoU3dpYTFMWGw0Zml0Q3p6U1diUDhBUDV2UkN3TEhMT3M5eTFKNmpYMDJJamtDSlBybU5KYmVTeUE9PSIsInNpZ25hdHVyZSI6Ik1JQUdDU3FHU0liM0RRRUhBcUNBTUlBQ0FRRXhEVEFMQmdsZ2hrZ0JaUU1FQWdFd2dBWUpLb1pJaHZjTkFRY0JBQUNnZ0RDQ0ErUXdnZ09Mb0FNQ0FRSUNDRm5Zb2J5cTlPUE5NQW9HQ0NxR1NNNDlCQU1DTUhveExqQXNCZ05WQkFNTUpVRndjR3hsSUVGd2NHeHBZMkYwYVc5dUlFbHVkR1ZuY21GMGFXOXVJRU5CSUMwZ1J6TXhKakFrQmdOVkJBc01IVUZ3Y0d4bElFTmxjblJwWm1sallYUnBiMjRnUVhWMGFHOXlhWFI1TVJNd0VRWURWUVFLREFwQmNIQnNaU0JKYm1NdU1Rc3dDUVlEVlFRR0V3SlZVekFlRncweU1UQTBNakF4T1RNM01EQmFGdzB5TmpBME1Ua3hPVE0yTlRsYU1HSXhLREFtQmdOVkJBTU1IMlZqWXkxemJYQXRZbkp2YTJWeUxYTnBaMjVmVlVNMExWTkJUa1JDVDFneEZEQVNCZ05WQkFzTUMybFBVeUJUZVhOMFpXMXpNUk13RVFZRFZRUUtEQXBCY0hCc1pTQkpibU11TVFzd0NRWURWUVFHRXdKVlV6QlpNQk1HQnlxR1NNNDlBZ0VHQ0NxR1NNNDlBd0VIQTBJQUJJSXcvYXZEblBkZUlDeFEyWnRGRXVZMzRxa0IzV3l6NExITlMxSm5tUGpQVHIzb0dpV293aDVNTTkzT2ppcVd3dmF2b1pNRFJjVG9la1FtenBVYkVwV2pnZ0lSTUlJQ0RUQU1CZ05WSFJNQkFmOEVBakFBTUI4R0ExVWRJd1FZTUJhQUZDUHlTY1JQaytUdkorYkU5aWhzUDZLNy9TNUxNRVVHQ0NzR0FRVUZCd0VCQkRrd056QTFCZ2dyQmdFRkJRY3dBWVlwYUhSMGNEb3ZMMjlqYzNBdVlYQndiR1V1WTI5dEwyOWpjM0F3TkMxaGNIQnNaV0ZwWTJFek1ESXdnZ0VkQmdOVkhTQUVnZ0VVTUlJQkVEQ0NBUXdHQ1NxR1NJYjNZMlFGQVRDQi9qQ0J3d1lJS3dZQkJRVUhBZ0l3Z2JZTWdiTlNaV3hwWVc1alpTQnZiaUIwYUdseklHTmxjblJwWm1sallYUmxJR0o1SUdGdWVTQndZWEowZVNCaGMzTjFiV1Z6SUdGalkyVndkR0Z1WTJVZ2IyWWdkR2hsSUhSb1pXNGdZWEJ3YkdsallXSnNaU0J6ZEdGdVpHRnlaQ0IwWlhKdGN5QmhibVFnWTI5dVpHbDBhVzl1Y3lCdlppQjFjMlVzSUdObGNuUnBabWxqWVhSbElIQnZiR2xqZVNCaGJtUWdZMlZ5ZEdsbWFXTmhkR2x2YmlCd2NtRmpkR2xqWlNCemRHRjBaVzFsYm5SekxqQTJCZ2dyQmdFRkJRY0NBUllxYUhSMGNEb3ZMM2QzZHk1aGNIQnNaUzVqYjIwdlkyVnlkR2xtYVdOaGRHVmhkWFJvYjNKcGRIa3ZNRFFHQTFVZEh3UXRNQ3N3S2FBbm9DV0dJMmgwZEhBNkx5OWpjbXd1WVhCd2JHVXVZMjl0TDJGd2NHeGxZV2xqWVRNdVkzSnNNQjBHQTFVZERnUVdCQlFDSkRBTG11N3RSakdYcEtaYUtaNUNjWUljUlRBT0JnTlZIUThCQWY4RUJBTUNCNEF3RHdZSktvWklodmRqWkFZZEJBSUZBREFLQmdncWhrak9QUVFEQWdOSEFEQkVBaUIwb2JNazIwSkpRdzNUSjB4UWRNU0FqWm9mU0E0NmhjWEJOaVZtTWwrOG93SWdhVGFRVTZ2MUMxcFMrZllBVGNXS3JXeFFwOVlJYURlUTRLYzYwQjVLMllFd2dnTHVNSUlDZGFBREFnRUNBZ2hKYlMrL09wamFsekFLQmdncWhrak9QUVFEQWpCbk1Sc3dHUVlEVlFRRERCSkJjSEJzWlNCU2IyOTBJRU5CSUMwZ1J6TXhKakFrQmdOVkJBc01IVUZ3Y0d4bElFTmxjblJwWm1sallYUnBiMjRnUVhWMGFHOXlhWFI1TVJNd0VRWURWUVFLREFwQmNIQnNaU0JKYm1NdU1Rc3dDUVlEVlFRR0V3SlZVekFlRncweE5EQTFNRFl5TXpRMk16QmFGdzB5T1RBMU1EWXlNelEyTXpCYU1Ib3hMakFzQmdOVkJBTU1KVUZ3Y0d4bElFRndjR3hwWTJGMGFXOXVJRWx1ZEdWbmNtRjBhVzl1SUVOQklDMGdSek14SmpBa0JnTlZCQXNNSFVGd2NHeGxJRU5sY25ScFptbGpZWFJwYjI0Z1FYVjBhRzl5YVhSNU1STXdFUVlEVlFRS0RBcEJjSEJzWlNCSmJtTXVNUXN3Q1FZRFZRUUdFd0pWVXpCWk1CTUdCeXFHU000OUFnRUdDQ3FHU000OUF3RUhBMElBQlBBWEVZUVoxMlNGMVJwZUpZRUhkdWlBb3UvZWU2NU40STM4UzVQaE0xYlZabHMxcmlMUWwzWU5JazU3dWdqOWRoZk9pTXQydTJad3Zzam9LWVQvVkVXamdmY3dnZlF3UmdZSUt3WUJCUVVIQVFFRU9qQTRNRFlHQ0NzR0FRVUZCekFCaGlwb2RIUndPaTh2YjJOemNDNWhjSEJzWlM1amIyMHZiMk56Y0RBMExXRndjR3hsY205dmRHTmhaek13SFFZRFZSME9CQllFRkNQeVNjUlBrK1R2SitiRTlpaHNQNks3L1M1TE1BOEdBMVVkRXdFQi93UUZNQU1CQWY4d0h3WURWUjBqQkJnd0ZvQVV1N0Rlb1ZnemlKcWtpcG5ldnIzcnI5ckxKS3N3TndZRFZSMGZCREF3TGpBc29DcWdLSVltYUhSMGNEb3ZMMk55YkM1aGNIQnNaUzVqYjIwdllYQndiR1Z5YjI5MFkyRm5NeTVqY213d0RnWURWUjBQQVFIL0JBUURBZ0VHTUJBR0NpcUdTSWIzWTJRR0FnNEVBZ1VBTUFvR0NDcUdTTTQ5QkFNQ0EyY0FNR1FDTURyUGNvTlJGcG14aHZzMXcxYktZci8wRiszWkQzVk5vbzYrOFp5QlhrSzNpZmlZOTV0Wm41alZRUTJQbmVuQy9nSXdNaTNWUkNHd293VjNiRjN6T0R1UVovMFhmQ3doYlpaUHhuSnBnaEp2VlBoNmZSdVp5NXNKaVNGaEJwa1BDWklkQUFBeGdnR0hNSUlCZ3dJQkFUQ0JoakI2TVM0d0xBWURWUVFERENWQmNIQnNaU0JCY0hCc2FXTmhkR2x2YmlCSmJuUmxaM0poZEdsdmJpQkRRU0F0SUVjek1TWXdKQVlEVlFRTERCMUJjSEJzWlNCRFpYSjBhV1pwWTJGMGFXOXVJRUYxZEdodmNtbDBlVEVUTUJFR0ExVUVDZ3dLUVhCd2JHVWdTVzVqTGpFTE1Ba0dBMVVFQmhNQ1ZWTUNDRm5Zb2J5cTlPUE5NQXNHQ1dDR1NBRmxBd1FDQWFDQmt6QVlCZ2txaGtpRzl3MEJDUU14Q3dZSktvWklodmNOQVFjQk1Cd0dDU3FHU0liM0RRRUpCVEVQRncweU5UQTNNVFV3TXpNMU16UmFNQ2dHQ1NxR1NJYjNEUUVKTkRFYk1Ca3dDd1lKWUlaSUFXVURCQUlCb1FvR0NDcUdTTTQ5QkFNQ01DOEdDU3FHU0liM0RRRUpCREVpQkNBZ0VKd0VMWm1LQ3Y4SFUraEhQVVAwdnNNdFB6UjI4UzJVNzFvVEdRMURvakFLQmdncWhrak9QUVFEQWdSR01FUUNJRE5JZnNod1lQYWFXd1prYWtmSWZtcVJNZVc5eE96S1RCZmY4MDIrVWF1MkFpQVltb2FnbVJMSFNzUjk0Z1IxMHlvKzBrL1ZRVlFvNUhRRllEUjEyWkg2d0FBQUFBQUFBQT09IiwiaGVhZGVyIjp7InB1YmxpY0tleUhhc2giOiJFYzRPbEFveXRpNFpyZ1lCclRMZzZMQ1NVSzdCdHBQekozblpQeC9Sd3RBPSIsImVwaGVtZXJhbFB1YmxpY0tleSI6Ik1Ga3dFd1lIS29aSXpqMENBUVlJS29aSXpqMERBUWNEUWdBRXZ0QlVudThhS244alBNQzM4SFdnQ00zeVRTT3ZiaDFsakRtWFVsZzJUUExtYWhwTS9RcEtqRkdYeVEyY2JKWW5aeU1HVjRzR2w1T0NWcFR2eld0cjBBPT0iLCJ0cmFuc2FjdGlvbklkIjoiNzI5NWY3NTc4ZGM4ODI2OWE5ZGY0MWU0YzgxZjQ2ODE2NWYzMmE3NjFjMTA5MGIzNDhlMjAxYzk1YmI0ZmUxMyJ9LCJ2ZXJzaW9uIjoiRUNfdjEifQ==", "payment_method": { "display_name": "Discover 9319", "network": "Discover", "type": "credit" }, "transaction_identifier": "c635c5b3af900d7bd81fecd7028f1262f9d030754ee65ec7afd988a678194751" } } } } ``` ``` { "payment_id": "pay_kM6NBnxuHTlzY5ybGLqx", "merchant_id": "merchant_1752565724", "status": "succeeded", "amount": 1, "net_amount": 1, "shipping_cost": null, "amount_capturable": 0, "amount_received": 1, "connector": "adyen", "client_secret": "pay_kM6NBnxuHTlzY5ybGLqx_secret_5mV0RX2Rs2mOQ4X67Yjs", "created": "2025-07-15T07:53:29.564Z", "currency": "EUR", "customer_id": "cu_1752566010", "customer": { "id": "cu_1752566010", "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": "Discover", "type": "credit" } }, "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" }, "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": "adyen_US_default", "business_country": "US", "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cu_1752566010", "created_at": 1752566009, "expires": 1752569609, "secret": "epk_dd5dd4d6b20d4c18a9db60922145f7b6" }, "manual_retry_allowed": false, "connector_transaction_id": "SHKNSMTDM6STT475", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_kM6NBnxuHTlzY5ybGLqx_1", "payment_link": null, "profile_id": "pro_BECixFE1QlimjLqJalgs", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_7SBGsmaaqWT9TrbNL747", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-15T08:08:29.564Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_oGV7tOINPnAnIWUo0w9U", "payment_method_status": "active", "updated": "2025-07-15T07:53:31.250Z", "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": "SQGB2PFPQLSMC375", "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 } ``` ## 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 1 more files **Code Patterns Applied:** - Define new data structures (1 changes) - Extend existing types with new fields (23 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 064113a4: Files to modify: **crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs** Modify existing code
{"pr_number": 8605, "pr_title": "feat(connector): add apple pay decrypt support for Adyen", "merged_at": "2025-07-15T09:38:59Z", "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/adyen/transformers.rs"]}, "change_types": {"structs_added": 1, "fields_added": 23, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(analytics): add issuer as filter for authentication analytics ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Added `acs_reference_number` as filter for authentication analytics. Will display it as `issuer` on FE dashboard. ### 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). --> Better insights into authentication data by applying filters ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Get Info curl: ```bash curl --location 'http://localhost:8080/analytics/v1/auth_events/info' \ --header 'Accept: */*' \ --header 'Accept-Language: en-US,en;q=0.9' \ --header 'Connection: keep-alive' \ --header 'Content-Type: application/json' \ --header 'Referer: http://localhost:9000/dashboard/analytics-payments' \ --header 'Sec-Fetch-Dest: empty' \ --header 'Sec-Fetch-Mode: cors' \ --header 'Sec-Fetch-Site: same-origin' \ --header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36' \ --header 'X-Merchant-Id: merchant_1740414909' \ --header 'X-Profile-Id: pro_q9g6emqpc7b41Lo7UXpx' \ --header 'api-key: dev_zKT6VT7TvcxCtwq8N716HELM6HZJAwZvkWVHrlKAU54Pzu6D18GL3u3UswnkMkug' \ --header 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiYWFiNWIxNDEtNjQwOC00YTUyLTk2MjMtNTVhNTgxMTU1M2U4IiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQwNDE0OTA5Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0MTI3NDY4NSwib3JnX2lkIjoib3JnX1QwSEtYNHYyRGFRT2lHUDVwRk52IiwicHJvZmlsZV9pZCI6InByb19xOWc2ZW1xcGM3YjQxTG83VVhweCIsInRlbmFudF9pZCI6InB1YmxpYyJ9.LIExs1jjG6N5AFu5_S3oiuy77fWF0IbJmNGbK8HHLXI' \ --header 'sec-ch-ua: "Not(A:Brand";v="99", "Google Chrome";v="133", "Chromium";v="133"' \ --header 'sec-ch-ua-mobile: ?0' \ --header 'sec-ch-ua-platform: "macOS"' ``` Sample Output: ```json { "metrics": [ { "name": "authentication_count", "desc": "" }, { "name": "authentication_attempt_count", "desc": "" }, { "name": "authentication_success_count", "desc": "" }, { "name": "challenge_flow_count", "desc": "" }, { "name": "frictionless_flow_count", "desc": "" }, { "name": "frictionless_success_count", "desc": "" }, { "name": "challenge_attempt_count", "desc": "" }, { "name": "challenge_success_count", "desc": "" }, { "name": "authentication_error_message", "desc": "" }, { "name": "authentication_funnel", "desc": "" } ], "downloadDimensions": null, "dimensions": [ { "name": "authentication_connector", "desc": "" }, { "name": "message_version", "desc": "" }, { "name": "acs_reference_number", "desc": "" } ] } ``` acs_reference_number is being sent in the dimensions list. Filters API: ```bash curl --location 'http://localhost:8080/analytics/v1/filters/auth_events' \ --header 'Accept: */*' \ --header 'Accept-Language: en-US,en;q=0.9' \ --header 'Connection: keep-alive' \ --header 'Content-Type: application/json' \ --header 'Origin: http://localhost:9000' \ --header 'Referer: http://localhost:9000/' \ --header 'Sec-Fetch-Dest: empty' \ --header 'Sec-Fetch-Mode: cors' \ --header 'Sec-Fetch-Site: same-site' \ --header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36' \ --header 'api-key: hyperswitch' \ --header 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiM2RlMDFhYWYtOWVkMi00YTY5LTg3YWItNWU1YmI2ZWFiNGQ5IiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQyMjEyMzQxIiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0MjM4NTE0Miwib3JnX2lkIjoib3JnX3pMQmRNTnpLaDZrNmhiT2tockdJIiwicHJvZmlsZV9pZCI6InByb19LWnhHZ21rUHFkMldQdXBFa2psWCIsInRlbmFudF9pZCI6InB1YmxpYyJ9.efMstkbz90nfMKju4PmdIedl_tN-FHW3aQKD44jOnxo' \ --header 'sec-ch-ua: "Chromium";v="128", "Not;A=Brand";v="24", "Google Chrome";v="128"' \ --header 'sec-ch-ua-mobile: ?0' \ --header 'sec-ch-ua-platform: "macOS"' \ --data '{ "timeRange": { "startTime": "2025-02-01T18:30:00.000Z", "endTime": "2025-02-28T09:22:30.000Z" }, "groupByNames": [ "message_version", "authentication_connector", "acs_reference_number" ], "source": "BATCH", "delta": true }' ``` Sample Output: ```json { "queryData": [ { "dimension": "message_version", "values": [ "2.3.1" ] }, { "dimension": "authentication_connector", "values": [ "netcetera" ] }, { "dimension": "acs_reference_number", "values": [ "3DS_LOA_ACS_201_13579" ] } ] } ``` ## 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/analytics/auth_events.rs` **2. Core Business Logic** - `crates/analytics/src/auth_events/core.rs` **3. Type Definitions** - `crates/analytics/src/auth_events/types.rs` **4. Utils** - `crates/analytics/src/utils.rs` **5. Other** - `crates/analytics/src/auth_events/filters.rs` - `crates/analytics/src/auth_events/metrics.rs` - `crates/analytics/src/auth_events/metrics/authentication_attempt_count.rs` - ... and 10 more files **Code Patterns Applied:** - Extend existing types with new fields (5 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit a87471c4: Files to modify: **crates/analytics/src/auth_events/core.rs** Modify existing code **crates/analytics/src/auth_events/filters.rs** Modify existing code **crates/analytics/src/auth_events/metrics.rs** Modify existing code **crates/analytics/src/auth_events/metrics/authentication_attempt_count.rs** Modify existing code **crates/analytics/src/auth_events/metrics/authentication_count.rs** Modify existing code **crates/analytics/src/auth_events/metrics/authentication_error_message.rs** Modify existing code **crates/analytics/src/auth_events/metrics/authentication_funnel.rs** Modify existing code **crates/analytics/src/auth_events/metrics/authentication_success_count.rs** Modify existing code **crates/analytics/src/auth_events/metrics/challenge_attempt_count.rs** Modify existing code **crates/analytics/src/auth_events/metrics/challenge_flow_count.rs** Modify existing code **crates/analytics/src/auth_events/metrics/challenge_success_count.rs** Modify existing code **crates/analytics/src/auth_events/metrics/frictionless_flow_count.rs** Modify existing code **crates/analytics/src/auth_events/metrics/frictionless_success_count.rs** Modify existing code **crates/analytics/src/auth_events/types.rs** Modify existing code **crates/analytics/src/sqlx.rs** Modify existing code **crates/analytics/src/utils.rs** Modify existing code **crates/api_models/src/analytics/auth_events.rs** Modify existing code
{"pr_number": 7535, "pr_title": "feat(analytics): add issuer as filter for authentication analytics", "merged_at": "2025-03-18T10:21:02Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"api_models": ["crates/api_models/src/analytics/auth_events.rs"], "core_business": ["crates/analytics/src/auth_events/core.rs"], "types": ["crates/analytics/src/auth_events/types.rs"], "utils": ["crates/analytics/src/utils.rs"], "other": ["crates/analytics/src/auth_events/filters.rs", "crates/analytics/src/auth_events/metrics.rs", "crates/analytics/src/auth_events/metrics/authentication_attempt_count.rs", "crates/analytics/src/auth_events/metrics/authentication_count.rs", "crates/analytics/src/auth_events/metrics/authentication_error_message.rs", "crates/analytics/src/auth_events/metrics/authentication_funnel.rs", "crates/analytics/src/auth_events/metrics/authentication_success_count.rs", "crates/analytics/src/auth_events/metrics/challenge_attempt_count.rs", "crates/analytics/src/auth_events/metrics/challenge_flow_count.rs", "crates/analytics/src/auth_events/metrics/challenge_success_count.rs", "crates/analytics/src/auth_events/metrics/frictionless_flow_count.rs", "crates/analytics/src/auth_events/metrics/frictionless_success_count.rs", "crates/analytics/src/sqlx.rs"]}, "change_types": {"fields_added": 5, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(accounts): move dashboard_metadata table to accounts_schema and point v2 to v1 dashboard_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 --> This PR moves the dashboard_metadata table to `accounts_schema` and points v2 to the v1 public schema - dashboard_metadata table. ### 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). --> To store all the data regarding dashboard_metadata in a common table irrespective of v1 and v2. ## 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 by deploying this branch on v2 integ-router and hitting the following 2 API's. The entries from the POST API populated the integ v1 public schema - dashboard metadata table. <img width="1728" alt="image" src="https://github.com/user-attachments/assets/2b73d3ff-2055-438c-a7d6-f1d865b57403" /> The highlighted entry in the v1 public schema dashboard_metadata table is the entry populated by hitting the v2 API, given by the curl below. Hit the following curl: - The entry for ProdIntent should be created in v1 public schema - dashboard_metadata table. ```bash curl --location 'http://localhost:8080/v2/user/data' \ --header 'accept: */*' \ --header 'accept-language: en-US,en;q=0.9' \ --header 'api-key: hyperswitch' \ --header 'content-type: application/json' \ --header 'origin: https://app.hyperswitch.io' \ --header 'priority: u=1, i' \ --header 'referer: https://app.hyperswitch.io/dashboard/home' \ --header 'sec-ch-ua: "Google Chrome";v="131", "Chromium";v="131", "Not_A Brand";v="24"' \ --header 'sec-ch-ua-mobile: ?0' \ --header 'sec-ch-ua-platform: "macOS"' \ --header 'sec-fetch-dest: empty' \ --header 'sec-fetch-mode: cors' \ --header 'sec-fetch-site: same-origin' \ --header 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36' \ --header 'x-merchant-id: merchant_1715600622' \ --header 'x-profile-id: pro_CqAdpUQBUUam1n0g56mB' \ --header 'cookie: login_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNjY2YzZlYWQtMWUzZi00ZTY4LWI5NjQtMGNiZTdkMWQ0OTk4IiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQ0MjkzMzU5Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0NDQ2NjE2Niwib3JnX2lkIjoib3JnX0hzNWNLM0RlSDByRTJGcTMwSmp5IiwicHJvZmlsZV9pZCI6InByb190Nml0cjE3TkR3cWJOdHV5OG44diIsInRlbmFudF9pZCI6InB1YmxpYyJ9.sckbBxvWK6MtuAAoi4rZaeOwfU2AibyLz8GR7ZcF0pc' \ --header 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNjY2YzZlYWQtMWUzZi00ZTY4LWI5NjQtMGNiZTdkMWQ0OTk4IiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQ0MjkzMzU5Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0NDQ2NjE2Niwib3JnX2lkIjoib3JnX0hzNWNLM0RlSDByRTJGcTMwSmp5IiwicHJvZmlsZV9pZCI6InByb190Nml0cjE3TkR3cWJOdHV5OG44diIsInRlbmFudF9pZCI6InB1YmxpYyJ9.sckbBxvWK6MtuAAoi4rZaeOwfU2AibyLz8GR7ZcF0pc' \ --data-raw '{ "ProdIntent": { "poc_email": "berry@gmail.com", "is_completed": true, "legal_business_name": "blueberry", "business_location": "IN", "business_website": "https://google.com", "poc_name": "berry", "comments": "tx123", "product_type": "vault" } }' ``` Expected Response: 200 OK, no body in the response The following curl is supposed to read data from v1 public schema dashboard_metadata table and return the entry whether or not a prod_intent has been raised for a particular merchant_account. ```bash curl --location 'http://localhost:8080/v2/user/data?keys=ProdIntent' \ --header 'X-Merchant-Id: ddcd_oBuAVsHl0XMLag9JsHCV' \ --header 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiM2RlMDFhYWYtOWVkMi00YTY5LTg3YWItNWU1YmI2ZWFiNGQ5IiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQyMjEyMzQxIiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0Mjk4MDgyOCwib3JnX2lkIjoib3JnX3pMQmRNTnpLaDZrNmhiT2tockdJIiwicHJvZmlsZV9pZCI6InByb19LWnhHZ21rUHFkMldQdXBFa2psWCIsInRlbmFudF9pZCI6InB1YmxpYyJ9.aD185AZEOcIjHnLnZZ9GJ2ujSHIdRPbPtrYhzNo0V4M' \ --header 'sec-ch-ua-platform: "macOS"' \ --header 'Referer: https://integ.hyperswitch.io/dashboard/v2/recon' \ --header 'sec-ch-ua: "Not(A:Brand";v="99", "Google Chrome";v="133", "Chromium";v="133"' \ --header 'X-Profile-Id: pro_UaxaxwTw4A0a9D0QNBrf' \ --header 'sec-ch-ua-mobile: ?0' \ --header 'api-key: hyperswitch' \ --header 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36' \ --header 'Content-Type: application/json' ``` Expected Response: ```json [ { "ProdIntent": { "legal_business_name": "blueberry", "business_label": null, "business_location": "IN", "display_name": null, "poc_email": "sandeep@gmail.com", "business_type": null, "business_identifier": null, "business_website": "https://google.com", "poc_name": "berry", "poc_contact": null, "comments": "tx123", "is_completed": true, "product_type": "vault" } } ] ``` ## 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/db.rs` - `crates/router/src/db/dashboard_metadata.rs` **Detailed Identifier Changes:** Commit 4f4e31db: Files to modify: **crates/router/src/db.rs** Modify existing code **crates/router/src/db/dashboard_metadata.rs** Modify existing code
{"pr_number": 7793, "pr_title": "refactor(accounts): move dashboard_metadata table to accounts_schema and point v2 to v1 dashboard_metadata", "merged_at": "2025-04-17T10:52:21Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant", "user", "token"]}, "hierarchy": {"other": ["crates/router/src/db.rs", "crates/router/src/db/dashboard_metadata.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(openapi): add payment get to openapi ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] New feature ## Description <!-- Describe your changes in detail --> This PR adds the payments get endpoint to the openapi. This PR also fixes some errors that were introduced in https://github.com/juspay/hyperswitch/pull/6393, which did not allow the v2 application to be run. ## 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)? --> - Run the v2 application - Run mintlify and check for the new endpoint <img width="1483" alt="Screenshot 2024-11-12 at 11 50 03 AM" src="https://github.com/user-attachments/assets/bed78286-4a58-4d36-9f0b-9e3e43cdd10b"> ## 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. Core Business Logic** - `crates/router/src/core/admin.rs` **2. Other** - `api-reference-v2/api-reference/payments/payments--get.mdx` - `api-reference-v2/mint.json` - `api-reference-v2/openapi_spec.json` - ... and 10 more files **Code Patterns Applied:** - Define new data structures (2 changes) - Implement new functions (7 changes) - Extend existing types with new fields (27 changes) - Add conditional logic for feature flags or filtering (4 changes) **Detailed Identifier Changes:** Commit 600cf446: Files to modify: **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/openapi/src/routes/payments.rs** Add: - function: pub::payment_status - enum: pub::ForceSync **crates/router/src/analytics.rs** Modify existing code **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/lib.rs** Modify existing code **crates/router/src/routes.rs** Modify existing code **crates/router/src/routes/admin.rs** Modify existing code **crates/router/src/routes/api_keys.rs** Modify existing code **crates/router/src/routes/app.rs** Remove: - function: pub::server - function: pub::server - function: pub::server - function: pub::server **crates/router/src/routes/profiles.rs** Modify existing code **crates/router/src/services/authentication.rs** Add: - function: private::authenticate_and_fetch - function: private::authenticate_and_fetch - function: private::authenticate_and_fetch - function: private::authenticate_and_fetch - struct: pub::AuthenticationDataWithoutProfile - impl: impl AuthenticateAndFetch<AuthenticationDataWithoutProfile, A> for AdminApiAuthWithMerchantIdFromHeader - impl: impl AuthenticateAndFetch<AuthenticationDataWithoutProfile, A> for JWTAuthMerchantFromHeader - impl: impl AuthenticateAndFetch<AuthenticationDataWithoutProfile, A> for JWTAuthMerchantFromRoute
{"pr_number": 6539, "pr_title": "feat(openapi): add payment get to openapi ", "merged_at": "2024-11-13T10:27:07Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["payment", "user"]}, "hierarchy": {"core_business": ["crates/router/src/core/admin.rs"], "other": ["api-reference-v2/api-reference/payments/payments--get.mdx", "api-reference-v2/mint.json", "api-reference-v2/openapi_spec.json", "crates/openapi/src/openapi_v2.rs", "crates/openapi/src/routes/payments.rs", "crates/router/src/analytics.rs", "crates/router/src/lib.rs", "crates/router/src/routes.rs", "crates/router/src/routes/admin.rs", "crates/router/src/routes/api_keys.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/profiles.rs", "crates/router/src/services/authentication.rs"]}, "change_types": {"structs_added": 2, "functions_added": 7, "fields_added": 27, "conditionals_added": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(router): Remove card exp validation for migration api ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Added support to migrate expired cards ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> req for migration api - ``` 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": "cust-1731038739", "network_transaction_id": "ntid-test-2", "payment_method":"card" }' ``` <img width="777" alt="Screenshot 2024-11-08 at 1 40 33 PM" src="https://github.com/user-attachments/assets/e92498cf-f516-49a8-a14f-6f648cee1f22"> ## 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/migration.rs` **Code Patterns Applied:** - Implement new functions (4 changes) - Extend existing types with new fields (31 changes) - Add conditional logic for feature flags or filtering (5 changes) **Detailed Identifier Changes:** Commit 1dfcaabf: Files to modify: **crates/router/src/core/payment_methods/cards.rs** Add: - function: pub::get_client_secret_or_add_payment_method_for_migration - function: pub::save_migration_payment_method **crates/router/src/core/payment_methods/migration.rs** Add: - function: pub::validate_card_expiry - function: private::validate_card_exp_year
{"pr_number": 6460, "pr_title": "refactor(router): Remove card exp validation for migration api", "merged_at": "2024-11-08T13:07:52Z", "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/migration.rs"]}, "change_types": {"functions_added": 4, "fields_added": 31, "imports_added": 2, "conditionals_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [TRUSTPAYMENTS] Integrate cards non 3ds payments ## 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 --> Cards Non-3DS payments added for Trustpayments ### 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 using cargo build and cypress test <img width="800" height="990" alt="image" src="https://github.com/user-attachments/assets/c8c11da3-737f-4518-b696-1a1a4ae07dca" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [x] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/connector_validation.rs` **2. External Connector Integration** - `crates/common_enums/src/connector_enums.rs` - `crates/connector_configs/src/connector.rs` - `crates/connector_configs/toml/development.toml` - ... and 9 more files **3. Type Definitions** - `crates/router/src/types/api/feature_matrix.rs` **4. Tests** - `cypress-tests/cypress/e2e/configs/Payment/TrustPayments.js` - `cypress-tests/cypress/e2e/configs/Payment/Utils.js` **5. Other** - `api-reference/v1/openapi_spec_v1.json` - `api-reference/v2/openapi_spec_v2.json` **Code Patterns Applied:** - Define new data structures (16 changes) - Implement new functions (42 changes) - Extend existing types with new fields (747 changes) - Add conditional logic for feature flags or filtering (9 changes) - Modify database queries (2 changes) **Detailed Identifier Changes:** Commit 1987cb4e: 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/trustpayments.rs** Remove: - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Trustpayments - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Trustpayments 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::get_request_body - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Trustpayments - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Trustpayments **crates/hyperswitch_connectors/src/connectors/trustpayments/transformers.rs** Add: - function: pub::as_str - function: private::fmt - function: pub::as_str - function: private::fmt - function: pub::as_str - function: pub::is_success - function: pub::get_attempt_status - function: pub::get_description - function: private::fmt - function: private::try_from - function: private::try_from - function: private::try_from - struct: pub::TrustpaymentsPaymentRequestData - enum: pub::TrustpaymentsSettleStatus - enum: pub::TrustpaymentsCredentialsOnFile - enum: pub::TrustpaymentsErrorCode - impl: impl TrustpaymentsCredentialsOnFile - impl: impl std::fmt::Display for TrustpaymentsCredentialsOnFile - impl: impl TrustpaymentsSettleStatus - impl: impl std::fmt::Display for TrustpaymentsSettleStatus - impl: impl TrustpaymentsErrorCode - impl: impl std::fmt::Display for TrustpaymentsErrorCode - impl: impl TryFrom< ResponseRouterData< hyperswitch_domain_models::router_flow_types::payments::Authorize, TrustpaymentsPaymentsResponse, hyperswitch_domain_models::router_request_types::PaymentsAuthorizeData, PaymentsResponseData, >, > for RouterData< hyperswitch_domain_models::router_flow_types::payments::Authorize, hyperswitch_domain_models::router_request_types::PaymentsAuthorizeData, PaymentsResponseData, > - impl: impl TryFrom< ResponseRouterData< hyperswitch_domain_models::router_flow_types::payments::PSync, TrustpaymentsPaymentsResponse, hyperswitch_domain_models::router_request_types::PaymentsSyncData, PaymentsResponseData, >, > for RouterData< hyperswitch_domain_models::router_flow_types::payments::PSync, hyperswitch_domain_models::router_request_types::PaymentsSyncData, PaymentsResponseData, > **crates/hyperswitch_connectors/src/default_implementations_v2.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/api/feature_matrix.rs** Modify existing code **crates/router/src/types/connector_transformers.rs** Modify existing code **crates/router/tests/connectors/trustpayments.rs** Modify existing code
{"pr_number": 8705, "pr_title": "feat(connector): [TRUSTPAYMENTS] Integrate cards non 3ds payments", "merged_at": "2025-09-18T08:40:02Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "card"]}, "hierarchy": {"core_business": ["crates/router/src/core/connector_validation.rs"], "connectors": ["crates/common_enums/src/connector_enums.rs", "crates/connector_configs/src/connector.rs", "crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/hyperswitch_connectors/src/connectors/trustpayments.rs", "crates/hyperswitch_connectors/src/connectors/trustpayments/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations_v2.rs", "crates/payment_methods/src/configs/payment_connector_required_fields.rs", "crates/router/src/types/api/connector_mapping.rs", "crates/router/src/types/connector_transformers.rs", "crates/router/tests/connectors/trustpayments.rs"], "types": ["crates/router/src/types/api/feature_matrix.rs"], "tests": ["cypress-tests/cypress/e2e/configs/Payment/TrustPayments.js", "cypress-tests/cypress/e2e/configs/Payment/Utils.js"], "other": ["api-reference/v1/openapi_spec_v1.json", "api-reference/v2/openapi_spec_v2.json"]}, "change_types": {"structs_added": 16, "functions_added": 42, "enums_added": 3, "fields_added": 747, "imports_added": 9, "conditionals_added": 9, "database_queries": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector_config): include the `payment_processing_details_at` `Hyperswitch` option only if apple pay token decryption flow is supported for the connector ## 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 --> While configuring apple pay iOS flow `payment_processing_details_at` option is shown that can take two values ,`Connector` or `Hyperswitch`. But the `payment_processing_details_at` can be `Hyperswitch` only if the apple pay token decryption flow is implemented for the connector. Currently both connector tokenization and decrypted flow is supported only by Stripe, BOA and Cybersource. And Fiu supports only the decrypted 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). --> ## 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 pr includes wasam changes to not show the `payment_processing_details_at` `Hyperswitch` when the web apple pay flow is not enabled. Things to test the below radio button with Hyperswitch option should not be shown if apple pay web flow is not enalbed. <img width="562" alt="image" src="https://github.com/user-attachments/assets/1153ebaf-59ca-4098-beeb-afff707fa405"> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - `crates/connector_configs/toml/sandbox.toml`
{"pr_number": 6386, "pr_title": "fix(connector_config): include the `payment_processing_details_at` `Hyperswitch` option only if apple pay token decryption flow is supported for the connector", "merged_at": "2024-10-23T12:33:09Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "connector"]}, "hierarchy": {"connectors": ["crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(connector): enhance ACI connector with comprehensive 3DS support - DRAFT ## Type of Change - [ ] Bugfix - [ ] New feature - [X] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Summary This PR enhances the ACI connector with comprehensive 3D Secure (3DS) authentication support and modernizes the test suite, porting behavioral improvements from the `ORCH-2/aci-fixes` branch to be compatible with the current upstream codebase structure. ### Key Changes - **Standalone 3DS Implementation**: Added complete 3DS authentication flow using proper `/v1/threeDSecure` endpoints (PreAuthentication and Authentication) - **Framework Integration**: Implemented `AciThreeDSFlow` redirect form variant with dual iframe support for precondition and authentication steps - **Enhanced Request Structures**: Updated request models to include all required fields matching the reference script at `@hyperswitch/tmp/poc-exipay-cnp/scripts/aci/3ds` - **Payment Processing Improvements**: Added network token support, payment brand mapping, and proper mandate setup functionality - **Security Enhancement**: Updated webhook verification from NoAlgorithm to HMAC-SHA256 - **Modernized Test Suite**: Refactored tests to use `ConnectorActions` pattern with comprehensive coverage including positive, negative, and 3DS scenarios ### Technical Details #### Files Modified - `crates/hyperswitch_connectors/src/connectors/aci.rs` - Main connector implementation - `crates/hyperswitch_connectors/src/connectors/aci/transformers.rs` - Request/response transformers - `crates/hyperswitch_domain_models/src/router_response_types.rs` - RedirectForm enum extension - `crates/diesel_models/src/payment_attempt.rs` - Database model updates - `crates/router/src/services/api.rs` - Framework-level redirect handling - `crates/router/tests/connectors/aci.rs` - Complete test suite modernization #### Key Implementations - **3DS Request Structure**: Complete `AciStandalone3DSRequest` with all required fields including challenge indicators, enrollment flags, and proper card data handling - **Dual Iframe Support**: Framework-level HTML generation for both precondition and authentication iframes - **Payment Brand Mapping**: Support for Visa, Mastercard, American Express, JCB, and other major card networks - **Authentication**: Fixed authentication to use Bearer format - **Modern Test Architecture**: Implemented `ConnectorActions` trait pattern following project standards ### Test Coverage Enhancements #### Positive Test Scenarios - Manual capture flow: authorize, capture, partial capture, sync, void, refund - Automatic capture flow: payment, sync, refund, partial refund, multiple refunds - 3DS authentication flows with proper status validation #### Negative Test Scenarios - Invalid card details (CVC, expiry month, expiry year) - Invalid payment operations (void auto-captured, invalid payment ID) - Refund validation (amount exceeding payment amount) #### 3DS-Specific Tests - 3DS payment creation with authentication data - 3DS authorization with redirect data validation - 3DS payment synchronization - Authentication flow status verification ### Validation - ✅ All modified files pass `cargo +nightly fmt` formatting checks - ✅ Code follows project conventions and patterns - ✅ Implementation matches reference script behavior - ✅ Comprehensive test coverage (18+ test scenarios) - ✅ Modern `ConnectorActions` pattern implementation - ✅ Backward compatibility maintained for existing functionality ### Test Plan - [x] Manual capture flow tests (authorize, capture, void, refund, sync) - [x] Automatic capture flow tests (payment, refund, sync) - [x] Negative scenario tests (invalid inputs, edge cases) - [x] 3DS authentication flow tests with redirect validation - [x] Framework-level redirect form handling validation - [x] Error handling and status code validation ### Additional Changes - [x] This PR modifies the API contract - [x] 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)? --> <details> <summary>1. Cards payment </summary> ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_Tz5ePEgSZ0NRdEOsdx3cloAjMSV3KkPbsWubLbAlSsv0ndwsblQKTkZZMu3332yC' \ --data-raw '{ "amount": 6540, "currency": "EUR", "amount_to_capture": 6540, "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "no_three_ds", "setup_future_usage": "on_session", "customer": { "id": "customer123", "name": "John Doe", "email": "customer@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "customer_id": "customer123", "phone_country_code": "+1", "description": "Its my first payment request", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "5454545454545454", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "card_cvc": "737", "card_network": "Mastercard" } }, "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" } }, "payment_link": false, "payment_link_config": { "theme": "", "logo": "", "seller_name": "", "sdk_layout": "", "display_sdk_only": false, "enabled_saved_payment_method": false }, "payment_type": "normal" }' ``` Response ``` ``` </details> 2. Redirection <img width="1721" height="1082" alt="Screenshot 2025-09-03 at 10 17 24 AM" src="https://github.com/user-attachments/assets/4e4c7059-1353-4160-b02e-bfa24fe7aa00" /> <details> <summary>3. CIT </summary> ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_jBGr5aVyHqi26wIUT0l6VoyH0lGLSC5AcUoyoSv4MOaZDVulNKHuceiO87kr1UDn' \ --data-raw '{ "amount": 6540, "currency": "EUR", "amount_to_capture": 6540, "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "no_three_ds", "setup_future_usage": "off_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": "5454545454545454", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "card_cvc": "737", "card_network": "Mastercard" } }, "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" } }, "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, "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" } } } } }' ```` Response: ``` {"payment_id":"pay_nJrHQrInwO77Uvsjrp1h","merchant_id":"merchant_1756939264","status":"requires_customer_action","amount":6540,"net_amount":6540,"shipping_cost":null,"amount_capturable":6540,"amount_received":null,"connector":"aci","client_secret":"pay_nJrHQrInwO77Uvsjrp1h_secret_klCqSLL4Va5yqCqoS7iU","created":"2025-09-03T22:48:45.789Z","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":"man_JblRgVnFHqYNKvQIONrg","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":null,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"5454","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"545454","card_extended_bin":null,"card_exp_month":"10","card_exp_year":"25","card_holder_name":"joseph Doe","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":"guest@example.com"},"billing":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":"guest@example.com"},"order_details":[{"sku":null,"upc":null,"brand":null,"amount":6540,"category":null,"quantity":1,"tax_rate":null,"product_id":null,"description":null,"product_name":"Apple iphone 15","product_type":null,"sub_category":null,"total_amount":null,"commodity_code":null,"unit_of_measure":null,"product_img_link":null,"product_tax_code":null,"total_tax_amount":null,"requires_shipping":null,"unit_discount_amount":null}],"email":"customer@gmail.com","name":"John Doe","phone":"9999999999","return_url":"https://google.com/","authentication_type":"no_three_ds","statement_descriptor_name":"joseph","statement_descriptor_suffix":"JS","next_action":{"type":"redirect_to_url","redirect_to_url":"http://localhost:8080/payments/redirect/pay_nJrHQrInwO77Uvsjrp1h/merchant_1756939264/pay_nJrHQrInwO77Uvsjrp1h_1"},"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"customer123","created_at":1756939725,"expires":1756943325,"secret":"epk_a1f0c3c09a644947b2fbad66699edd4d"},"manual_retry_allowed":null,"connector_transaction_id":"8ac7a4a19911957d019911c4b0db7792","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":"8ac7a4a19911957d019911c4b0db7792","payment_link":null,"profile_id":"pro_HoadX959YnH9wsndpUrq","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_PZ6v2D98umb2BxIN28tM","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-09-03T23:03:45.788Z","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":"pm_Nm9GUukfMLZhXdHJSEy0","network_transaction_id":null,"payment_method_status":null,"updated":"2025-09-03T22:48:47.635Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":"test_ord","order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null,"enable_partial_authorization":null} ``` </details> <details> <summary>4. Corresponding MIT </summary> ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_jBGr5aVyHqi26wIUT0l6VoyH0lGLSC5AcUoyoSv4MOaZDVulNKHuceiO87kr1UDn' \ --data '{ "amount": 1000, "currency": "EUR", "customer_id": "customer123", "description": "Subsequent Mandate Test Payment (MIT from New CIT Demo)", "confirm": true, "off_session": true, "recurring_details": { "type": "payment_method_id", "data": "pm_Nm9GUukfMLZhXdHJSEy0" } } ' ``` Response ``` {"payment_id":"pay_tzYpHGeuRYHdPGK5M89d","merchant_id":"merchant_1756939264","status":"succeeded","amount":1000,"net_amount":1000,"shipping_cost":null,"amount_capturable":0,"amount_received":1000,"connector":"aci","client_secret":"pay_tzYpHGeuRYHdPGK5M89d_secret_AErv7wAoaKE3LP4CWUR1","created":"2025-09-03T22:49:39.145Z","currency":"EUR","customer_id":"customer123","customer":{"id":"customer123","name":"John Doe","email":"customer@gmail.com","phone":"9999999999","phone_country_code":"+1"},"description":"Subsequent Mandate Test Payment (MIT from New CIT Demo)","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":true,"capture_on":null,"capture_method":null,"payment_method":"card","payment_method_data":{"card":{"last4":"5454","card_type":null,"card_network":"Mastercard","card_issuer":null,"card_issuing_country":null,"card_isin":"545454","card_extended_bin":null,"card_exp_month":"10","card_exp_year":"25","card_holder_name":"joseph Doe","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":"customer@gmail.com","name":"John Doe","phone":"9999999999","return_url":null,"authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"customer123","created_at":1756939779,"expires":1756943379,"secret":"epk_63a75cd297424ac8b2af9abbd2e7396b"},"manual_retry_allowed":false,"connector_transaction_id":"8ac7a49f99119578019911c57d647953","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":"8ac7a49f99119578019911c57d647953","payment_link":null,"profile_id":"pro_HoadX959YnH9wsndpUrq","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_PZ6v2D98umb2BxIN28tM","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-09-03T23:04:39.145Z","fingerprint":null,"browser_info":null,"payment_channel":null,"payment_method_id":"pm_Nm9GUukfMLZhXdHJSEy0","network_transaction_id":null,"payment_method_status":"active","updated":"2025-09-03T22:49:40.001Z","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":"8ac7a4a299119a87019911c4af57529a","card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null,"enable_partial_authorization":null} ``` </details> <details> <summary>5. setup mandate </summary> ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_dVV9Je3mjaAV1ryc2n6xxIBOOiA5O7RoCqSRMpVpb9Gj9AV6dS5g3hEbMQp3K5rG' \ --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": "5454545454545454", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "card_cvc": "737", "card_network": "Mastercard" } }, "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" } }' ``` Response ``` {"payment_id":"pay_4fB1VOfBvH94w8ubEwIR","merchant_id":"merchant_1756917466","status":"succeeded","amount":0,"net_amount":0,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"aci","client_secret":"pay_4fB1VOfBvH94w8ubEwIR_secret_CGiYMO43dEvBza21wCNY","created":"2025-09-03T21:43:07.598Z","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_D0PDZ3sITaf5hRKWOv9w","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":"5454","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"545454","card_extended_bin":null,"card_exp_month":"10","card_exp_year":"25","card_holder_name":"joseph Doe","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"John","last_name":"Doe","origin_zip":null},"phone":null,"email":"johndoe@gmail.com"},"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":1756935787,"expires":1756939387,"secret":"epk_297846ba6efb4bc1a00da345f2d56273"},"manual_retry_allowed":false,"connector_transaction_id":"8ac7a4a1990ec863019911889b7c095d","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":"8ac7a4a1990ec863019911889b7c095d","payment_link":null,"profile_id":"pro_xtK5YkotshPxwjOySVEi","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_gnftzAdh1YZJvZj3U2nU","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-09-03T21:58:07.597Z","fingerprint":null,"browser_info":null,"payment_channel":null,"payment_method_id":"pm_lM41ZHCkvobdOiYZwhPr","network_transaction_id":null,"payment_method_status":"active","updated":"2025-09-03T21:43:10.100Z","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":"8ac7a4a1990ec863019911889b7c095d","card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null,"enable_partial_authorization":null} ``` </details> <details> <summary>6. MIT corresponding to setup mandate</summary> ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_T42KWe2OWnUIg0vvhyYcFu7R1lLBKCRrpLWyPb4hWHNFyyC34aN9NQjpUdLsd9t9' \ --data '{ "amount": 1000, "currency": "USD", "customer_id": "tester123C", "description": "Subsequent Mandate Test Payment (MIT from New CIT Demo)", "confirm": true, "off_session": true, "recurring_details": { "type": "payment_method_id", "data": "pm_lM41ZHCkvobdOiYZwhPr" } } ' ``` Response ``` {"payment_id":"pay_TzRnmR2Nthv3WQbjCToR","merchant_id":"merchant_1756917466","status":"succeeded","amount":1000,"net_amount":1000,"shipping_cost":null,"amount_capturable":0,"amount_received":1000,"connector":"aci","client_secret":"pay_TzRnmR2Nthv3WQbjCToR_secret_dOfVMRSVNv25sfAoN6nO","created":"2025-09-03T21:44:32.257Z","currency":"USD","customer_id":"tester123C","customer":{"id":"tester123C","name":null,"email":"johndoe@gmail.com","phone":null,"phone_country_code":null},"description":"Subsequent Mandate Test Payment (MIT from New CIT Demo)","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":true,"capture_on":null,"capture_method":null,"payment_method":"card","payment_method_data":{"card":{"last4":"5454","card_type":null,"card_network":"Mastercard","card_issuer":null,"card_issuing_country":null,"card_isin":"545454","card_extended_bin":null,"card_exp_month":"10","card_exp_year":"25","card_holder_name":"joseph Doe","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":"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":1756935872,"expires":1756939472,"secret":"epk_a4ec4eaa5b374dc682e3fac2ad45b421"},"manual_retry_allowed":false,"connector_transaction_id":"8ac7a4a0990ed03f01991189e2d474be","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":"8ac7a4a0990ed03f01991189e2d474be","payment_link":null,"profile_id":"pro_xtK5YkotshPxwjOySVEi","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_gnftzAdh1YZJvZj3U2nU","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-09-03T21:59:32.256Z","fingerprint":null,"browser_info":null,"payment_channel":null,"payment_method_id":"pm_lM41ZHCkvobdOiYZwhPr","network_transaction_id":null,"payment_method_status":"active","updated":"2025-09-03T21:44:33.883Z","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":"8ac7a4a1990ec863019911889b7c095d","card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null,"enable_partial_authorization":null} ``` </details> <details> <summary>7. Network Token flow</summary> I. Create ACI connector ``` curl --location 'http://localhost:8080/account/merchant_1756935953/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_HlwN4Co1MokPmoPglbMtwu0HJ25IBH6oRMWOUJuubIG71NvbeULTgz9TNjjGzlsz' \ --data '{ "connector_type": "payment_processor", "connector_name": "aci", "connector_account_details": { "auth_type": "BodyKey", "api_key": API_KEY, "key1": ENTITY_ID }, "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":null, "accepted_currencies": null }, { "payment_method_type": "debit", "card_networks": [ "Visa", "Mastercard" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true, "accepted_countries": null, "accepted_currencies": null } ] }, ], "connector_webhook_details": { "merchant_secret": "MyWebhookSecret" }, "business_label": "default" }' ``` II. Enable UAS for profile ``` curl --location 'http://localhost:8080/configs/merchants_eligible_for_authentication_service' \ --header 'Content-Type: application/json' \ --header 'api-key: test_admin' \ --data '{ "key": "merchants_eligible_for_authentication_service", "value": VALUE_HERE }' ``` III. create ctp_mastercard ``` curl --location 'http://localhost:8080/account/merchant_1756935953/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_HlwN4Co1MokPmoPglbMtwu0HJ25IBH6oRMWOUJuubIG71NvbeULTgz9TNjjGzlsz' \ --data '{ "connector_type": "authentication_processor", "connector_name": "ctp_mastercard", "connector_account_details": { "auth_type": "HeaderKey", "api_key": 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 }, { "payment_method_type": "debit", "card_networks": [ "Visa", "Mastercard" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "business_country": "US", "business_label": "default", "metadata": { "dpa_id": "DPA ID", "dpa_name": "TestMerchant", "locale": "en_AU", "card_brands": [ "mastercard", "visa" ], "acquirer_bin": "ACQUIRER BIN", "acquirer_merchant_id": "ACQUIRER MERCHANT ID", "merchant_category_code": "0001", "merchant_country_code": "US" } }' ``` IV. CTP profile update ``` curl --location 'http://localhost:8080/account/merchant_1756935953/business_profile/pro_kkwmU6LfcSIte3TlcHMh' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_HlwN4Co1MokPmoPglbMtwu0HJ25IBH6oRMWOUJuubIG71NvbeULTgz9TNjjGzlsz' \ --data '{ "is_click_to_pay_enabled": true, "authentication_product_ids": {"click_to_pay": "mca_foGzOn6nPM6TFvwh6fhj"} }' ``` V. create payment ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_HlwN4Co1MokPmoPglbMtwu0HJ25IBH6oRMWOUJuubIG71NvbeULTgz9TNjjGzlsz' \ --data-raw ' { "amount": 1130, "currency": "EUR", "confirm": false, "return_url": "https://hyperswitch.io", "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" } }' ``` Response ``` {"payment_id":"pay_CHQQv8xweeAmih5MdFXd","merchant_id":"merchant_1756935953","status":"requires_payment_method","amount":1130,"net_amount":1130,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":null,"client_secret":"pay_CHQQv8xweeAmih5MdFXd_secret_zoplDPH6fk9Qm6Recdqn","created":"2025-09-03T21:48:11.651Z","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":{"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":null,"name":null,"phone":null,"return_url":"https://hyperswitch.io/","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":null,"profile_id":"pro_kkwmU6LfcSIte3TlcHMh","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":null,"incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-09-03T22:03:11.651Z","fingerprint":null,"browser_info":null,"payment_channel":null,"payment_method_id":null,"network_transaction_id":null,"payment_method_status":null,"updated":"2025-09-03T21:48:11.673Z","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} ``` VI. confirm payment ``` curl --location 'http://localhost:8080/payments/pay_CHQQv8xweeAmih5MdFXd/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_4c7f1ffc1dfc4e889e867ac60505d178' \ --data '{ "payment_method": "card", "payment_method_type": "debit", "client_secret": "pay_CHQQv8xweeAmih5MdFXd_secret_zoplDPH6fk9Qm6Recdqn", "all_keys_required":true, "ctp_service_details": { "merchant_transaction_id": VALUE_HERE, "correlation_id": VALUE_HERE, "x_src_flow_id": VALUE_HERE }, "browser_info": { "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "color_depth": 24, "java_enabled": true, "java_script_enabled": true, "language": "en-GB", "screen_height": 1440, "screen_width": 2560, "time_zone": -330, "user_agent": "Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Mobile Safari/537.36" } }' ``` Response ``` {"payment_id":"pay_CHQQv8xweeAmih5MdFXd","merchant_id":"merchant_1756935953","status":"requires_customer_action","amount":1130,"net_amount":1130,"shipping_cost":null,"amount_capturable":1130,"amount_received":null,"connector":"aci","client_secret":"pay_CHQQv8xweeAmih5MdFXd_secret_zoplDPH6fk9Qm6Recdqn","created":"2025-09-03T21:48:11.651Z","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":"card","payment_method_data":null,"payment_token":null,"shipping":null,"billing":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":"guest@example.com"},"order_details":null,"email":null,"name":null,"phone":null,"return_url":"https://hyperswitch.io/","authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":{"type":"redirect_to_url","redirect_to_url":"http://localhost:8080/payments/redirect/pay_CHQQv8xweeAmih5MdFXd/merchant_1756935953/pay_CHQQv8xweeAmih5MdFXd_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":"8ac7a4a1990ec8630199118d5b0d11ed","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":"8ac7a4a1990ec8630199118d5b0d11ed","payment_link":null,"profile_id":"pro_kkwmU6LfcSIte3TlcHMh","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_bQFt1dkbAjSp6Gv6pbJR","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":{"authentication_flow":null,"electronic_commerce_indicator":"06","status":"success","ds_transaction_id":null,"version":null,"error_code":null,"error_message":null},"external_3ds_authentication_attempted":false,"expires_on":"2025-09-03T22:03:11.651Z","fingerprint":null,"browser_info":{"os_type":null,"language":"en-GB","time_zone":-330,"ip_address":"::1","os_version":null,"user_agent":"Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Mobile Safari/537.36","color_depth":24,"device_model":null,"java_enabled":true,"screen_width":2560,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":1440,"accept_language":"en","java_script_enabled":true},"payment_channel":null,"payment_method_id":null,"network_transaction_id":null,"payment_method_status":null,"updated":"2025-09-03T21:48:20.951Z","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":"click_to_pay","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\":\"8ac7a4a1990ec8630199118d5b0d11ed\",\"paymentType\":\"DB\",\"paymentBrand\":\"VISA\",\"amount\":\"11.30\",\"currency\":\"EUR\",\"descriptor\":\"3484.7818.5182 NetworkTokenChannel \",\"result\":{\"code\":\"000.200.000\",\"description\":\"transaction pending\"},\"tokenAccount\":{\"number\":\"2222030199301958\",\"type\":\"NETWORK\",\"expiryMonth\":\"10\",\"expiryYear\":\"2027\"},\"redirect\":{\"url\":\"https://eu-test.oppwa.com/connectors/demo/cybersourcerest/simulator/payment.ftl?ndcid=8a8294175d602369015d73bf009f1808_efdb58167aad468a928b44dde03c2115\",\"parameters\":[{\"name\":\"TransactionId\",\"value\":\"0000000070575071\"},{\"name\":\"uuid\",\"value\":\"8ac7a4a1990ec8630199118d5b0d11ed\"}]},\"buildNumber\":\"e05bc10dcc6acc6bd4abda346f4af077dcd905d7@2025-09-02 06:02:21 +0000\",\"timestamp\":\"2025-09-03 21:48:20+0000\",\"ndc\":\"8a8294175d602369015d73bf009f1808_efdb58167aad468a928b44dde03c2115\",\"source\":\"OPP\",\"paymentMethod\":\"NT\",\"shortId\":\"3484.7818.5182\"}","enable_partial_authorization":null} ``` </details> <details> <summary>7. Manual capture </summary> ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_jBGr5aVyHqi26wIUT0l6VoyH0lGLSC5AcUoyoSv4MOaZDVulNKHuceiO87kr1UDn' \ --data-raw '{ "amount": 6540, "currency": "EUR", "amount_to_capture": 6540, "confirm": true, "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "three_ds", "setup_future_usage": "on_session", "customer": { "id": "customer123", "name": "John Doe", "email": "customer@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "customer_id": "customer123", "phone_country_code": "+1", "description": "Its my first payment request", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "5386024192625914", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "card_cvc": "737", "card_network": "Mastercard" } }, "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" } }, "payment_link": false, "payment_link_config": { "theme": "", "logo": "", "seller_name": "", "sdk_layout": "", "display_sdk_only": false, "enabled_saved_payment_method": false }, "payment_type": "normal" } ' ``` Response: ``` {"payment_id":"pay_dTlUOqtFsHTk2pYjcNDt","merchant_id":"merchant_1756939264","status":"requires_customer_action","amount":6540,"net_amount":6540,"shipping_cost":null,"amount_capturable":6540,"amount_received":null,"connector":"aci","client_secret":"pay_dTlUOqtFsHTk2pYjcNDt_secret_quBPvBLmgEoMeGq30q8W","created":"2025-09-04T12:25:30.223Z","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":"manual","payment_method":"card","payment_method_data":{"card":{"last4":"5914","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"538602","card_extended_bin":null,"card_exp_month":"10","card_exp_year":"25","card_holder_name":"joseph Doe","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":"guest@example.com"},"billing":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":"guest@example.com"},"order_details":[{"sku":null,"upc":null,"brand":null,"amount":6540,"category":null,"quantity":1,"tax_rate":null,"product_id":null,"description":null,"product_name":"Apple iphone 15","product_type":null,"sub_category":null,"total_amount":null,"commodity_code":null,"unit_of_measure":null,"product_img_link":null,"product_tax_code":null,"total_tax_amount":null,"requires_shipping":null,"unit_discount_amount":null}],"email":"customer@gmail.com","name":"John Doe","phone":"9999999999","return_url":"https://google.com/","authentication_type":"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_dTlUOqtFsHTk2pYjcNDt/merchant_1756939264/pay_dTlUOqtFsHTk2pYjcNDt_1"},"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"customer123","created_at":1756988730,"expires":1756992330,"secret":"epk_fbfca29dcba44555b3c4abb3e7ce9b67"},"manual_retry_allowed":null,"connector_transaction_id":"8ac7a49f9912a69e019914b074cd08f8","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":"8ac7a49f9912a69e019914b074cd08f8","payment_link":null,"profile_id":"pro_HoadX959YnH9wsndpUrq","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_PZ6v2D98umb2BxIN28tM","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-09-04T12:40:30.223Z","fingerprint":null,"browser_info":{"language":"nl-NL","time_zone":0,"ip_address":"128.0.0.1","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36","color_depth":24,"java_enabled":true,"screen_width":1536,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":723,"java_script_enabled":true},"payment_channel":null,"payment_method_id":null,"network_transaction_id":null,"payment_method_status":null,"updated":"2025-09-04T12:25:33.311Z","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} ```` capture after redirection: ``` curl --location 'http://localhost:8080/payments/pay_dTlUOqtFsHTk2pYjcNDt/capture' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_jBGr5aVyHqi26wIUT0l6VoyH0lGLSC5AcUoyoSv4MOaZDVulNKHuceiO87kr1UDn' \ --data '{ "amount_to_capture": 6540, "statement_descriptor_name": "Joseph", "statement_descriptor_prefix" :"joseph", "statement_descriptor_suffix": "JS" }' ``` Response ``` {"payment_id":"pay_dTlUOqtFsHTk2pYjcNDt","merchant_id":"merchant_1756939264","status":"succeeded","amount":6540,"net_amount":6540,"shipping_cost":null,"amount_capturable":0,"amount_received":6540,"connector":"aci","client_secret":"pay_dTlUOqtFsHTk2pYjcNDt_secret_quBPvBLmgEoMeGq30q8W","created":"2025-09-04T12:25:30.223Z","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":"manual","payment_method":"card","payment_method_data":{"card":{"last4":"5914","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"538602","card_extended_bin":null,"card_exp_month":"10","card_exp_year":"25","card_holder_name":"joseph Doe","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":"guest@example.com"},"billing":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe","origin_zip":null},"phone":{"number":"8056594427","country_code":"+91"},"email":"guest@example.com"},"order_details":[{"sku":null,"upc":null,"brand":null,"amount":6540,"category":null,"quantity":1,"tax_rate":null,"product_id":null,"description":null,"product_name":"Apple iphone 15","product_type":null,"sub_category":null,"total_amount":null,"commodity_code":null,"unit_of_measure":null,"product_img_link":null,"product_tax_code":null,"total_tax_amount":null,"requires_shipping":null,"unit_discount_amount":null}],"email":"customer@gmail.com","name":"John Doe","phone":"9999999999","return_url":"https://google.com/","authentication_type":"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":"8ac7a4a29912ae61019914b0fd8866f5","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":"8ac7a49f9912a69e019914b074cd08f8","payment_link":null,"profile_id":"pro_HoadX959YnH9wsndpUrq","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_PZ6v2D98umb2BxIN28tM","incremental_authorization_allowed":false,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-09-04T12:40:30.223Z","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":"pm_dgRVnCJRHsU6c2LmY34G","network_transaction_id":null,"payment_method_status":null,"updated":"2025-09-04T12:26:08.107Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null,"enable_partial_authorization":null} ``` </details> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [x] I added unit tests for my changes where possible
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` - `crates/router/tests/connectors/aci.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:** - Define new data structures (5 changes) - Implement new functions (46 changes) - Extend existing types with new fields (152 changes) - Add conditional logic for feature flags or filtering (4 changes) **Detailed Identifier Changes:** Commit b014b138: Files to modify: **crates/hyperswitch_connectors/src/connectors/aci.rs** Add: - function: private::build_request - function: private::build_request - function: private::build_request - function: private::get_headers - function: private::get_content_type - function: private::get_url - function: private::get_request_body **crates/hyperswitch_connectors/src/connectors/aci/transformers.rs** Add: - function: private::from_str - function: private::map_aci_capture_status - function: private::try_from - struct: pub::AciMandateRequest - struct: pub::AciMandateResponse - impl: impl TryFrom< ResponseRouterData< SetupMandate, AciMandateResponse, SetupMandateRequestData, PaymentsResponseData, >, > for RouterData<SetupMandate, SetupMandateRequestData, PaymentsResponseData> **crates/router/tests/connectors/aci.rs** Add: - function: private::get_data - function: private::get_auth_token - function: private::get_name - function: private::get_payment_authorize_data - 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 - impl: impl ConnectorActions for AciTest - impl: impl utils::Connector for AciTest
{"pr_number": 8986, "pr_title": "feat(connector): enhance ACI connector with comprehensive 3DS support - DRAFT", "merged_at": "2025-09-10T14:03:29Z", "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", "crates/router/tests/connectors/aci.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": 5, "functions_added": 46, "enums_added": 2, "fields_added": 152, "imports_added": 5, "conditionals_added": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(cypress): fix adyen ideal bank redirect and refactor `handleFlow` ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR fixes adyen ideal bank redirect and also refactor handle flow function to simplify the complexity to work with. ### 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). --> fixes ideal bank redirect for adyen. ## 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)? --> by running the test for adyen: <img width="398" alt="image" src="https://github.com/user-attachments/assets/cdb89d22-8fd4-4585-be02-bb04975027a5" /> ci should pass. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `npm run format` - [x] I addressed lints thrown by `cnpm 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/support/redirectionHandler.js` **Code Patterns Applied:** - Extend existing types with new fields (3 changes) - Add conditional logic for feature flags or filtering (7 changes)
{"pr_number": 7848, "pr_title": "refactor(cypress): fix adyen ideal bank redirect and refactor `handleFlow`", "merged_at": "2025-05-14T08:17:03Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"tests": ["cypress-tests/cypress/support/redirectionHandler.js"]}, "change_types": {"fields_added": 3, "conditionals_added": 7}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(payment): add connector_request_reference_id to PaymentAttemptUpdate in ConfirmIntentTokenized 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 --> In the payment tokenization confirm intent flow, the field `connector_request_reference_id` was not being updated in payment_attempt. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database 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 #9596 ## 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. Confirm Intent : ``` curl --location 'http://localhost:8080/v2/payments/12345_pay_019994e36a177e03b4024c1e86907ed0/confirm-intent' \ --header 'x-profile-id: pro_rn7g67NOZXIaqMQMjSWG' \ --header 'x-client-secret: cs_019994e36a2a771290eaaf9c5baba115' \ --header 'Authorization: api-key=dev_C9gNbgcEhMbQloVd4ASlr97dPXRvpcZP5iTrecc88qJA1UqMsJa0VPxqlz8lOcy9' \ --header 'Content-Type: application/json' \ --header 'api-key: pk_dev_aacd87682cc548e6a240c0a5e69c3771' \ --data '{ "payment_method_data": { "card": { "card_cvc": "123", "card_exp_month": "10", "card_exp_year": "25", "card_number": "4111111111111111", "card_holder_name": "joseph Doe" } }, "payment_method_type": "card", "payment_method_subtype": "credit", "browser_info": { "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36", "accept_header": "text\\/html,application\\/xhtml+xml,application\\/xml;q=0.9,image\\/webp,image\\/apng,*\\/*;q=0.8", "language": "en-GB", "color_depth": 24, "screen_height": 1440, "screen_width": 2560, "time_zone": -330, "java_enabled": true, "java_script_enabled": true, "ip_address": "0.0.0.0" }, "customer_acceptance": { "acceptance_type": "online", "accepted_at": "2022-09-10T10:11:12Z", "online": { "ip_address": "123.32.25.123", "user_agent": "Mozilla/5.0 (Linux; Android 12; SM-S906N Build/QP1A.190711.020; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/80.0.3987.119 Mobile Safari/537.36" } } }' ``` Response: ``` { "id": "12345_pay_019994e36a177e03b4024c1e86907ed0", "status": "requires_capture", "amount": { "order_amount": 10000, "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": 10000, "amount_to_capture": null, "amount_capturable": 10000, "amount_captured": 0 }, "customer_id": "12345_cus_019994e3438475c39db3fd368c7f5343", "connector": "authorizedotnet", "created": "2025-09-29T09:52:35.876Z", "modified_at": "2025-09-29T09:52:45.633Z", "payment_method_data": { "billing": null }, "payment_method_type": "card", "payment_method_subtype": "credit", "connector_transaction_id": "120071794888", "connector_reference_id": "120071794888", "merchant_connector_id": "mca_wOvtWjK6SlBGig1M2MFQ", "browser_info": null, "error": null, "shipping": null, "billing": null, "attempts": null, "connector_token_details": null, "payment_method_id": "12345_pm_019994e387c677919b40d6062bff9935", "next_action": null, "return_url": "https://google.com/success", "authentication_type": "no_three_ds", "authentication_type_applied": "no_three_ds", "is_iframe_redirection_enabled": null, "merchant_reference_id": null, "raw_connector_response": null, "feature_metadata": null, "metadata": null } ``` <img width="773" height="173" alt="image" src="https://github.com/user-attachments/assets/b07d60f5-ec3e-4419-ae38-4e922a955fe8" /> ## 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/payments/payment_attempt.rs` **2. Core Business Logic** - `crates/router/src/core/payments/operations/payment_confirm_intent.rs` **Code Patterns Applied:** - Extend existing types with new fields (1 changes) **Detailed Identifier Changes:** Commit 55263047: Files to modify: **crates/hyperswitch_domain_models/src/payments/payment_attempt.rs** Modify existing code **crates/router/src/core/payments/operations/payment_confirm_intent.rs** Modify existing code
{"pr_number": 9597, "pr_title": "fix(payment): add connector_request_reference_id to PaymentAttemptUpdate in ConfirmIntentTokenized flow", "merged_at": "2025-10-01T13:42:36Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/payments/payment_attempt.rs"], "core_business": ["crates/router/src/core/payments/operations/payment_confirm_intent.rs"]}, "change_types": {"fields_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(payment-link): use shouldRemoveBeforeUnloadEvents flag for handling removal of beforeunload events through SDK ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Hotfix for https://github.com/juspay/hyperswitch/pull/7072 ### 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_link/payment_link_initiate/payment_link_initiator.js` - `crates/router/src/core/payment_link/payment_link_initiate/secure_payment_link_initiator.js` **Code Patterns Applied:** - Extend existing types with new fields (6 changes)
{"pr_number": 7079, "pr_title": "refactor(payment-link): use shouldRemoveBeforeUnloadEvents flag for handling removal of beforeunload events through SDK", "merged_at": "2025-01-20T19:19:48Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"core_business": ["crates/router/src/core/payment_link/payment_link_initiate/payment_link_initiator.js", "crates/router/src/core/payment_link/payment_link_initiate/secure_payment_link_initiator.js"]}, "change_types": {"fields_added": 6}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(connector): [CYBERSOURCE] send xid as none for external 3ds payments ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> send xid as none for external 3ds payments Main PR - https://github.com/juspay/hyperswitch/pull/7577 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Test cases in Main PR ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (3 changes) **Detailed Identifier Changes:** Commit 34efe953: Files to modify: **crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs** Modify existing code
{"pr_number": 7618, "pr_title": "fix(connector): [CYBERSOURCE] send xid as none for external 3ds payments", "merged_at": "2025-03-25T13:21:31Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs"]}, "change_types": {"fields_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(cypress): Resolve cypress issue for NMI connector ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD Fixes this issue - github.com/juspay/hyperswitch/issues/7268 ## Description <!-- Describe your changes in detail --> NMI cypress were failing because of this [PR](https://github.com/juspay/hyperswitch/pull/7200). This PR resolves the cypress 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)? --> Cypress Test <img width="767" alt="Screenshot 2025-02-14 at 13 45 56" src="https://github.com/user-attachments/assets/58733baf-303d-45a0-8eb9-c9d93cf0335d" /> <img width="795" alt="Screenshot 2025-02-14 at 15 56 41" src="https://github.com/user-attachments/assets/6406627d-a05d-4c1b-bfb1-c7bf6454b4ad" /> ## 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/Nmi.js` **Code Patterns Applied:** - Extend existing types with new fields (2 changes)
{"pr_number": 7267, "pr_title": "fix(cypress): Resolve cypress issue for NMI connector", "merged_at": "2025-02-14T15:05:50Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/configs/Payment/Nmi.js"]}, "change_types": {"fields_added": 2}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
refactor(connector): [Noon] Implement Paypal Payment Method ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Implemented Paypal Payment Method ### 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 Account 2. Create API key 3. Create Paypal MCA ``` curl --location 'http://localhost:8080/account/postman_merchant_GHAction_e985e611-eaa7-4782-b44f-517fe9315e73/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "connector_type": "payment_processor", "connector_name": "noon", "connector_account_details": { "auth_type": "SignatureKey", "api_key": "__", "api_secret": "_", "key1": "_" }, "test_mode": true, "disabled": false, "payment_methods_enabled": [ { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ "Visa", "Mastercard" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "debit", "payment_experience": null, "card_networks": [ "Visa", "Mastercard" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method": "bank_debit", "payment_method_types": [ { "payment_method_type": "ach", "recurring_enabled": true, "installment_payment_enabled": true, "minimum_amount": 0, "maximum_amount": 10000 } ] }, { "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 }, { "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_type": "paypal", "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 } ] } ], "metadata": { "terminal_id": "10000001", "account_name": "transaction_processing", "google_pay": { "merchant_info": { "merchant_name": "bluesnap", "merchant_id": "vbewlji" }, "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": "bluesnap", "gateway_merchant_id": "1087905" } } } ] } }, "connector_webhook_details": { "merchant_secret": "samraat" } }' ``` 4. Create Paypal Create+ Confirm ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: ____' \ --data-raw '{ "amount": 1000, "currency": "USD", "confirm": true, "capture_method": "automatic", "customer_id": "sammantest2722", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "three_ds", "return_url": "https://google.com", "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "payment_method": "wallet", "payment_method_type": "paypal", "payment_method_data": { "wallet": { "paypal_redirect": {} } }, "browser_info": { "user_agent": "Mozilla\/5.0 (iPhone NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "128.0.0.1" }, "connector_metadata": { "noon": { "order_category": "pay" } }, "order_details": [ { "product_name": "Apple iphone 15", "quantity": 1, "amount": 390, "account_name": "transaction_processing" } ] }' ``` Response ``` { "payment_id": "pay_7KTPasJhuBkDNsQnOFOO", "merchant_id": "postman_merchant_GHAction_e985e611-eaa7-4782-b44f-517fe9315e73", "status": "requires_customer_action", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 1000, "amount_received": null, "connector": "noon", "client_secret": "pay_7KTPasJhuBkDNsQnOFOO_secret_yXYOhACDtqKXt5oNVGKA", "created": "2025-03-25T10:45:28.435Z", "currency": "USD", "customer_id": "sammantest2722", "customer": { "id": "sammantest2722", "name": "Joseph Doe", "email": "something@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "wallet", "payment_method_data": { "wallet": {}, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": [ { "brand": null, "amount": 390, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null } ], "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "three_ds", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "next_action": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_7KTPasJhuBkDNsQnOFOO/postman_merchant_GHAction_e985e611-eaa7-4782-b44f-517fe9315e73/pay_7KTPasJhuBkDNsQnOFOO_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "paypal", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "sammantest2722", "created_at": 1742899528, "expires": 1742903128, "secret": "epk_6c478e7ddaab49a2b7ffe9d010c24565" }, "manual_retry_allowed": null, "connector_transaction_id": "351877590674", "frm_message": null, "metadata": null, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "pay" }, "braintree": null }, "feature_metadata": null, "reference_id": "pay_7KTPasJhuBkDNsQnOFOO_1", "payment_link": null, "profile_id": "pro_aMgWBXyM22kAqjSNNpYI", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_vdO9nv1Hwx5BfK1LEBHL", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-03-25T11:00:28.435Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "128.0.0.1", "user_agent": "Mozilla/5.0 (iPhone NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-03-25T10:45:32.840Z", "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 5. Psync to know the status ``` curl --location 'http://localhost:8080/payments/pay_7KTPasJhuBkDNsQnOFOO?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: _' ``` Resposne ``` { "payment_id": "pay_7KTPasJhuBkDNsQnOFOO", "merchant_id": "postman_merchant_GHAction_e985e611-eaa7-4782-b44f-517fe9315e73", "status": "succeeded", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 1000, "connector": "noon", "client_secret": "pay_7KTPasJhuBkDNsQnOFOO_secret_yXYOhACDtqKXt5oNVGKA", "created": "2025-03-25T10:45:28.435Z", "currency": "USD", "customer_id": "sammantest2722", "customer": { "id": "sammantest2722", "name": "Joseph Doe", "email": "something@gmail.com", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "wallet", "payment_method_data": { "wallet": {}, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": [ { "brand": null, "amount": 390, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null } ], "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "three_ds", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "paypal", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "351877590674", "frm_message": null, "metadata": null, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "pay" }, "braintree": null }, "feature_metadata": null, "reference_id": "pay_7KTPasJhuBkDNsQnOFOO_1", "payment_link": null, "profile_id": "pro_aMgWBXyM22kAqjSNNpYI", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_vdO9nv1Hwx5BfK1LEBHL", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-03-25T11:00:28.435Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "128.0.0.1", "user_agent": "Mozilla/5.0 (iPhone NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-03-25T10:45:55.776Z", "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` - [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/production.toml` - `crates/hyperswitch_connectors/src/connectors/noon.rs` - `crates/hyperswitch_connectors/src/connectors/noon/transformers.rs` - ... and 1 more files **2. Tests** - `config/deployments/integration_test.toml` - `loadtest/config/development.toml` **3. Configuration Files** - `config/config.example.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 2 more files **Code Patterns Applied:** - Define new data structures (10 changes) - Implement new functions (9 changes) - Extend existing types with new fields (68 changes) **Detailed Identifier Changes:** Commit 5153e361: Files to modify: **crates/hyperswitch_connectors/src/connectors/noon.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/noon/transformers.rs** Add: - function: private::try_from - function: private::try_from - struct: pub::NoonPaymentsCompleteAuthorizeRequest - struct: pub::NoonCompleteOrder - struct: pub::NoonCompletePaymentData - struct: pub::NoonData - struct: pub::NoonQueryData - struct: pub::PaypalQueryData - struct: pub::NoonPaypalResponse - struct: pub::NoonPaypalResponseResult - struct: pub::NoonPaypalPaymentData - struct: pub::PaypalData - enum: pub::NoonPaymentMethodType - enum: pub::NoonAuthPaymentResponse - impl: impl TryFrom<&NoonRouterData<&PaymentsCompleteAuthorizeRouterData>> for NoonPaymentsCompleteAuthorizeRequest - impl: impl TryFrom<ResponseRouterData<F, NoonPaypalResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData> **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code
{"pr_number": 7610, "pr_title": "refactor(connector): [Noon] Implement Paypal Payment Method", "merged_at": "2025-03-27T12:05:05Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/connector_configs/toml/production.toml", "crates/hyperswitch_connectors/src/connectors/noon.rs", "crates/hyperswitch_connectors/src/connectors/noon/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.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": 10, "functions_added": 9, "enums_added": 2, "fields_added": 68, "imports_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(samsung_pay): add payment_method_type duplication check ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> As we do not have a unique identifier to store when we save a wallet, we are unable to prevent payment method duplication. As a result, when a customer uses a saved wallet, we end up saving it again. During the next payment, the customer will see two buttons for the same wallet in the customer PML. To address this issue, we check if the wallet is already saved. If the particular wallet is already saved, we simply update the 'last used' status for the same wallet, rather than creating a new entry. This payment method duplication check is already implemented for Apple Pay and Google Pay, and in this PR, I have extended it to include Samsung Pay as well. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> -> Create a merchant connector account with google pay or samsung pay enabled -> Enable the below config ``` curl --location 'localhost:8080/configs/' \ --header 'api-key: api-key' \ --header 'Content-Type: application/json' \ --data '{ "key": "skip_saving_wallet_at_connector_merchant_1740130285", "value": "[\"samsung_pay\",\"google_pay\"]" }' ``` ``` { "key": "skip_saving_wallet_at_connector_merchant_1740130285", "value": "[\"samsung_pay\",\"google_pay\"]" } ``` -> Make a samsung pay payment with `"setup_future_usage": "off_session"` ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: api-key' \ --data-raw '{ "amount": 2300, "currency": "USD", "confirm": true, "business_country": "US", "business_label": "default", "amount_to_capture": 2300, "customer_id": "cu_1740120198", "setup_future_usage": "off_session", "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "return_url": "https://google.com", "email": "samsungpay@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": "samsung_pay", "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "in sit", "user_agent": "amet irure esse" } }, "billing": { "address": { "line1": "1467", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" } }, "payment_method_data": { "wallet": { "samsung_pay": { "payment_credential": { "3_d_s": { "type": "S", "version": "100", "data": "samsung pay token" }, "payment_card_brand": "VI", "payment_currency_type": "USD", "payment_last4_fpan": "1661", "method": "3DS", "recurring_payment": false } } } } } ' ``` ``` { "payment_id": "pay_2p8lTfi6OM7SZrj6PBnR", "merchant_id": "merchant_1740130285", "status": "succeeded", "amount": 2300, "net_amount": 2300, "shipping_cost": null, "amount_capturable": 0, "amount_received": 2300, "connector": "cybersource", "client_secret": "pay_2p8lTfi6OM7SZrj6PBnR_secret_gMXnHSdwMhvGnpslHATf", "created": "2025-02-21T09:33:01.655Z", "currency": "USD", "customer_id": "cu_1740120198", "customer": { "id": "cu_1740120198", "name": "Joseph Doe", "email": "samsungpay@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": { "samsung_pay": { "last4": "1661", "card_network": "Visa", "type": 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" }, "phone": null, "email": null }, "order_details": null, "email": "samsungpay@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": "samsung_pay", "connector_label": "cybersource_US_default_default", "business_country": "US", "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cu_1740120198", "created_at": 1740130381, "expires": 1740133981, "secret": "epk_6ce927c963fa4105a8ab9228f97416b7" }, "manual_retry_allowed": false, "connector_transaction_id": "7401303829696483104805", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_2p8lTfi6OM7SZrj6PBnR_1", "payment_link": null, "profile_id": "pro_Gi6ZTv5ZEsUTOmapC9Rq", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_1qwQigfi1hdSHlCKLEOw", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-21T09:48:01.655Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-02-21T09:33:04.066Z", "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 } ``` -> List customer payment methods for the above customer. We can see that there is only one payment method that is saved ``` curl --location 'http://localhost:8080/customers/cu_1740120198/payment_methods' \ --header 'Accept: application/json' \ --header 'api-key: api-key' ``` ``` { "customer_payment_methods": [ { "payment_token": "token_NHsoBD91m4hXF1jHayz0", "payment_method_id": "pm_BuHQFVj1XP70L0hlwzrT", "customer_id": "cu_1740120198", "payment_method": "wallet", "payment_method_type": "samsung_pay", "payment_method_issuer": null, "payment_method_issuer_code": null, "recurring_enabled": false, "installment_payment_enabled": false, "payment_experience": [ "redirect_to_url" ], "card": null, "metadata": null, "created": "2025-02-21T09:33:04.086Z", "bank": null, "surcharge_details": null, "requires_cvv": true, "last_used_at": "2025-02-21T09:33:04.086Z", "default_payment_method_set": true, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": null, "line3": null, "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": null, "email": null } } ], "is_guest_customer": null } ``` -> Make a google pay payment for the same customer and make customer pml. The response will contain the google pay at the top indicating it is the recently used payment method type. ``` curl --location 'http://localhost:8080/customers/cu_1740120198/payment_methods' \ --header 'Accept: application/json' \ --header 'api-key: api-key' ``` ``` { "customer_payment_methods": [ { "payment_token": "token_CLtCX0lG2248Tg9x8TCs", "payment_method_id": "pm_YQISjUrUW9YHJT0Szb7P", "customer_id": "cu_1740120198", "payment_method": "wallet", "payment_method_type": "google_pay", "payment_method_issuer": null, "payment_method_issuer_code": null, "recurring_enabled": false, "installment_payment_enabled": false, "payment_experience": [ "redirect_to_url" ], "card": null, "metadata": null, "created": "2025-02-21T09:38:01.648Z", "bank": null, "surcharge_details": null, "requires_cvv": true, "last_used_at": "2025-02-21T09:38:01.648Z", "default_payment_method_set": false, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": null, "line3": null, "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": null, "email": null } }, { "payment_token": "token_1w5WhYajhQbs8ghjTCXP", "payment_method_id": "pm_BuHQFVj1XP70L0hlwzrT", "customer_id": "cu_1740120198", "payment_method": "wallet", "payment_method_type": "samsung_pay", "payment_method_issuer": null, "payment_method_issuer_code": null, "recurring_enabled": false, "installment_payment_enabled": false, "payment_experience": [ "redirect_to_url" ], "card": null, "metadata": null, "created": "2025-02-21T09:33:04.086Z", "bank": null, "surcharge_details": null, "requires_cvv": true, "last_used_at": "2025-02-21T09:33:04.086Z", "default_payment_method_set": true, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": null, "line3": null, "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": null, "email": null } } ], "is_guest_customer": null } ``` -> Now make one more samsung pay payment for the same customer ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: api-key' \ --data-raw '{ "amount": 2300, "currency": "USD", "confirm": true, "business_country": "US", "business_label": "default", "amount_to_capture": 2300, "customer_id": "cu_1740120198", "setup_future_usage": "off_session", "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "return_url": "https://google.com", "email": "samsungpay@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": "samsung_pay", "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "in sit", "user_agent": "amet irure esse" } }, "billing": { "address": { "line1": "1467", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" } }, "payment_method_data": { "wallet": { "samsung_pay": { "payment_credential": { "3_d_s": { "type": "S", "version": "100", "data": "samsung pay token" }, "payment_card_brand": "VI", "payment_currency_type": "USD", "payment_last4_fpan": "1661", "method": "3DS", "recurring_payment": false } } } } } ' ``` ``` { "payment_id": "pay_4ixWGjRYTrngGcTYhhYO", "merchant_id": "merchant_1740130285", "status": "succeeded", "amount": 2300, "net_amount": 2300, "shipping_cost": null, "amount_capturable": 0, "amount_received": 2300, "connector": "cybersource", "client_secret": "pay_4ixWGjRYTrngGcTYhhYO_secret_PbeOhfHgCOZNYYYTmzcB", "created": "2025-02-21T09:40:10.925Z", "currency": "USD", "customer_id": "cu_1740120198", "customer": { "id": "cu_1740120198", "name": "Joseph Doe", "email": "samsungpay@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": { "samsung_pay": { "last4": "1661", "card_network": "Visa", "type": 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" }, "phone": null, "email": null }, "order_details": null, "email": "samsungpay@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": "samsung_pay", "connector_label": "cybersource_US_default_default", "business_country": "US", "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cu_1740120198", "created_at": 1740130810, "expires": 1740134410, "secret": "epk_86d9427e2e0641ae9d888d0aee1892e9" }, "manual_retry_allowed": false, "connector_transaction_id": "7401308119186931304807", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_4ixWGjRYTrngGcTYhhYO_1", "payment_link": null, "profile_id": "pro_Gi6ZTv5ZEsUTOmapC9Rq", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_1qwQigfi1hdSHlCKLEOw", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-21T09:55:10.925Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-02-21T09:40:13.489Z", "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 } ``` -> Make customer pml. The response should contain samsung pay at the top indicating it is the recently used payment method type and also there should only be one samsung pay button ``` curl --location 'http://localhost:8080/customers/cu_1740120198/payment_methods' \ --header 'Accept: application/json' \ --header 'api-key: api-key' ``` ``` { "customer_payment_methods": [ { "payment_token": "token_6QkmZgFGtk17Spmc0Krc", "payment_method_id": "pm_BuHQFVj1XP70L0hlwzrT", "customer_id": "cu_1740120198", "payment_method": "wallet", "payment_method_type": "samsung_pay", "payment_method_issuer": null, "payment_method_issuer_code": null, "recurring_enabled": false, "installment_payment_enabled": false, "payment_experience": [ "redirect_to_url" ], "card": null, "metadata": null, "created": "2025-02-21T09:33:04.086Z", "bank": null, "surcharge_details": null, "requires_cvv": true, "last_used_at": "2025-02-21T09:40:13.492Z", "default_payment_method_set": true, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": null, "line3": null, "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": null, "email": null } }, { "payment_token": "token_uUhRNFlDlK8pkDXapajC", "payment_method_id": "pm_YQISjUrUW9YHJT0Szb7P", "customer_id": "cu_1740120198", "payment_method": "wallet", "payment_method_type": "google_pay", "payment_method_issuer": null, "payment_method_issuer_code": null, "recurring_enabled": false, "installment_payment_enabled": false, "payment_experience": [ "redirect_to_url" ], "card": null, "metadata": null, "created": "2025-02-21T09:38:01.648Z", "bank": null, "surcharge_details": null, "requires_cvv": true, "last_used_at": "2025-02-21T09:38:01.648Z", "default_payment_method_set": false, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": null, "line3": null, "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": null, "email": null } } ], "is_guest_customer": 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/helpers.rs` - `crates/router/src/core/payments/tokenization.rs` **2. Other** - `crates/common_enums/src/enums.rs` **Code Patterns Applied:** - Implement new functions (1 changes) **Detailed Identifier Changes:** Commit 11ff4374: Files to modify: **crates/common_enums/src/enums.rs** Add: - function: pub::should_check_for_customer_saved_payment_method_type - impl: impl PaymentMethodType **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payments/tokenization.rs** Modify existing code
{"pr_number": 7337, "pr_title": "fix(samsung_pay): add payment_method_type duplication check", "merged_at": "2025-02-22T12:27:22Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/tokenization.rs"], "other": ["crates/common_enums/src/enums.rs"]}, "change_types": {"functions_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connectors): [Stripe] add extended authorization 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 --> Extend stripe integration to support extended authorization ## 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)? --> We cannot test this feature until it is enabled by stripe Sanity Test - cypress ran on the PR ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **authentication** feature, you'll need to modify these architectural layers: **1. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/router_data.rs` **2. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs` **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (4 changes) - Extend existing types with new fields (17 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit 8cfa966d: Files to modify: **crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs** Remove: - impl: impl TryFrom<(&Card, Auth3ds, bool)> for StripePaymentMethodData Add: - struct: pub::StripeExtendedAuthorizationResponse - enum: pub::StripeRequestExtendedAuthorization - enum: pub::StripeExtendedAuthorizationStatus - impl: impl TryFrom<( &Card, Auth3ds, bool, Option<primitive_wrappers::RequestExtendedAuthorizationBool>, )> for StripePaymentMethodData **crates/hyperswitch_domain_models/src/router_data.rs** Add: - function: pub::new
{"pr_number": 9084, "pr_title": "feat(connectors): [Stripe] add extended authorization for cards", "merged_at": "2025-08-29T11:12:57Z", "intent": {"feature_type": "authentication", "action": "add_feature", "entities": []}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/router_data.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs"]}, "change_types": {"structs_added": 1, "functions_added": 4, "enums_added": 2, "fields_added": 17, "imports_added": 1, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(recovery): add support for custom billing api 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 --> Revenue recovery incoming webhook flow handles events from external 3rd party subscription provider, If merchant has inhouse subscription solution and wants to use revenue recovery, `/payments/recovery` will consume the events same as incoming webhooks. Flow : - Merchant can integrate with /payments/recovery endpoint and sends failed payments to recovery system. - recovery core will schedule the payments in process tracker. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Create payment mca : ``` curl --location 'http://localhost:8080/v2/connector-accounts' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-merchant-id: cloth_seller_j08ByNifXf1Q9nMHaBN6' \ --header 'x-profile-id: pro_QfvcZDEn9OJaUyLTL6Z4' \ --header 'Authorization: admin-api-key=test_admin' \ --data '{ "connector_type": "payment_processor", "connector_name": "worldpayvantiv", "connector_account_details": { "auth_type": "SignatureKey", "api_key": "apikey", "key1": "key1", "api_secret": "secret" }, "payment_methods_enabled": [ { "payment_method_type": "card", "payment_method_subtypes": [ { "payment_method_subtype": "credit", "payment_experience": null, "card_networks": [ "Visa", "Mastercard" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_subtype": "debit", "payment_experience": null, "card_networks": [ "Visa", "Mastercard" ], "accepted_currencies": null, "accepted_countries": null, "minimum_amount": -1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ], "frm_configs": null, "connector_webhook_details": { "merchant_secret": "" }, "metadata": { "report_group": "Hello", "merchant_config_currency": "USD" }, "profile_id": "pro_QfvcZDEn9OJaUyLTL6Z4" }' ``` create custom billing mca : ``` curl --location 'http://localhost:8080/v2/connector-accounts' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-merchant-id: cloth_seller_NjzUfz0ALVkqI8BOBP0P' \ --header 'x-profile-id: pro_HfHD4qr1QNDUSHwMyytb' \ --header 'Authorization: admin-api-key=test_admin' \ --header 'api-key: ••••••' \ --data '{ "connector_type": "billing_processor", "connector_name": "custombilling", "connector_account_details": { "auth_type": "NoKey" }, "feature_metadata" : { "revenue_recovery" : { "max_retry_count" : 9, "billing_connector_retry_threshold" : 2, "billing_account_reference" :{ "mca_oc9cwYX0KTkSy76ZscY2" : "mca_oc9cwYX0KTkSy76ZscY2" }, "switch_payment_method_config" : { "retry_threshold" : 5, "time_threshold_after_creation": 1 } } }, "profile_id": "pro_HfHD4qr1QNDUSHwMyytb" }' ``` Update the profile revenue_recovery_retry_algorithm_type to cascading. Create revenue recovery ``` curl --location 'http://localhost:8080/v2/payments/recovery' \ --header 'Authorization: api-key=dev_VWOtZtmJoPKjnhD9evLcDDbL6CRTI5oSrVZ6EqMTbDflaWFKJY1gapwrEYouiva4' \ --header 'x-profile-id: pro_a8uCk5nzKhOXxnm68UCv' \ --header 'x-merchant-id: cloth_seller_vMdpVbUDQDxrDB04KB6L' \ --header 'Content-Type: application/json' \ --data-raw '{ "amount_details": { "order_amount": 100, "currency": "USD" }, "merchant_reference_id": "merchant_reference_id_20jgfdh19asasd", "billing_merchant_connector_id" : "mca_5rHage7LWP2yB2BdNZRO", "payment_merchant_connector_id": "mca_86nTDgqPCM8EPXPNkzvh", "error": { "code": "card_declined", "message": "Your card was declined.", "network_advice_code": null, "network_decline_code": "01", "network_error_message": "generic_decline" }, "billing": { "address": { "first_name": "John", "last_name": "Dough" }, "email": "example@example.com" }, "attempt_status": "failure", "payment_method_type": "card", "payment_method_sub_type": "credit", "transaction_created_at": "2025-06-20T10:11:12Z", "connector_customer_id": "cus_0001", "connector_transaction_id": "connector_transaction_id", "primary_processor_payment_method_token": "2541911049890008", "action": "schedule_failed_payment", "billing_started_at": "2025-07-31T10:11:12Z", "payment_method_units": { "2541911049890008": { "card": { "expiry_month": "06", "expiry_year": "50", "last_four_digits": "0008", "card_issuer": "Chase", "card_network" :"visa" } } } }' ``` response status indicates intent is failed (Success response) ``` { "id": "12345_pay_019883e1dc4971228aa378ab75b738f7", "intent_status": "failed", } ``` ## 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/events/payment.rs` - `crates/api_models/src/payments.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/revenue_recovery.rs` **3. Core Business Logic** - `crates/router/src/core/revenue_recovery/api.rs` - `crates/router/src/core/revenue_recovery/transformers.rs` - `crates/router/src/core/webhooks/incoming_v2.rs` - ... and 1 more files **4. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/custombilling.rs` - `crates/hyperswitch_connectors/src/connectors/custombilling/transformers.rs` **5. Type Definitions** - `crates/common_types/src/payments.rs` - `crates/router/src/types/api/payments.rs` - `crates/router_env/src/logger/types.rs` **6. Utils** - `crates/router/src/routes/lock_utils.rs` **7. Other** - `crates/router/src/routes/app.rs` - `crates/router/src/routes/payments.rs` **Code Patterns Applied:** - Define new data structures (4 changes) - Implement new functions (11 changes) - Extend existing types with new fields (94 changes) **Detailed Identifier Changes:** Commit 9e8df845: Files to modify: **crates/api_models/src/events/payment.rs** Add: - function: private::get_api_event_type - function: private::get_api_event_type - impl: impl ApiEventMetric for RecoveryPaymentsCreate - impl: impl ApiEventMetric for RecoveryPaymentsResponse **crates/api_models/src/payments.rs** Add: - struct: pub::RecoveryPaymentsResponse - struct: pub::CustomRecoveryPaymentMethodData - struct: pub::RecoveryPaymentsCreate **crates/common_types/src/payments.rs** Add: - enum: pub::RecoveryAction **crates/hyperswitch_connectors/src/connectors/custombilling.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/custombilling/transformers.rs** Remove: - function: private::try_from - struct: pub::CustombillingAuthType - impl: impl TryFrom<&ConnectorAuthType> for CustombillingAuthType **crates/hyperswitch_domain_models/src/revenue_recovery.rs** Remove: - function: pub::get_action - enum: pub::RecoveryAction - impl: impl RecoveryAction **crates/router/src/core/revenue_recovery/api.rs** Add: - function: pub::custom_revenue_recovery_core **crates/router/src/core/revenue_recovery/transformers.rs** Add: - function: private::foreign_from - function: private::foreign_from - impl: impl ForeignFrom<api_models::payments::RecoveryPaymentsCreate> for hyperswitch_domain_models::revenue_recovery::RevenueRecoveryInvoiceData - impl: impl ForeignFrom<&api_models::payments::RecoveryPaymentsCreate> for hyperswitch_domain_models::revenue_recovery::RevenueRecoveryAttemptData **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/routes/app.rs** Modify existing code **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/payments.rs** Add: - function: pub::recovery_payments_create **crates/router/src/types/api/payments.rs** Modify existing code **crates/router_env/src/logger/types.rs** Modify existing code
{"pr_number": 8838, "pr_title": "feat(recovery): add support for custom billing api for v2", "merged_at": "2025-08-08T09:52:16Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/events/payment.rs", "crates/api_models/src/payments.rs"], "domain": ["crates/hyperswitch_domain_models/src/revenue_recovery.rs"], "core_business": ["crates/router/src/core/revenue_recovery/api.rs", "crates/router/src/core/revenue_recovery/transformers.rs", "crates/router/src/core/webhooks/incoming_v2.rs", "crates/router/src/core/webhooks/recovery_incoming.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/custombilling.rs", "crates/hyperswitch_connectors/src/connectors/custombilling/transformers.rs"], "types": ["crates/common_types/src/payments.rs", "crates/router/src/types/api/payments.rs", "crates/router_env/src/logger/types.rs"], "utils": ["crates/router/src/routes/lock_utils.rs"], "other": ["crates/router/src/routes/app.rs", "crates/router/src/routes/payments.rs"]}, "change_types": {"structs_added": 4, "functions_added": 11, "enums_added": 1, "fields_added": 94, "imports_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(cypress): valdiate `error_code` and `error_message` and make it visible in `reports` ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> This PR introduces error code and error message validations. This nullifies the need to re-run the ci check manually in local every the check just to see the reason for the failure. With that, `error_code` and `error_message` will now be printed in the ui in every run and hence, this makes the generated reports more reliable. ### 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). --> i want reports to serve a purpose and reliable. ## 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)? --> when a ci check fail, especially from the connectors' end, ci takes a screenshot of the ui, as usual, but that will now contain the error code and message. since adyen yet again got into some issues with save card flow, it is possible to test my changes directly without the need to make any modifications to the test: <img width="539" alt="image" src="https://github.com/user-attachments/assets/c2037bb2-b393-410d-b5b4-feb093a94a7a" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `prettier . --write` - [ ] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Tests** - `cypress-tests/cypress/support/commands.js` **Code Patterns Applied:** - Extend existing types with new fields (1 changes) - Add conditional logic for feature flags or filtering (11 changes)
{"pr_number": 6913, "pr_title": "feat(cypress): valdiate `error_code` and `error_message` and make it visible in `reports`", "merged_at": "2024-12-23T18:26:54Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user", "connector", "card"]}, "hierarchy": {"tests": ["cypress-tests/cypress/support/commands.js"]}, "change_types": {"fields_added": 1, "conditionals_added": 11}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(webhooks): move webhook acknowledge config to cover early deserialization errors ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description This PR includes changes to make incoming webhooks respect the acknowledge config - Wrapped both UCS and non-UCS webhook processing in unified error handling - Applied `handle_incoming_webhook_error` to catch deserialization failures before they propagate - Ensured config check covers `decode_webhook_body` errors and `get_webhook_event_type` failures ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context This allows for ensuring webhooks never move to an unexpected state if an unexpected webhook event was sent. ## How did you test it? <details> <summary>Simulate an incoming webhook request</summary> cURL for Adyenplatform curl --location --request POST 'http://localhost:8080/webhooks/merchant_1758618685/mca_Cn91aoBREMZsK52j3IpE' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_J5AQ9drHJslEgtCIxXfwjOtd7vDqfPQ3fKWNT70OeKVsSukLqlMmUWkFtBVRNEBz' \ --data '{ "invalid_field": "random_value" }' Response headers <img width="681" height="381" alt="Screenshot 2025-09-23 at 3 08 59 PM" src="https://github.com/user-attachments/assets/cb7d1a43-5040-4380-a8e5-f84397d25934" /> Expectations - Should return back a 200 response </details> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/webhooks/incoming.rs` **Detailed Identifier Changes:** Commit 2a00e722: Files to modify: **crates/router/src/core/webhooks/incoming.rs** Modify existing code
{"pr_number": 9508, "pr_title": "fix(webhooks): move webhook acknowledge config to cover early deserialization errors", "merged_at": "2025-09-23T20:19:02Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant", "user", "webhook"]}, "hierarchy": {"core_business": ["crates/router/src/core/webhooks/incoming.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [WORLDPAYVANTIV] Populate Network Decline Error Code & Message ## 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 --> Populated Network Decline Error code and Error Message with EnhancedAuthResponse getting from connector. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Ref: http://support.worldpay.com/support/CNP-API/content/authresp.htm Ref: http://support.worldpay.com/support/CNP-API/content/saleresp1.htm ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Payments Create (Failed case to see the `issuer_error_code` and `issuer_error_message`) : cURL : ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_xMNIZBeTXsGRgGNBdW8jJsqfJg7yFIoUXdtDgAPWf6PLWq9my1HkfKQsTPc7VKuf' \ --header 'Cookie: PHPSESSID=0b47db9d7de94c37b6b272087a9f2fa7' \ --data '{ "amount": 65, "currency": "USD", "connector": ["worldpayvantiv"], "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "customer_id": "First_Customer", "name": "John Doe", "authentication_type": "no_three_ds", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4457010100000008", "card_exp_month": "06", "card_exp_year": "52", "card_holder_name": "joseph Doe", "card_cvc": "992" } }, "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": "9123456789", "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": "9123456789", "country_code": "+91" } } }' ``` Response : ``` { "payment_id": "pay_nDIWwY1FN6RUooVbl2TN", "merchant_id": "merchant_1754472094", "status": "failed", "amount": 65, "net_amount": 65, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "worldpayvantiv", "client_secret": "pay_nDIWwY1FN6RUooVbl2TN_secret_WSxBelwY9VXi1sAkmhT7", "created": "2025-08-06T12:45:40.372Z", "currency": "USD", "customer_id": "First_Customer", "customer": { "id": "First_Customer", "name": "John Doe", "email": null, "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "0008", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "445701", "card_extended_bin": null, "card_exp_month": "06", "card_exp_year": "52", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "9123456789", "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": "9123456789", "country_code": "+91" }, "email": null }, "order_details": null, "email": null, "name": "John Doe", "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": "110", "error_message": "Insufficient Funds", "unified_code": "UE_9000", "unified_message": "Something went wrong", "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "First_Customer", "created_at": 1754484340, "expires": 1754487940, "secret": "epk_353f5708ca694e4596e9aa09dd9198b9" }, "manual_retry_allowed": true, "connector_transaction_id": "pay_nDIWwY1FN6RUooVbl2TN_1", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_DWXrygWVghiYH2Q2tp6n", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_fKaZeQpALEJZCnUCsVFE", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-06T13:00:40.372Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-08-06T12:45:43.692Z", "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": "51", "issuer_error_message": "Insufficient Funds", "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/worldpayvantiv/transformers.rs` **Code Patterns Applied:** - Define new data structures (4 changes) - Extend existing types with new fields (42 changes) **Detailed Identifier Changes:** Commit e2bfce89: Files to modify: **crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs** Add: - struct: pub::EnhancedAuthResponse - struct: pub::NetworkResponse - struct: pub::NetworkField - struct: pub::NetworkSubField
{"pr_number": 8856, "pr_title": "feat(connector): [WORLDPAYVANTIV] Populate Network Decline Error Code & Message", "merged_at": "2025-08-06T16:36:36Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs"]}, "change_types": {"structs_added": 4, "fields_added": 42}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(router): [ZSL] remove partially capture status ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Currently, in case of underpayment we are mapping the payment status as `partially captured` with the changes of this PR. We will map the underpayment status as `succeeded` and provide information about the amount actually captured ## 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)? --> Webhooks cannot be tested in ZSL sandbox. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **payment** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/zsl/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (1 changes) **Detailed Identifier Changes:** Commit 05726262: Files to modify: **crates/hyperswitch_connectors/src/connectors/zsl/transformers.rs** Modify existing code
{"pr_number": 6689, "pr_title": "refactor(router): [ZSL] remove partially capture status", "merged_at": "2024-11-29T10:22:24Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["payment", "webhook"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/zsl/transformers.rs"]}, "change_types": {"fields_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [NETCETERA] add fixes for authentication response fields ## Type of Change <!-- Put an `x` in the boxes that apply --> - [X] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Current structure ``` NetceteraAuthenticationSuccessResponse{ .... pub challenge_cancel: Option<String>, pub trans_status_reason: Option<String>, pub message_extension: Option<Vec<MessageExtensionAttribute>>, } ``` Correct structure ``` NetceteraAuthenticationSuccessResponse{ .... authentication_response: { pub trans_status_reason: Option<String>, }, authentication_request: { pub message_extension: Option<String>, } } ``` This PR introduces the above fix in the struct. Fixes summary: 1. Remove **challenge_cancel** field from NetceteraAuthenticationSuccessResponse 2. Move **trans_status_reason** inside AuthenticationResponse struct 3. Move **message_extension** inside AuthenticationRequest struct 4. Remove fields **challenge_cancel** and **challenge_code_reason** from ResultsResponseData, and consume **challenge_cancel** and **challenge_code_reason** from webhook's results_request field (RReq)." For your reference, please check the official specification of these attribute in 3DSecureio docs —it's clearer than what Netcetera currently provides https://docs.3dsecure.io/3dsv2/specification_220.html#attr-RReq-challengeCancel https://docs.3dsecure.io/3dsv2/specification_220.html#attr-ARes-transStatusReason https://docs.3dsecure.io/3dsv2/specification_220.html#attr-ARes-messageExtension ### 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` 4. `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)? --> With the code changes, the expected behaviour is to, 1. Receive message_extension and trans_status_reason fields in Netcetera’s authentication response and store them in the authentication table. 2. Receive the challenge_cancel field from the Netcetera notification payload and store it in the authentication table. ### Steps to verify field **trans_status_reason**: 1. Test Netcetera 3ds challenge flow via SDK. 2. Check in Authentication Table if **challenge_code_reason** is present. (trans_status_reason is mapped to challenge_code_reason in authentication table) **Query** `select challenge_code_reason from authentication where connector_authentication_id='82e5df02-d83f-4adf-b00b-d5c10c52d4cd';` <img width="1074" height="516" alt="Screenshot 2025-08-11 at 5 38 31 PM" src="https://github.com/user-attachments/assets/ffe93636-1630-4d75-b310-e28e9cdcab8a" /> ### Steps to verify field **challenge_cancel**: 1. Test Netcetera 3ds challenge flow via SDK. 2. Cancel the challenge from challenge iframe. 3. Check in Authentication Table if **challenge_cancel** is present. <img width="1319" height="585" alt="Screenshot 2025-08-11 at 5 40 31 PM" src="https://github.com/user-attachments/assets/612f21a1-2da1-472d-a844-d205024bc01f" /> **Query** `select challenge_cancel from authentication where connector_authentication_id='b51b6977-059d-4a59-92c9-1f3d37b43563';` <img width="1319" height="585" alt="Screenshot 2025-08-11 at 5 43 11 PM" src="https://github.com/user-attachments/assets/a441d352-4e7b-4c0a-ac82-09849dbcbc2f" /> Please note we cannot verify field **message_extension** in integ/sandbox, can only be tested in prod. ## 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` - `crates/hyperswitch_connectors/src/connectors/netcetera.rs` - `crates/hyperswitch_connectors/src/connectors/netcetera/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (4 changes) **Detailed Identifier Changes:** Commit 58b3e64f: Files to modify: **crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/netcetera.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/netcetera/transformers.rs** Modify existing code
{"pr_number": 8907, "pr_title": "fix(connector): [NETCETERA] add fixes for authentication response fields", "merged_at": "2025-08-11T14:21:26Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user", "connector", "webhook"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs", "crates/hyperswitch_connectors/src/connectors/netcetera.rs", "crates/hyperswitch_connectors/src/connectors/netcetera/transformers.rs"]}, "change_types": {"fields_added": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): revert [paypal, trustpay] add in feature matrix ORIGINAL PR: https://github.com/juspay/hyperswitch/pull/8042 Reverts https://github.com/juspay/hyperswitch/pull/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 f43d1b3e: 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": 8054, "pr_title": "feat(connector): revert [paypal, trustpay] add in feature matrix", "merged_at": "2025-05-16T10:01:23Z", "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"}
chore(postman): update `Stripe` response `status`, `error_code`, and `error_message` for deprecated `Sofort` ## 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 --> Mapping `status`, `error_code`, and `error_message` for `Stripe` Payment Processor `Sofort` Bank Transfer Payment Method as `Sofort` has been deprecated by `Stripe`. ### 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). --> `Stripe` Payment Processor has deprecated `Sofort` Bank Transfer Payment Method. ## 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)? --> _Before_ <img width="1728" alt="image" src="https://github.com/user-attachments/assets/96c27305-04fb-4839-a91b-84ed69bc4ced" /> _After_ <img width="1727" alt="image" src="https://github.com/user-attachments/assets/50881bf2-8fb0-4b7f-8a96-2742e55d6c76" /> ## 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** - `postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario16-Bank Redirect-sofort/Payments - Confirm/event.test.js` - `postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario16-Bank Redirect-sofort/Payments - Retrieve/event.test.js` **Code Patterns Applied:** - Add conditional logic for feature flags or filtering (4 changes)
{"pr_number": 7730, "pr_title": "chore(postman): update `Stripe` response `status`, `error_code`, and `error_message` for deprecated `Sofort`", "merged_at": "2025-04-08T11:27:04Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user"]}, "hierarchy": {"tests": ["postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario16-Bank Redirect-sofort/Payments - Confirm/event.test.js", "postman/collection-dir/stripe/Flow Testcases/Happy Cases/Scenario16-Bank Redirect-sofort/Payments - Retrieve/event.test.js"]}, "change_types": {"conditionals_added": 4}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(connector): [Novalnet] Remove webhook placeholder connector config ## Type of Change <!-- Put an `x` in the boxes that apply --> - [X] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description remove placeholder from novalnet webhooks secret ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [X] I formatted the code `cargo +nightly fmt --all` - [X] I addressed lints thrown by `cargo clippy` - [X] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - `crates/connector_configs/toml/sandbox.toml`
{"pr_number": 6451, "pr_title": "fix(connector): [Novalnet] Remove webhook placeholder connector config", "merged_at": "2024-10-28T13:40:56Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["webhook"]}, "hierarchy": {"connectors": ["crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
refactor: explicitly specify top redirections for secure payment and payout links ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Described in https://github.com/juspay/hyperswitch-web/issues/773 ### 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 secure links handle redirections for 3ds txns for payments and end return URLs for payouts. ## How did you test it? Locally, using iframed links. <details> <summary>1. Enable secure links by setting up allowed domains</summary> cURL curl --location 'http://localhost:8080/account/merchant_1730884662/business_profile/pro_4eqlNAJWOPckKqn59OBB' \ --header 'Content-Type: application/json' \ --header 'api-key: test_admin' \ --data '{"payment_link_config":{"allowed_domains":["*"],"enabled_saved_payment_method":false,"theme":"#1A1A1A","logo":"https://hyperswitch.io/favicon.ico"}}' </details> <details> <summary>2. Create a payment link</summary> cURL curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_tMyRpU4sj6bZ7z3j6Ho0NJGCRJvx7bkdu6e2MNtBb8225cKSV1YZkJDXoOpqv1ao' \ --data-raw '{"authentication_type":"three_ds","customer_id":"cus_thvkuYBbjlREiSblofy9","profile_id":"pro_4eqlNAJWOPckKqn59OBB","amount":100,"currency":"USD","payment_link":true,"setup_future_usage":"on_session","connector":["stripe"],"email":"john.doe@example.com","session_expiry":10000,"return_url":"https://example.com","payment_link_config":{"theme":"#14356f","logo":"https://hyperswitch.io/favicon.ico","seller_name":"HyperSwitch Inc."}}' Response {"payment_id":"pay_63XbTYdh5nBWx41iK6qM","merchant_id":"merchant_1730884662","status":"requires_payment_method","amount":100,"net_amount":100,"shipping_cost":null,"amount_capturable":100,"amount_received":null,"connector":null,"client_secret":"pay_63XbTYdh5nBWx41iK6qM_secret_GcI9m8tIxoFMxgl8RKsQ","created":"2024-11-07T12:07:53.674Z","currency":"USD","customer_id":"cus_thvkuYBbjlREiSblofy9","customer":{"id":"cus_thvkuYBbjlREiSblofy9","name":"John Doe","email":"john.doe@example.com","phone":"6168205366","phone_country_code":"+1"},"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":"on_session","off_session":null,"capture_on":null,"capture_method":null,"payment_method":null,"payment_method_data":null,"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":"john.doe@example.com","name":"John Doe","phone":"6168205366","return_url":"https://example.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":null,"connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"cus_thvkuYBbjlREiSblofy9","created_at":1730981273,"expires":1730984873,"secret":"epk_9093c895ec7f41838498599676c8195a"},"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_1730884662/pay_63XbTYdh5nBWx41iK6qM?locale=en","secure_link":"http://localhost:8080/payment_link/s/merchant_1730884662/pay_63XbTYdh5nBWx41iK6qM?locale=en","payment_link_id":"plink_wEst8i1pAaM90cI1EfFZ"},"profile_id":"pro_4eqlNAJWOPckKqn59OBB","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":null,"incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2024-11-07T14:54:33.669Z","fingerprint":null,"browser_info":null,"payment_method_id":null,"payment_method_status":null,"updated":"2024-11-07T12:07:53.695Z","charges":null,"frm_metadata":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null} Open payment link inside an iframe and complete the txn Payment links with top redirection: true [payment_link.webm](https://github.com/user-attachments/assets/02687473-8a5d-4d0f-92ac-26b0f62964bd) </details> <details> <summary>3. Setup allowed domains for payout links</summary> cURL curl --location 'http://localhost:8080/account/merchant_1730884662/business_profile/pro_4eqlNAJWOPckKqn59OBB' \ --header 'Content-Type: application/json' \ --header 'api-key: test_admin' \ --data '{"payout_link_config":{"allowed_domains":["http://localhost:5500","localhost:5500"],"theme":"#1A1A1A","logo":"https://hyperswitch.io/favicon.ico"}}' </details> <details> <summary>4. Create a payout link</summary> cURL curl --location 'http://localhost:8080/payouts/create' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_tMyRpU4sj6bZ7z3j6Ho0NJGCRJvx7bkdu6e2MNtBb8225cKSV1YZkJDXoOpqv1ao' \ --data '{"amount":1,"currency":"EUR","customer_id":"cus_thvkuYBbjlREiSblofy9","description":"Its my first payout request","entity_type":"Individual","confirm":false,"auto_fulfill":true,"session_expiry":1000000,"priority":"instant","profile_id":"pro_4eqlNAJWOPckKqn59OBB","payout_link":true,"return_url":"https://www.google.com","billing":{"address":{"line1":"Raadhuisplein","line2":"92","state":"FL","zip":"7901 BW","country":"NL","first_name":"John","last_name":"Doe"}},"payout_link_config":{"theme":"#0066ff","logo":"https://hyperswitch.io/favicon.ico","merchant_name":"HyperSwitch Inc.","enabled_payment_methods":[{"payment_method":"card","payment_method_types":["debit","credit"]},{"payment_method":"bank_transfer","payment_method_types":["ach","bacs","sepa"]},{"payment_method":"wallet","payment_method_types":["pix","paypal","venmo"]}]}}' Response {"payout_id":"20a97a1f-948a-48cc-acfb-836bb2a9440a","merchant_id":"merchant_1730884662","amount":1,"currency":"EUR","connector":null,"payout_type":null,"payout_method_data":null,"billing":{"address":{"city":null,"country":"NL","line1":"Raadhuisplein","line2":"92","line3":null,"zip":"7901 BW","state":"FL","first_name":"John","last_name":"Doe"},"phone":null,"email":null},"auto_fulfill":true,"customer_id":"cus_thvkuYBbjlREiSblofy9","customer":{"id":"cus_thvkuYBbjlREiSblofy9","name":"John Doe","email":"john.doe@example.com","phone":"6168205366","phone_country_code":"+1"},"client_secret":"payout_20a97a1f-948a-48cc-acfb-836bb2a9440a_secret_m15ekjiQ9h6ba3Vtqr6P","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_4eqlNAJWOPckKqn59OBB","created":"2024-11-07T12:09:58.421Z","connector_transaction_id":null,"priority":"instant","payout_link":{"payout_link_id":"payout_link_ryMUNr5ZK0cJpvCwLxXU","link":"http://localhost:8080/payout_link/merchant_1730884662/20a97a1f-948a-48cc-acfb-836bb2a9440a?locale=en"},"email":"john.doe@example.com","name":"John Doe","phone":"6168205366","phone_country_code":"+1","unified_code":null,"unified_message":null} Open payout link in an iframe and complete the txn Payout links with top redirection: true [payout_link.webm](https://github.com/user-attachments/assets/d5fbf693-530c-43a5-a6ba-fb87c47c7d32) </details> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/generic_link/payout_link/initiate/script.js` - `crates/router/src/core/payment_link/payment_link_initiate/secure_payment_link_initiator.js` **Code Patterns Applied:** - Extend existing types with new fields (2 changes)
{"pr_number": 6494, "pr_title": "refactor: explicitly specify top redirections for secure payment and payout links", "merged_at": "2024-11-11T08:07:30Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/generic_link/payout_link/initiate/script.js", "crates/router/src/core/payment_link/payment_link_initiate/secure_payment_link_initiator.js"]}, "change_types": {"fields_added": 2}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(connector): [TRUSTPAYMENTS] Add 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 TRUSTPAYMENTS Added Template Code ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> https://github.com/juspay/hyperswitch/pull/8672 ## How did you test it? Only template code added hence no testing required ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. 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 (164 changes) **Detailed Identifier Changes:** Commit 31590718: Files to modify: **crates/connector_configs/src/connector.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors.rs** Add: - mod: pub::trustpayments **crates/hyperswitch_connectors/src/connectors/trustpayments.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::Trustpayments - impl: impl Trustpayments - impl: impl api::Payment for Trustpayments - impl: impl api::PaymentSession for Trustpayments - impl: impl api::ConnectorAccessToken for Trustpayments - impl: impl api::MandateSetup for Trustpayments - impl: impl api::PaymentAuthorize for Trustpayments - impl: impl api::PaymentSync for Trustpayments - impl: impl api::PaymentCapture for Trustpayments - impl: impl api::PaymentVoid for Trustpayments - impl: impl api::Refund for Trustpayments - impl: impl api::RefundExecute for Trustpayments - impl: impl api::RefundSync for Trustpayments - impl: impl api::PaymentToken for Trustpayments - impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for Trustpayments - impl: impl ConnectorCommonExt<Flow, Request, Response> for Trustpayments - impl: impl ConnectorCommon for Trustpayments - impl: impl ConnectorValidation for Trustpayments - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Trustpayments - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Trustpayments - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Trustpayments - impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Trustpayments - impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Trustpayments - impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Trustpayments - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Trustpayments - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Trustpayments - impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Trustpayments - impl: impl webhooks::IncomingWebhook for Trustpayments - impl: impl ConnectorSpecifications for Trustpayments - mod: pub::transformers **crates/hyperswitch_connectors/src/connectors/trustpayments/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::TrustpaymentsRouterData - struct: pub::TrustpaymentsPaymentsRequest - struct: pub::TrustpaymentsCard - struct: pub::TrustpaymentsAuthType - struct: pub::TrustpaymentsPaymentsResponse - struct: pub::TrustpaymentsRefundRequest - struct: pub::RefundResponse - struct: pub::TrustpaymentsErrorResponse - enum: pub::TrustpaymentsPaymentStatus - enum: pub::RefundStatus - impl: impl From<(StringMinorUnit, T)> for TrustpaymentsRouterData<T> - impl: impl TryFrom<&TrustpaymentsRouterData<&PaymentsAuthorizeRouterData>> for TrustpaymentsPaymentsRequest - impl: impl TryFrom<&ConnectorAuthType> for TrustpaymentsAuthType - impl: impl From<TrustpaymentsPaymentStatus> for common_enums::AttemptStatus - impl: impl TryFrom<ResponseRouterData<F, TrustpaymentsPaymentsResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData> - impl: impl TryFrom<&TrustpaymentsRouterData<&RefundsRouterData<F>>> for TrustpaymentsRefundRequest - 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/main.rs** Add: - mod: private::trustpayments **crates/router/tests/connectors/trustpayments.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::TrustpaymentsTest - impl: impl ConnectorActions for TrustpaymentsTest - impl: impl utils::Connector for TrustpaymentsTest **crates/test_utils/src/connector_auth.rs** Modify existing code
{"pr_number": 8672, "pr_title": "feat(connector): [TRUSTPAYMENTS] Add Template Code ", "merged_at": "2025-07-24T07:47:30Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment"]}, "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/trustpayments.rs", "crates/hyperswitch_connectors/src/connectors/trustpayments/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/trustpayments.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": 164, "imports_added": 22}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): 2 digit state code for ach fixed ## 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 --> If full state name was provided such as `California` in the `billing`, which Adyen does not recognize as a valid value for the `ach` payment method. The request will succeed if the two-letter state code, for example CA is used. In this PR, internally state is mapped to its 2-digit code for `ach` in `Adyen`. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_jHJyXP82dw0b91ZRpjKIAchhFIePhLsy3oArYC0rOE52iEeUG4377qToguBQjeN5' \ --data-raw '{ "amount": 10000, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "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://duck.com", "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" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US" } }, "payment_method": "bank_debit", "payment_method_type": "ach", "payment_method_data": { "bank_debit": { "ach_bank_debit": { "account_number": "40308669", "routing_number": "121000358", "sort_code": "560036", "shopper_email": "example@gmail.com", "card_holder_name": "joseph Doe", "bank_account_holder_name": "David Archer", "billing_details": { "houseNumberOrName": "50", "street": "Test Street", "city": "Amsterdam", "stateOrProvince": "NY", "postalCode": "12010", "country": "US", "name": "A. Klaassen", "email": "example@gmail.com" }, "reference": "daslvcgbaieh" } } }, "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_TuiR9fWzJhxCp7RSo3E7", "merchant_id": "merchant_1750752538", "status": "succeeded", "amount": 10000, "net_amount": 10000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 10000, "connector": "adyen", "client_secret": "pay_TuiR9fWzJhxCp7RSo3E7_secret_HkF5MLt9l8u6J6MjNVtk", "created": "2025-06-26T05:15:38.140Z", "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": "on_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "bank_debit", "payment_method_data": { "bank_debit": { "ach": { "account_number": "****8669", "routing_number": "121***358", "card_holder_name": "joseph Doe", "bank_account_holder_name": "David Archer", "bank_name": null, "bank_type": null, "bank_holder_type": 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": null, "last_name": null }, "phone": null, "email": null }, "order_details": null, "email": "abcdef123@gmail.com", "name": "John Doe", "phone": "999999999", "return_url": "https://duck.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": "ach", "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": 1750914938, "expires": 1750918538, "secret": "epk_61b34153ff8f410d96e245e31af5b585" }, "manual_retry_allowed": false, "connector_transaction_id": "XMCZC87RD95TPM75", "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_TuiR9fWzJhxCp7RSo3E7_1", "payment_link": null, "profile_id": "pro_zqb2rOPuTMJ2PjV33YMt", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_h95Am2FUsIal5TwffLYh", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-06-26T05:30:38.140Z", "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-06-26T05:15:40.693Z", "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 } ``` 2 digit state code is passed in connector request <img width="1105" alt="Screenshot 2025-06-26 at 10 56 14 AM" src="https://github.com/user-attachments/assets/980afcb4-dc9a-4672-aea4-b53891f56b3e" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs` **Code Patterns Applied:** - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit 68db51a3: Files to modify: **crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs** Modify existing code
{"pr_number": 8466, "pr_title": "fix(connector): 2 digit state code for ach fixed", "merged_at": "2025-06-27T08:51:10Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs"]}, "change_types": {"conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore(cypress): payout - fix test cases for adyenplatform bank ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description This PR fixes the cypress payout test cases for 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 Helps in enabling the Adyenplatform connector for payout cypress test cases as a part of Github CI checks. ## How did you test it? Locally. <img width="845" alt="Screenshot 2024-12-19 at 12 33 27 PM" src="https://github.com/user-attachments/assets/e9cd904d-c9a7-4b1e-93e9-5c78ae705a4e" /> ## 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** - `.github/workflows/cypress-tests-runner.yml` - `cypress-tests/cypress/e2e/PayoutUtils/AdyenPlatform.js` **Code Patterns Applied:** - Extend existing types with new fields (4 changes)
{"pr_number": 6887, "pr_title": "chore(cypress): payout - fix test cases for adyenplatform bank", "merged_at": "2024-12-22T18:00:59Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user", "connector"]}, "hierarchy": {"tests": [".github/workflows/cypress-tests-runner.yml", "cypress-tests/cypress/e2e/PayoutUtils/AdyenPlatform.js"]}, "change_types": {"fields_added": 4}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(connector): [BRAINTREE] Pass connector request reference id ## 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 --> Pass connector request reference id in payment requests to braintree ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> https://github.com/juspay/hyperswitch/issues/7608 ## 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)? --> Order ID on braintree dashboard should contain Hyperswitch connector request reference ID for all the transactions: <img width="1618" alt="image" src="https://github.com/user-attachments/assets/63dbd338-ce24-4e45-91bf-99905de22775" /> Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_q0iUEbBtK5AYpgqOXSEq5bha8S9xpSZeZ7HeRzRDZSIVLREPxMnRGOBxEB6mcbjU' \ --data-raw '{ "amount": 100, "currency": "EUR", "confirm": true, "customer_id": "deepanshu", "email": "deepanshubansal515@gmail.com", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://duck.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "5200000000001096", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "Deepanshu Bansal", "card_cvc": "123" } }, "setup_future_usage": "off_session", "customer_acceptance": { "acceptance_type": "offline" }, "billing": { "email": "guest@example.com" } }' ``` Response: ``` { "payment_id": "pay_qj6nnKBVA02m4m16Bf0p", "merchant_id": "postman_merchant_GHAction_8dc59add-138a-4366-b2f4-e7fd9a76682e", "status": "requires_customer_action", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 100, "amount_received": null, "connector": "braintree", "client_secret": "pay_qj6nnKBVA02m4m16Bf0p_secret_vp3Dm540FBjEy5oODEu0", "created": "2025-03-24T12:18:19.821Z", "currency": "EUR", "customer_id": "deepanshu", "customer": { "id": "deepanshu", "name": null, "email": "deepanshubansal515@gmail.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": "off_session", "off_session": null, "capture_on": null, "capture_method": null, "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": "10", "card_exp_year": "25", "card_holder_name": "Deepanshu Bansal", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": null, "phone": null, "email": "guest@example.com" }, "order_details": null, "email": "deepanshubansal515@gmail.com", "name": null, "phone": null, "return_url": "https://duck.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_qj6nnKBVA02m4m16Bf0p/postman_merchant_GHAction_8dc59add-138a-4366-b2f4-e7fd9a76682e/pay_qj6nnKBVA02m4m16Bf0p_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": "deepanshu", "created_at": 1742818699, "expires": 1742822299, "secret": "epk_ece8705d8e4d40f59864e32e6e61727a" }, "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_7Mi4xtmmjuOFZgzb4rqz", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_fQJW054s61taxmNcIf7d", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-03-24T12:33:19.820Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_0j6JND9oAujfW12x9utN", "payment_method_status": "inactive", "updated": "2025-03-24T12:18:23.369Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "issuer_error_code": null, "issuer_error_message": null } ``` Refunds Request: ``` curl --location 'http://localhost:8080/refunds' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_q0iUEbBtK5AYpgqOXSEq5bha8S9xpSZeZ7HeRzRDZSIVLREPxMnRGOBxEB6mcbjU' \ --data '{ "payment_id": "pay_0SDwU6UegcLz7XeOQdPR", "amount": 123, "reason": "Customer returned product", "refund_type": "instant", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` Refunds Response: ``` { "refund_id": "ref_cqDKR27PsjuksAuU1feK", "payment_id": "pay_0SDwU6UegcLz7XeOQdPR", "amount": 123, "currency": "EUR", "status": "succeeded", "reason": "Customer returned product", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "error_message": null, "error_code": null, "unified_code": null, "unified_message": null, "created_at": "2025-03-24T12:58:51.627Z", "updated_at": "2025-03-24T12:58:53.214Z", "connector": "braintree", "profile_id": "pro_7Mi4xtmmjuOFZgzb4rqz", "merchant_connector_id": "mca_fQJW054s61taxmNcIf7d", "split_refunds": null, "issuer_error_code": null, "issuer_error_message": null } ``` <img width="1618" alt="image" src="https://github.com/user-attachments/assets/1243347a-14d1-44bb-8f17-2d045affa523" /> ## 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/braintree/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (9 changes) **Detailed Identifier Changes:** Commit da8cf61f: Files to modify: **crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs** Modify existing code
{"pr_number": 7609, "pr_title": "feat(connector): [BRAINTREE] Pass connector request reference id", "merged_at": "2025-03-26T10:26:02Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs"]}, "change_types": {"fields_added": 9}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(utils): match string for state with SDK's naming convention ## 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 --> string value for each state is being refactored to the values provided by the the given file: https://github.com/juspay/hyperswitch-web/edit/main/src/States.json Note: Hotfix PR against : https://github.com/juspay/hyperswitch/pull/7300 ### 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/utils.rs` **2. Other** - `crates/common_enums/src/enums.rs` **Code Patterns Applied:** - Extend existing types with new fields (42 changes) **Detailed Identifier Changes:** Commit 0e4b18ad: Files to modify: **crates/common_enums/src/enums.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Modify existing code
{"pr_number": 7377, "pr_title": "refactor(utils): match string for state with SDK's naming convention", "merged_at": "2025-02-25T14:06:40Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/utils.rs"], "other": ["crates/common_enums/src/enums.rs"]}, "change_types": {"fields_added": 42}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [SHIFT4] Pass metadata to connector ## 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 --> Pass metadata to connector Shift4. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> https://github.com/juspay/hyperswitch/issues/9255 ## 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 Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_eJHaeshBvRK6V5mOAoloL5aRczu82zuQt41YvafbbOxn5nDxMNIHOWsJ5TDCT8dJ' \ --data-raw '{ "amount": 5556, "currency": "USD", "confirm": true, "profile_id": "pro_mId6vzqmEh4dUmJyLRSI", "authentication_type": "no_three_ds", "customer": { "id": "deepanshu", "name": "John Doe", "email": "customer@gmail.com", "phone": "9999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4012001800000016", "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" }, "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" }, "metadata": { "order_id": "ORD-12345", "customer_segment": "premium", "purchase_platform": "web_store" } }' ``` Payment Response: ``` { "payment_id": "pay_Xb9hjoMzOeSqH14S1HXy", "merchant_id": "merchant_1756889332", "status": "succeeded", "amount": 5556, "net_amount": 5556, "shipping_cost": null, "amount_capturable": 0, "amount_received": 5556, "connector": "shift4", "client_secret": "pay_Xb9hjoMzOeSqH14S1HXy_secret_EYxCuRxvHkZu7WyJW1Hh", "created": "2025-09-03T09:34:00.407Z", "currency": "USD", "customer_id": "deepanshu", "customer": { "id": "deepanshu", "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": null, "payment_method": "card", "payment_method_data": { "card": { "last4": "0016", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "401200", "card_extended_bin": null, "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": "token_whphrdy66T0EROtSP61h", "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": "customer@gmail.com", "name": "John Doe", "phone": "9999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "deepanshu", "created_at": 1756892040, "expires": 1756895640, "secret": "epk_00a0b91c83104def83f9758c18ee9034" }, "manual_retry_allowed": false, "connector_transaction_id": "char_pBsemSHNsodexllVdUWYvyUi", "frm_message": null, "metadata": { "order_id": "ORD-12345", "customer_segment": "premium", "purchase_platform": "web_store" }, "connector_metadata": null, "feature_metadata": { "redirect_response": null, "search_tags": null, "apple_pay_recurring_details": null, "gateway_system": "direct" }, "reference_id": "char_pBsemSHNsodexllVdUWYvyUi", "payment_link": null, "profile_id": "pro_mId6vzqmEh4dUmJyLRSI", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_lLEdkj8jX102T4hpRpLE", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-03T09:49:00.407Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "128.0.0.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-09-03T09:34:01.500Z", "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 } ``` Shift4 Dashboard: <img width="1955" height="217" alt="image" src="https://github.com/user-attachments/assets/47fb3ce8-0687-41f1-990b-2d8c30e8b65f" /> Cypress: <img width="822" height="1071" alt="image" src="https://github.com/user-attachments/assets/af192e95-66a5-49d6-a0f7-7960b8e1e76a" /> ## 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/shift4/transformers.rs` **Code Patterns Applied:** - Implement new functions (3 changes) - Extend existing types with new fields (1 changes) **Detailed Identifier Changes:** Commit bcfb13ee: Files to modify: **crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs** Add: - function: private::get_metadata - function: private::get_metadata
{"pr_number": 9254, "pr_title": "feat(connector): [SHIFT4] Pass metadata to connector", "merged_at": "2025-09-04T07:16:48Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/shift4/transformers.rs"]}, "change_types": {"functions_added": 3, "fields_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(payments): propagate additional payment method data for google pay during MIT ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Described in #5858 # 2 point ### 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 the requestor identify the cards used for GooglePay MIT ## How did you test it? Using Adyen's GPay CIT and MIT transactions <details> <summary>1. Create a payment link (CIT for future uses)</summary> cURL curl --location --request POST 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_y1KsGsLkn9B3ZruidtCYZVHA5sGL6u9vlIwTMhLD1QsVp04x766uWdrvc7st37At' \ --data-raw '{"authentication_type":"no_three_ds","customer_id":"cus_DYMtbNUqf3wErjOjcZXy","profile_id":"pro_sM6tKJWMBFyr4lsWTpcI","amount":100,"currency":"USD","payment_link":true,"setup_future_usage":"off_session","connector":["adyen"],"capture_method":"automatic","email":"john.doe@example.com","session_expiry":10000,"return_url":"https://example.com","payment_link_config":{"theme":"#14356f","logo":"https://hyperswitch.io/favicon.ico","seller_name":"Hyperswitch Inc."}}' Response {"payment_id":"pay_GSNRKMc5gDRwEeJjSryk","merchant_id":"merchant_1732617559","status":"requires_payment_method","amount":100,"net_amount":100,"shipping_cost":null,"amount_capturable":100,"amount_received":null,"connector":null,"client_secret":"pay_GSNRKMc5gDRwEeJjSryk_secret_X3NpMpozPum0Gi8rBM80","created":"2024-11-26T10:41:59.952Z","currency":"USD","customer_id":"cus_DYMtbNUqf3wErjOjcZXy","customer":{"id":"cus_DYMtbNUqf3wErjOjcZXy","name":"John Doe","email":"john.doe@example.com","phone":"6168205366","phone_country_code":"+1"},"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":"off_session","off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":null,"payment_method_data":null,"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":"john.doe@example.com","name":"John Doe","phone":"6168205366","return_url":"https://example.com/","authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":null,"connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"cus_DYMtbNUqf3wErjOjcZXy","created_at":1732617719,"expires":1732621319,"secret":"epk_7d5167d10116455fa27c36a38a6fa3e7"},"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_1732617559/pay_GSNRKMc5gDRwEeJjSryk?locale=en","secure_link":null,"payment_link_id":"plink_gR2yXhCPMRKid7pKDuaH"},"profile_id":"pro_sM6tKJWMBFyr4lsWTpcI","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":null,"incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2024-11-26T13:28:39.951Z","fingerprint":null,"browser_info":null,"payment_method_id":null,"payment_method_status":null,"updated":"2024-11-26T10:41:59.963Z","charges":null,"frm_metadata":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null} Open payment link and process using GPay Retrieve payment curl --location --request GET 'http://localhost:8080/payments/pay_GSNRKMc5gDRwEeJjSryk' \ --header 'Accept: application/json' \ --header 'api-key: dev_y1KsGsLkn9B3ZruidtCYZVHA5sGL6u9vlIwTMhLD1QsVp04x766uWdrvc7st37At' Response (verify `payment_method_data` in response) {"payment_id":"pay_GSNRKMc5gDRwEeJjSryk","merchant_id":"merchant_1732617559","status":"succeeded","amount":100,"net_amount":100,"shipping_cost":null,"amount_capturable":0,"amount_received":100,"connector":"adyen","client_secret":"pay_GSNRKMc5gDRwEeJjSryk_secret_X3NpMpozPum0Gi8rBM80","created":"2024-11-26T10:41:59.952Z","currency":"USD","customer_id":"cus_DYMtbNUqf3wErjOjcZXy","customer":{"id":"cus_DYMtbNUqf3wErjOjcZXy","name":"John Doe","email":"john.doe@example.com","phone":"6168205366","phone_country_code":"+1"},"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":"off_session","off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"wallet","payment_method_data":{"wallet":{"google_pay":{"last4":"0002","card_network":"AMEX","type":"CARD"}},"billing":null},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":"john.doe@example.com","name":"John Doe","phone":"6168205366","return_url":"https://example.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":"google_pay","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":"G3KHBBJPBCKN2S65","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_GSNRKMc5gDRwEeJjSryk_1","payment_link":null,"profile_id":"pro_sM6tKJWMBFyr4lsWTpcI","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_xYTHzmcNXozYAu6ILLf2","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2024-11-26T13:28:39.951Z","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.4 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":"pm_6OLW7u9HRIGE1RcfAPIk","payment_method_status":"active","updated":"2024-11-26T10:44:13.616Z","charges":null,"frm_metadata":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null} </details> <details> <summary>2. Create GPay MIT</summary> Use payment_method_id from previous step curl --location --request POST 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_y1KsGsLkn9B3ZruidtCYZVHA5sGL6u9vlIwTMhLD1QsVp04x766uWdrvc7st37At' \ --data-raw '{"amount":6500,"currency":"USD","confirm":true,"capture_method":"automatic","capture_on":"2022-09-10T10:11:12Z","customer_id":"cus_DYMtbNUqf3wErjOjcZXy","email":"guest@example.com","name":"John Doe","phone":"999999999","profile_id":"pro_sM6tKJWMBFyr4lsWTpcI","phone_country_code":"+65","description":"Its my first payment request","authentication_type":"no_three_ds","return_url":"https://hyperswitch.io","off_session":true,"recurring_details":{"type":"payment_method_id","data":"pm_6OLW7u9HRIGE1RcfAPIk"},"connector":["adyen"],"statement_descriptor_name":"joseph","statement_descriptor_suffix":"JS","metadata":{"udf1":"value1","new_customer":"true","login_date":"2019-09-10T10:11:12Z"},"browser_info":{"ip_address":"129.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","language":"en-US","color_depth":32,"screen_height":1117,"screen_width":1728,"time_zone":-330,"java_enabled":true,"java_script_enabled":true}}' Response (Verify payment_method_data) {"payment_id":"pay_xmeQ3ppk1UWZF2UI0NwW","merchant_id":"merchant_1732617559","status":"succeeded","amount":6500,"net_amount":6500,"shipping_cost":null,"amount_capturable":0,"amount_received":6500,"connector":"adyen","client_secret":"pay_xmeQ3ppk1UWZF2UI0NwW_secret_dUxHa4fXuMhhis3l2Uqw","created":"2024-11-26T10:45:17.654Z","currency":"USD","customer_id":"cus_DYMtbNUqf3wErjOjcZXy","customer":{"id":"cus_DYMtbNUqf3wErjOjcZXy","name":"John Doe","email":"guest@example.com","phone":"999999999","phone_country_code":"+65"},"description":"Its my first payment request","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":true,"capture_on":null,"capture_method":"automatic","payment_method":"wallet","payment_method_data":{"wallet":{"google_pay":{"last4":"0002","card_network":"AMEX","type":"CARD"}},"billing":null},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":"guest@example.com","name":"John Doe","phone":"999999999","return_url":"https://hyperswitch.io/","authentication_type":"no_three_ds","statement_descriptor_name":"joseph","statement_descriptor_suffix":"JS","next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"google_pay","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"cus_DYMtbNUqf3wErjOjcZXy","created_at":1732617917,"expires":1732621517,"secret":"epk_01c8c2825ebd4d09975d4ae28251704a"},"manual_retry_allowed":false,"connector_transaction_id":"N6L3PNWK585QJ2V5","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_xmeQ3ppk1UWZF2UI0NwW_1","payment_link":null,"profile_id":"pro_sM6tKJWMBFyr4lsWTpcI","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_xYTHzmcNXozYAu6ILLf2","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2024-11-26T11:00:17.654Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"129.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","color_depth":32,"java_enabled":true,"screen_width":1728,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":1117,"java_script_enabled":true},"payment_method_id":"pm_6OLW7u9HRIGE1RcfAPIk","payment_method_status":"active","updated":"2024-11-26T10:45:19.145Z","charges":null,"frm_metadata":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":"XR9D2WCG7NRH9275"} </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/payment_methods.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payment_method_data.rs` **3. Core Business Logic** - `crates/router/src/core/payment_methods/cards.rs` - `crates/router/src/core/payments/operations/payment_create.rs` - `crates/router/src/core/payments/tokenization.rs` **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (3 changes) - Extend existing types with new fields (15 changes) **Detailed Identifier Changes:** Commit 75fe9c0c: Files to modify: **crates/api_models/src/payment_methods.rs** Add: - function: private::from - function: private::from - struct: pub::PaymentMethodDataWalletInfo - impl: impl From<payments::additional_info::WalletAdditionalDataForCard> for PaymentMethodDataWalletInfo - impl: impl From<PaymentMethodDataWalletInfo> for payments::additional_info::WalletAdditionalDataForCard **crates/hyperswitch_domain_models/src/payment_method_data.rs** Add: - function: private::from - impl: impl From<GooglePayWalletData> for payment_methods::PaymentMethodDataWalletInfo **crates/router/src/core/payment_methods/cards.rs** Modify existing code **crates/router/src/core/payments/operations/payment_create.rs** Modify existing code **crates/router/src/core/payments/tokenization.rs** Modify existing code
{"pr_number": 6644, "pr_title": "feat(payments): propagate additional payment method data for google pay during MIT", "merged_at": "2024-11-26T14:14:16Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/payment_methods.rs"], "domain": ["crates/hyperswitch_domain_models/src/payment_method_data.rs"], "core_business": ["crates/router/src/core/payment_methods/cards.rs", "crates/router/src/core/payments/operations/payment_create.rs", "crates/router/src/core/payments/tokenization.rs"]}, "change_types": {"structs_added": 1, "functions_added": 3, "fields_added": 15, "imports_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(router): Add attempts_group DB changes for split payments (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 DB changes for split payments In PaymentIntent: - Add `active_attempts_group_id` column - Add `active_attempt_id_type` column In PaymentAttempt: - Add `attempts_group_id` column While currently a payment_intent can have only a single active_attempt, For split payments case, a payment_intent will have a group of active attempts. These attempts will be linked together by the `attempts_group_id`. This `attempts_group_id` will be stored in the payment intent as the `active_attempts_group_id`. The active_attempt_id will be ignored in split payments case. ### 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). --> Closes #9465 ## 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 PR only contains DB changes. No API changes are done ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Database Layer (Queries & Schema)** - `crates/diesel_models/src/payment_attempt.rs` - `crates/diesel_models/src/payment_intent.rs` - `crates/diesel_models/src/schema_v2.rs` **2. 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` **3. Other** - `crates/common_enums/src/enums.rs` - `crates/router/src/services/kafka/payment_attempt.rs` - `crates/router/src/services/kafka/payment_attempt_event.rs` - ... and 4 more files **Code Patterns Applied:** - Extend existing types with new fields (32 changes) **Detailed Identifier Changes:** Commit 9dbfeda4: Files to modify: **crates/common_enums/src/enums.rs** Add: - enum: pub::ActiveAttemptIDType **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_v2.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/router/src/services/kafka/payment_attempt.rs** Modify existing code **crates/router/src/services/kafka/payment_attempt_event.rs** Modify existing code **crates/router/src/services/kafka/payment_intent.rs** Modify existing code **crates/router/src/services/kafka/payment_intent_event.rs** Modify existing code
{"pr_number": 9466, "pr_title": "feat(router): Add attempts_group DB changes for split payments (v2)", "merged_at": "2025-09-24T08:41:25Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment"]}, "hierarchy": {"database": ["crates/diesel_models/src/payment_attempt.rs", "crates/diesel_models/src/payment_intent.rs", "crates/diesel_models/src/schema_v2.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"], "other": ["crates/common_enums/src/enums.rs", "crates/router/src/services/kafka/payment_attempt.rs", "crates/router/src/services/kafka/payment_attempt_event.rs", "crates/router/src/services/kafka/payment_intent.rs", "crates/router/src/services/kafka/payment_intent_event.rs", "v2_compatible_migrations/2025-09-19-061700-0000_add-group-id-in-payment-intent-and-attempt/down.sql", "v2_compatible_migrations/2025-09-19-061700-0000_add-group-id-in-payment-intent-and-attempt/up.sql"]}, "change_types": {"enums_added": 1, "fields_added": 32}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(routing): Add support to update config for elimination routing ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Add a new route for updating the elimination routing config when it is toggled ### 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). --> This PR closes #7939 ## 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 elimination routing request ``` curl --location --request POST 'http://localhost:8080/account/merchant_174600xxxx/business_profile/pro_h9ecR6baV3b1eDvfxxxB/dynamic_routing/elimination/toggle?enable=metrics' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_YWu8PFM4pqgBjknNsvHimHsB*******' ``` response ``` { "id": "routing_yfRG8iqWlBreVTVlnYwB", "profile_id": "pro_h9ecR6baV3b1eDvfxxxB", "name": "Elimination based dynamic routing algorithm", "kind": "dynamic", "description": "", "created_at": 1746007881, "modified_at": 1746007881, "algorithm_for": "payment" } ``` 2. Update elimination routing config request ``` curl --location --request PATCH 'http://localhost:8080/account/merchant_174600xxxx/business_profile/pro_h9ecR6baV3b1eDvfxxxB/dynamic_routing/elimination/config/routing_yfRG8iqWlBreVTVlxxxB' \ --header 'api-key: dev_YWu8PFM4pqgBjknNsvHimHsBW1O9CBVy3*******' \ --header 'Content-Type: application/json' \ --data '{ "params": [ "Currency", "CardBin", "Country", "PaymentMethod", "PaymentMethodType", "AuthenticationType", "CardNetwork" ] }' ``` response ``` { "id": "routing_YYu14QIGKRrWgJ8QllpR", "profile_id": "pro_h9ecR6baV3b1eDvfxxxB", "name": "Elimination based dynamic routing algorithm", "kind": "dynamic", "description": "", "created_at": 1746008246, "modified_at": 1746008246, "algorithm_for": "payment" } ``` ## 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/events/routing.rs` - `crates/api_models/src/routing.rs` **2. Core Business Logic** - `crates/router/src/core/routing.rs` **3. Other** - `crates/router/src/routes/app.rs` - `crates/router/src/routes/routing.rs` **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (5 changes) - Extend existing types with new fields (29 changes) - Add conditional logic for feature flags or filtering (4 changes) - Modify database queries (4 changes) **Detailed Identifier Changes:** Commit d07a85ca: Files to modify: **crates/api_models/src/events/routing.rs** Add: - function: private::get_api_event_type - impl: impl ApiEventMetric for EliminationRoutingPayloadWrapper **crates/api_models/src/routing.rs** Add: - function: pub::update - function: pub::update - struct: pub::EliminationRoutingPayloadWrapper - impl: impl EliminationAnalyserConfig - impl: impl EliminationRoutingConfig **crates/router/src/core/routing.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/routing.rs** Add: - function: pub::elimination_routing_update_configs
{"pr_number": 7938, "pr_title": "feat(routing): Add support to update config for elimination routing", "merged_at": "2025-05-12T16:26:29Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "card"]}, "hierarchy": {"api_models": ["crates/api_models/src/events/routing.rs", "crates/api_models/src/routing.rs"], "core_business": ["crates/router/src/core/routing.rs"], "other": ["crates/router/src/routes/app.rs", "crates/router/src/routes/routing.rs"]}, "change_types": {"structs_added": 1, "functions_added": 5, "fields_added": 29, "conditionals_added": 4, "database_queries": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [Novalnet] Integrate wallets Paypal and Googlepay ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [X] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description 1. Integrated Googlepay and Paypal for Novalnet 2. Integrated mandates for Googlepay and Paypal ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 3. `crates/router/src/configs` 4. `loadtest/config` --> ## Motivation and Context https://github.com/juspay/hyperswitch-cloud/issues/6731 <!-- 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. Test cases: 1. Googlepay payment - manual - automatic - mandates 2. Paypal - manual - automatic - mandates [Manual Testing Doc](https://docs.google.com/document/d/1E1nkLfc8qg0htkxOkwbsA0f9B5QBoECxJ4swH1WElgw/edit?usp=sharing) ## 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 **Code Patterns Applied:** - Define new data structures (2 changes) - Implement new functions (2 changes) - Extend existing types with new fields (31 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit 673b8691: Files to modify: **crates/hyperswitch_connectors/src/connectors/novalnet.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs** Add: - function: private::try_from - function: pub::get_token - struct: pub::NovalnetGooglePay - impl: impl TryFrom<&api_enums::PaymentMethodType> for NovalNetPaymentTypes - impl: impl NovalnetPaymentsResponseTransactionData
{"pr_number": 6370, "pr_title": "feat(connector): [Novalnet] Integrate wallets Paypal and Googlepay", "merged_at": "2024-10-24T13:35:51Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment"]}, "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/novalnet.rs", "crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs"]}, "change_types": {"structs_added": 2, "functions_added": 2, "fields_added": 31, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): implemented platform merchant account ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [X] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description #### About the feature - This the first PR for the Platform Account feature. - Feature is under development and behind the feature flag. - Feature is supposed to be disabled for sandbox and production environments. #### Enabling the platform account. - New API has been created to enable platform account. - API requires Admin API auth. - Once enabled, there is no way of disabling platform account as of now. #### How it works - A new special header is to be sent by the platform called `x-connected-merchant-id`. - Platform will use its own API key irrespective of the merchant id present in the above header. - Value of this header is supposed to be the merchant id of the merchant account on behalf of which the platform is performing the operation. - **If the platform has `is_platform` true and the merchant account on behalf of which operation is performed belongs to the same organisation as platform** then the operation is allowed. #### Payment Intent - Operation will be performed for merchant id present in the `x-connected-merchant-id` header. - `platform_merchant_id` column for the payment intent will be populated with platforms merchant id. #### Other operations - Will add context of `platform_merchant_id` in other operations as well. <!-- Describe your changes in detail --> ### Additional Changes - [x] This PR modifies the API contract - [x] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context #6883 <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? 1. Create a merchant account(m1). 2. Use below api to convert it into platform account. ```sh curl --location --request POST '<BASE URL>/accounts/{merchant_id}/platform' \ --header 'api-key:<ADMIN API KEY>' ``` 3. Create another merchant account in the same organisation(m2). 4. Do a payment using platform's(m1) API key for connected merchant account(m2) by passing header `x-connected-merchant-id` with value as connected merchant account's merchant id. 5. Check if payment is created for connected merchant account. 6. Check if `platform_merchant_id` is populated with platform's merchant id. <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [X] I formatted the code `cargo +nightly fmt --all` - [X] I addressed lints thrown by `cargo clippy` - [X] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Database Layer (Queries & Schema)** - `crates/diesel_models/src/merchant_account.rs` - `crates/diesel_models/src/payment_intent.rs` - `crates/diesel_models/src/schema.rs` - ... and 1 more files **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/errors/api_error_response.rs` - `crates/hyperswitch_domain_models/src/merchant_account.rs` - `crates/hyperswitch_domain_models/src/payments.rs` - ... and 1 more files **3. Core Business Logic** - `crates/router/src/core/admin.rs` - `crates/router/src/core/fraud_check.rs` - `crates/router/src/core/fraud_check/operation.rs` - ... and 27 more files **4. Type Definitions** - `crates/router_env/src/logger/types.rs` **5. Utils** - `crates/router/src/routes/lock_utils.rs` - `crates/router/src/utils/user/sample_data.rs` **6. Tests** - `config/deployments/integration_test.toml` - `crates/router/tests/payments.rs` - `crates/router/tests/payments2.rs` **7. Configuration Files** - `.github/workflows/postman-collection-runner.yml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 4 more files **8. Other** - `crates/router/build.rs` - `crates/router/src/compatibility/stripe/errors.rs` - `crates/router/src/compatibility/stripe/payment_intents.rs` - ... and 10 more files **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (7 changes) - Extend existing types with new fields (182 changes) - Add conditional logic for feature flags or filtering (10 changes) **Detailed Identifier Changes:** Commit 95fcf2a4: Files to modify: **crates/diesel_models/src/merchant_account.rs** Modify existing code **crates/diesel_models/src/payment_intent.rs** Modify existing code **crates/diesel_models/src/schema.rs** Modify existing code **crates/diesel_models/src/schema_v2.rs** Modify existing code **crates/hyperswitch_domain_models/src/errors/api_error_response.rs** Modify existing code **crates/hyperswitch_domain_models/src/merchant_account.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_intent.rs** Modify existing code **crates/router/build.rs** Modify existing code **crates/router/src/compatibility/stripe/errors.rs** Modify existing code **crates/router/src/compatibility/stripe/payment_intents.rs** Modify existing code **crates/router/src/compatibility/stripe/setup_intents.rs** Modify existing code **crates/router/src/configs/secrets_transformers.rs** Modify existing code **crates/router/src/configs/settings.rs** Add: - struct: pub::Platform **crates/router/src/core/admin.rs** Add: - function: pub::enable_platform_account **crates/router/src/core/fraud_check.rs** Modify existing code **crates/router/src/core/fraud_check/operation.rs** Modify existing code **crates/router/src/core/fraud_check/operation/fraud_check_post.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payments/operations.rs** Modify existing code **crates/router/src/core/payments/operations/payment_approve.rs** Modify existing code **crates/router/src/core/payments/operations/payment_cancel.rs** Modify existing code **crates/router/src/core/payments/operations/payment_capture.rs** Modify existing code **crates/router/src/core/payments/operations/payment_capture_v2.rs** Modify existing code **crates/router/src/core/payments/operations/payment_complete_authorize.rs** Modify existing code **crates/router/src/core/payments/operations/payment_confirm.rs** Modify existing code **crates/router/src/core/payments/operations/payment_confirm_intent.rs** Modify existing code **crates/router/src/core/payments/operations/payment_create.rs** Modify existing code **crates/router/src/core/payments/operations/payment_create_intent.rs** Modify existing code **crates/router/src/core/payments/operations/payment_get.rs** Modify existing code **crates/router/src/core/payments/operations/payment_get_intent.rs** Modify existing code **crates/router/src/core/payments/operations/payment_post_session_tokens.rs** Modify existing code **crates/router/src/core/payments/operations/payment_reject.rs** Modify existing code **crates/router/src/core/payments/operations/payment_session.rs** Modify existing code **crates/router/src/core/payments/operations/payment_session_intent.rs** Modify existing code **crates/router/src/core/payments/operations/payment_start.rs** Modify existing code **crates/router/src/core/payments/operations/payment_status.rs** Modify existing code **crates/router/src/core/payments/operations/payment_update.rs** Modify existing code **crates/router/src/core/payments/operations/payment_update_intent.rs** Modify existing code **crates/router/src/core/payments/operations/payments_incremental_authorization.rs** Modify existing code **crates/router/src/core/payments/operations/tax_calculation.rs** Modify existing code **crates/router/src/core/payments/session_operation.rs** Modify existing code **crates/router/src/core/webhooks/incoming.rs** Modify existing code **crates/router/src/lib.rs** Modify existing code **crates/router/src/routes/admin.rs** Add: - function: pub::merchant_account_enable_platform_account **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/payments.rs** Modify existing code **crates/router/src/services/authentication.rs** Add: - function: pub::get_id_type_from_header_if_present - function: private::get_connected_merchant_account - function: private::get_platform_merchant_account - function: private::get_and_validate_connected_merchant_id - function: private::throw_error_if_platform_merchant_authentication_required **crates/router/src/utils/user/sample_data.rs** Modify existing code **crates/router/src/workflows/outgoing_webhook_retry.rs** Modify existing code **crates/router/src/workflows/payment_sync.rs** Modify existing code **crates/router/tests/payments.rs** Modify existing code **crates/router/tests/payments2.rs** Modify existing code **crates/router_env/src/logger/types.rs** Modify existing code
{"pr_number": 6882, "pr_title": "feat(core): implemented platform merchant account", "merged_at": "2024-12-23T13:21:14Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant"]}, "hierarchy": {"database": ["crates/diesel_models/src/merchant_account.rs", "crates/diesel_models/src/payment_intent.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs"], "domain": ["crates/hyperswitch_domain_models/src/errors/api_error_response.rs", "crates/hyperswitch_domain_models/src/merchant_account.rs", "crates/hyperswitch_domain_models/src/payments.rs", "crates/hyperswitch_domain_models/src/payments/payment_intent.rs"], "core_business": ["crates/router/src/core/admin.rs", "crates/router/src/core/fraud_check.rs", "crates/router/src/core/fraud_check/operation.rs", "crates/router/src/core/fraud_check/operation/fraud_check_post.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/operations.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_capture_v2.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_confirm_intent.rs", "crates/router/src/core/payments/operations/payment_create.rs", "crates/router/src/core/payments/operations/payment_create_intent.rs", "crates/router/src/core/payments/operations/payment_get.rs", "crates/router/src/core/payments/operations/payment_get_intent.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_session_intent.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_intent.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/session_operation.rs", "crates/router/src/core/webhooks/incoming.rs"], "types": ["crates/router_env/src/logger/types.rs"], "utils": ["crates/router/src/routes/lock_utils.rs", "crates/router/src/utils/user/sample_data.rs"], "tests": ["config/deployments/integration_test.toml", "crates/router/tests/payments.rs", "crates/router/tests/payments2.rs"], "config": [".github/workflows/postman-collection-runner.yml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml", "crates/router/src/configs/secrets_transformers.rs", "crates/router/src/configs/settings.rs"], "other": ["crates/router/build.rs", "crates/router/src/compatibility/stripe/errors.rs", "crates/router/src/compatibility/stripe/payment_intents.rs", "crates/router/src/compatibility/stripe/setup_intents.rs", "crates/router/src/lib.rs", "crates/router/src/routes/admin.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/payments.rs", "crates/router/src/services/authentication.rs", "crates/router/src/workflows/outgoing_webhook_retry.rs", "crates/router/src/workflows/payment_sync.rs", "migrations/2024-12-03-072318_platform_merchant_account/down.sql", "migrations/2024-12-03-072318_platform_merchant_account/up.sql"]}, "change_types": {"structs_added": 1, "functions_added": 7, "fields_added": 182, "conditionals_added": 10}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [AUTHIPAY] Integrate cards non 3ds payments ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Cards Non-3DS payments added for authipay https://docs.fiserv.dev/public/reference/payments-intro ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> https://github.com/juspay/hyperswitch/issues/8398 ## How did you test it? Tested using cargo build and cypress test <img width="738" alt="Screenshot 2025-07-04 at 11 49 02 AM" src="https://github.com/user-attachments/assets/d4927935-5af6-4b14-88c4-dc1c9f723886" /> <!-- 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/configs.rs` **2. Core Business Logic** - `crates/router/src/core/connector_validation.rs` **3. External Connector Integration** - `crates/common_enums/src/connector_enums.rs` - `crates/connector_configs/src/connector.rs` - `crates/connector_configs/toml/development.toml` - ... and 13 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/configs/Payment/Authipay.js` - `cypress-tests/cypress/e2e/configs/Payment/Utils.js` - ... and 1 more files **6. Configuration Files** - `config/config.example.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 3 more files **7. Other** - `api-reference/v1/openapi_spec_v1.json` - `api-reference/v2/openapi_spec_v2.json` **Code Patterns Applied:** - Define new data structures (26 changes) - Implement new functions (98 changes) - Extend existing types with new fields (916 changes) - Add conditional logic for feature flags or filtering (3 changes) **Detailed Identifier Changes:** Commit ef42ad43: 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::authipay **crates/hyperswitch_connectors/src/connectors/authipay.rs** Add: - function: pub::new - function: pub::generate_authorization_signature - 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_connector_against_payment_request - 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::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::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_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::Authipay - impl: impl Authipay - impl: impl api::Payment for Authipay - impl: impl api::PaymentSession for Authipay - impl: impl api::ConnectorAccessToken for Authipay - impl: impl api::MandateSetup for Authipay - impl: impl api::PaymentAuthorize for Authipay - impl: impl api::PaymentSync for Authipay - impl: impl api::PaymentCapture for Authipay - impl: impl api::PaymentVoid for Authipay - impl: impl api::Refund for Authipay - impl: impl api::RefundExecute for Authipay - impl: impl api::RefundSync for Authipay - impl: impl api::PaymentToken for Authipay - impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for Authipay - impl: impl ConnectorCommonExt<Flow, Request, Response> for Authipay - impl: impl ConnectorCommon for Authipay - impl: impl ConnectorValidation for Authipay - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Authipay - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Authipay - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Authipay - impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Authipay - impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Authipay - impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Authipay - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Authipay - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Authipay - impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Authipay - impl: impl webhooks::IncomingWebhook for Authipay - impl: impl ConnectorSpecifications for Authipay - mod: pub::transformers **crates/hyperswitch_connectors/src/connectors/authipay/transformers.rs** Add: - function: private::from - function: private::try_from - function: private::try_from - function: private::from - function: pub::gateway_response - function: pub::payment_receipt - function: private::get_transaction_status - function: private::try_from - function: private::try_from - function: private::try_from - function: private::try_from - function: private::from - function: private::try_from - function: private::try_from - function: private::from - struct: pub::AuthipayRouterData - struct: pub::Amount - struct: pub::AmountComponents - struct: pub::ExpiryDate - struct: pub::Card - struct: pub::PaymentMethod - struct: pub::SplitShipment - struct: pub::AuthipayPaymentsRequest - struct: pub::AuthipayAuthType - struct: pub::AuthipayTransactionProcessingDetails - struct: pub::AuthipayGatewayResponse - struct: pub::AuthipayPaymentReceipt - struct: pub::AuthipayPaymentsResponse - struct: pub::PaymentToken - struct: pub::PaymentMethodDetails - struct: pub::PaymentCardDetails - struct: pub::Processor - struct: pub::AvsResponse - struct: pub::AuthipayCaptureRequest - struct: pub::AuthipayVoidRequest - struct: pub::AuthipayRefundRequest - struct: pub::ErrorDetailItem - struct: pub::ErrorDetails - struct: pub::AuthipayErrorResponse - enum: pub::AuthipayTransactionStatus - enum: pub::RefundStatus - impl: impl From<(FloatMajorUnit, T)> for AuthipayRouterData<T> - impl: impl TryFrom<&AuthipayRouterData<&PaymentsAuthorizeRouterData>> for AuthipayPaymentsRequest - impl: impl TryFrom<&ConnectorAuthType> for AuthipayAuthType - impl: impl From<AuthipayTransactionStatus> for enums::AttemptStatus - impl: impl AuthipayPaymentsResponse - impl: impl TryFrom<ResponseRouterData<F, AuthipayPaymentsResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData> - impl: impl TryFrom<&AuthipayRouterData<&PaymentsCaptureRouterData>> for AuthipayCaptureRequest - impl: impl TryFrom<&AuthipayRouterData<&PaymentsCancelRouterData>> for AuthipayVoidRequest - impl: impl TryFrom<&AuthipayRouterData<&RefundsRouterData<F>>> for AuthipayRefundRequest - 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> - impl: impl From<&AuthipayErrorResponse> for ErrorResponse **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/configs.rs** Modify existing code **crates/payment_methods/src/configs/payment_connector_required_fields.rs** Modify existing code **crates/router/src/connector.rs** Modify existing code **crates/router/src/core/connector_validation.rs** Modify existing code **crates/router/src/types/api.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code **crates/router/tests/connectors/authipay.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::AuthipayTest - impl: impl ConnectorActions for AuthipayTest - impl: impl utils::Connector for AuthipayTest **crates/test_utils/src/connector_auth.rs** Modify existing code
{"pr_number": 8266, "pr_title": "feat(connector): [AUTHIPAY] Integrate cards non 3ds payments", "merged_at": "2025-07-08T12:36:01Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "card"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/configs.rs"], "core_business": ["crates/router/src/core/connector_validation.rs"], "connectors": ["crates/common_enums/src/connector_enums.rs", "crates/connector_configs/src/connector.rs", "crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/hyperswitch_connectors/src/connectors.rs", "crates/hyperswitch_connectors/src/connectors/authipay.rs", "crates/hyperswitch_connectors/src/connectors/authipay/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/hyperswitch_connectors/src/default_implementations_v2.rs", "crates/payment_methods/src/configs/payment_connector_required_fields.rs", "crates/router/src/connector.rs", "crates/router/tests/connectors/authipay.rs", "crates/router/tests/connectors/sample_auth.toml", "crates/test_utils/src/connector_auth.rs", "scripts/add_connector.sh"], "types": ["crates/router/src/types/api.rs", "crates/router/src/types/transformers.rs"], "tests": ["config/deployments/integration_test.toml", "cypress-tests/cypress/e2e/configs/Payment/Authipay.js", "cypress-tests/cypress/e2e/configs/Payment/Utils.js", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml", "config/payment_required_fields_v2.toml"], "other": ["api-reference/v1/openapi_spec_v1.json", "api-reference/v2/openapi_spec_v2.json"]}, "change_types": {"structs_added": 26, "functions_added": 98, "enums_added": 2, "fields_added": 916, "imports_added": 25, "conditionals_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat: add nix shell environments ## 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 extends nix shell environments by including 1. Default minimal shell 2. Development shell 3. QA shell ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 4. `crates/router/src/configs` 5. `loadtest/config` --> ## Motivation and Context <!-- 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. Minimal shell ``` nix develop ``` 2. Dev shell ``` nix develop .#dev ``` 3. QA shell ``` nix develop .#qa ``` ## 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** - `docs/try_local_system.md` - `flake.lock` - `flake.nix`
{"pr_number": 8329, "pr_title": "feat: add nix shell environments", "merged_at": "2025-06-16T07:23:27Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"other": ["docs/try_local_system.md", "flake.lock", "flake.nix"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(routing): Fixed 5xx error logs in dynamic routing metrics ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> A 5xx error log in DR metrics was spamming in alerts. Have removed the log Main PR - https://github.com/juspay/hyperswitch/pull/7335 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> make a payment with dynamic routing enabled 5xx error log now converted to 4xx <img width="1056" alt="image" src="https://github.com/user-attachments/assets/df763221-d26b-47a0-927a-83a5d38d0457" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [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/routing/helpers.rs` **Code Patterns Applied:** - Extend existing types with new fields (32 changes) - Add conditional logic for feature flags or filtering (6 changes) **Detailed Identifier Changes:** Commit caa39962: Files to modify: **crates/router/src/core/routing/helpers.rs** Modify existing code
{"pr_number": 7332, "pr_title": "fix(routing): Fixed 5xx error logs in dynamic routing metrics", "merged_at": "2025-02-24T05:49:30Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user"]}, "hierarchy": {"core_business": ["crates/router/src/core/routing/helpers.rs"]}, "change_types": {"fields_added": 32, "conditionals_added": 6}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(webhook): Return events list and total_count on list initial delivery attempt call ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Add `total_events` field to webhook initial delivery attempt response at /events/{merchant_id}. This involves api contract change as we were only returning list of initial delivery attempts, with this getting merged, we will return ``` { "events":[...], "total_count":<i64> } ``` ### 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). --> Upon merging this PR, the api will return a new response having events and total_count field when querying initial delivery attempts instead of array of events. ## 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)? --> - List initial delivery attempts api call ``` curl --location 'http://localhost:8080/events/merchant_1738922563' \ --header 'Content-Type: application/json' \ --header 'admin_api_key: test_admin' \ --header 'api-key: test_admin' \ --data '' ``` - Response from above call ``` {"events":[{"event_id":"evt_0194eff72c477871b4ddd46276f1f817","merchant_id":"merchant_1738922563","profile_id":"pro_jA0LJ9podhUSLu1H7EKP","object_id":"pay_9WySSsFmMH2tVj6gU5f3","event_type":"payment_succeeded","event_class":"payments","is_delivery_successful":false,"initial_attempt_id":"evt_0194eff72c477871b4ddd46276f1f817","created":"2025-02-10T13:05:40.936Z"},{"event_id":"evt_0194eff71e2d7852b63b6d1e1581c32e","merchant_id":"merchant_1738922563","profile_id":"pro_jA0LJ9podhUSLu1H7EKP","object_id":"pay_Fu9JmwIFkB2oejQsQt4B","event_type":"payment_succeeded","event_class":"payments","is_delivery_successful":false,"initial_attempt_id":"evt_0194eff71e2d7852b63b6d1e1581c32e","created":"2025-02-10T13:05:37.326Z"},{"event_id":"evt_0194eff70d227282a187302c432e446e","merchant_id":"merchant_1738922563","profile_id":"pro_jA0LJ9podhUSLu1H7EKP","object_id":"pay_cQDHrTCuk8zI5rmU4wTa","event_type":"payment_succeeded","event_class":"payments","is_delivery_successful":false,"initial_attempt_id":"evt_0194eff70d227282a187302c432e446e","created":"2025-02-10T13:05:32.963Z"},{"event_id":"evt_0194dfdd52897eb39dd7af9310d8e8d7","merchant_id":"merchant_1738922563","profile_id":"pro_jA0LJ9podhUSLu1H7EKP","object_id":"pay_ORr2AU4XL2hJkXKV1o8B","event_type":"payment_succeeded","event_class":"payments","is_delivery_successful":false,"initial_attempt_id":"evt_0194dfdd52897eb39dd7af9310d8e8d7","created":"2025-02-07T10:03:31.338Z"},{"event_id":"evt_0194dfdd1fbe7a0298c6530bed81d739","merchant_id":"merchant_1738922563","profile_id":"pro_jA0LJ9podhUSLu1H7EKP","object_id":"pay_N5LFrrk9KTAbDmvou3jY","event_type":"payment_succeeded","event_class":"payments","is_delivery_successful":false,"initial_attempt_id":"evt_0194dfdd1fbe7a0298c6530bed81d739","created":"2025-02-07T10:03:18.335Z"},{"event_id":"evt_0194dfdd1d7672e09c6da7a6429d6d32","merchant_id":"merchant_1738922563","profile_id":"pro_jA0LJ9podhUSLu1H7EKP","object_id":"pay_ZJGJwno98a7qEiZugswX","event_type":"payment_succeeded","event_class":"payments","is_delivery_successful":false,"initial_attempt_id":"evt_0194dfdd1d7672e09c6da7a6429d6d32","created":"2025-02-07T10:03:17.751Z"},{"event_id":"evt_0194dfdd1bae733290da71bfca8a6107","merchant_id":"merchant_1738922563","profile_id":"pro_jA0LJ9podhUSLu1H7EKP","object_id":"pay_J3zdj0J13ldoBHAtZmhU","event_type":"payment_succeeded","event_class":"payments","is_delivery_successful":false,"initial_attempt_id":"evt_0194dfdd1bae733290da71bfca8a6107","created":"2025-02-07T10:03:17.295Z"},{"event_id":"evt_0194dfdd19c07312a38d56655d2e021e","merchant_id":"merchant_1738922563","profile_id":"pro_jA0LJ9podhUSLu1H7EKP","object_id":"pay_6DqZUZ7WjGcBusy3I67C","event_type":"payment_succeeded","event_class":"payments","is_delivery_successful":false,"initial_attempt_id":"evt_0194dfdd19c07312a38d56655d2e021e","created":"2025-02-07T10:03:16.801Z"},{"event_id":"evt_0194dfdd16a27af29382a859dce1b236","merchant_id":"merchant_1738922563","profile_id":"pro_jA0LJ9podhUSLu1H7EKP","object_id":"pay_ry337IM2gN01zw9Wt83E","event_type":"payment_succeeded","event_class":"payments","is_delivery_successful":false,"initial_attempt_id":"evt_0194dfdd16a27af29382a859dce1b236","created":"2025-02-07T10:03:16.003Z"},{"event_id":"evt_0194dfdd0f45770086e46b79621f05cb","merchant_id":"merchant_1738922563","profile_id":"pro_jA0LJ9podhUSLu1H7EKP","object_id":"pay_fcK4amsYPri3xFHy5lIW","event_type":"payment_succeeded","event_class":"payments","is_delivery_successful":false,"initial_attempt_id":"evt_0194dfdd0f45770086e46b79621f05cb","created":"2025-02-07T10:03:14.118Z"},{"event_id":"evt_0194dfdd04e27a139fe26c9a3a2f68d2","merchant_id":"merchant_1738922563","profile_id":"pro_jA0LJ9podhUSLu1H7EKP","object_id":"pay_yFVzIkZV8VZ5WaeshtDO","event_type":"payment_succeeded","event_class":"payments","is_delivery_successful":false,"initial_attempt_id":"evt_0194dfdd04e27a139fe26c9a3a2f68d2","created":"2025-02-07T10:03:11.459Z"},{"event_id":"evt_0194dfdced6d7620b6b8a88b4f2425fb","merchant_id":"merchant_1738922563","profile_id":"pro_jA0LJ9podhUSLu1H7EKP","object_id":"pay_icO4WYAeyRkdFZ0s41hX","event_type":"payment_succeeded","event_class":"payments","is_delivery_successful":false,"initial_attempt_id":"evt_0194dfdced6d7620b6b8a88b4f2425fb","created":"2025-02-07T10:03:05.453Z"}],"total_count":12} ``` - Call list api with filters like limit, created_before, created_after ``` curl --location 'http://localhost:8080/events/merchant_1738922563?limit=1&created_before=2025-02-07T10%3A03%3A14.118Z&created_after=2025-01-07T10%3A03%3A14.118Z' \ --header 'Content-Type: application/json' \ --header 'admin_api_key: test_admin' \ --header 'api-key: test_admin' \ --data '' ``` - Response from the above call ``` {"events":[{"event_id":"evt_0194dfdd0f45770086e46b79621f05cb","merchant_id":"merchant_1738922563","profile_id":"pro_jA0LJ9podhUSLu1H7EKP","object_id":"pay_fcK4amsYPri3xFHy5lIW","event_type":"payment_succeeded","event_class":"payments","is_delivery_successful":false,"initial_attempt_id":"evt_0194dfdd0f45770086e46b79621f05cb","created":"2025-02-07T10:03:14.118Z"}],"total_count":3} ``` - Call list api with invalid time frame i.e created_after and created_before ``` curl --location 'http://localhost:8080/events/merchant_1740040892?created_after=2025-02-18T10%3A03%3A14.118Z&created_before=2025-01-07T10%3A03%3A14.118Z' \ --header 'Content-Type: application/json' \ --header 'admin_api_key: test_admin' \ --header 'api-key: test_admin' \ --data '' ``` - Response from the above call ``` {"error":{"type":"invalid_request","message":"Invalid time range provided with `created_after` and `created_before`","code":"IR_06"}} ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] 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/webhook_events.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/query/events.rs` **3. Core Business Logic** - `crates/router/src/core/webhooks/webhook_events.rs` **4. Type Definitions** - `crates/router/src/types/api/webhook_events.rs` **5. Other** - `api-reference/openapi_spec.json` - `crates/openapi/src/openapi.rs` - `crates/openapi/src/routes/webhook_events.rs` - ... and 2 more files **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (8 changes) - Extend existing types with new fields (52 changes) - Add conditional logic for feature flags or filtering (5 changes) - Modify database queries (14 changes) **Detailed Identifier Changes:** Commit 4d57f5e6: Files to modify: **crates/api_models/src/webhook_events.rs** Add: - function: pub::new - function: private::get_api_event_type - struct: pub::TotalEventsResponse - impl: impl TotalEventsResponse - impl: impl common_utils::events::ApiEventMetric for TotalEventsResponse **crates/diesel_models/src/query/events.rs** Add: - function: private::apply_filters - function: pub::count_initial_attempts_by_constraints **crates/openapi/src/openapi.rs** Modify existing code **crates/openapi/src/routes/webhook_events.rs** Modify existing code **crates/router/src/core/webhooks/webhook_events.rs** Modify existing code **crates/router/src/db/events.rs** Add: - function: private::count_initial_events_by_constraints - function: private::count_initial_events_by_constraints **crates/router/src/db/kafka_store.rs** Add: - function: private::count_initial_events_by_constraints **crates/router/src/types/api/webhook_events.rs** Modify existing code
{"pr_number": 7243, "pr_title": "feat(webhook): Return events list and total_count on list initial delivery attempt call", "merged_at": "2025-03-21T14:42:28Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "webhook"]}, "hierarchy": {"api_models": ["crates/api_models/src/webhook_events.rs"], "database": ["crates/diesel_models/src/query/events.rs"], "core_business": ["crates/router/src/core/webhooks/webhook_events.rs"], "types": ["crates/router/src/types/api/webhook_events.rs"], "other": ["api-reference/openapi_spec.json", "crates/openapi/src/openapi.rs", "crates/openapi/src/routes/webhook_events.rs", "crates/router/src/db/events.rs", "crates/router/src/db/kafka_store.rs"]}, "change_types": {"structs_added": 1, "functions_added": 8, "fields_added": 52, "imports_added": 7, "conditionals_added": 5, "database_queries": 14}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(payment_methods): add v2 api for fetching token 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 --> An endpoint is added to fetch network token related to a payment method (specifically cards) - Add a GET call to fetch network token data with cryptogram - Cryptogram is generated for every api call - No DB changes made since cryptogram is single use ### Additional Changes - [ ] This PR modifies the API contract Endpoint: ``` {{baseUrl}}/v2/payment-methods/{id}/get-token ``` - [ ] 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 Merchant Account - Cretae Organization - Create a Merchant Connector Account - Enable network tokenization in Business Profile ``` { "is_network_tokenization_enabled": true } ``` - Save a payment method with network token ``` curl --location '{{baseUrl}}/v2/payment-methods' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'X-Profile-Id: {{profile_id}}' \ --header 'Authorization: api-key={{api_key}}' \ --data '{ "customer_id": "{{customer_id}}", "payment_method_type": "card", "payment_method_subtype": "credit", "payment_method_data": { "card": { "card_number": "4761360080000093", "card_exp_month": "12", "card_exp_year": "2026", "card_holder_name": "joseph Doe" } }, "network_tokenization":{ "enable":"Enable" } }' ``` - Get cryptogram for the network token with `payment_method_id`: ``` curl --location --request GET '{{base_url}}/v2/payment-methods/{{payment_method_id}}/get-token' \ --header 'X-Profile-Id:{{profile_id}}' \ --header 'Content-Type: application/json' \ --header 'Authorization: api-key={{api_key}}' \ --data '{ "token_type": "network_token" }' ``` Following should be the response: ``` { "payment_method_id": "12345_pm_0195dc62e14d7102b2ee7be5d04fe853", "network_token": "4604000460040707", "network_token_exp_month": "12", "network_token_exp_year": "2026", "cryptogram": "AwAAAAABD5dXv0wAmbSeglsLAAA=", "card_issuer": "ICICI Bank", "card_network": "Visa", "card_type": null, "card_issuing_country": null, "bank_code": null, "card_holder_name": "joseph Doe", "nick_name": null, "eci": "07" } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/payment_methods.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payment_method_data.rs` **3. Core Business Logic** - `crates/router/src/core/payment_methods.rs` - `crates/router/src/core/payment_methods/network_tokenization.rs` **4. Type Definitions** - `crates/router/src/types/api/payment_methods.rs` - `crates/router/src/types/payment_methods.rs` - `crates/router_env/src/logger/types.rs` **5. Utils** - `crates/router/src/routes/lock_utils.rs` **6. Configuration Files** - `crates/payment_methods/Cargo.toml` **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:** - Define new data structures (4 changes) - Implement new functions (4 changes) - Extend existing types with new fields (75 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit 2cefac5c: Files to modify: **crates/api_models/src/payment_methods.rs** Add: - struct: pub::GetTokenDataRequest - struct: pub::TokenDataResponse - struct: pub::NetworkTokenDetailsResponse - enum: pub::TokenDetailsResponse - impl: impl common_utils::events::ApiEventMetric for GetTokenDataRequest - impl: impl common_utils::events::ApiEventMetric for TokenDataResponse **crates/common_enums/src/enums.rs** Add: - enum: pub::TokenDataType **crates/hyperswitch_domain_models/src/payment_method_data.rs** Modify existing code **crates/openapi/src/openapi.rs** Modify existing code **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/router/src/core/payment_methods.rs** Add: - function: pub::get_token_data_for_payment_method - function: pub::generate_token_data_response **crates/router/src/core/payment_methods/network_tokenization.rs** Add: - function: pub::get_token_from_tokenization_service **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/payment_methods.rs** Add: - function: pub::get_payment_method_token_data **crates/router/src/types/api/payment_methods.rs** Modify existing code **crates/router/src/types/payment_methods.rs** Add: - struct: pub::AuthenticationDetails **crates/router_env/src/logger/types.rs** Modify existing code
{"pr_number": 7629, "pr_title": "feat(payment_methods): add v2 api for fetching token data", "merged_at": "2025-05-12T14:19:41Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/payment_methods.rs"], "domain": ["crates/hyperswitch_domain_models/src/payment_method_data.rs"], "core_business": ["crates/router/src/core/payment_methods.rs", "crates/router/src/core/payment_methods/network_tokenization.rs"], "types": ["crates/router/src/types/api/payment_methods.rs", "crates/router/src/types/payment_methods.rs", "crates/router_env/src/logger/types.rs"], "utils": ["crates/router/src/routes/lock_utils.rs"], "config": ["crates/payment_methods/Cargo.toml"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/common_enums/src/enums.rs", "crates/openapi/src/openapi.rs", "crates/openapi/src/openapi_v2.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/payment_methods.rs"]}, "change_types": {"structs_added": 4, "functions_added": 4, "enums_added": 2, "fields_added": 75, "imports_added": 4, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(payments): propagate additional payment method data for apple pay during MIT ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Described in #5868 point # 3 This PR enables sending out `payment_method_data` for AP MIT ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- 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 the requestor identify the cards used for ApplePay MIT ## How did you test it? <details> <summary>1. Process an ApplePay CIT payment</summary> cURL (using payment links) curl --location --request POST 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_1uTESxXpaQnwB8NTMzbiY0f09gtorvVq3FngeQkFN1UY0JtlEVGC0BCC5ZLLViuo' \ --data '{"payment_id":"97a10a7f-7d78-42a2-838e-1f6051ae65f8","authentication_type":"three_ds","customer_id":"cus_gBWmUTIZ5DmABhSNAEjP","profile_id":"pro_qA3tbnls38Scviwwy7hz","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"}},"setup_future_usage":"off_session","amount":1,"currency":"EUR","confirm":false,"payment_link":true,"session_expiry":172800,"return_url":"https://www.example.com"}' Response {"payment_id":"f552b557-1883-46c1-8475-d721ae743fb2","merchant_id":"merchant_1752180309","status":"requires_payment_method","amount":1,"net_amount":1,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":null,"client_secret":"f552b557-1883-46c1-8475-d721ae743fb2_secret_pfJ4eI3tvPI2iOSmv5y9","created":"2025-07-10T21:18:53.061Z","currency":"EUR","customer_id":"cus_gBWmUTIZ5DmABhSNAEjP","customer":{"id":"cus_gBWmUTIZ5DmABhSNAEjP","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":"off_session","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":"guest@example.com","name":"John Doe","phone":"999999999","return_url":"https://www.example.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":null,"connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"cus_gBWmUTIZ5DmABhSNAEjP","created_at":1752182333,"expires":1752185933,"secret":"epk_46fb291b8a9b4f15854dfa2cf7bb0d52"},"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":"https://onemore.tame-bird-39.telebit.io/payment_link/merchant_1752180309/f552b557-1883-46c1-8475-d721ae743fb2?locale=en","secure_link":null,"payment_link_id":"plink_IQGQunGBCDnr8pA6ksR3"},"profile_id":"pro_qA3tbnls38Scviwwy7hz","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":null,"incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-12T21:18:53.055Z","fingerprint":null,"browser_info":null,"payment_method_id":null,"payment_method_status":null,"updated":"2025-07-10T21:18:53.081Z","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} Process AP payment </details> <details> <summary>2. Retrieve payment</summary> cURL curl --location --request GET 'http://localhost:8080/payments/f552b557-1883-46c1-8475-d721ae743fb2?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_1uTESxXpaQnwB8NTMzbiY0f09gtorvVq3FngeQkFN1UY0JtlEVGC0BCC5ZLLViuo' Response {"payment_id":"f552b557-1883-46c1-8475-d721ae743fb2","merchant_id":"merchant_1752180309","status":"succeeded","amount":1,"net_amount":1,"shipping_cost":null,"amount_capturable":0,"amount_received":1,"connector":"adyen","client_secret":"f552b557-1883-46c1-8475-d721ae743fb2_secret_pfJ4eI3tvPI2iOSmv5y9","created":"2025-07-10T21:18:53.061Z","currency":"EUR","customer_id":"cus_gBWmUTIZ5DmABhSNAEjP","customer":{"id":"cus_gBWmUTIZ5DmABhSNAEjP","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":"off_session","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":null,"order_details":null,"email":"guest@example.com","name":"John Doe","phone":"999999999","return_url":"https://www.example.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":"apple_pay","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":"K6SSTJD5QTTUXHN2","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"f552b557-1883-46c1-8475-d721ae743fb2_1","payment_link":{"link":"https://onemore.tame-bird-39.telebit.io/payment_link/merchant_1752180309/f552b557-1883-46c1-8475-d721ae743fb2?locale=en","secure_link":null,"payment_link_id":"plink_IQGQunGBCDnr8pA6ksR3"},"profile_id":"pro_qA3tbnls38Scviwwy7hz","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_WPKmOYrtCqcPfL2xue29","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-12T21:18:53.055Z","fingerprint":null,"browser_info":{"os_type":"macOS","language":"en-US","time_zone":-330,"ip_address":"127.0.0.1","os_version":"10.15.7","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.5 Safari/605.1.15","color_depth":24,"device_model":"Macintosh","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,"accept_language":"en-US,en;q=0.9","java_script_enabled":true},"payment_method_id":"pm_wgu2MWu3eTrQ9XbRf2Wj","payment_method_status":"active","updated":"2025-07-10T21:20:28.794Z","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} Note down payment_method_id </details> <details> <summary>3. Create MIT payment</summary> cURL curl --location --request POST 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_1uTESxXpaQnwB8NTMzbiY0f09gtorvVq3FngeQkFN1UY0JtlEVGC0BCC5ZLLViuo' \ --data-raw '{"amount":6500,"currency":"EUR","confirm":true,"capture_method":"automatic","capture_on":"2022-09-10T10:11:12Z","customer_id":"cus_gBWmUTIZ5DmABhSNAEjP","email":"guest@example.com","name":"John Doe","phone":"999999999","profile_id":"pro_qA3tbnls38Scviwwy7hz","phone_country_code":"+65","description":"Its my first payment request","return_url":"https://hyperswitch.io","off_session":true,"recurring_details":{"type":"payment_method_id","data":"pm_wgu2MWu3eTrQ9XbRf2Wj"},"connector":["adyen"]}' Response {"payment_id":"pay_IiOzDjK3egmVbg3OKqn8","merchant_id":"merchant_1752180309","status":"succeeded","amount":6500,"net_amount":6500,"shipping_cost":null,"amount_capturable":0,"amount_received":6500,"connector":"adyen","client_secret":"pay_IiOzDjK3egmVbg3OKqn8_secret_Mi0BjvdeTQlu1etWD3FM","created":"2025-07-10T21:22:46.283Z","currency":"EUR","customer_id":"cus_gBWmUTIZ5DmABhSNAEjP","customer":{"id":"cus_gBWmUTIZ5DmABhSNAEjP","name":"John Doe","email":"guest@example.com","phone":"999999999","phone_country_code":"+65"},"description":"Its my first payment request","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":true,"capture_on":null,"capture_method":"automatic","payment_method":"wallet","payment_method_data":{"wallet":{"apple_pay":{"last4":"0049","card_network":"MasterCard","type":"credit"}},"billing":null},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":"guest@example.com","name":"John Doe","phone":"999999999","return_url":"https://hyperswitch.io/","authentication_type":"no_three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"apple_pay","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"cus_gBWmUTIZ5DmABhSNAEjP","created_at":1752182566,"expires":1752186166,"secret":"epk_b479f7cb8f1e4ca7b568cbcc47196b95"},"manual_retry_allowed":false,"connector_transaction_id":"ZFQA3LJZICX1Q0R1","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_IiOzDjK3egmVbg3OKqn8_1","payment_link":null,"profile_id":"pro_qA3tbnls38Scviwwy7hz","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_WPKmOYrtCqcPfL2xue29","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-10T21:37:46.283Z","fingerprint":null,"browser_info":null,"payment_method_id":"pm_wgu2MWu3eTrQ9XbRf2Wj","payment_method_status":"active","updated":"2025-07-10T21:22:46.302Z","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":"RECURRING_1752182120551_HHLP38","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} Things to verify - payment_method_data is present for both CIT and MIT </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/payment_methods.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/operations/payment_create.rs` - `crates/router/src/core/payments/tokenization.rs` **4. Type Definitions** - `crates/router/src/types/api/payments.rs` **Code Patterns Applied:** - Implement new functions (3 changes) - Extend existing types with new fields (12 changes) **Detailed Identifier Changes:** Commit 0f70fc51: Files to modify: **crates/api_models/src/payment_methods.rs** Add: - function: private::from - function: private::try_from - impl: impl From<payments::ApplepayPaymentMethod> for PaymentMethodDataWalletInfo - impl: impl TryFrom<PaymentMethodDataWalletInfo> for payments::ApplepayPaymentMethod **crates/hyperswitch_domain_models/src/payment_method_data.rs** Add: - function: private::from - impl: impl From<ApplePayWalletData> for payment_methods::PaymentMethodDataWalletInfo **crates/router/src/core/payments/operations/payment_create.rs** Modify existing code **crates/router/src/core/payments/tokenization.rs** Modify existing code **crates/router/src/types/api/payments.rs** Modify existing code
{"pr_number": 7170, "pr_title": "feat(payments): propagate additional payment method data for apple pay during MIT", "merged_at": "2025-07-11T15:18:48Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/payment_methods.rs"], "domain": ["crates/hyperswitch_domain_models/src/payment_method_data.rs"], "core_business": ["crates/router/src/core/payments/operations/payment_create.rs", "crates/router/src/core/payments/tokenization.rs"], "types": ["crates/router/src/types/api/payments.rs"]}, "change_types": {"functions_added": 3, "fields_added": 12}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(cypress): update skip logic and test flow for cypress incremental auth tests ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [x] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> This PR introduces a set of improvements and refactors in the Cypress test suite specifically for **Incremental Authorization** test cases. --- ### ✅ Key Changes: 1. **Connector Inclusion List for Incremental Auth** * Introduced a new list `INCREMENTAL_AUTH` in `Utils.js` under `CONNECTOR_LISTS.INCLUDE`. * This inclusion list determines which connectors support Incremental Authorization and should execute related tests. 2. **Dynamic Skipping of Tests Based on Connector Support** * Refactored the test flow to dynamically `skip()` test blocks at runtime if the connector isn't included in `INCREMENTAL_AUTH`. * Prevents false negatives and unwanted test runs on unsupported connectors (like CyberSource with known `MULTIPLE_CONNECTORS` issues). 3. **Refactored `before` and `after` Hooks** * Replaced arrow functions with regular functions in `before()` hooks to correctly utilize `this.skip()`. * Ensured proper state flushing with `afterEach` instead of `after`. 4. **Improved Capture Test for Incremental Auth** * Modified the capture test logic to simulate an **incremented capture amount**. * Prevents test result from falling into `partially_captured` due to stale `previously_authorized_amount`. 5. **Enhanced Assertions for Incremental Auth Response** * Added deep assertions for `previously_authorized_amount` from `incremental_authorizations` to validate correctness of incremental logic. * Ensures the captured amount matches the expected post-incremented value. ### 🧪 Test Impact: * Only **connectors in `INCREMENTAL_AUTH` list** will now run Incremental Authorization tests. * Currently includes: `cybersource` (commented out due to known issue), `paypal`, and `archipel` (handled in related PR #8189). * Other connectors will auto-skip these tests, improving CI stability and relevance. ### 💡 Reference Followed the pattern used in working test files like `00020-MandatesUsingNTIDProxy.cy.js`, which implement `this.skip()` with proper connector inclusion checks. ### 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 test suite for Incremental Auth (`00029-IncrementalAuth.cy.js`) was being entirely skipped due to usage of `describe.skip` and context handling. ## 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)? --> | Cybersource (Skipped) | ArchiPEL | |----|----| | <img height="300" alt="image" src="https://github.com/user-attachments/assets/343f556a-26e8-43dc-b714-9b74446d4e35" /> | <img width="300" alt="image" src="https://github.com/user-attachments/assets/8fa0bf09-0cea-4b23-b656-5d0f3c236ab9" /> | ### Sanity | Stripe | Adyen | Bluesnap | Bank of America | |----|----|----|----| | <img width="300" alt="image" src="https://github.com/user-attachments/assets/8b567f21-fbde-4ad3-88e1-2a8cca70084f" /> | <img width="300" alt="image" src="https://github.com/user-attachments/assets/8b567f21-fbde-4ad3-88e1-2a8cca70084f" /> | <img width="300" alt="image" src="https://github.com/user-attachments/assets/8b567f21-fbde-4ad3-88e1-2a8cca70084f" /> | <img width="300" alt="image" src="https://github.com/user-attachments/assets/8b567f21-fbde-4ad3-88e1-2a8cca70084f" /> | ## 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/Cybersource.js` - `cypress-tests/cypress/e2e/configs/Payment/Utils.js` - `cypress-tests/cypress/e2e/spec/Payment/00029-IncrementalAuth.cy.js` - ... and 1 more files **Code Patterns Applied:** - Extend existing types with new fields (5 changes) - Add conditional logic for feature flags or filtering (2 changes)
{"pr_number": 8594, "pr_title": "refactor(cypress): update skip logic and test flow for cypress incremental auth tests", "merged_at": "2025-07-11T02:04:29Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user", "connector"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/configs/Payment/Cybersource.js", "cypress-tests/cypress/e2e/configs/Payment/Utils.js", "cypress-tests/cypress/e2e/spec/Payment/00029-IncrementalAuth.cy.js", "cypress-tests/cypress/support/commands.js"]}, "change_types": {"fields_added": 5, "conditionals_added": 2}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(connector): [Datatrans] 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 --> - add mandate flow (zero auth included) for datatrans connector ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Tested through Postman: Create an MCA (Datatrans) Case 1: (Zero Auth) - Do a CIT: ``` { "amount": 0, "currency": "GBP", "confirm": true, "capture_method": "automatic", "customer_id": "Sakil", "email": "guest@example.com", "return_url": "https://www.google.com", "customer_acceptance": { "acceptance_type": "online" }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "Zurich", "state": "asd", "zip": "8008", "country": "CH", "first_name": "joseph", "last_name": "Doe" }, "email": "sk.sakil@juspay.in" }, "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" }, "payment_method": "card", "payment_method_type": "credit", "payment_type": "setup_mandate", "payment_method_data": { "card": { "card_number": "5404000000000001", "card_exp_month": "06", "card_exp_year": "2025", "card_holder_name": "Test Holder", "card_cvc": "123" } }, "authentication_type": "no_three_ds" } ``` - Collect the payment_methon_id from response and do the redirction to make the payment successful: ``` { "payment_id": "pay_AHgLUOh4bB3DIjkEEnVi", "merchant_id": "postman_merchant_GHAction_eed5bd85-d778-4c6d-9048-bf2e58487030", "status": "requires_customer_action", "amount": 0, "net_amount": 0, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "datatrans", "client_secret": "pay_AHgLUOh4bB3DIjkEEnVi_secret_rDLfEhlWLFlQUWTrlqFR", "created": "2025-02-13T11:06:06.809Z", "currency": "GBP", "customer_id": "Sakil", "customer": { "id": "Sakil", "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": "0001", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "540400", "card_extended_bin": null, "card_exp_month": "06", "card_exp_year": "2025", "card_holder_name": "Test Holder", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "Zurich", "country": "CH", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "8008", "state": "asd", "first_name": "joseph", "last_name": "Doe" }, "phone": null, "email": "sk.sakil@juspay.in" }, "order_details": null, "email": "guest@example.com", "name": null, "phone": null, "return_url": "https://www.google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_AHgLUOh4bB3DIjkEEnVi/postman_merchant_GHAction_eed5bd85-d778-4c6d-9048-bf2e58487030/pay_AHgLUOh4bB3DIjkEEnVi_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": "Sakil", "created_at": 1739444766, "expires": 1739448366, "secret": "epk_7d862bb2fa734d3c8c62a0d98a5eb419" }, "manual_retry_allowed": null, "connector_transaction_id": "250213120606991660", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_4b0kZjcwsxbB2jQrJaG4", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_s8lmK0NsZlom2M4xkhbZ", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-13T11:21:06.809Z", "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_5RUnczRNazfbiaTL9SnD", "payment_method_status": "inactive", "updated": "2025-02-13T11:06:07.072Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` - Do a MIT with payment_method_id: ``` { "amount": 1000, "currency": "GBP", "capture_method": "automatic", "authentication_type": "no_three_ds", "confirm": true, "customer_id": "Sakil", "off_session": true, "description": "Hello this is description", "recurring_details": { "type": "payment_method_id", "data": "pm_5RUnczRNazfbiaTL9SnD" }, "billing": { "address": { "line1": "Shankar", "line2": "Shankar", "line3": "Shankar", "city": "Shankar", "state": "Shankar", "zip": "560095", "country": "IN", "first_name": "Sakil", "last_name": "Mostak" } } } ``` - The response should have status succeeded: ``` { "payment_id": "pay_FxWNpVEWI6fTfDrpPLs0", "merchant_id": "postman_merchant_GHAction_eed5bd85-d778-4c6d-9048-bf2e58487030", "status": "succeeded", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 1000, "connector": "datatrans", "client_secret": "pay_FxWNpVEWI6fTfDrpPLs0_secret_4j8sPTd1CrUgDfjmwjds", "created": "2025-02-13T11:06:32.836Z", "currency": "GBP", "customer_id": "Sakil", "customer": { "id": "Sakil", "name": null, "email": "guest@example.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": true, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "0001", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "540400", "card_extended_bin": null, "card_exp_month": "06", "card_exp_year": "2025", "card_holder_name": "Test Holder", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "Shankar", "country": "IN", "line1": "Shankar", "line2": "Shankar", "line3": "Shankar", "zip": "560095", "state": "Shankar", "first_name": "Sakil", "last_name": "Mostak" }, "phone": null, "email": 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": "Sakil", "created_at": 1739444792, "expires": 1739448392, "secret": "epk_ef37c3843e0d4230bb7f420c485f1fbf" }, "manual_retry_allowed": false, "connector_transaction_id": "250213120633001871", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_4b0kZjcwsxbB2jQrJaG4", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_s8lmK0NsZlom2M4xkhbZ", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-13T11:21:32.836Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_5RUnczRNazfbiaTL9SnD", "payment_method_status": "active", "updated": "2025-02-13T11:06:33.076Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": "AFBWlDuSAAEAAAGU_vzJOgraI3PVAFdP" } ``` Case 2: (Payment with Mandate Create) - Do a CIT: ``` { "amount": 1000, "currency": "GBP", "amount_to_capture": 1000, "confirm": true, "capture_method": "automatic", "authentication_type": "three_ds", "return_url": "https://www.google.com", "payment_method": "card", "payment_method_type": "credit", "customer_id": "Sakil", "email": "guest@example.com", "payment_method_data": { "card": { "card_number": "5404000000000001", "card_exp_month": "06", "card_exp_year": "25", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "Zurich", "state": "asd", "zip": "8008", "country": "CH", "first_name": "joseph", "last_name": "Doe" }, "email": "guest@example.com" } "setup_future_usage": "off_session", "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" } } } ``` - Collect the payment_method_id from the response and do the redirection to succeed the payment: ``` { "payment_id": "pay_pHJaEI5qznn1x9rbCKU9", "merchant_id": "postman_merchant_GHAction_eed5bd85-d778-4c6d-9048-bf2e58487030", "status": "requires_customer_action", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 1000, "amount_received": null, "connector": "datatrans", "client_secret": "pay_pHJaEI5qznn1x9rbCKU9_secret_a523Gd5rx8NZ3LBpMp0P", "created": "2025-02-13T11:07:28.524Z", "currency": "GBP", "customer_id": "Sakil", "customer": { "id": "Sakil", "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": "0001", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "540400", "card_extended_bin": null, "card_exp_month": "06", "card_exp_year": "25", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "Zurich", "country": "CH", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "8008", "state": "asd", "first_name": "joseph", "last_name": "Doe" }, "phone": null, "email": "guest@example.com" }, "order_details": null, "email": "guest@example.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_pHJaEI5qznn1x9rbCKU9/postman_merchant_GHAction_eed5bd85-d778-4c6d-9048-bf2e58487030/pay_pHJaEI5qznn1x9rbCKU9_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": "Sakil", "created_at": 1739444848, "expires": 1739448448, "secret": "epk_bf07a0e3ab10480189c5e97cbb04b361" }, "manual_retry_allowed": null, "connector_transaction_id": "250213120728692326", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_4b0kZjcwsxbB2jQrJaG4", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_s8lmK0NsZlom2M4xkhbZ", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-13T11:22:28.524Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_5RUnczRNazfbiaTL9SnD", "payment_method_status": null, "updated": "2025-02-13T11:07:28.751Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` - Do a MIT with payment_method_id: ``` { "amount": 1000, "currency": "GBP", "capture_method": "automatic", "authentication_type": "no_three_ds", "confirm": true, "customer_id": "Sakil", "off_session": true, "description": "Hello this is description", "recurring_details": { "type": "payment_method_id", "data": "pm_5RUnczRNazfbiaTL9SnD" }, "billing": { "address": { "line1": "Shankar", "line2": "Shankar", "line3": "Shankar", "city": "Shankar", "state": "Shankar", "zip": "560095", "country": "IN", "first_name": "Sakil", "last_name": "Mostak" } } } ``` - The response should have status succeeded: ``` { "payment_id": "pay_FxWNpVEWI6fTfDrpPLs0", "merchant_id": "postman_merchant_GHAction_eed5bd85-d778-4c6d-9048-bf2e58487030", "status": "succeeded", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 1000, "connector": "datatrans", "client_secret": "pay_FxWNpVEWI6fTfDrpPLs0_secret_4j8sPTd1CrUgDfjmwjds", "created": "2025-02-13T11:06:32.836Z", "currency": "GBP", "customer_id": "Sakil", "customer": { "id": "Sakil", "name": null, "email": "guest@example.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": true, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "0001", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "540400", "card_extended_bin": null, "card_exp_month": "06", "card_exp_year": "2025", "card_holder_name": "Test Holder", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "Shankar", "country": "IN", "line1": "Shankar", "line2": "Shankar", "line3": "Shankar", "zip": "560095", "state": "Shankar", "first_name": "Sakil", "last_name": "Mostak" }, "phone": null, "email": 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": "Sakil", "created_at": 1739444792, "expires": 1739448392, "secret": "epk_ef37c3843e0d4230bb7f420c485f1fbf" }, "manual_retry_allowed": false, "connector_transaction_id": "250213120633001871", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_4b0kZjcwsxbB2jQrJaG4", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_s8lmK0NsZlom2M4xkhbZ", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-13T11:21:32.836Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_5RUnczRNazfbiaTL9SnD", "payment_method_status": "active", "updated": "2025-02-13T11:06:33.076Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": "AFBWlDuSAAEAAAGU_vzJOgraI3PVAFdP" } ``` ## 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/datatrans.rs` - `crates/hyperswitch_connectors/src/connectors/datatrans/transformers.rs` - `crates/hyperswitch_connectors/src/utils.rs` **Code Patterns Applied:** - Define new data structures (3 changes) - Implement new functions (13 changes) - Extend existing types with new fields (103 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit e2043dee: Files to modify: **crates/hyperswitch_connectors/src/connectors/datatrans.rs** Add: - function: private::validate_mandate_payment - 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 **crates/hyperswitch_connectors/src/connectors/datatrans/transformers.rs** Add: - function: private::try_from - function: private::try_from - struct: pub::DataTransCreateAlias - struct: pub::SyncCardDetails - impl: impl TryFrom<&types::SetupMandateRouterData> for DatatransPaymentsRequest **crates/hyperswitch_connectors/src/utils.rs** Add: - function: private::get_card_expiry_year_2_digit - trait: pub::AdditionalCardInfo - impl: impl AdditionalCardInfo for payments::AdditionalCardInfo
{"pr_number": 7245, "pr_title": "feat(connector): [Datatrans] add mandate flow", "merged_at": "2025-02-14T13:42:25Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/datatrans.rs", "crates/hyperswitch_connectors/src/connectors/datatrans/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs"]}, "change_types": {"structs_added": 3, "functions_added": 13, "enums_added": 1, "fields_added": 103, "imports_added": 1, "conditionals_added": 2}, "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 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. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (8 changes) - Add conditional logic for feature flags or filtering (5 changes) **Detailed Identifier Changes:** Commit 62e4d299: Files to modify: **crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs** Add: - enum: pub::CybersourceParesStatus
{"pr_number": 8550, "pr_title": "fix(connector): [CYBERSOURCE] Passing pares_status for MasterCard & Visa and transaction_type field", "merged_at": "2025-07-06T05:45:54Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs"]}, "change_types": {"enums_added": 1, "fields_added": 8, "conditionals_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(authorizedotnet): refund via ucs missing connector_metadata ## 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 --> - Refunds via authorizedot net are getting into `pending` state where no connector call is made - This happens when `connector_metadata` is empty in attempt table - In usual cases `connector_metadata` is not empty but this happened via ucs. ### solution - `connector_metadata` contains last4 digits which can be fetched form payment_method_data ## how did i test - make payment from old code , delete connector metadata in attempt table and make refund 1. make payment ```json { "amount": 689, "customer_id": "hello_world", "currency": "USD", "confirm": true, "capture_method": "automatic", "payment_method": "card", "payment_method_type": "debit", "authentication_type": "no_three_ds", "setup_future_usage": "off_session", "customer_acceptance": { "acceptance_type": "online", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "127.0.0.1", "user_agent": "amet irure esse" } }, "email": "hello@gmail.com", "description": "hellow world", "connector": [ "authorizedotnet" ], "billing": { "address": { "zip": "560095", "country": "US", "first_name": "Sakil", "last_name": "Mostak", "line1": "Fasdf", "line2": "Fasdf", "city": "Fasdf" } }, "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "12", "card_exp_year": "2029", "card_holder_name": "John Doe", "card_cvc": "123", "card_network": "Visa" } } } ``` ```json { "payment_id": "pay_n4mGvzhDDxV8ontN4pNa", "merchant_id": "merchant_1759037295", "status": "succeeded", "amount": 689, "net_amount": 689, "shipping_cost": null, "amount_capturable": 0, "amount_received": 689, "connector": "authorizedotnet", "client_secret": "pay_n4mGvzhDDxV8ontN4pNa_secret_nJprHzvgyCnAQQxGeSD9", "created": "2025-09-28T07:38:56.792Z", "currency": "USD", "customer_id": "hello_world", "customer": { "id": "hello_world", "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": "1111", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "411111", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2029", "card_holder_name": "John Doe", "payment_checks": { "description": "The street address and postal code matched.", "avs_result_code": "Y" }, "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": 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": { "customer_id": "hello_world", "created_at": 1759045136, "expires": 1759048736, "secret": "epk_d109625edc44483a9a0d6e034153633f" }, "manual_retry_allowed": null, "connector_transaction_id": "120071750406", "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": "120071750406", "payment_link": null, "profile_id": "pro_KP1SMsZKdiOrioYnjKO2", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_Ym77o958MRzqZWCyOQXt", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-28T07:53:56.792Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": "pm_BS4qjY5VS1ARCBexzcfb", "network_transaction_id": "ZKS4CMGOARXYQR4IVKIRAOE", "payment_method_status": "active", "updated": "2025-09-28T07:38:59.120Z", "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": "932841928-932130361", "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 } ``` Delete connector metadata <img width="1233" height="503" alt="Screenshot 2025-09-28 at 1 12 00 PM" src="https://github.com/user-attachments/assets/6fd10bd3-87a1-4798-81f3-e3707ee61ccc" /> <img width="1136" height="944" alt="Screenshot 2025-09-28 at 1 12 22 PM" src="https://github.com/user-attachments/assets/84d13528-a37f-4f2e-ab74-79f70344d49d" /> - manual update refund status into failed ```sh curl --location --request PUT 'localhost:8080/refunds/ref_Ut6eGBd4ZUKJXMhn3NZz/manual-update' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "status": "failed", "merchant_id": "merchant_1759037295" }' ``` - retrigger refund with new code ```json curl --location 'localhost:8080/refunds' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_IbxeUnL1qB3Fre0mdogERYiA4O4rQttdcxtzqzMjzWpVR6zafoOzCYvIdRz9X5bu' \ --data '{ "payment_id": "pay_n4mGvzhDDxV8ontN4pNa", "amount":689, "reason":"pause" }' ``` ### NOTE THAT in sbx we cannot make successful refund , its skipped in cypress too. Now the api call is goign ```json { "refund_id": "ref_KlllCvhIs4k7Twk6teXh", "payment_id": "pay_n4mGvzhDDxV8ontN4pNa", "amount": 689, "currency": "USD", "status": "failed", "reason": "pause", "metadata": null, "error_message": "The referenced transaction does not meet the criteria for issuing a credit.", "error_code": "54", "unified_code": "UE_9000", "unified_message": "Something went wrong", "created_at": "2025-09-28T07:46:51.621Z", "updated_at": "2025-09-28T07:46:53.144Z", "connector": "authorizedotnet", "profile_id": "pro_KP1SMsZKdiOrioYnjKO2", "merchant_connector_id": "mca_Ym77o958MRzqZWCyOQXt", "split_refunds": null, "issuer_error_code": null, "issuer_error_message": null } ``` ### 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)? --> ## 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/authorizedotnet/transformers.rs` **Code Patterns Applied:** - Implement new functions (2 changes) - Extend existing types with new fields (5 changes) **Detailed Identifier Changes:** Commit ff06ae46: Files to modify: **crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs** Add: - enum: private::PaymentDetailAccountNumber
{"pr_number": 9581, "pr_title": "fix(authorizedotnet): refund via ucs missing connector_metadata", "merged_at": "2025-09-29T18:26:45Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs"]}, "change_types": {"functions_added": 2, "enums_added": 1, "fields_added": 5, "imports_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connectors): [worldpayvantiv] add connector mandate support ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Add connector mandate support for vantiv cards Note: This feature has to be enabled at Vantiv ## 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 Customer Initiated Mandate</summary> ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_yd2YxRScbTZYwkJGCv6YdgFo3Hj2th1v8scxfbq8WdMo3EsTgxgTd4FbRLixw71c' \ --data '{ "amount": 15000, "currency": "USD", "confirm": true, "capture_method": "automatic", "customer_id": "hyperswitch_sdk_demo_id", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "5435101234510196", "card_exp_month": "11", "card_exp_year": "50", "card_cvc": "987" } }, "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" }' ``` Response ``` {"payment_id":"pay_pKDE8WgeFLUV9hWxUlkf","merchant_id":"postman_merchant_GHAction_aad3d97c-40fb-4f4c-bc2a-dd683b156d5a","status":"processing","amount":15000,"net_amount":15000,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_pKDE8WgeFLUV9hWxUlkf_secret_D2ivaJYROS8fkiKG2IzP","created":"2025-07-04T10:26:49.764Z","currency":"USD","customer_id":"hyperswitch_sdk_demo_id","customer":{"id":"hyperswitch_sdk_demo_id","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":"off_session","off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"0196","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"543510","card_extended_bin":null,"card_exp_month":"11","card_exp_year":"50","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":{"customer_id":"hyperswitch_sdk_demo_id","created_at":1751624809,"expires":1751628409,"secret":"epk_2ab6628c91f84c7cac386b9ee784b5c8"},"manual_retry_allowed":false,"connector_transaction_id":"84085100193940137","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_pKDE8WgeFLUV9hWxUlkf","payment_link":null,"profile_id":"pro_sFS1d84BWdVLMu7kZqTD","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_bpcDnKfJlT6NY9v7PGYZ","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-04T10:41:49.764Z","fingerprint":null,"browser_info":null,"payment_method_id":"pm_H9GSPzY88jHtNhHnGOa1","payment_method_status":"inactive","updated":"2025-07-04T10:27:00.942Z","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":"2032317115030196","card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null} ``` </details> <details> <summary>Psync</summary> ``` {"payment_id":"pay_pKDE8WgeFLUV9hWxUlkf","merchant_id":"postman_merchant_GHAction_aad3d97c-40fb-4f4c-bc2a-dd683b156d5a","status":"succeeded","amount":15000,"net_amount":15000,"shipping_cost":null,"amount_capturable":0,"amount_received":15000,"connector":"worldpayvantiv","client_secret":"pay_pKDE8WgeFLUV9hWxUlkf_secret_D2ivaJYROS8fkiKG2IzP","created":"2025-07-04T10:26:49.764Z","currency":"USD","customer_id":"hyperswitch_sdk_demo_id","customer":{"id":"hyperswitch_sdk_demo_id","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":"off_session","off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"0196","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"543510","card_extended_bin":null,"card_exp_month":"11","card_exp_year":"50","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":"84085100193940137","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_pKDE8WgeFLUV9hWxUlkf","payment_link":null,"profile_id":"pro_sFS1d84BWdVLMu7kZqTD","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_bpcDnKfJlT6NY9v7PGYZ","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-04T10:41:49.764Z","fingerprint":null,"browser_info":null,"payment_method_id":"pm_H9GSPzY88jHtNhHnGOa1","payment_method_status":"inactive","updated":"2025-07-04T10:28:40.597Z","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":"2032317115030196","card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null} ``` </details> <details> <summary>Create a Merchant Initiated Transaction</summary> ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_yd2YxRScbTZYwkJGCv6YdgFo3Hj2th1v8scxfbq8WdMo3EsTgxgTd4FbRLixw71c' \ --data '{ "amount": 2500, "currency": "USD", "off_session": true, "confirm": true, "capture_method": "automatic", "recurring_details": { "type": "payment_method_id", "data": "pm_H9GSPzY88jHtNhHnGOa1" }, "customer_id": "hyperswitch_sdk_demo_id", "connector": [ "worldpayvantiv" ] }' ``` Response ``` {"payment_id":"pay_iFoYl0jlYH9S8ICvmxwA","merchant_id":"postman_merchant_GHAction_aad3d97c-40fb-4f4c-bc2a-dd683b156d5a","status":"processing","amount":2500,"net_amount":2500,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":"worldpayvantiv","client_secret":"pay_iFoYl0jlYH9S8ICvmxwA_secret_ipDVUhYazuFcfNrCH4dP","created":"2025-07-04T10:30:38.534Z","currency":"USD","customer_id":"hyperswitch_sdk_demo_id","customer":{"id":"hyperswitch_sdk_demo_id","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":true,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"0196","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"543510","card_extended_bin":null,"card_exp_month":"11","card_exp_year":"50","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":{"customer_id":"hyperswitch_sdk_demo_id","created_at":1751625038,"expires":1751628638,"secret":"epk_206cfdc52eb34851b00ad367718368c0"},"manual_retry_allowed":false,"connector_transaction_id":"83997139237370330","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_iFoYl0jlYH9S8ICvmxwA","payment_link":null,"profile_id":"pro_sFS1d84BWdVLMu7kZqTD","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_bpcDnKfJlT6NY9v7PGYZ","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-04T10:45:38.534Z","fingerprint":null,"browser_info":null,"payment_method_id":"pm_H9GSPzY88jHtNhHnGOa1","payment_method_status":"active","updated":"2025-07-04T10:30:40.709Z","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":"2032317115030196","card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null} ``` </details> <details> <summary>Psync</summary> ``` {"payment_id":"pay_iFoYl0jlYH9S8ICvmxwA","merchant_id":"postman_merchant_GHAction_aad3d97c-40fb-4f4c-bc2a-dd683b156d5a","status":"succeeded","amount":2500,"net_amount":2500,"shipping_cost":null,"amount_capturable":0,"amount_received":2500,"connector":"worldpayvantiv","client_secret":"pay_iFoYl0jlYH9S8ICvmxwA_secret_ipDVUhYazuFcfNrCH4dP","created":"2025-07-04T10:30:38.534Z","currency":"USD","customer_id":"hyperswitch_sdk_demo_id","customer":{"id":"hyperswitch_sdk_demo_id","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":true,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"0196","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"543510","card_extended_bin":null,"card_exp_month":"11","card_exp_year":"50","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":"83997139237370330","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"pay_iFoYl0jlYH9S8ICvmxwA","payment_link":null,"profile_id":"pro_sFS1d84BWdVLMu7kZqTD","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_bpcDnKfJlT6NY9v7PGYZ","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-04T10:45:38.534Z","fingerprint":null,"browser_info":null,"payment_method_id":"pm_H9GSPzY88jHtNhHnGOa1","payment_method_status":"active","updated":"2025-07-04T10:32:02.030Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null} ``` </details> ## 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 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Enhanced Worldpay Vantiv connector to support tokenized mandates and improved mandate handling. * Added support for tokenization data and improved processing of mandate-related payments and responses. * **Bug Fixes** * Improved error handling for missing card mandate information during payment authorization. * **Refactor** * Streamlined mandate information extraction for Paybox and Worldpay Vantiv connectors. * Updated internal data structures for cleaner and more flexible mandate and token data management. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
To implement this **payment** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/paybox/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs` - `crates/hyperswitch_connectors/src/utils.rs` **Code Patterns Applied:** - Define new data structures (4 changes) - Implement new functions (4 changes) - Extend existing types with new fields (53 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit de92973b: Files to modify: **crates/hyperswitch_connectors/src/connectors/paybox/transformers.rs** Remove: - function: private::extract_card_mandate_info - struct: pub::CardMandateInfo **crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs** Add: - function: private::from - function: private::get_vantiv_card_data - struct: pub::TokenizationData - struct: private::VantivMandateDetail - struct: pub::TokenResponse - impl: impl From<TokenResponse> for MandateReference **crates/hyperswitch_connectors/src/utils.rs** Add: - function: private::get_card_mandate_info - struct: pub::CardMandateInfo
{"pr_number": 8546, "pr_title": "feat(connectors): [worldpayvantiv] add connector mandate support ", "merged_at": "2025-07-07T12:08:22Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/paybox/transformers.rs", "crates/hyperswitch_connectors/src/connectors/worldpayvantiv/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs"]}, "change_types": {"structs_added": 4, "functions_added": 4, "fields_added": 53, "imports_added": 1, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor: alter subscription table to update primary key ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description This PR refactors the **`subscription` table schema** to improve key management and alignment with business requirements. Key updates include: - Changed the **primary key** from `id` to a **composite key**: `(subscription_id, merchant_id)`. - Removed the old `id` field as a primary identifier. - Added a new field: `profile_id` (`VARCHAR(128) NOT NULL`) to support profile-specific subscription handling. - Renamed `mca_id` → `merchant_connector_id` for better clarity and consistency across schema and model definitions. - Updated associated Diesel models (`Subscription`, `SubscriptionNew`, `SubscriptionUpdate`) to reflect the schema changes. ## Outcomes - Ensures **subscriptions are uniquely identified** by merchant and subscription ID, preventing conflicts across merchants. - Introduces **profile-level granularity** for subscriptions, enabling better multi-profile support. - Aligns field naming (`merchant_connector_id`) with domain terminology for consistency across codebase. - Strengthens schema constraints to reduce risk of duplicate or inconsistent subscription entries. ## Diff Hunk Explanation - **`crates/diesel_models/src/schema.rs` & `schema_v2.rs`** - Modified `subscription` table definition to use `(subscription_id, merchant_id)` as composite primary key. - Added new column `profile_id`. - Renamed column `mca_id` → `merchant_connector_id`. - **`crates/diesel_models/src/subscription.rs`** - Updated structs (`Subscription`, `SubscriptionNew`) to drop old `id` field and include `profile_id`. - Renamed field `mca_id` → `merchant_connector_id`. - Updated Diesel annotations to reflect composite primary key. - **Migrations** - `up.sql`: drops old PK, removes `id`, adds `profile_id`, sets composite PK, renames column. - `down.sql`: restores old structure with `id` as PK, removes `profile_id`, renames column back to `mca_id`. This refactor lays the foundation for **robust subscription handling with merchant-profile level uniqueness**. ## How did you test it? Its just migration PR won't require testing ## 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. Database Layer (Queries & Schema)** - `crates/diesel_models/src/schema.rs` - `crates/diesel_models/src/schema_v2.rs` - `crates/diesel_models/src/subscription.rs` **2. Other** - `migrations/2025-09-04-063109_update_subscription_table_with_profile_id/down.sql` - `migrations/2025-09-04-063109_update_subscription_table_with_profile_id/up.sql` **Code Patterns Applied:** - Extend existing types with new fields (6 changes) **Detailed Identifier Changes:** Commit 5e1fd0b1: Files to modify: **crates/diesel_models/src/schema.rs** Modify existing code **crates/diesel_models/src/schema_v2.rs** Modify existing code **crates/diesel_models/src/subscription.rs** Modify existing code
{"pr_number": 9272, "pr_title": "refactor: alter subscription table to update primary key", "merged_at": "2025-09-04T09:48:09Z", "intent": {"feature_type": "connector_integration", "action": "add_feature", "entities": ["merchant", "connector"]}, "hierarchy": {"database": ["crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs", "crates/diesel_models/src/subscription.rs"], "other": ["migrations/2025-09-04-063109_update_subscription_table_with_profile_id/down.sql", "migrations/2025-09-04-063109_update_subscription_table_with_profile_id/up.sql"]}, "change_types": {"fields_added": 6}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [redsys] psync transaction type mapping ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> In this PR 1. Authorized Attempt status was mapped to Confirmation transaction type. But it should be mapped to Pre-Authorization. 2. Adds browserIP to the connector payment request which is a mandatory field to be sent in production environment. ## 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 1. Create a manual 3ds card transaction and do a psync before capture call ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_EGQ7GlLUxISLGlUsiVADWtoqBmxw07LrGBvztBw3GFnOYhYVAh5nT2chXJOfOW7u' \ --data-raw '{ "amount": 10, "currency": "EUR", "return_url": "https://hyperswitch.io", "confirm": true, "customer_acceptance": null, "customer_id" :"asbh", "capture_method": "manual", "authentication_type": "three_ds", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "Ceutâ", "zip": "94122", "country": "ES", "first_name": "joseph", "last_name": "Doe" }, "email": "mauro.morandi@nexi.it", "phone": { "number": "9123456789", "country_code": "+91" } }, "email": "hyperswitch_sdk_demo_id@gmail.com", "browser_info": { "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "en-US", "color_depth": 32, "screen_height": 1117, "screen_width": 1728, "time_zone": -330, "java_enabled": true, "java_script_enabled": true, "ip_address": "127.0.0.1" }, "payment_method": "card", "payment_method_data": { "card": { "card_number": "4548814479727229", "card_exp_month": "12", "card_exp_year": "49", "card_holder_name": "Joseph", "card_cvc": "123" } }, "setup_future_usage": "on_session", "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "Ceuta", "zip": "94122", "country": "ES", "first_name": "joseph", "last_name": "Doe" }, "email": "mauro.morandi@nexi.it", "phone": { "number": "9123456789", "country_code": "+91" } } }' ``` Response ``` {"payment_id":"pay_rwKhRr9dAqAttQe4JgTn","merchant_id":"postman_merchant_GHAction_42f3b809-6439-4372-b361-f9bc8e9498dd","status":"requires_capture","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":10,"amount_received":null,"connector":"redsys","client_secret":"pay_rwKhRr9dAqAttQe4JgTn_secret_ulEePhsTatEfTfUm11Pk","created":"2025-03-25T11:54:53.876Z","currency":"EUR","customer_id":"asbh","customer":{"id":"asbh","name":null,"email":"hyperswitch_sdk_demo_id@gmail.com","phone":null,"phone_country_code":null},"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":"on_session","off_session":null,"capture_on":null,"capture_method":"manual","payment_method":"card","payment_method_data":{"card":{"last4":"7229","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"454881","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"49","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":"token_5PuVXvwm2RmXchPox71K","shipping":{"address":{"city":"San Fransico","country":"ES","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceuta","first_name":"joseph","last_name":"Doe"},"phone":{"number":"9123456789","country_code":"+91"},"email":"mauro.morandi@nexi.it"},"billing":{"address":{"city":"San Fransico","country":"ES","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"phone":{"number":"9123456789","country_code":"+91"},"email":"mauro.morandi@nexi.it"},"order_details":null,"email":"hyperswitch_sdk_demo_id@gmail.com","name":null,"phone":null,"return_url":"https://hyperswitch.io/","authentication_type":"three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":null,"connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"asbh","created_at":1742903693,"expires":1742907293,"secret":"epk_2f88c0bacc514f5c9993dcc6a8ed88f0"},"manual_retry_allowed":false,"connector_transaction_id":"959804361926","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"959804361926","payment_link":null,"profile_id":"pro_c5tItNnUXgY4Q5FJ7yjz","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_8xML5xLiLKwhfhWhoC0B","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-03-25T12:09:53.876Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"127.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","color_depth":32,"java_enabled":true,"screen_width":1728,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":1117,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2025-03-25T11:54:57.350Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","issuer_error_code":null,"issuer_error_message":null} ``` Psync ``` curl --location 'http://localhost:8080/payments/pay_rwKhRr9dAqAttQe4JgTn?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_EGQ7GlLUxISLGlUsiVADWtoqBmxw07LrGBvztBw3GFnOYhYVAh5nT2chXJOfOW7u' ``` Response ``` {"payment_id":"pay_rwKhRr9dAqAttQe4JgTn","merchant_id":"postman_merchant_GHAction_42f3b809-6439-4372-b361-f9bc8e9498dd","status":"requires_capture","amount":10,"net_amount":10,"shipping_cost":null,"amount_capturable":10,"amount_received":null,"connector":"redsys","client_secret":"pay_rwKhRr9dAqAttQe4JgTn_secret_ulEePhsTatEfTfUm11Pk","created":"2025-03-25T11:54:53.876Z","currency":"EUR","customer_id":"asbh","customer":{"id":"asbh","name":null,"email":"hyperswitch_sdk_demo_id@gmail.com","phone":null,"phone_country_code":null},"description":null,"refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":"on_session","off_session":null,"capture_on":null,"capture_method":"manual","payment_method":"card","payment_method_data":{"card":{"last4":"7229","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"454881","card_extended_bin":null,"card_exp_month":"12","card_exp_year":"49","card_holder_name":"Joseph","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":"token_5PuVXvwm2RmXchPox71K","shipping":{"address":{"city":"San Fransico","country":"ES","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceuta","first_name":"joseph","last_name":"Doe"},"phone":{"number":"9123456789","country_code":"+91"},"email":"mauro.morandi@nexi.it"},"billing":{"address":{"city":"San Fransico","country":"ES","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"Ceutâ","first_name":"joseph","last_name":"Doe"},"phone":{"number":"9123456789","country_code":"+91"},"email":"mauro.morandi@nexi.it"},"order_details":null,"email":"hyperswitch_sdk_demo_id@gmail.com","name":null,"phone":null,"return_url":"https://hyperswitch.io/","authentication_type":"three_ds","statement_descriptor_name":null,"statement_descriptor_suffix":null,"next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":null,"connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":false,"connector_transaction_id":"959804361926","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"959804361926","payment_link":null,"profile_id":"pro_c5tItNnUXgY4Q5FJ7yjz","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_8xML5xLiLKwhfhWhoC0B","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-03-25T12:09:53.876Z","fingerprint":null,"browser_info":{"language":"en-US","time_zone":-330,"ip_address":"127.0.0.1","user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","color_depth":32,"java_enabled":true,"screen_width":1728,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":1117,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2025-03-25T11:55:51.691Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","issuer_error_code":null,"issuer_error_message":null} ``` Earlier payment was failed when psync failed ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **payment** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/redsys.rs` - `crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (2 changes) **Detailed Identifier Changes:** Commit d45f1f14: Files to modify: **crates/hyperswitch_connectors/src/connectors/redsys.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs** Modify existing code Commit 9159823d: Files to modify: **crates/hyperswitch_connectors/src/connectors/redsys.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs** Modify existing code
{"pr_number": 7628, "pr_title": "fix(connector): [redsys] psync transaction type mapping", "merged_at": "2025-03-26T14:24:19Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/redsys.rs", "crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs"]}, "change_types": {"fields_added": 2}, "has_identifier_data": true, "commits_matched": 2, "match_method": "pr_number"}
feat(connector): [Novalnet] Add minimal customer data feature ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [X] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Added minimal customer data feature. To use this the payments request body should have `"no_nc": 1`. With this enabled, `billing`, `customer_ip` wont be needed in `Novalnet request body` anymore So in the `HS payments request body` we wont be needing `billing.address` anymore Details: https://developer.novalnet.com/onlinepayments/aboutminimalcustomerdata ### 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 locally for cards with `billing.address` ### **/payments cURL** `curl --location --request POST 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_uMzYVQ13nwcIGJPBPuAUYOoH7EpGhb48w3cYLMn1Y34u6fxzUqmACEhkWrK3SrSq' \ --data-raw '{ "amount": 10000, "currency": "EUR", "confirm": true, "payment_link": false, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 10000, "customer_id": "StripeCustomer", "email": "guest@example.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4000 0000 0000 1091", "card_exp_month": "12", "card_exp_year": "2025", "card_holder_name": "Max Mustermann", "card_cvc": "123" } }, "billing": { "email": "test@novalnet.de" }, "browser_info": { "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,\/;q=0.8", "language": "nl-NL", "color_depth": 24, "ip_address": "103.77.139.95", "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }'` ### **/payment response** `{ "payment_id": "pay_SXHaUZKFxM1nMu6a0bvt", "merchant_id": "merchant_1731578904", "status": "requires_customer_action", "amount": 10000, "net_amount": 10000, "shipping_cost": null, "amount_capturable": 10000, "amount_received": null, "connector": "novalnet", "client_secret": "pay_SXHaUZKFxM1nMu6a0bvt_secret_WaOVo5M3DOfuO8Ny0Jek", "created": "2024-11-14T11:11:25.351Z", "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": "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": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": null, "phone": null, "email": "test@novalnet.de" }, "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_SXHaUZKFxM1nMu6a0bvt/merchant_1731578904/pay_SXHaUZKFxM1nMu6a0bvt_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "StripeCustomer", "created_at": 1731582685, "expires": 1731586285, "secret": "epk_ad675fe4e7e24456bc5639df098a9085" }, "manual_retry_allowed": null, "connector_transaction_id": null, "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_E9P6mpTKHjYrjQ33lcs7", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_xiG3VZewShhbSQslXD60", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-11-14T11:26:25.351Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "103.77.139.95", "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-11-14T11:11:25.662Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null }` <img width="1169" alt="Screenshot 2024-11-14 at 16 43 17" src="https://github.com/user-attachments/assets/6ad8b5b0-d1a0-4947-bc98-0d7e732f8c7f"> ## 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/novalnet/transformers.rs` - `crates/router/src/configs/defaults/payment_connector_required_fields.rs` **Code Patterns Applied:** - Extend existing types with new fields (19 changes) **Detailed Identifier Changes:** Commit 9787a2be: Files to modify: **crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs** Modify existing code **crates/router/src/configs/defaults/payment_connector_required_fields.rs** Modify existing code
{"pr_number": 6570, "pr_title": "feat(connector): [Novalnet] Add minimal customer data feature ", "merged_at": "2024-11-19T20:03:09Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs", "crates/router/src/configs/defaults/payment_connector_required_fields.rs"]}, "change_types": {"fields_added": 19}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(webhook): Add is_delivered filter to list initial attempts endpoint ## 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 features addition of new filter called `is_delivered` which will allow merchants to filter out webhook events based on the fact that if a particular event was ultimately delivered or not. The `is_delivery_successful` field now takes data from `is_overall_delivery_successful` column of the events table and not `is_webhook_notified` to represent the eventual delivery of the event. Since this is new column and is null by default, for older data which doesnt contain value, the api response will have none value for this field. Backfill script for `is_overall_delivery_successful` column in events table. ```psql CREATE OR REPLACE FUNCTION update_is_overall_delivery_successful(evt_id varchar(64)) RETURNS void AS $$ BEGIN UPDATE events SET is_overall_delivery_successful = ( SELECT bool_or(is_webhook_notified) FROM events WHERE initial_attempt_id = evt_id AND delivery_attempt != 'manual_retry' ) WHERE event_id = evt_id; END; $$ LANGUAGE plpgsql; CREATE OR REPLACE FUNCTION backfill_is_overall_delivery_successful_column(created_after timestamp, created_before timestamp) RETURNS void AS $$ DECLARE event_rec RECORD; BEGIN FOR event_rec IN SELECT event_id FROM events WHERE event_id = initial_attempt_id AND is_overall_delivery_successful IS NULL AND created_at BETWEEN created_after AND created_before LOOP PERFORM update_is_overall_delivery_successful(event_rec.event_id); END LOOP; END; $$ LANGUAGE plpgsql; DO $$ BEGIN PERFORM backfill_is_overall_delivery_successful_column(start_date_timestamp, end_date_timestamp); DROP FUNCTION IF EXISTS update_is_overall_delivery_successful(varchar(64)); DROP FUNCTION IF EXISTS backfill_is_overall_delivery_successful_column(timestamp, timestamp); END; $$; ``` - Things to keep in mind before running in script 1. Substitute the `start_date_timestamp` and `end_date_timestamp` with actual timestamp values. 2. You can choose to keep the psql functions after running the script, just remove the `DROP FUNCTION ...` queries. ### Additional Changes - [x] This PR modifies the API contract - [x] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context Upon merging this PR, the merchants would be able to filter webhook events based on ultimate delivery status. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> - API request to fetch webhook events with no filter ``` curl --location 'http://localhost:8080/events/merchant_1740390998' \ --header 'Content-Type: application/json' \ --header 'admin_api_key: test_admin' \ --header 'api-key: test_admin' \ --data '' ``` - Response from the above call ```json { "events": [ { "event_id": "evt_01955ac0f0f87622a3748e69918d7a08", "merchant_id": "merchant_1740390998", "profile_id": "pro_IzLLBXNTTbYTO6TehKsK", "object_id": "pay_R9a71ZdcKL5etALU6QwT", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": false, "initial_attempt_id": "evt_01955ac0f0f87622a3748e69918d7a08", "created": "2025-03-03T06:45:48.920Z" }, { "event_id": "evt_01955ac0dfaa75508fdd3a435b06ba4f", "merchant_id": "merchant_1740390998", "profile_id": "pro_IzLLBXNTTbYTO6TehKsK", "object_id": "pay_YHPcEzH1JsaT7MsP1wyW", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": false, "initial_attempt_id": "evt_01955ac0dfaa75508fdd3a435b06ba4f", "created": "2025-03-03T06:45:44.491Z" }, { "event_id": "evt_01955ac0cefc7a0089be2973b68c8a0b", "merchant_id": "merchant_1740390998", "profile_id": "pro_IzLLBXNTTbYTO6TehKsK", "object_id": "pay_9Zk9Pa3DhacBWfZ1YiR5", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": false, "initial_attempt_id": "evt_01955ac0cefc7a0089be2973b68c8a0b", "created": "2025-03-03T06:45:40.221Z" }, { "event_id": "evt_01955ac0b9617601b64c7b029e8143ea", "merchant_id": "merchant_1740390998", "profile_id": "pro_IzLLBXNTTbYTO6TehKsK", "object_id": "pay_n6FHQ60LL3rUV0YynGui", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": false, "initial_attempt_id": "evt_01955ac0b9617601b64c7b029e8143ea", "created": "2025-03-03T06:45:34.690Z" }, { "event_id": "evt_0195471e27f4715386fe8d60d6b71a3f", "merchant_id": "merchant_1740390998", "profile_id": "pro_IzLLBXNTTbYTO6TehKsK", "object_id": "pay_o44C1ycjBXhqqHnmT2pq", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": true, "initial_attempt_id": "evt_0195471e27f4715386fe8d60d6b71a3f", "created": "2025-02-27T11:15:13.524Z" }, { "event_id": "evt_01954718c59470318339e9d3e9fb46f2", "merchant_id": "merchant_1740390998", "profile_id": "pro_IzLLBXNTTbYTO6TehKsK", "object_id": "pay_P9WiEf2l9jk1H7R4Sjg0", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": true, "initial_attempt_id": "evt_01954718c59470318339e9d3e9fb46f2", "created": "2025-02-27T11:09:20.661Z" }, { "event_id": "evt_01953774e7eb7c9190e280ea6756d032", "merchant_id": "merchant_1740390998", "profile_id": "pro_IzLLBXNTTbYTO6TehKsK", "object_id": "pay_QlQAl1DOJug8H0kk9FtW", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": null, "initial_attempt_id": "evt_01953774e7eb7c9190e280ea6756d032", "created": "2025-02-24T10:16:03.308Z" }, { "event_id": "evt_01953774d6b57762a2ff4fd96e27cce3", "merchant_id": "merchant_1740390998", "profile_id": "pro_IzLLBXNTTbYTO6TehKsK", "object_id": "pay_lKLVcse8HzUlytYrQtKJ", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": null, "initial_attempt_id": "evt_01953774d6b57762a2ff4fd96e27cce3", "created": "2025-02-24T10:15:58.901Z" }, { "event_id": "evt_01953774c1147c41a855a13536beafd7", "merchant_id": "merchant_1740390998", "profile_id": "pro_IzLLBXNTTbYTO6TehKsK", "object_id": "pay_TpPAwHW9pb1VtDoQR1fn", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": null, "initial_attempt_id": "evt_01953774c1147c41a855a13536beafd7", "created": "2025-02-24T10:15:53.365Z" }, { "event_id": "evt_019537748a317841814d292122fe384b", "merchant_id": "merchant_1740390998", "profile_id": "pro_IzLLBXNTTbYTO6TehKsK", "object_id": "pay_Wfg8KwLIKpNukRyI7LGN", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": null, "initial_attempt_id": "evt_019537748a317841814d292122fe384b", "created": "2025-02-24T10:15:39.313Z" }, { "event_id": "evt_019537728f3b7000b60bbf18cb8b1373", "merchant_id": "merchant_1740390998", "profile_id": "pro_IzLLBXNTTbYTO6TehKsK", "object_id": "pay_ISS739fX9arr9CNf6w73", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": null, "initial_attempt_id": "evt_019537728f3b7000b60bbf18cb8b1373", "created": "2025-02-24T10:13:29.532Z" }, { "event_id": "evt_01953771f29d7911be93a3753f1eb0c4", "merchant_id": "merchant_1740390998", "profile_id": "pro_IzLLBXNTTbYTO6TehKsK", "object_id": "pay_PEAL9Kt0lSt3tllLtSD6", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": null, "initial_attempt_id": "evt_01953771f29d7911be93a3753f1eb0c4", "created": "2025-02-24T10:12:49.438Z" }, { "event_id": "evt_019537707b8b70838e753daf51eb1d67", "merchant_id": "merchant_1740390998", "profile_id": "pro_IzLLBXNTTbYTO6TehKsK", "object_id": "pay_hXCyBkIAVf00lf03jyMQ", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": null, "initial_attempt_id": "evt_019537707b8b70838e753daf51eb1d67", "created": "2025-02-24T10:11:13.420Z" }, { "event_id": "evt_0195376867a57282999dd9ac75b137f9", "merchant_id": "merchant_1740390998", "profile_id": "pro_IzLLBXNTTbYTO6TehKsK", "object_id": "pay_g2TOloPWFFrhm02n9kuv", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": null, "initial_attempt_id": "evt_0195376867a57282999dd9ac75b137f9", "created": "2025-02-24T10:02:24.038Z" }, { "event_id": "evt_0195376750287e53bb08204068a6a902", "merchant_id": "merchant_1740390998", "profile_id": "pro_IzLLBXNTTbYTO6TehKsK", "object_id": "pay_47LGuikk3tqhnHNxrQfL", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": null, "initial_attempt_id": "evt_0195376750287e53bb08204068a6a902", "created": "2025-02-24T10:01:12.489Z" }, { "event_id": "evt_01953764d84a7811b03e83c906fd8009", "merchant_id": "merchant_1740390998", "profile_id": "pro_IzLLBXNTTbYTO6TehKsK", "object_id": "pay_d4MTTk0iuQzjQcChWHsa", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": null, "initial_attempt_id": "evt_01953764d84a7811b03e83c906fd8009", "created": "2025-02-24T09:58:30.731Z" }, { "event_id": "evt_0195376421b477909d06c2b227c734f7", "merchant_id": "merchant_1740390998", "profile_id": "pro_IzLLBXNTTbYTO6TehKsK", "object_id": "pay_9yrvfEwJyUYS1BScPn8Y", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": null, "initial_attempt_id": "evt_0195376421b477909d06c2b227c734f7", "created": "2025-02-24T09:57:43.988Z" }, { "event_id": "evt_0195376386e97a93a6b464285a262d8f", "merchant_id": "merchant_1740390998", "profile_id": "pro_IzLLBXNTTbYTO6TehKsK", "object_id": "pay_43vhcdhitA2NdA7cALAx", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": null, "initial_attempt_id": "evt_0195376386e97a93a6b464285a262d8f", "created": "2025-02-24T09:57:04.361Z" } ], "total_count": 18 } ``` - API call to fetch webhook events with `is_delivered` having `false` value. ``` curl --location 'http://localhost:8080/events/merchant_1740390998?is_delivered=false' \ --header 'Content-Type: application/json' \ --header 'admin_api_key: test_admin' \ --header 'api-key: test_admin' \ --data '' ``` - Response from above call ```json { "events": [ { "event_id": "evt_01955ac0f0f87622a3748e69918d7a08", "merchant_id": "merchant_1740390998", "profile_id": "pro_IzLLBXNTTbYTO6TehKsK", "object_id": "pay_R9a71ZdcKL5etALU6QwT", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": false, "initial_attempt_id": "evt_01955ac0f0f87622a3748e69918d7a08", "created": "2025-03-03T06:45:48.920Z" }, { "event_id": "evt_01955ac0dfaa75508fdd3a435b06ba4f", "merchant_id": "merchant_1740390998", "profile_id": "pro_IzLLBXNTTbYTO6TehKsK", "object_id": "pay_YHPcEzH1JsaT7MsP1wyW", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": false, "initial_attempt_id": "evt_01955ac0dfaa75508fdd3a435b06ba4f", "created": "2025-03-03T06:45:44.491Z" }, { "event_id": "evt_01955ac0cefc7a0089be2973b68c8a0b", "merchant_id": "merchant_1740390998", "profile_id": "pro_IzLLBXNTTbYTO6TehKsK", "object_id": "pay_9Zk9Pa3DhacBWfZ1YiR5", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": false, "initial_attempt_id": "evt_01955ac0cefc7a0089be2973b68c8a0b", "created": "2025-03-03T06:45:40.221Z" }, { "event_id": "evt_01955ac0b9617601b64c7b029e8143ea", "merchant_id": "merchant_1740390998", "profile_id": "pro_IzLLBXNTTbYTO6TehKsK", "object_id": "pay_n6FHQ60LL3rUV0YynGui", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": false, "initial_attempt_id": "evt_01955ac0b9617601b64c7b029e8143ea", "created": "2025-03-03T06:45:34.690Z" } ], "total_count": 4 } ``` - API call to fetch webhook events with `is_delivered` filter having `true` value. ``` curl --location 'http://localhost:8080/events/merchant_1740390998?is_delivered=true' \ --header 'Content-Type: application/json' \ --header 'admin_api_key: test_admin' \ --header 'api-key: test_admin' \ --data '' ``` - Response from above call ```json { "events": [ { "event_id": "evt_0195471e27f4715386fe8d60d6b71a3f", "merchant_id": "merchant_1740390998", "profile_id": "pro_IzLLBXNTTbYTO6TehKsK", "object_id": "pay_o44C1ycjBXhqqHnmT2pq", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": true, "initial_attempt_id": "evt_0195471e27f4715386fe8d60d6b71a3f", "created": "2025-02-27T11:15:13.524Z" }, { "event_id": "evt_01954718c59470318339e9d3e9fb46f2", "merchant_id": "merchant_1740390998", "profile_id": "pro_IzLLBXNTTbYTO6TehKsK", "object_id": "pay_P9WiEf2l9jk1H7R4Sjg0", "event_type": "payment_succeeded", "event_class": "payments", "is_delivery_successful": true, "initial_attempt_id": "evt_01954718c59470318339e9d3e9fb46f2", "created": "2025-02-27T11:09:20.661Z" } ], "total_count": 2 } ``` ## 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/webhook_events.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/events.rs` - `crates/diesel_models/src/query/events.rs` - `crates/diesel_models/src/schema.rs` - ... and 1 more files **3. Core Business Logic** - `crates/router/src/core/webhooks/outgoing.rs` - `crates/router/src/core/webhooks/webhook_events.rs` **4. Type Definitions** - `crates/router/src/types/domain/event.rs` - `crates/router/src/types/transformers.rs` **5. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - `crates/openapi/src/routes/webhook_events.rs` - ... and 5 more files **Code Patterns Applied:** - Implement new functions (2 changes) - Extend existing types with new fields (43 changes) - Add conditional logic for feature flags or filtering (2 changes) - Modify database queries (4 changes) **Detailed Identifier Changes:** Commit 55d27ce1: Files to modify: **crates/api_models/src/webhook_events.rs** Modify existing code **crates/diesel_models/src/events.rs** Modify existing code **crates/diesel_models/src/query/events.rs** Modify existing code **crates/diesel_models/src/schema.rs** Modify existing code **crates/diesel_models/src/schema_v2.rs** Modify existing code **crates/openapi/src/routes/webhook_events.rs** Modify existing code **crates/router/src/core/webhooks/outgoing.rs** Add: - function: private::update_overall_delivery_status_in_storage **crates/router/src/core/webhooks/webhook_events.rs** Modify existing code **crates/router/src/db/events.rs** Modify existing code **crates/router/src/db/kafka_store.rs** Modify existing code **crates/router/src/types/domain/event.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code **crates/router/src/workflows/outgoing_webhook_retry.rs** Modify existing code
{"pr_number": 7344, "pr_title": "feat(webhook): Add is_delivered filter to list initial attempts endpoint", "merged_at": "2025-03-28T11:03:29Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "webhook"]}, "hierarchy": {"api_models": ["crates/api_models/src/webhook_events.rs"], "database": ["crates/diesel_models/src/events.rs", "crates/diesel_models/src/query/events.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs"], "core_business": ["crates/router/src/core/webhooks/outgoing.rs", "crates/router/src/core/webhooks/webhook_events.rs"], "types": ["crates/router/src/types/domain/event.rs", "crates/router/src/types/transformers.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/openapi/src/routes/webhook_events.rs", "crates/router/src/db/events.rs", "crates/router/src/db/kafka_store.rs", "crates/router/src/workflows/outgoing_webhook_retry.rs", "migrations/2025-02-19-072457_add_is_overall_delivery_successful_column_in_events_table/down.sql", "migrations/2025-02-19-072457_add_is_overall_delivery_successful_column_in_events_table/up.sql"]}, "change_types": {"functions_added": 2, "fields_added": 43, "conditionals_added": 2, "database_queries": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [payload] add recurring payments ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> This PR targets Payload connector and has multiple fixes and a new feature introduced: - Add support for mandates (PMID and MandateID) - Add filters - Enable connector customer - Enable mandates - Add currency filter - Change AuthType from `HeaderKey` to `CurrencyAuthKey` - Add `CurrencyAuthKey` to connector auth - Wasm changes (connector configs) - Add connectorCustomer call - Change currency from `StringMajorUnit` to `StringMinorUnit` ### 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 #8610 ## 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)? --> - Modifications to test_utils does not affect the [postman ci](https://github.com/juspay/hyperswitch/actions/runs/16190276513/job/45704229040?pr=8597) - Have enabled mandates for Payload in Cypress, it takes a lot of time to run (30 seconds timeout for each call) as the connector marks the transaction as duplicate. So adding it manually ### PMID <details> <summary>CIT</summary> ```curl curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_m7DXx6rBjmKrdRDYX9enGDJJdFWAR88Rqd9URbqrN3qHYPH4PdNkG4CS4RCRmtof' \ --data-raw '{ "currency": "USD", "amount": 301, "confirm": true, "amount_to_capture": 301, "customer_id": "payload_connector_test", "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "no_three_ds", "return_url": "https://www.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", "setup_future_usage": "off_session", "payment_method_type": "debit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "card_cvc": "737" } }, "billing": { "address": { "line1": "1467", "line2": "CA", "line3": "Harrison Street", "city": "San Fransico", "state": "CA", "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": "CA", "zip": "94122", "country": "US", "first_name": "john", "last_name": "Doe" } }, "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" }, "metadata": { "order_category": "applepay" }, "order_details": [ { "product_name": "Apple iphone 15", "quantity": 1, "amount": 300, "account_name": "transaction_processing" } ], "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "in sit", "user_agent": "amet irure esse" } } }' ``` ```json { "payment_id": "pay_cFFeOg8VQh3r1UKHjxQY", "merchant_id": "postman_merchant_GHAction_1752169809", "status": "succeeded", "amount": 301, "net_amount": 301, "shipping_cost": null, "amount_capturable": 0, "amount_received": 301, "connector": "payload", "client_secret": "pay_cFFeOg8VQh3r1UKHjxQY_secret_9vFrK98gjbfWd17w3NGK", "created": "2025-07-11T10:03:59.758Z", "currency": "USD", "customer_id": "payload_connector_test", "customer": { "id": "payload_connector_test", "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": "4242", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "STRIPE PAYMENTS UK LIMITED", "card_issuing_country": "UNITEDKINGDOM", "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "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": "CA", "first_name": "john", "last_name": "Doe" }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "CA", "line3": "Harrison Street", "zip": "94122", "state": "CA", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": [ { "brand": null, "amount": 300, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null } ], "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "return_url": "https://www.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": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "payload_connector_test", "created_at": 1752228239, "expires": 1752231839, "secret": "epk_6e270b5bb80e49128fb686e54660baab" }, "manual_retry_allowed": false, "connector_transaction_id": "txn_3eq8JiwRx0zcJClLHNNTG", "frm_message": null, "metadata": { "order_category": "applepay" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "PL-NUR-ARK-VST", "payment_link": null, "profile_id": "pro_U3a7wsuWqn7xeMgksp4V", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_7CKiTQWaqGxdIPppsU0c", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-11T10:18:59.758Z", "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_method_id": "pm_K6kfIFL4v3OssBHiGbwP", "payment_method_status": "active", "updated": "2025-07-11T10:04:01.887Z", "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": "pm_3eq8JiuwUNh4hmG5LM9z8", "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` </details> <details> <summary>DB</summary> ```sh select * from payment_methods where payment_method_id='pm_K6kfIFL4v3OssBHiGbwP'; ``` <img width="1728" height="731" alt="image" src="https://github.com/user-attachments/assets/c03669dc-03d3-4592-9a3a-db0fd68f1a0f" /> </details> <details> <summary>Logs</summary> <img width="1728" height="291" alt="image" src="https://github.com/user-attachments/assets/1108d3c4-6d9b-482b-a8ee-d32b0ba1f6a8" /> </details> <details> <summary>MIT</summary> ```curl curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_m7DXx6rBjmKrdRDYX9enGDJJdFWAR88Rqd9URbqrN3qHYPH4PdNkG4CS4RCRmtof' \ --data-raw '{ "amount": 499, "currency": "USD", "confirm": true, "capture_method": "automatic", "customer_id": "payload_connector_test", "email": "guest@example.com", "off_session": true, "recurring_details": { "type": "payment_method_id", "data": "pm_K6kfIFL4v3OssBHiGbwP" }, "authentication_type": "no_three_ds" }' ``` ```json { "payment_id": "pay_Kh14Ha1Qf2No7vy5uInT", "merchant_id": "postman_merchant_GHAction_1752169809", "status": "succeeded", "amount": 499, "net_amount": 499, "shipping_cost": null, "amount_capturable": 0, "amount_received": 499, "connector": "payload", "client_secret": "pay_Kh14Ha1Qf2No7vy5uInT_secret_dZrGrLgAydWM6cohE4n3", "created": "2025-07-11T10:08:06.844Z", "currency": "USD", "customer_id": "payload_connector_test", "customer": { "id": "payload_connector_test", "name": "Joseph 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": true, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "STRIPE PAYMENTS UK LIMITED", "card_issuing_country": "UNITEDKINGDOM", "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "guest@example.com", "name": "Joseph 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": "payload_connector_test", "created_at": 1752228486, "expires": 1752232086, "secret": "epk_a2dac1ad9e95460188359d12e909214e" }, "manual_retry_allowed": false, "connector_transaction_id": "txn_3eq8Kg5mIVLawJ4aV37th", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "PL-B4F-T13-TKQ", "payment_link": null, "profile_id": "pro_U3a7wsuWqn7xeMgksp4V", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_7CKiTQWaqGxdIPppsU0c", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-11T10:23:06.844Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_K6kfIFL4v3OssBHiGbwP", "payment_method_status": "active", "updated": "2025-07-11T10:08:08.244Z", "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": "pm_3eq8JiuwUNh4hmG5LM9z8", "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` </details> <details> <summary>Logs</summary> <img width="1727" height="237" alt="image" src="https://github.com/user-attachments/assets/84bbf55c-5d5e-4781-8010-46ee73025773" /> </details> ### Mandate ID <details> <summary>CIT</summary> ```curl curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_m7DXx6rBjmKrdRDYX9enGDJJdFWAR88Rqd9URbqrN3qHYPH4PdNkG4CS4RCRmtof' \ --data-raw '{ "currency": "USD", "amount": 301, "confirm": true, "amount_to_capture": 301, "customer_id": "payload_connector_test", "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "no_three_ds", "return_url": "https://www.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", "setup_future_usage": "off_session", "payment_method_type": "debit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "card_cvc": "737" } }, "billing": { "address": { "line1": "1467", "line2": "CA", "line3": "Harrison Street", "city": "San Fransico", "state": "CA", "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": "CA", "zip": "94122", "country": "US", "first_name": "john", "last_name": "Doe" } }, "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" }, "metadata": { "order_category": "applepay" }, "order_details": [ { "product_name": "Apple iphone 15", "quantity": 1, "amount": 300, "account_name": "transaction_processing" } ], "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" } } } } }' ``` ```json { "payment_id": "pay_xfMJVkL91e65KhqShOL9", "merchant_id": "postman_merchant_GHAction_1752169809", "status": "succeeded", "amount": 301, "net_amount": 301, "shipping_cost": null, "amount_capturable": 0, "amount_received": 301, "connector": "payload", "client_secret": "pay_xfMJVkL91e65KhqShOL9_secret_FVOhXugml3wRNFaoumg1", "created": "2025-07-11T10:15:51.598Z", "currency": "USD", "customer_id": "payload_connector_test", "customer": { "id": "payload_connector_test", "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": "man_DOv6UBVXbbPkjZXHBLUE", "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": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "STRIPE PAYMENTS UK LIMITED", "card_issuing_country": "UNITEDKINGDOM", "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "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": "CA", "first_name": "john", "last_name": "Doe" }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "CA", "line3": "Harrison Street", "zip": "94122", "state": "CA", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": [ { "brand": null, "amount": 300, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null } ], "email": "something@gmail.com", "name": "Joseph Doe", "phone": "999999999", "return_url": "https://www.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": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "payload_connector_test", "created_at": 1752228951, "expires": 1752232551, "secret": "epk_c5e3a34b2f784c68bea277551db69f8f" }, "manual_retry_allowed": false, "connector_transaction_id": "txn_3eq8MTfYv50WNQWctbmie", "frm_message": null, "metadata": { "order_category": "applepay" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "PL-R93-80L-0LH", "payment_link": null, "profile_id": "pro_U3a7wsuWqn7xeMgksp4V", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_7CKiTQWaqGxdIPppsU0c", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-11T10:30:51.598Z", "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_method_id": "pm_59J4zT8ruI102Kufe0ba", "payment_method_status": null, "updated": "2025-07-11T10:15:53.533Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` </details> <details> <summary>DB</summary> ```sh select * from mandate where mandate_id='man_DOv6UBVXbbPkjZXHBLUE'; ``` <img width="1112" height="432" alt="image" src="https://github.com/user-attachments/assets/73382db9-736a-4a92-96cd-71f04c8a4094" /> </details> <details> <summary>Logs</summary> <img width="1728" height="352" alt="image" src="https://github.com/user-attachments/assets/8bc725ba-0d67-4577-802d-3ddabefd8e92" /> </details> <details> <summary>MIT</summary> ```curl curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_m7DXx6rBjmKrdRDYX9enGDJJdFWAR88Rqd9URbqrN3qHYPH4PdNkG4CS4RCRmtof' \ --data-raw '{ "amount": 499, "currency": "USD", "confirm": true, "capture_method": "automatic", "customer_id": "payload_connector_test", "email": "guest@example.com", "off_session": true, "recurring_details": { "type": "mandate_id", "data": "man_DOv6UBVXbbPkjZXHBLUE" }, "authentication_type": "no_three_ds" }' ``` ```json { "payment_id": "pay_9PGgJH8pDDvgqehXW5em", "merchant_id": "postman_merchant_GHAction_1752169809", "status": "succeeded", "amount": 499, "net_amount": 499, "shipping_cost": null, "amount_capturable": 0, "amount_received": 499, "connector": "payload", "client_secret": "pay_9PGgJH8pDDvgqehXW5em_secret_vH55DU5GTyE2gZCUCC5s", "created": "2025-07-11T10:18:56.534Z", "currency": "USD", "customer_id": "payload_connector_test", "customer": { "id": "payload_connector_test", "name": "Joseph 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": true, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "STRIPE PAYMENTS UK LIMITED", "card_issuing_country": "UNITEDKINGDOM", "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": "48d415eb-209f-4172-9c29-19bfc632e07d", "shipping": null, "billing": null, "order_details": null, "email": "guest@example.com", "name": "Joseph 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": "payload_connector_test", "created_at": 1752229136, "expires": 1752232736, "secret": "epk_9a4366bde51147aa934745fa0e027bf1" }, "manual_retry_allowed": false, "connector_transaction_id": "txn_3eq8NC1EJ8WDm9T9DDq4w", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "PL-VJO-13E-620", "payment_link": null, "profile_id": "pro_U3a7wsuWqn7xeMgksp4V", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_7CKiTQWaqGxdIPppsU0c", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-11T10:33:56.534Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_59J4zT8ruI102Kufe0ba", "payment_method_status": "active", "updated": "2025-07-11T10:18:58.254Z", "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": "pm_3eq8MTeHLzBEtLVBD2g0b", "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` </details> <details> <summary>Logs</summary> <img width="1728" height="264" alt="image" src="https://github.com/user-attachments/assets/6f6644ee-4180-4a0e-87f2-363e8991fff0" /> </details> ### Cypress Test <details> <summary>Cypress</summary> <img width="423" height="688" alt="image" src="https://github.com/user-attachments/assets/b5b8fcd7-7c4b-4512-80f8-b71e2c4341c0" /> </details> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `just clippy && just clippy_v2` - [x] I reviewed the submitted code - [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. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/router_request_types.rs` **2. External Connector Integration** - `crates/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - `crates/connector_configs/toml/sandbox.toml` - ... and 8 more files **3. Utils** - `crates/test_utils/Cargo.toml` **4. Tests** - `config/deployments/integration_test.toml` - `cypress-tests/cypress/e2e/configs/Payment/Commons.js` - `cypress-tests/cypress/e2e/configs/Payment/Payload.js` - ... and 1 more files **5. Configuration Files** - `config/config.example.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 2 more files **6. Other** - `Cargo.lock` **Code Patterns Applied:** - Define new data structures (4 changes) - Implement new functions (5 changes) - Extend existing types with new fields (86 changes) - Add conditional logic for feature flags or filtering (5 changes) **Detailed Identifier Changes:** Commit 64e6dc86: Files to modify: **crates/hyperswitch_connectors/src/connectors/payload.rs** Remove: - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Payload Add: - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Payload **crates/hyperswitch_connectors/src/connectors/payload/requests.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/payload/responses.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/payload/transformers.rs** Remove: - struct: pub::PayloadAuthType Add: - function: private::try_from - function: private::try_from - struct: pub::PayloadAuth - struct: pub::PayloadAuthType - impl: impl TryFrom<(&ConnectorAuthType, enums::Currency)> for PayloadAuth - impl: impl TryFrom<&ConnectorAuthType> for PayloadAuthType **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code **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/tests/connectors/utils.rs** Modify existing code **crates/test_utils/src/connector_auth.rs** Add: - function: private::from - impl: impl From<CurrencyAuthKey> for ConnectorAuthType
{"pr_number": 8597, "pr_title": "feat(connector): [payload] add recurring payments", "merged_at": "2025-07-31T07:04:50Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/router_request_types.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/payload.rs", "crates/hyperswitch_connectors/src/connectors/payload/requests.rs", "crates/hyperswitch_connectors/src/connectors/payload/responses.rs", "crates/hyperswitch_connectors/src/connectors/payload/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/router/tests/connectors/utils.rs", "crates/test_utils/src/connector_auth.rs"], "utils": ["crates/test_utils/Cargo.toml"], "tests": ["config/deployments/integration_test.toml", "cypress-tests/cypress/e2e/configs/Payment/Commons.js", "cypress-tests/cypress/e2e/configs/Payment/Payload.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": ["Cargo.lock"]}, "change_types": {"structs_added": 4, "functions_added": 5, "fields_added": 86, "imports_added": 6, "conditionals_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(docker-compose): address "role root does not exist" errors arising from postgres health check ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding 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). --> Fixes #6577. ## 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` **Code Patterns Applied:** - Extend existing types with new fields (2 changes)
{"pr_number": 6582, "pr_title": "fix(docker-compose): address \"role root does not exist\" errors arising from postgres health check", "merged_at": "2024-11-19T19:04:27Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"config": ["docker-compose-development.yml", "docker-compose.yml"]}, "change_types": {"fields_added": 2}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(payouts): Mapped Default Values to Unified Error Code and Message ## 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 --> Hotfix for [PR](https://github.com/juspay/hyperswitch/pull/9262) ### 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="824" height="47" alt="Screenshot 2025-09-09 at 5 20 11 PM" src="https://github.com/user-attachments/assets/e57ba37b-517e-42d6-8164-cfe84bd4aad3" /> <img width="824" height="47" alt="Screenshot 2025-09-09 at 5 24 18 PM" src="https://github.com/user-attachments/assets/2894b574-044d-4cce-82f0-9b35a827e1f4" /> ## 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/payouts.rs` **Detailed Identifier Changes:** Commit b65d46c4: Files to modify: **crates/router/src/core/payouts.rs** Modify existing code
{"pr_number": 9318, "pr_title": "feat(payouts): Mapped Default Values to Unified Error Code and Message", "merged_at": "2025-09-09T11:58:51Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"core_business": ["crates/router/src/core/payouts.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore(env): fix Facilitapay connector config ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR fixes Facilitapay payment method env that broke WASM. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment 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). --> WASM broke. ## 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)? --> WASM shouldn't break now. closes #7957 ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - `crates/connector_configs/toml/sandbox.toml`
{"pr_number": 7958, "pr_title": "chore(env): fix Facilitapay connector config", "merged_at": "2025-05-05T13:07:47Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment"]}, "hierarchy": {"connectors": ["crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(openapi): Standardise API naming scheme for V2 ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [x] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Use kebab-case for all API endpoints in V2 ### Additional Changes - [x] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> This is mostly a documentation PR, doesn't require any additional test cases. Verified that existing cypress tests are passing ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/organization.rs` - `crates/api_models/src/payment_methods.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payments.rs` **3. External Connector Integration** - `api-reference-v2/api-reference/business-profile/merchant-connector--list.mdx` - `api-reference-v2/api-reference/connector-account/connector-account--create.mdx` - `api-reference-v2/api-reference/connector-account/connector-account--delete.mdx` - ... and 4 more files **4. Type Definitions** - `crates/router/src/types/api/admin.rs` **5. Tests** - `cypress-tests-v2/cypress/support/commands.js` **6. Other** - `api-reference-v2/api-reference/api-key/api-key--create.mdx` - `api-reference-v2/api-reference/api-key/api-key--list.mdx` - `api-reference-v2/api-reference/api-key/api-key--retrieve.mdx` - ... and 35 more files **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (8 changes) - Extend existing types with new fields (7 changes) **Detailed Identifier Changes:** Commit 96393ff3: Files to modify: **crates/api_models/src/organization.rs** Add: - struct: pub::OrganizationResponse **crates/api_models/src/payment_methods.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments.rs** Modify existing code **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/openapi/src/routes/api_keys.rs** Modify existing code **crates/openapi/src/routes/merchant_account.rs** Modify existing code **crates/openapi/src/routes/merchant_connector_account.rs** Modify existing code **crates/openapi/src/routes/organization.rs** Modify existing code **crates/openapi/src/routes/payment_method.rs** Add: - function: pub::create_payment_method_intent_api - function: pub::confirm_payment_method_intent_api - function: pub::create_payment_method_api - function: pub::payment_method_retrieve_api - function: pub::payment_method_update_api - function: pub::payment_method_delete_api - function: pub::list_customer_payment_method_for_payment - function: pub::list_customer_payment_method_api **crates/openapi/src/routes/profile.rs** Modify existing code **crates/openapi/src/routes/routing.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/payment_methods.rs** Modify existing code **crates/router/src/types/api/admin.rs** Modify existing code
{"pr_number": 6510, "pr_title": "fix(openapi): Standardise API naming scheme for V2", "merged_at": "2024-11-29T11:04:43Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"api_models": ["crates/api_models/src/organization.rs", "crates/api_models/src/payment_methods.rs"], "domain": ["crates/hyperswitch_domain_models/src/payments.rs"], "connectors": ["api-reference-v2/api-reference/business-profile/merchant-connector--list.mdx", "api-reference-v2/api-reference/connector-account/connector-account--create.mdx", "api-reference-v2/api-reference/connector-account/connector-account--delete.mdx", "api-reference-v2/api-reference/connector-account/connector-account--retrieve.mdx", "api-reference-v2/api-reference/connector-account/connector-account--update.mdx", "api-reference-v2/api-reference/profile/merchant-connector--list.mdx", "crates/openapi/src/routes/merchant_connector_account.rs"], "types": ["crates/router/src/types/api/admin.rs"], "tests": ["cypress-tests-v2/cypress/support/commands.js"], "other": ["api-reference-v2/api-reference/api-key/api-key--create.mdx", "api-reference-v2/api-reference/api-key/api-key--list.mdx", "api-reference-v2/api-reference/api-key/api-key--retrieve.mdx", "api-reference-v2/api-reference/api-key/api-key--revoke.mdx", "api-reference-v2/api-reference/api-key/api-key--update.mdx", "api-reference-v2/api-reference/merchant-account/business-profile--list.mdx", "api-reference-v2/api-reference/merchant-account/merchant-account--create.mdx", "api-reference-v2/api-reference/merchant-account/merchant-account--retrieve.mdx", "api-reference-v2/api-reference/merchant-account/merchant-account--update.mdx", "api-reference-v2/api-reference/merchant-account/profile--list.mdx", "api-reference-v2/api-reference/organization/organization--merchant-account--list.mdx", "api-reference-v2/api-reference/payment-methods/list-customer-saved-payment-methods-for-a-payment.mdx", "api-reference-v2/api-reference/payment-methods/list-payment-methods-for-a-customer.mdx", "api-reference-v2/api-reference/payment-methods/payment-method--confirm-intent.mdx", "api-reference-v2/api-reference/payment-methods/payment-method--create-intent.mdx", "api-reference-v2/api-reference/payment-methods/payment-method--create.mdx", "api-reference-v2/api-reference/payment-methods/payment-method--delete.mdx", "api-reference-v2/api-reference/payment-methods/payment-method--retrieve.mdx", "api-reference-v2/api-reference/payment-methods/payment-method--update.mdx", "api-reference-v2/api-reference/profile/profile--activate-routing-algorithm.mdx", "api-reference-v2/api-reference/profile/profile--deactivate-routing-algorithm.mdx", "api-reference-v2/api-reference/profile/profile--retrieve-active-routing-algorithm.mdx", "api-reference-v2/api-reference/profile/profile--retrieve-default-fallback-routing-algorithm.mdx", "api-reference-v2/api-reference/profile/profile--update-default-fallback-routing-algorithm.mdx", "api-reference-v2/api-reference/routing/routing--create.mdx", "api-reference-v2/api-reference/routing/routing--retrieve.mdx", "api-reference-v2/mint.json", "api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/openapi/src/openapi_v2.rs", "crates/openapi/src/routes/api_keys.rs", "crates/openapi/src/routes/merchant_account.rs", "crates/openapi/src/routes/organization.rs", "crates/openapi/src/routes/payment_method.rs", "crates/openapi/src/routes/profile.rs", "crates/openapi/src/routes/routing.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/payment_methods.rs"]}, "change_types": {"structs_added": 1, "functions_added": 8, "fields_added": 7}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(user_roles): migrations for backfilling user_roles entity_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 --> This PR ensures that the entity_id is backfilled in the user_roles table, preventing issues for V1 users when switching organizations and logging in. ### Additional Changes - [ ] This PR modifies the API contract - [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)? --> Through dashboard - login to v1 user - invite the same user to another org - Switch organization ## 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. Other** - `migrations/2024-12-02-110129_update-user-role-entity-type/down.sql` - `migrations/2024-12-02-110129_update-user-role-entity-type/up.sql` - `migrations/2024-12-13-080558_entity-id-backfill-for-user-roles/down.sql` - ... and 1 more files **Code Patterns Applied:** - Modify database queries (5 changes)
{"pr_number": 6837, "pr_title": "fix(user_roles): migrations for backfilling user_roles entity_id", "merged_at": "2024-12-16T11:42:17Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"other": ["migrations/2024-12-02-110129_update-user-role-entity-type/down.sql", "migrations/2024-12-02-110129_update-user-role-entity-type/up.sql", "migrations/2024-12-13-080558_entity-id-backfill-for-user-roles/down.sql", "migrations/2024-12-13-080558_entity-id-backfill-for-user-roles/up.sql"]}, "change_types": {"database_queries": 5}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}