prompt
stringlengths
83
247k
response
stringlengths
121
36.1k
metadata
stringlengths
314
42.3k
feat(payouts): add payout currency in wasm crate ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description This PR adds two changes 1. Updates `Sepa` to `SepaBankTransfer` for dynamic required fields for payouts 2. Adds PayoutCurrency as a rule to be set while configuring payout routing on dashboard ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies 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 Two things - 1. Allows for configuring currency as a rule for payout routing 2. Sends back required fields in the response for `sepa_bank_transfer` ## How did you test it? <details> <summary>Create a payout link</summary> cURL curl --location --request POST 'http://localhost:8080/payouts/create' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_ps5hUWh9tfDFtu9IO0MAaK3tbLTAWscvZlCanmGmTELIWPYCJPWVHkUXWeEGDWig' \ --data '{"merchant_order_reference_id":"ref123","amount":213,"currency":"EUR","customer_id":"cus_uEIQdrEFaB5iVfAUSTrU","description":"Its my first payout request","entity_type":"Individual","auto_fulfill":true,"session_expiry":1000000,"profile_id":"pro_0U7D6dU6lAplreXCcFs6","payout_link":true,"return_url":"https://www.google.com","payout_link_config":{"form_layout":"tabs","theme":"#0066ff","logo":"https://hyperswitch.io/favicon.ico","merchant_name":"HyperSwitch Inc.","test_mode":true},"billing":{"address":{"line1":"1467","line2":"Harrison Street","line3":"Harrison Street","city":"London","zip":"94122","country":"NL","first_name":"John","last_name":"Nether"}}}' Response {"payout_id":"payout_Eyodo5H37xucxcfnGhJR","merchant_id":"merchant_1759230162","merchant_order_reference_id":"ref123","amount":213,"currency":"EUR","connector":null,"payout_type":null,"payout_method_data":null,"billing":{"address":{"city":"London","country":"NL","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":null,"first_name":"John","last_name":"Nether","origin_zip":null},"phone":null,"email":null},"auto_fulfill":true,"customer_id":"cus_uEIQdrEFaB5iVfAUSTrU","customer":{"id":"cus_uEIQdrEFaB5iVfAUSTrU","name":"Albert Klaassen","email":null,"phone":"6168205362","phone_country_code":"+1"},"client_secret":"payout_payout_Eyodo5H37xucxcfnGhJR_secret_ht1Pkut3UyldsRln2A8w","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_0U7D6dU6lAplreXCcFs6","created":"2025-09-30T11:03:02.998Z","connector_transaction_id":null,"priority":null,"payout_link":{"payout_link_id":"payout_link_oI2b4wNeAez056omVVCT","link":"http://localhost:8080/payout_link/merchant_1759230162/payout_Eyodo5H37xucxcfnGhJR?locale=en"},"email":null,"name":"Albert Klaassen","phone":"6168205362","phone_country_code":"+1","unified_code":null,"unified_message":null,"payout_method_id":null} </details> <details> <summary>Required fields embedded in payout links</summary> Expectation - `sepa_bank_transfer` must not be null "enabled_payment_methods_with_required_fields": [ { "payment_method": "card", "payment_method_types_info": [ { "payment_method_type": "credit", "required_fields": { "payout_method_data.card.card_holder_name": { "required_field": "payout_method_data.card.card_holder_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": null }, "payout_method_data.card.card_number": { "required_field": "payout_method_data.card.card_number", "display_name": "card_number", "field_type": "user_card_number", "value": null }, "billing.address.city": { "required_field": "billing.address.city", "display_name": "billing_address_city", "field_type": "text", "value": "London" }, "billing.address.line1": { "required_field": "billing.address.line1", "display_name": "billing_address_line1", "field_type": "text", "value": "1467" }, "payout_method_data.card.expiry_year": { "required_field": "payout_method_data.card.expiry_year", "display_name": "exp_year", "field_type": "user_card_expiry_year", "value": null }, "billing.address.country": { "required_field": "billing.address.country", "display_name": "billing_address_country", "field_type": { "user_address_country": { "options": [ "ES", "SK", "AT", "NL", "DE", "BE", "FR", "FI", "PT", "IE", "EE", "LT", "LV", "IT", "CZ", "DE", "HU", "NO", "PL", "SE", "GB", "CH" ] } }, "value": "NL" }, "billing.address.line2": { "required_field": "billing.address.line2", "display_name": "billing_address_line2", "field_type": "text", "value": "Harrison Street" }, "payout_method_data.card.expiry_month": { "required_field": "payout_method_data.card.expiry_month", "display_name": "exp_month", "field_type": "user_card_expiry_month", "value": null } } }, { "payment_method_type": "debit", "required_fields": { "payout_method_data.card.card_number": { "required_field": "payout_method_data.card.card_number", "display_name": "card_number", "field_type": "user_card_number", "value": null }, "billing.address.line1": { "required_field": "billing.address.line1", "display_name": "billing_address_line1", "field_type": "text", "value": "1467" }, "payout_method_data.card.expiry_month": { "required_field": "payout_method_data.card.expiry_month", "display_name": "exp_month", "field_type": "user_card_expiry_month", "value": null }, "payout_method_data.card.expiry_year": { "required_field": "payout_method_data.card.expiry_year", "display_name": "exp_year", "field_type": "user_card_expiry_year", "value": null }, "payout_method_data.card.card_holder_name": { "required_field": "payout_method_data.card.card_holder_name", "display_name": "card_holder_name", "field_type": "user_full_name", "value": null }, "billing.address.country": { "required_field": "billing.address.country", "display_name": "billing_address_country", "field_type": { "user_address_country": { "options": [ "ES", "SK", "AT", "NL", "DE", "BE", "FR", "FI", "PT", "IE", "EE", "LT", "LV", "IT", "CZ", "DE", "HU", "NO", "PL", "SE", "GB", "CH" ] } }, "value": "NL" }, "billing.address.line2": { "required_field": "billing.address.line2", "display_name": "billing_address_line2", "field_type": "text", "value": "Harrison Street" }, "billing.address.city": { "required_field": "billing.address.city", "display_name": "billing_address_city", "field_type": "text", "value": "London" } } } ] }, { "payment_method": "bank_transfer", "payment_method_types_info": [ { "payment_method_type": "sepa_bank_transfer", "required_fields": { "billing.address.line2": { "required_field": "billing.address.line2", "display_name": "billing_address_line2", "field_type": "text", "value": "Harrison Street" }, "billing.address.city": { "required_field": "billing.address.city", "display_name": "billing_address_city", "field_type": "text", "value": "London" }, "billing.address.line1": { "required_field": "billing.address.line1", "display_name": "billing_address_line1", "field_type": "text", "value": "1467" }, "payout_method_data.bank.iban": { "required_field": "payout_method_data.bank.iban", "display_name": "iban", "field_type": "text", "value": null }, "billing.address.first_name": { "required_field": "billing.address.first_name", "display_name": "billing_address_first_name", "field_type": "text", "value": "John" }, "billing.address.country": { "required_field": "billing.address.country", "display_name": "billing_address_country", "field_type": { "user_address_country": { "options": [ "ES", "SK", "AT", "NL", "DE", "BE", "FR", "FI", "PT", "IE", "EE", "LT", "LV", "IT", "CZ", "DE", "HU", "NO", "PL", "SE", "GB", "CH" ] } }, "value": "NL" }, "payout_method_data.bank.bic": { "required_field": "payout_method_data.bank.bic", "display_name": "bic", "field_type": "text", "value": null } } }, { "payment_method_type": "sepa", "required_fields": 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 **search_filter** feature, you'll need to modify these architectural layers: **1. Type Definitions** - `crates/euclid/src/types.rs` **2. Configuration Files** - `crates/router/src/configs/defaults/payout_required_fields.rs` **3. Other** - `crates/euclid/src/frontend/dir.rs` - `crates/euclid_wasm/src/lib.rs` **Code Patterns Applied:** - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 51c8d16d: Files to modify: **crates/euclid/src/frontend/dir.rs** Modify existing code **crates/euclid/src/types.rs** Modify existing code **crates/euclid_wasm/src/lib.rs** Modify existing code **crates/router/src/configs/defaults/payout_required_fields.rs** Modify existing code
{"pr_number": 9626, "pr_title": "feat(payouts): add payout currency in wasm crate", "merged_at": "2025-09-30T14:41:56Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"types": ["crates/euclid/src/types.rs"], "config": ["crates/router/src/configs/defaults/payout_required_fields.rs"], "other": ["crates/euclid/src/frontend/dir.rs", "crates/euclid_wasm/src/lib.rs"]}, "change_types": {"conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): implement `NameType` for name validation ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> for card holder name in cards, validation is added before creation of request to flag invalid data in case it is present. Reference is taken from Visa Documetation <img width="889" alt="image" src="https://github.com/user-attachments/assets/02859794-8313-46fb-a2b2-33a009a03600"> ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Tested through Postman: - Create a MCA (Cybersource): Case 1: Create a Payment with valid name: ``` { "amount": 499, "currency": "EUR", "confirm": true, "capture_method": "automatic", "customer_id": "test_rec7", "email": "[email protected]", "customer_acceptance": { "acceptance_type": "online" }, "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "Sakil Mostak", "card_cvc": "737", "card_network": "Visa" } }, "billing": { "address": { "city": "test", "country": "US", "line1": "here is some \n there is some \n none is some? \n ", "line2": "there", "line3": "anywhere", "zip": "560095", "state": "Washington", "first_name": "Sakil", "last_name": "Mostak" }, "phone": { "number": "1234567890", "country_code": "+1" }, "email": "[email protected]" }, "authentication_type": "no_three_ds" } ``` - The payment should succeed, below is an example: ``` { "payment_id": "pay_7YANCrkBMUVJngRBg36l", "merchant_id": "merchant_1737373987", "status": "succeeded", "amount": 499, "net_amount": 499, "shipping_cost": null, "amount_capturable": 0, "amount_received": 499, "connector": "cybersource", "client_secret": "pay_7YANCrkBMUVJngRBg36l_secret_jp4t6pcoJTnMFrQsGd1R", "created": "2025-01-20T17:52:24.651Z", "currency": "EUR", "customer_id": "test_rec7", "customer": { "id": "test_rec7", "name": null, "email": "[email protected]", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "Sakil Mostak", "payment_checks": { "avs_response": { "code": "X", "codeRaw": "I1" }, "card_verification": null }, "authentication_data": null }, "billing": null }, "payment_token": "token_7usZJrOsD3Qoy6kLGDnQ", "shipping": null, "billing": { "address": { "city": "test", "country": "US", "line1": "here is some \n there is some \n none is some? \n ", "line2": "there", "line3": "anywhere", "zip": "560095", "state": "Washington", "first_name": "Sakil", "last_name": "Mostak" }, "phone": { "number": "1234567890", "country_code": "+1" }, "email": "[email protected]" }, "order_details": null, "email": "[email protected]", "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "test_rec7", "created_at": 1737395544, "expires": 1737399144, "secret": "epk_b4c0b9ee60c844dd88e6cbc9daa9e7cb" }, "manual_retry_allowed": false, "connector_transaction_id": "7373955459786405604807", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_7YANCrkBMUVJngRBg36l_1", "payment_link": null, "profile_id": "pro_VcDn0jWTcCmofCpz2CAH", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_KXO79qkYuOXsSZCYByGz", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-01-20T18:07:24.651Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-01-20T17:52:26.511Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` Case 2: Create a Payment with invalid name: ``` { "amount": 499, "currency": "EUR", "confirm": true, "capture_method": "automatic", "customer_id": "test_rec7", "email": "[email protected]", "customer_acceptance": { "acceptance_type": "online" }, "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "S@k*l M0st@k", "card_cvc": "737", "card_network": "Visa" } }, "billing": { "address": { "city": "test", "country": "US", "line1": "here is some \n there is some \n none is some? \n ", "line2": "there", "line3": "anywhere", "zip": "560095", "state": "Washington", "first_name": "Sakil", "last_name": "Mostak" }, "phone": { "number": "1234567890", "country_code": "+1" }, "email": "[email protected]" }, "authentication_type": "no_three_ds" } ``` Response should contain 400 error with below response: ``` { "error": { "error_type": "invalid_request", "message": "Json deserialize error: invalid character found in card holder name: @ at line 23 column 5", "code": "IR_06" } } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [x] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/customers.rs` - `crates/api_models/src/mandates.rs` - `crates/api_models/src/payment_methods.rs` - ... and 3 more files **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/address.rs` - `crates/hyperswitch_domain_models/src/bulk_tokenization.rs` - `crates/hyperswitch_domain_models/src/payment_method_data.rs` - ... and 2 more files **3. Core Business Logic** - `crates/router/src/core/customers.rs` - `crates/router/src/core/locker_migration.rs` - `crates/router/src/core/payment_methods.rs` - ... and 11 more files **4. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs` - ... and 34 more files **5. Type Definitions** - `crates/common_utils/src/types.rs` - `crates/router/src/compatibility/stripe/customers/types.rs` - `crates/router/src/compatibility/stripe/payment_intents/types.rs` - ... and 3 more files **6. Utils** - `crates/router/src/utils.rs` **7. Tests** - `crates/cards/tests/basic.rs` - `crates/router/tests/payments.rs` - `crates/router/tests/payments2.rs` **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (29 changes) - Extend existing types with new fields (245 changes) - Add conditional logic for feature flags or filtering (3 changes) **Detailed Identifier Changes:** Commit 0e55510b: Files to modify: **crates/api_models/src/customers.rs** Modify existing code **crates/api_models/src/mandates.rs** Modify existing code **crates/api_models/src/payment_methods.rs** Modify existing code **crates/api_models/src/payments.rs** Modify existing code **crates/api_models/src/payments/additional_info.rs** Modify existing code **crates/api_models/src/payouts.rs** Modify existing code **crates/cards/tests/basic.rs** Modify existing code **crates/common_utils/src/types.rs** Remove: - function: private::fmt - function: private::default - function: private::deref - function: private::try_from - function: private::try_from - function: pub::get_unchecked - function: pub::get_unchecked_from_secret - function: pub::trim - function: pub::is_empty - function: pub::split_whitespace - function: pub::split_once - function: pub::rsplit_once - function: private::from - function: private::from - function: private::from_str - function: private::from - function: private::from - function: private::validate_character_in_card_holder_name - function: private::deserialize - function: private::is_empty_after_trim - function: private::test_card_holder_name - struct: pub::NameType - impl: impl masking::SerializableSecret for LengthString<MAX_LENGTH, MIN_LENGTH> - impl: impl Display for LengthString<MAX_LENGTH, MIN_LENGTH> - impl: impl Default for LengthString<MAX_LENGTH, MIN_LENGTH> - impl: impl Deref for LengthString<MAX_LENGTH, MIN_LENGTH> - impl: impl TryFrom<String> for NameType - impl: impl TryFrom<masking::Secret<String>> for NameType - impl: impl NameType - impl: impl From<NameType> for String - impl: impl From<&NameType> for String - impl: impl FromStr for NameType - impl: impl From<NameType> for masking::Secret<String> - impl: impl From<&NameType> for masking::Secret<String> - impl: impl Deserialize<'de> for NameType - impl: impl ConfigExt for NameType - mod: private::name_type_test **crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/bluesnap/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/dlocal/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/trustpay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldline/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Modify existing code **crates/hyperswitch_domain_models/src/address.rs** Modify existing code **crates/hyperswitch_domain_models/src/bulk_tokenization.rs** Modify existing code **crates/hyperswitch_domain_models/src/payment_method_data.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_data.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_request_types/fraud_check.rs** Modify existing code **crates/router/src/compatibility/stripe/customers/types.rs** Modify existing code **crates/router/src/compatibility/stripe/payment_intents/types.rs** Modify existing code **crates/router/src/compatibility/stripe/setup_intents/types.rs** Modify existing code **crates/router/src/connector/netcetera/netcetera_types.rs** Modify existing code **crates/router/src/connector/payone/transformers.rs** Modify existing code **crates/router/src/connector/riskified/transformers/api.rs** Modify existing code **crates/router/src/connector/signifyd/transformers/api.rs** Modify existing code **crates/router/src/connector/stripe/transformers.rs** Modify existing code **crates/router/src/connector/stripe/transformers/connect.rs** Modify existing code **crates/router/src/connector/utils.rs** Modify existing code **crates/router/src/core/customers.rs** Modify existing code **crates/router/src/core/locker_migration.rs** Modify existing code **crates/router/src/core/payment_methods.rs** Modify existing code **crates/router/src/core/payment_methods/cards.rs** Modify existing code **crates/router/src/core/payment_methods/network_tokenization.rs** Modify existing code **crates/router/src/core/payment_methods/tokenize.rs** Modify existing code **crates/router/src/core/payment_methods/tokenize/card_executor.rs** Modify existing code **crates/router/src/core/payment_methods/tokenize/payment_method_executor.rs** Modify existing code **crates/router/src/core/payment_methods/transformers.rs** Modify existing code **crates/router/src/core/payment_methods/vault.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payouts/helpers.rs** Modify existing code **crates/router/src/core/unified_authentication_service.rs** Modify existing code **crates/router/src/core/utils.rs** Modify existing code **crates/router/src/types/api/payments.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code **crates/router/src/utils.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/bitpay.rs** Modify existing code **crates/router/tests/connectors/bluesnap.rs** Modify existing code **crates/router/tests/connectors/coinbase.rs** Modify existing code **crates/router/tests/connectors/cryptopay.rs** Modify existing code **crates/router/tests/connectors/cybersource.rs** Modify existing code **crates/router/tests/connectors/fiserv.rs** Modify existing code **crates/router/tests/connectors/forte.rs** Modify existing code **crates/router/tests/connectors/iatapay.rs** Modify existing code **crates/router/tests/connectors/multisafepay.rs** Modify existing code **crates/router/tests/connectors/opennode.rs** Modify existing code **crates/router/tests/connectors/payme.rs** Modify existing code **crates/router/tests/connectors/rapyd.rs** Modify existing code **crates/router/tests/connectors/trustpay.rs** Modify existing code **crates/router/tests/connectors/utils.rs** Modify existing code **crates/router/tests/connectors/worldline.rs** Modify existing code **crates/router/tests/payments.rs** Modify existing code **crates/router/tests/payments2.rs** Modify existing code Commit 1100dcc6: Files to modify: **crates/api_models/src/customers.rs** Modify existing code **crates/api_models/src/mandates.rs** Modify existing code **crates/api_models/src/payment_methods.rs** Modify existing code **crates/api_models/src/payments.rs** Modify existing code **crates/api_models/src/payments/additional_info.rs** Modify existing code **crates/api_models/src/payouts.rs** Modify existing code **crates/cards/tests/basic.rs** Modify existing code **crates/common_utils/src/types.rs** Add: - function: private::fmt - function: private::default - function: private::deref - function: private::try_from - function: private::try_from - function: pub::get_unchecked - function: pub::get_unchecked_from_secret - function: pub::trim - function: pub::is_empty - function: pub::split_whitespace - function: pub::split_once - function: pub::rsplit_once - function: private::from - function: private::from - function: private::from_str - function: private::from - function: private::from - function: private::validate_character_in_card_holder_name - function: private::deserialize - function: private::is_empty_after_trim - function: private::test_card_holder_name - struct: pub::NameType - impl: impl masking::SerializableSecret for LengthString<MAX_LENGTH, MIN_LENGTH> - impl: impl Display for LengthString<MAX_LENGTH, MIN_LENGTH> - impl: impl Default for LengthString<MAX_LENGTH, MIN_LENGTH> - impl: impl Deref for LengthString<MAX_LENGTH, MIN_LENGTH> - impl: impl TryFrom<String> for NameType - impl: impl TryFrom<masking::Secret<String>> for NameType - impl: impl NameType - impl: impl From<NameType> for String - impl: impl From<&NameType> for String - impl: impl FromStr for NameType - impl: impl From<NameType> for masking::Secret<String> - impl: impl From<&NameType> for masking::Secret<String> - impl: impl Deserialize<'de> for NameType - impl: impl ConfigExt for NameType - mod: private::name_type_test **crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/bluesnap/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/dlocal/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/trustpay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldline/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Modify existing code **crates/hyperswitch_domain_models/src/address.rs** Modify existing code **crates/hyperswitch_domain_models/src/bulk_tokenization.rs** Modify existing code **crates/hyperswitch_domain_models/src/payment_method_data.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_data.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_request_types/fraud_check.rs** Modify existing code **crates/router/src/compatibility/stripe/customers/types.rs** Modify existing code **crates/router/src/compatibility/stripe/payment_intents/types.rs** Modify existing code **crates/router/src/compatibility/stripe/setup_intents/types.rs** Modify existing code **crates/router/src/connector/netcetera/netcetera_types.rs** Modify existing code **crates/router/src/connector/payone/transformers.rs** Modify existing code **crates/router/src/connector/riskified/transformers/api.rs** Modify existing code **crates/router/src/connector/signifyd/transformers/api.rs** Modify existing code **crates/router/src/connector/stripe/transformers.rs** Modify existing code **crates/router/src/connector/stripe/transformers/connect.rs** Modify existing code **crates/router/src/connector/utils.rs** Modify existing code **crates/router/src/core/customers.rs** Modify existing code **crates/router/src/core/locker_migration.rs** Modify existing code **crates/router/src/core/payment_methods.rs** Modify existing code **crates/router/src/core/payment_methods/cards.rs** Modify existing code **crates/router/src/core/payment_methods/network_tokenization.rs** Modify existing code **crates/router/src/core/payment_methods/tokenize.rs** Modify existing code **crates/router/src/core/payment_methods/tokenize/card_executor.rs** Modify existing code **crates/router/src/core/payment_methods/tokenize/payment_method_executor.rs** Modify existing code **crates/router/src/core/payment_methods/transformers.rs** Modify existing code **crates/router/src/core/payment_methods/vault.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payouts/helpers.rs** Modify existing code **crates/router/src/core/unified_authentication_service.rs** Modify existing code **crates/router/src/core/utils.rs** Modify existing code **crates/router/src/types/api/payments.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code **crates/router/src/utils.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/bitpay.rs** Modify existing code **crates/router/tests/connectors/bluesnap.rs** Modify existing code **crates/router/tests/connectors/coinbase.rs** Modify existing code **crates/router/tests/connectors/cryptopay.rs** Modify existing code **crates/router/tests/connectors/cybersource.rs** Modify existing code **crates/router/tests/connectors/fiserv.rs** Modify existing code **crates/router/tests/connectors/forte.rs** Modify existing code **crates/router/tests/connectors/iatapay.rs** Modify existing code **crates/router/tests/connectors/multisafepay.rs** Modify existing code **crates/router/tests/connectors/opennode.rs** Modify existing code **crates/router/tests/connectors/payme.rs** Modify existing code **crates/router/tests/connectors/rapyd.rs** Modify existing code **crates/router/tests/connectors/trustpay.rs** Modify existing code **crates/router/tests/connectors/utils.rs** Modify existing code **crates/router/tests/connectors/worldline.rs** Modify existing code **crates/router/tests/payments.rs** Modify existing code **crates/router/tests/payments2.rs** Modify existing code Commit 016d158d: Files to modify: **crates/api_models/src/customers.rs** Modify existing code **crates/api_models/src/mandates.rs** Modify existing code **crates/api_models/src/payment_methods.rs** Modify existing code **crates/api_models/src/payments.rs** Modify existing code **crates/api_models/src/payments/additional_info.rs** Modify existing code **crates/api_models/src/payouts.rs** Modify existing code **crates/cards/tests/basic.rs** Modify existing code **crates/common_utils/src/types.rs** Add: - function: private::fmt - function: private::default - function: private::deref - function: private::try_from - function: private::try_from - function: pub::get_unchecked - function: pub::get_unchecked_from_secret - function: pub::trim - function: pub::is_empty - function: pub::split_whitespace - function: pub::split_once - function: pub::rsplit_once - function: private::from - function: private::from - function: private::from_str - function: private::from - function: private::from - function: private::validate_character_in_card_holder_name - function: private::deserialize - function: private::is_empty_after_trim - function: private::test_card_holder_name - struct: pub::NameType - impl: impl masking::SerializableSecret for LengthString<MAX_LENGTH, MIN_LENGTH> - impl: impl Display for LengthString<MAX_LENGTH, MIN_LENGTH> - impl: impl Default for LengthString<MAX_LENGTH, MIN_LENGTH> - impl: impl Deref for LengthString<MAX_LENGTH, MIN_LENGTH> - impl: impl TryFrom<String> for NameType - impl: impl TryFrom<masking::Secret<String>> for NameType - impl: impl NameType - impl: impl From<NameType> for String - impl: impl From<&NameType> for String - impl: impl FromStr for NameType - impl: impl From<NameType> for masking::Secret<String> - impl: impl From<&NameType> for masking::Secret<String> - impl: impl Deserialize<'de> for NameType - impl: impl ConfigExt for NameType - mod: private::name_type_test **crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/bluesnap/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/dlocal/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/trustpay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/worldline/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Modify existing code **crates/hyperswitch_domain_models/src/address.rs** Modify existing code **crates/hyperswitch_domain_models/src/bulk_tokenization.rs** Modify existing code **crates/hyperswitch_domain_models/src/payment_method_data.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_data.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_request_types/fraud_check.rs** Modify existing code **crates/router/src/compatibility/stripe/customers/types.rs** Modify existing code **crates/router/src/compatibility/stripe/payment_intents/types.rs** Modify existing code **crates/router/src/compatibility/stripe/setup_intents/types.rs** Modify existing code **crates/router/src/connector/netcetera/netcetera_types.rs** Modify existing code **crates/router/src/connector/payone/transformers.rs** Modify existing code **crates/router/src/connector/riskified/transformers/api.rs** Modify existing code **crates/router/src/connector/signifyd/transformers/api.rs** Modify existing code **crates/router/src/connector/stripe/transformers.rs** Modify existing code **crates/router/src/connector/stripe/transformers/connect.rs** Modify existing code **crates/router/src/connector/utils.rs** Modify existing code **crates/router/src/core/customers.rs** Modify existing code **crates/router/src/core/locker_migration.rs** Modify existing code **crates/router/src/core/payment_methods.rs** Modify existing code **crates/router/src/core/payment_methods/cards.rs** Modify existing code **crates/router/src/core/payment_methods/network_tokenization.rs** Modify existing code **crates/router/src/core/payment_methods/tokenize.rs** Modify existing code **crates/router/src/core/payment_methods/tokenize/card_executor.rs** Modify existing code **crates/router/src/core/payment_methods/tokenize/payment_method_executor.rs** Modify existing code **crates/router/src/core/payment_methods/transformers.rs** Modify existing code **crates/router/src/core/payment_methods/vault.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payouts/helpers.rs** Modify existing code **crates/router/src/core/unified_authentication_service.rs** Modify existing code **crates/router/src/core/utils.rs** Modify existing code **crates/router/src/types/api/payments.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code **crates/router/src/utils.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/bitpay.rs** Modify existing code **crates/router/tests/connectors/bluesnap.rs** Modify existing code **crates/router/tests/connectors/coinbase.rs** Modify existing code **crates/router/tests/connectors/cryptopay.rs** Modify existing code **crates/router/tests/connectors/cybersource.rs** Modify existing code **crates/router/tests/connectors/fiserv.rs** Modify existing code **crates/router/tests/connectors/forte.rs** Modify existing code **crates/router/tests/connectors/iatapay.rs** Modify existing code **crates/router/tests/connectors/multisafepay.rs** Modify existing code **crates/router/tests/connectors/opennode.rs** Modify existing code **crates/router/tests/connectors/payme.rs** Modify existing code **crates/router/tests/connectors/rapyd.rs** Modify existing code **crates/router/tests/connectors/trustpay.rs** Modify existing code **crates/router/tests/connectors/utils.rs** Modify existing code **crates/router/tests/connectors/worldline.rs** Modify existing code **crates/router/tests/payments.rs** Modify existing code **crates/router/tests/payments2.rs** Modify existing code
{"pr_number": 6734, "pr_title": "feat(core): implement `NameType` for name validation", "merged_at": "2025-04-01T10:03:42Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/customers.rs", "crates/api_models/src/mandates.rs", "crates/api_models/src/payment_methods.rs", "crates/api_models/src/payments.rs", "crates/api_models/src/payments/additional_info.rs", "crates/api_models/src/payouts.rs"], "domain": ["crates/hyperswitch_domain_models/src/address.rs", "crates/hyperswitch_domain_models/src/bulk_tokenization.rs", "crates/hyperswitch_domain_models/src/payment_method_data.rs", "crates/hyperswitch_domain_models/src/router_data.rs", "crates/hyperswitch_domain_models/src/router_request_types/fraud_check.rs"], "core_business": ["crates/router/src/core/customers.rs", "crates/router/src/core/locker_migration.rs", "crates/router/src/core/payment_methods.rs", "crates/router/src/core/payment_methods/cards.rs", "crates/router/src/core/payment_methods/network_tokenization.rs", "crates/router/src/core/payment_methods/tokenize.rs", "crates/router/src/core/payment_methods/tokenize/card_executor.rs", "crates/router/src/core/payment_methods/tokenize/payment_method_executor.rs", "crates/router/src/core/payment_methods/transformers.rs", "crates/router/src/core/payment_methods/vault.rs", "crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payouts/helpers.rs", "crates/router/src/core/unified_authentication_service.rs", "crates/router/src/core/utils.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs", "crates/hyperswitch_connectors/src/connectors/authorizedotnet/transformers.rs", "crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs", "crates/hyperswitch_connectors/src/connectors/bluesnap/transformers.rs", "crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs", "crates/hyperswitch_connectors/src/connectors/dlocal/transformers.rs", "crates/hyperswitch_connectors/src/connectors/nuvei/transformers.rs", "crates/hyperswitch_connectors/src/connectors/paypal/transformers.rs", "crates/hyperswitch_connectors/src/connectors/trustpay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs", "crates/hyperswitch_connectors/src/connectors/worldline/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/router/src/connector/netcetera/netcetera_types.rs", "crates/router/src/connector/payone/transformers.rs", "crates/router/src/connector/riskified/transformers/api.rs", "crates/router/src/connector/signifyd/transformers/api.rs", "crates/router/src/connector/stripe/transformers.rs", "crates/router/src/connector/stripe/transformers/connect.rs", "crates/router/src/connector/utils.rs", "crates/router/tests/connectors/aci.rs", "crates/router/tests/connectors/adyen.rs", "crates/router/tests/connectors/airwallex.rs", "crates/router/tests/connectors/bitpay.rs", "crates/router/tests/connectors/bluesnap.rs", "crates/router/tests/connectors/coinbase.rs", "crates/router/tests/connectors/cryptopay.rs", "crates/router/tests/connectors/cybersource.rs", "crates/router/tests/connectors/fiserv.rs", "crates/router/tests/connectors/forte.rs", "crates/router/tests/connectors/iatapay.rs", "crates/router/tests/connectors/multisafepay.rs", "crates/router/tests/connectors/opennode.rs", "crates/router/tests/connectors/payme.rs", "crates/router/tests/connectors/rapyd.rs", "crates/router/tests/connectors/trustpay.rs", "crates/router/tests/connectors/utils.rs", "crates/router/tests/connectors/worldline.rs"], "types": ["crates/common_utils/src/types.rs", "crates/router/src/compatibility/stripe/customers/types.rs", "crates/router/src/compatibility/stripe/payment_intents/types.rs", "crates/router/src/compatibility/stripe/setup_intents/types.rs", "crates/router/src/types/api/payments.rs", "crates/router/src/types/transformers.rs"], "utils": ["crates/router/src/utils.rs"], "tests": ["crates/cards/tests/basic.rs", "crates/router/tests/payments.rs", "crates/router/tests/payments2.rs"]}, "change_types": {"structs_added": 1, "functions_added": 29, "fields_added": 245, "imports_added": 7, "conditionals_added": 3}, "has_identifier_data": true, "commits_matched": 3, "match_method": "pr_number"}
chore(fix): [XENDIT] Make CVV Optional and fix Capture 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 --> 1. CVV should be made an optional field for the connector Xendit. 2. Fix Capture Flow for Xendit ### 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 <!-- 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/8920 ## How did you test 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 CURL's: Payments Create: Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_43StkeAliDdRysVQ1Bk58TfaGfqvDrRcQDIWNdnr9rx3WGPr7qnKR9ZQzdmf7P07' \ --data-raw '{ "amount": 6540000, "currency": "IDR", "confirm": true, "capture_method": "manual", "email": "[email protected]", "amount_to_capture": 6540000, "billing": { "phone": { "number": "8056594427", "country_code": "+91" } }, "payment_method": "card", "payment_method_data": { "card": { "card_exp_month": "11", "card_exp_year": "29", "card_holder_name": "John Doe", "card_number": "4000000000001091", "card_cvc": "100" } }, "payment_method_type": "credit", "retry_action": "manual_retry" }' ``` Response: ``` { "payment_id": "pay_iapkM8sQja6Xvfdn9Tje", "merchant_id": "merchant_1754983663", "status": "processing", "amount": 6540000, "net_amount": 6540000, "shipping_cost": null, "amount_capturable": 6540000, "amount_received": null, "connector": "xendit", "client_secret": "pay_iapkM8sQja6Xvfdn9Tje_secret_83zsZQ4asN8r6n39cRgb", "created": "2025-08-12T09:59:40.385Z", "currency": "IDR", "customer_id": null, "customer": { "id": null, "name": null, "email": "[email protected]", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "1091", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "400000", "card_extended_bin": null, "card_exp_month": "11", "card_exp_year": "29", "card_holder_name": "John Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": null, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": null, "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "pr-d7afb058-5ecb-424b-af1a-60c6ce3f8df0", "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": "2aa664ab-6a91-417d-a9bb-db3f6fd1fc21", "payment_link": null, "profile_id": "pro_pRZDis5aB5cSfftyA4Dq", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_mJa8AsZOXYdYmggROjBG", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-12T10:14:40.385Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-12T09:59:41.228Z", "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 } ``` Payments Retrieve: Request: ``` curl --location 'http://localhost:8080/payments/pay_iapkM8sQja6Xvfdn9Tje?force_sync=true&expand_captures=true&expand_attempts=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_43StkeAliDdRysVQ1Bk58TfaGfqvDrRcQDIWNdnr9rx3WGPr7qnKR9ZQzdmf7P07' ``` Response: ``` { "payment_id": "pay_iapkM8sQja6Xvfdn9Tje", "merchant_id": "merchant_1754983663", "status": "requires_capture", "amount": 6540000, "net_amount": 6540000, "shipping_cost": null, "amount_capturable": 6540000, "amount_received": null, "connector": "xendit", "client_secret": "pay_iapkM8sQja6Xvfdn9Tje_secret_83zsZQ4asN8r6n39cRgb", "created": "2025-08-12T09:59:40.385Z", "currency": "IDR", "customer_id": null, "customer": { "id": null, "name": null, "email": "[email protected]", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "attempts": [ { "attempt_id": "pay_iapkM8sQja6Xvfdn9Tje_1", "status": "pending", "amount": 6540000, "order_tax_amount": null, "currency": "IDR", "connector": "xendit", "error_message": null, "payment_method": "card", "connector_transaction_id": "pr-d7afb058-5ecb-424b-af1a-60c6ce3f8df0", "capture_method": "manual", "authentication_type": "no_three_ds", "created_at": "2025-08-12T09:59:40.385Z", "modified_at": "2025-08-12T09:59:41.229Z", "cancellation_reason": null, "mandate_id": null, "error_code": null, "payment_token": null, "connector_metadata": null, "payment_experience": null, "payment_method_type": "credit", "reference_id": "2aa664ab-6a91-417d-a9bb-db3f6fd1fc21", "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": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "1091", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "400000", "card_extended_bin": null, "card_exp_month": "11", "card_exp_year": "29", "card_holder_name": "John Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": null, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": null, "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "pr-d7afb058-5ecb-424b-af1a-60c6ce3f8df0", "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": "2aa664ab-6a91-417d-a9bb-db3f6fd1fc21", "payment_link": null, "profile_id": "pro_pRZDis5aB5cSfftyA4Dq", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_mJa8AsZOXYdYmggROjBG", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-12T10:14:40.385Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-12T09:59:48.778Z", "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 } ``` Payments Capture: Request: ``` curl --location 'http://localhost:8080/payments/pay_iapkM8sQja6Xvfdn9Tje/capture' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_43StkeAliDdRysVQ1Bk58TfaGfqvDrRcQDIWNdnr9rx3WGPr7qnKR9ZQzdmf7P07' \ --data '{ "statement_descriptor_name": "Joseph", "statement_descriptor_prefix" :"joseph", "statement_descriptor_suffix": "JS" }' ``` Response: ``` { "payment_id": "pay_iapkM8sQja6Xvfdn9Tje", "merchant_id": "merchant_1754983663", "status": "succeeded", "amount": 6540000, "net_amount": 6540000, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6540000, "connector": "xendit", "client_secret": "pay_iapkM8sQja6Xvfdn9Tje_secret_83zsZQ4asN8r6n39cRgb", "created": "2025-08-12T09:59:40.385Z", "currency": "IDR", "customer_id": null, "customer": { "id": null, "name": null, "email": "[email protected]", "phone": null, "phone_country_code": null }, "description": null, "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "1091", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "400000", "card_extended_bin": null, "card_exp_month": "11", "card_exp_year": "29", "card_holder_name": "John Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": null, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": null, "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "pr-d7afb058-5ecb-424b-af1a-60c6ce3f8df0", "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": "1746e4f7-36a7-4058-9301-aac9772f97b7", "payment_link": null, "profile_id": "pro_pRZDis5aB5cSfftyA4Dq", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_mJa8AsZOXYdYmggROjBG", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-12T10:14:40.385Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "network_transaction_id": null, "payment_method_status": null, "updated": "2025-08-12T09:59:57.719Z", "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 } ``` Note: Existing CYPRESS not working on main branch for PSP Xendit and hence skipping Cypress tests for this 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/xendit.rs` - `crates/hyperswitch_connectors/src/connectors/xendit/transformers.rs` **Code Patterns Applied:** - Define new data structures (1 changes) - Extend existing types with new fields (8 changes) **Detailed Identifier Changes:** Commit 97b45f70: Files to modify: **crates/hyperswitch_connectors/src/connectors/xendit.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/xendit/transformers.rs** Add: - struct: pub::XenditCaptureResponse
{"pr_number": 8921, "pr_title": "chore(fix): [XENDIT] Make CVV Optional and fix Capture flow", "merged_at": "2025-08-13T11:40:03Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/xendit.rs", "crates/hyperswitch_connectors/src/connectors/xendit/transformers.rs"]}, "change_types": {"structs_added": 1, "fields_added": 8}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(connector): Move connectors Aci, Braintree, Globalpay, Iatapay, Itaubank, Klarna, Mifinity and Nuvei from router to hyperswitch_connectors crate ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Move Aci, Braintree, Globalpay, Iatapay, Itaubank, Klarna, Mifinity and Nuvei from router crate to hyperswitch_connector crate ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> https://github.com/juspay/hyperswitch-cloud/issues/7977 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Mifinity Testing: Payments Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_sznRWvN4ZPo23VZwx6pRwSZSZ6gnfoBqepkvGic1mmfkmrC7gf7Xmyz5DITnl2cf' \ --data-raw '{ "amount": 100000, "currency": "AUD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 100000, "customer_id": "StripeCustomer", "email": "[email protected]", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://google.com", "payment_method": "wallet", "payment_method_type": "mifinity", "payment_method_data": { "wallet": { "mifinity": { "date_of_birth": "2000-10-16", "language_preference": "en" } } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "AU", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "[email protected]" }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` Payments Response: ``` { "payment_id": "pay_j1JR2NsbszZR7TjoojVt", "merchant_id": "merchant_1738917180", "status": "requires_customer_action", "amount": 100000, "net_amount": 100000, "shipping_cost": null, "amount_capturable": 100000, "amount_received": null, "connector": "mifinity", "client_secret": "pay_j1JR2NsbszZR7TjoojVt_secret_5OXPz3gc8tBr0S1gzStL", "created": "2025-02-07T08:34:03.001Z", "currency": "AUD", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "[email protected]", "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": "wallet", "payment_method_data": { "wallet": {}, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "AU", "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": "[email protected]" }, "order_details": null, "email": "[email protected]", "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": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_j1JR2NsbszZR7TjoojVt/merchant_1738917180/pay_j1JR2NsbszZR7TjoojVt_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "mifinity", "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": 1738917242, "expires": 1738920842, "secret": "epk_f3204ab163e649f094ffbff7559d34c2" }, "manual_retry_allowed": null, "connector_transaction_id": "pay_j1JR2NsbszZR7TjoojVt_1", "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_j1JR2NsbszZR7TjoojVt_1", "payment_link": null, "profile_id": "pro_VnjwaEzm1FBAdSsnQ6MA", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_fKSzlXveNTjUg6Y10VZG", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-07T08:49:03.001Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-02-07T08:34:03.781Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` <img width="1719" alt="image" src="https://github.com/user-attachments/assets/88749b06-04ed-4c4e-b3a7-45e0b91b0d6d" /> Klarna: Payments Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_PsYMyijFrhKDzuTTjJHm0UazXnlHhagrnFHyEYiZXJ1aBS4TLr7GC7EL1gYQG3Cg' \ --data-raw '{ "amount": 50000, "order_tax_amount":0, "confirm": false, "currency": "EUR", "capture_method": "automatic", "customer_id": "klarna", "payment_experience":"redirect_to_url", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "no_three_ds", "payment_method": "pay_later", "payment_method_type": "klarna", "payment_method_data": { "pay_later": { "klarna_redirect":{} } }, "email": "[email protected]", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "return_url": "https://google.com" }' ``` Payments Response: ``` { "payment_id": "pay_uFIH6LB9spugVJI2yUum", "merchant_id": "merchant_1738919315", "status": "requires_confirmation", "amount": 50000, "net_amount": 50000, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_uFIH6LB9spugVJI2yUum_secret_NcB7eZhwBnxQQq2zHdwR", "created": "2025-02-07T09:31:33.061Z", "currency": "EUR", "customer_id": "klarna", "customer": { "id": "klarna", "name": "John Doe", "email": "[email protected]", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "pay_later", "payment_method_data": { "pay_later": { "klarna_sdk": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "[email protected]", "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": "redirect_to_url", "payment_method_type": "klarna", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "klarna", "created_at": 1738920693, "expires": 1738924293, "secret": "epk_2ad2f7d0e86943109414f87932043f40" }, "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_ZpWPiDjWYzPh6nvi4juI", "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-02-07T09:46:33.060Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-02-07T09:31:33.157Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": 0, "connector_mandate_id": null } ``` Payment Confirm Klarna: Request: ``` curl --location 'http://localhost:8080/payments/pay_uFIH6LB9spugVJI2yUum/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_PsYMyijFrhKDzuTTjJHm0UazXnlHhagrnFHyEYiZXJ1aBS4TLr7GC7EL1gYQG3Cg' \ --data-raw '{ "amount": 50000, "order_tax_amount":0, "currency": "EUR", "amount_to_capture": 50000, "retry_action": "manual_retry", "capture_method": "automatic", "payment_experience":"redirect_to_url", "profile_id": null, "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "no_three_ds", "setup_future_usage":"on_session", "customer": { "id": "customer123", "name": "John Doe", "email": "[email protected]", "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": "pay_later", "payment_method_type": "klarna", "payment_method_data": { "pay_later": { "klarna_redirect":{} } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "FR", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "[email protected]" }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "FR", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "[email protected]" }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "order_details": [ { "product_name": "Red T-Shirt", "quantity": 5, "amount": 10000, "account_name": "transaction_processing", "total_tax_amount": 0, "tax_rate": 0, "total_amount": 50000 } ], "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "browser_info": { "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "128.0.0.1" }, "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "125.0.0.1", "user_agent": "amet irure esse" } }, "connector_metadata": { "noon": { "order_category": "pay" } }, "payment_link": false, "payment_link_config": { "theme": "", "logo": "", "seller_name": "", "sdk_layout": "", "display_sdk_only": false, "enabled_saved_payment_method": false }, "payment_type": "normal", "request_incremental_authorization": false, "merchant_order_reference_id": "test_ord" }' ``` Response: ``` { "payment_id": "pay_uFIH6LB9spugVJI2yUum", "merchant_id": "merchant_1738919315", "status": "requires_customer_action", "amount": 50000, "net_amount": 50000, "shipping_cost": null, "amount_capturable": 50000, "amount_received": null, "connector": "klarna", "client_secret": "pay_uFIH6LB9spugVJI2yUum_secret_NcB7eZhwBnxQQq2zHdwR", "created": "2025-02-07T09:31:33.061Z", "currency": "EUR", "customer_id": "customer123", "customer": { "id": "customer123", "name": "John Doe", "email": "[email protected]", "phone": "9999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "pay_later", "payment_method_data": { "pay_later": { "klarna_sdk": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "FR", "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": "[email protected]" }, "billing": { "address": { "city": "San Fransico", "country": "FR", "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": "[email protected]" }, "order_details": [ { "brand": null, "amount": 10000, "category": null, "quantity": 5, "tax_rate": 0.0, "product_id": null, "product_name": "Red T-Shirt", "product_type": null, "sub_category": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": 0, "requires_shipping": null } ], "email": "[email protected]", "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": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_uFIH6LB9spugVJI2yUum/merchant_1738919315/pay_uFIH6LB9spugVJI2yUum_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": "redirect_to_url", "payment_method_type": "klarna", "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": "a524f881-4345-1afb-9784-3518944878d7", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "a524f881-4345-1afb-9784-3518944878d7", "payment_link": null, "profile_id": "pro_ZpWPiDjWYzPh6nvi4juI", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_rLDXJv1LNAcJXJ4YbhPC", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-02-07T09:46:33.060Z", "fingerprint": null, "browser_info": { "os_type": null, "language": "nl-NL", "time_zone": 0, "ip_address": "128.0.0.1", "os_version": null, "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "device_model": null, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "accept_language": "en", "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-02-07T09:31:52.064Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": 0, "connector_mandate_id": null } ``` ![image](https://github.com/user-attachments/assets/4dc23016-aec4-42ec-b786-ecc6748d1417) Note: Nuvei was unable to be tested due to unavailability of connector credentials, but no major testing will be required for this PR as only connector code is moved to hyperswitch_connectors crate and no logic change has been 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. Core Business Logic** - `crates/router/src/core/payments/connector_integration_v2_impls.rs` - `crates/router/src/core/payments/flows.rs` **2. External Connector Integration** - `crates/hyperswitch_connectors/Cargo.toml` - `crates/hyperswitch_connectors/src/connectors.rs` - `crates/router/src/connector/aci.rs` - ... and 24 more files **3. Other** - `Cargo.lock` - `crates/router/src/consts.rs` **Code Patterns Applied:** - Implement new functions (50 changes) - Extend existing types with new fields (737 changes) - Add conditional logic for feature flags or filtering (8 changes) **Detailed Identifier Changes:** Commit 7dfe4004: Files to modify: **crates/hyperswitch_connectors/src/connectors.rs** Add: - mod: pub::aci - mod: pub::braintree - mod: pub::globalpay - mod: pub::iatapay - mod: pub::itaubank - mod: pub::klarna - mod: pub::mifinity - mod: pub::nuvei **crates/hyperswitch_connectors/src/constants.rs** Modify existing code **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code **crates/hyperswitch_connectors/src/default_implementations_v2.rs** Modify existing code **crates/hyperswitch_connectors/src/types.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Add: - function: pub::get_timestamp_in_milliseconds - function: pub::base64_decode - function: private::get_connector_reference_id - function: pub::construct_captures_response_hashmap - function: pub::validate_currency - function: private::get_connector_metadata - function: private::get_email - function: private::get_phone_with_country_code - trait: pub::MultipleCaptureSyncResponse **crates/router/src/connector.rs** Remove: - mod: pub::aci - mod: pub::braintree - mod: pub::globalpay - mod: pub::iatapay - mod: pub::itaubank - mod: pub::klarna - mod: pub::mifinity - mod: pub::nuvei **crates/router/src/consts.rs** Modify existing code **crates/router/src/core/payments/connector_integration_v2_impls.rs** Modify existing code **crates/router/src/core/payments/flows.rs** Modify existing code
{"pr_number": 7167, "pr_title": "refactor(connector): Move connectors Aci, Braintree, Globalpay, Iatapay, Itaubank, Klarna, Mifinity and Nuvei from router to hyperswitch_connectors crate", "merged_at": "2025-02-07T10:42:49Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/connector_integration_v2_impls.rs", "crates/router/src/core/payments/flows.rs"], "connectors": ["crates/hyperswitch_connectors/Cargo.toml", "crates/hyperswitch_connectors/src/connectors.rs", "crates/router/src/connector/aci.rs", "crates/router/src/connector/aci/result_codes.rs", "crates/router/src/connector/aci/transformers.rs", "crates/router/src/connector/braintree.rs", "crates/router/src/connector/braintree/transformers.rs", "crates/router/src/connector/globalpay.rs", "crates/router/src/connector/globalpay/requests.rs", "crates/router/src/connector/globalpay/response.rs", "crates/router/src/connector/globalpay/transformers.rs", "crates/router/src/connector/iatapay.rs", "crates/router/src/connector/iatapay/transformers.rs", "crates/router/src/connector/itaubank.rs", "crates/router/src/connector/itaubank/transformers.rs", "crates/router/src/connector/klarna.rs", "crates/router/src/connector/klarna/transformers.rs", "crates/router/src/connector/mifinity.rs", "crates/router/src/connector/mifinity/transformers.rs", "crates/router/src/connector/nuvei.rs", "crates/router/src/connector/nuvei/transformers.rs", "crates/hyperswitch_connectors/src/constants.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/hyperswitch_connectors/src/default_implementations_v2.rs", "crates/hyperswitch_connectors/src/types.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/router/src/connector.rs"], "other": ["Cargo.lock", "crates/router/src/consts.rs"]}, "change_types": {"functions_added": 50, "fields_added": 737, "imports_added": 83, "conditionals_added": 8}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(connector-configs): worldpay - update username / password mapping ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Described in #6316 point # 8 This PR includes WASM changes for Worldpay MCA creation on 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 Updates the incorrect mapping of username / password to HS `ConnectorAuthType` ## How did you test 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/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - `crates/connector_configs/toml/sandbox.toml`
{"pr_number": 6752, "pr_title": "refactor(connector-configs): worldpay - update username / password mapping", "merged_at": "2024-12-05T14:02:43Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["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"}
fix(analytics): fix bugs in payments page metrics in Analytics V2 dashboard ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Fixing some bugs in metrics calculations for Payments page - Analytics V2 dashboard: - `Successful Payments Distribution` and `Failure Payments Distribution`: Excluded the following dropoffs from the denominator while calculating the rates - Without smart retries - From Payment Intents - RequiresCustomerAction - RequiresPaymentMethod - RequiresMerchantAction - RequiresConfirmation - With smart retries - AuthenticationFailed - PaymentMethodAwaited - DeviceDataCollectionPending - ConfirmationAwaited - Unresolved - `Failure reasons`: Removed limit by clause and extracting data for all error_reasons - `Payments lifecycle`: Updated the sankey response structure, now it will look like this: ```bash { "count":"25", "first_attempt":0, "status":"requires_payment_method", "refunds_status":null, "dispute_status":null } ``` ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Fix bugs and send correct data to be displayed in the analytics v2 dashboard. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Sankey: ```bash curl --location 'http://localhost:8080/analytics/v1/org/metrics/sankey' \ --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: test_admin' \ --header 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTQ5ZTNkMmItMTY5Yi00NzUzLWJmNTQtZDcxMTM2YjRiN2JkIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzI2MDQ2MzI4Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTczMjYwODUzNCwib3JnX2lkIjoib3JnX1ZwU0hPanNZZkR2YWJWWUpnQ0FKIiwicHJvZmlsZV9pZCI6InByb192NXNGb0hlODBPZWlVbElvbm9jTSIsInRlbmFudF9pZCI6InB1YmxpYyJ9.tQYvWyhWQInhAymh0c4itE1CWVwhOG3L4_yHMY4RLkQ' \ --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 '{ "startTime": "2024-05-11T00:30:00Z", "endTime": "2024-11-25T23:30:00Z" }' ``` Response: ```json [ { "count": 2, "status": "succeeded", "refunds_status": null, "dispute_status": null, "first_attempt": 0 }, { "count": 40, "status": "succeeded", "refunds_status": null, "dispute_status": null, "first_attempt": 1 }, { "count": 1, "status": "failed", "refunds_status": null, "dispute_status": null, "first_attempt": 0 }, { "count": 2, "status": "requires_confirmation", "refunds_status": null, "dispute_status": null, "first_attempt": 1 }, { "count": 3, "status": "failed", "refunds_status": null, "dispute_status": null, "first_attempt": 1 }, { "count": 2, "status": "requires_payment_method", "refunds_status": null, "dispute_status": null, "first_attempt": 1 }, { "count": 7, "status": "succeeded", "refunds_status": "partial_refunded", "dispute_status": null, "first_attempt": 1 } ] ``` Payments Distribution ```bash curl --location 'http://localhost:8080/analytics/v1/org/metrics/payments' \ --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: test_admin' \ --header 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTQ5ZTNkMmItMTY5Yi00NzUzLWJmNTQtZDcxMTM2YjRiN2JkIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzI2MDQ2MzI4Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTczMjYwODUzNCwib3JnX2lkIjoib3JnX1ZwU0hPanNZZkR2YWJWWUpnQ0FKIiwicHJvZmlsZV9pZCI6InByb192NXNGb0hlODBPZWlVbElvbm9jTSIsInRlbmFudF9pZCI6InB1YmxpYyJ9.tQYvWyhWQInhAymh0c4itE1CWVwhOG3L4_yHMY4RLkQ' \ --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": "2024-11-19T00:30:00Z", "endTime": "2024-11-19T23:30:00Z" }, "groupByNames": [ "connector" ], "source": "BATCH", "metrics": [ "payments_distribution" ], "delta": true } ]' ``` Response: ```json { "queryData": [ { "payment_success_rate": null, "payment_count": null, "payment_success_count": null, "payment_processed_amount": 0, "payment_processed_amount_in_usd": null, "payment_processed_count": null, "payment_processed_amount_without_smart_retries": 0, "payment_processed_amount_without_smart_retries_usd": null, "payment_processed_count_without_smart_retries": null, "avg_ticket_size": null, "payment_error_message": null, "retries_count": null, "retries_amount_processed": 0, "connector_success_rate": null, "payments_success_rate_distribution": null, "payments_success_rate_distribution_without_smart_retries": null, "payments_success_rate_distribution_with_only_retries": null, "payments_failure_rate_distribution": null, "payments_failure_rate_distribution_without_smart_retries": null, "payments_failure_rate_distribution_with_only_retries": null, "failure_reason_count": 0, "failure_reason_count_without_smart_retries": 0, "currency": null, "status": null, "connector": null, "authentication_type": null, "payment_method": null, "payment_method_type": null, "client_source": null, "client_version": null, "profile_id": null, "card_network": null, "merchant_id": null, "card_last_4": null, "card_issuer": null, "error_reason": null, "time_range": { "start_time": "2024-11-19T00:30:00.000Z", "end_time": "2024-11-19T23:30:00.000Z" }, "time_bucket": "2024-11-19 00:30:00" }, { "payment_success_rate": null, "payment_count": null, "payment_success_count": null, "payment_processed_amount": 0, "payment_processed_amount_in_usd": null, "payment_processed_count": null, "payment_processed_amount_without_smart_retries": 0, "payment_processed_amount_without_smart_retries_usd": null, "payment_processed_count_without_smart_retries": null, "avg_ticket_size": null, "payment_error_message": null, "retries_count": null, "retries_amount_processed": 0, "connector_success_rate": null, "payments_success_rate_distribution": 88.88888888888889, "payments_success_rate_distribution_without_smart_retries": 87.5, "payments_success_rate_distribution_with_only_retries": 100.0, "payments_failure_rate_distribution": 11.11111111111111, "payments_failure_rate_distribution_without_smart_retries": 12.5, "payments_failure_rate_distribution_with_only_retries": 0.0, "failure_reason_count": 0, "failure_reason_count_without_smart_retries": 0, "currency": null, "status": null, "connector": "stripe_test", "authentication_type": null, "payment_method": null, "payment_method_type": null, "client_source": null, "client_version": null, "profile_id": null, "card_network": null, "merchant_id": null, "card_last_4": null, "card_issuer": null, "error_reason": null, "time_range": { "start_time": "2024-11-19T00:30:00.000Z", "end_time": "2024-11-19T23:30:00.000Z" }, "time_bucket": "2024-11-19 00:30:00" } ], "metaData": [ { "total_payment_processed_amount": 0, "total_payment_processed_amount_in_usd": 0, "total_payment_processed_amount_without_smart_retries": 0, "total_payment_processed_amount_without_smart_retries_usd": 0, "total_payment_processed_count": 0, "total_payment_processed_count_without_smart_retries": 0, "total_failure_reasons_count": 0, "total_failure_reasons_count_without_smart_retries": 0 } ] } ``` Failure Reasons: ```bash curl --location 'http://localhost:8080/analytics/v1/org/metrics/payments' \ --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: test_admin' \ --header 'authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiNTQ5ZTNkMmItMTY5Yi00NzUzLWJmNTQtZDcxMTM2YjRiN2JkIiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzI2MDQ2MzI4Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTczMjYwODUzNCwib3JnX2lkIjoib3JnX1ZwU0hPanNZZkR2YWJWWUpnQ0FKIiwicHJvZmlsZV9pZCI6InByb192NXNGb0hlODBPZWlVbElvbm9jTSIsInRlbmFudF9pZCI6InB1YmxpYyJ9.tQYvWyhWQInhAymh0c4itE1CWVwhOG3L4_yHMY4RLkQ' \ --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": "2024-11-17T00:30:00Z", "endTime": "2024-11-25T23:30:00Z" }, "groupByNames": [ "connector", "error_reason" ], "source": "BATCH", "metrics": [ "failure_reasons" ], "delta": true } ]' ``` Response: ```json { "queryData": [ { "payment_success_rate": null, "payment_count": null, "payment_success_count": null, "payment_processed_amount": 0, "payment_processed_amount_in_usd": null, "payment_processed_count": null, "payment_processed_amount_without_smart_retries": 0, "payment_processed_amount_without_smart_retries_usd": null, "payment_processed_count_without_smart_retries": null, "avg_ticket_size": null, "payment_error_message": null, "retries_count": null, "retries_amount_processed": 0, "connector_success_rate": null, "payments_success_rate_distribution": null, "payments_success_rate_distribution_without_smart_retries": null, "payments_success_rate_distribution_with_only_retries": null, "payments_failure_rate_distribution": null, "payments_failure_rate_distribution_without_smart_retries": null, "payments_failure_rate_distribution_with_only_retries": null, "failure_reason_count": 1, "failure_reason_count_without_smart_retries": 1, "currency": null, "status": null, "connector": "stripe_test", "authentication_type": null, "payment_method": null, "payment_method_type": null, "client_source": null, "client_version": null, "profile_id": null, "card_network": null, "merchant_id": null, "card_last_4": null, "card_issuer": null, "error_reason": "TEST ERROR - 1", "time_range": { "start_time": "2024-11-17T00:30:00.000Z", "end_time": "2024-11-25T23:30:00.000Z" }, "time_bucket": "2024-11-17 00:30:00" } ], "metaData": [ { "total_payment_processed_amount": 0, "total_payment_processed_amount_in_usd": 0, "total_payment_processed_amount_without_smart_retries": 0, "total_payment_processed_amount_without_smart_retries_usd": 0, "total_payment_processed_count": 0, "total_payment_processed_count_without_smart_retries": 0, "total_failure_reasons_count": 1, "total_failure_reasons_count_without_smart_retries": 1 } ] } ``` ## 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.rs` **2. Core Business Logic** - `crates/analytics/src/payment_intents/core.rs` **3. Other** - `crates/analytics/src/payment_intents/accumulator.rs` - `crates/analytics/src/payment_intents/sankey.rs` - `crates/analytics/src/payments/accumulator.rs` - ... and 1 more files **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 93459fde: Files to modify: **crates/analytics/src/payment_intents/accumulator.rs** Modify existing code **crates/analytics/src/payment_intents/core.rs** Modify existing code **crates/analytics/src/payment_intents/sankey.rs** Remove: - struct: pub::PaymentIntentMetricRow Add: - enum: pub::SessionizerDisputeStatus **crates/analytics/src/payments/accumulator.rs** Modify existing code **crates/analytics/src/payments/metrics/sessionized_metrics/failure_reasons.rs** Modify existing code **crates/api_models/src/analytics.rs** Modify existing code
{"pr_number": 6654, "pr_title": "fix(analytics): fix bugs in payments page metrics in Analytics V2 dashboard", "merged_at": "2024-11-28T10:25:23Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/analytics.rs"], "core_business": ["crates/analytics/src/payment_intents/core.rs"], "other": ["crates/analytics/src/payment_intents/accumulator.rs", "crates/analytics/src/payment_intents/sankey.rs", "crates/analytics/src/payments/accumulator.rs", "crates/analytics/src/payments/metrics/sessionized_metrics/failure_reasons.rs"]}, "change_types": {"enums_added": 1, "fields_added": 8, "imports_added": 1, "conditionals_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore(users): change entity_type column of roles to non-optional ## 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 --> Earlier entity-type column in roles table was optional , after this change the column will be non-optional with default value as Merchant ### 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)? --> - Request : ``` curl 'http://localhost:8080/user/role' \ -H 'authorization: Bearer JWT \ --data-raw '{"role_scope":"merchant","groups":["operations_manage","connectors_view","connectors_manage"],"role_name":"merch-scope-merch-role"}' ``` Response : ``` { "role_id": "role_qrQ05Q9pu7czBlDEWnGE", "groups": [ "operations_manage", "connectors_view", "connectors_manage" ], "role_name": "merch-scope-merch-role", "role_scope": "merchant" } ``` Db should have an entry in roles table with role-name as merch-scope-merch-role and entity-type as merchant. All the existing flows should work as before ## Checklist <!-- Put an `x` in the boxes that apply --> - [X] I formatted the code `cargo +nightly fmt --all` - [X] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Database Layer (Queries & Schema)** - `crates/diesel_models/src/role.rs` - `crates/diesel_models/src/schema.rs` - `crates/diesel_models/src/schema_v2.rs` **2. Core Business Logic** - `crates/router/src/core/user_role/role.rs` **3. Other** - `crates/router/src/db/role.rs` - `crates/router/src/services/authorization/roles.rs` - `migrations/2024-10-24-123318_update-entity-type-column-in-roles/down.sql` - ... and 1 more files **Code Patterns Applied:** - Extend existing types with new fields (4 changes) - Modify database queries (1 changes) **Detailed Identifier Changes:** Commit 62067e40: Files to modify: **crates/diesel_models/src/role.rs** Modify existing code **crates/diesel_models/src/schema.rs** Modify existing code **crates/diesel_models/src/schema_v2.rs** Modify existing code **crates/router/src/core/user_role/role.rs** Modify existing code **crates/router/src/db/role.rs** Modify existing code **crates/router/src/services/authorization/roles.rs** Modify existing code
{"pr_number": 6435, "pr_title": "chore(users): change entity_type column of roles to non-optional", "merged_at": "2024-10-30T13:04:08Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant", "user", "connector"]}, "hierarchy": {"database": ["crates/diesel_models/src/role.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs"], "core_business": ["crates/router/src/core/user_role/role.rs"], "other": ["crates/router/src/db/role.rs", "crates/router/src/services/authorization/roles.rs", "migrations/2024-10-24-123318_update-entity-type-column-in-roles/down.sql", "migrations/2024-10-24-123318_update-entity-type-column-in-roles/up.sql"]}, "change_types": {"fields_added": 4, "database_queries": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): (payload) currency auth key wasm changes ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> - [this](https://github.com/juspay/hyperswitch/commit/64e6dc860d3c18a87160d374fb4fa6500b0b4285) commit introduced wasm changes for payload auth key to use currencyauthkey instead of headkerkey. payload is a special case where the currency is dependent on the `processing_account_id`. this was not done properly that resulted in wasm build to fail at run time. - [this](https://github.com/juspay/hyperswitch/commit/e6268d6d5e2a4d3015d1c4982701e1f27895511e) commit reverted the wasm changes which resulted in dashboard page for payload to break. - in this pr, we have reverted the revert pr and also introduced a new specific case for payload to support currency based auth. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [x] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> `crates/connector_configs/toml/*.toml` ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> my previous changes caused the wasm build to fail which i reverted earlier today as that the fastest fix. however, i need that to be fixed. so this pr. closes https://github.com/juspay/hyperswitch/issues/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)? --> wasm build should succeed. in run time, wasm should not throw error, especially for cashtocode and payload, as shown below: i constructed a simple html page to check this: |cashtocode|payload| |-|-| |<img width="738" height="451" alt="image" src="https://github.com/user-attachments/assets/4eac86df-1f16-46be-bf04-febd0afc6277" />|<img width="739" height="463" alt="image" src="https://github.com/user-attachments/assets/e2f47020-acfe-421b-9f81-4c0f25731353" /><img width="737" height="272" alt="image" src="https://github.com/user-attachments/assets/bc64a769-8def-4868-bf24-02c1c38963a3" />| there exist some issue with data loading in the page, so i directly loaded the wasm and spit out the data: <img width="622" height="621" alt="image" src="https://github.com/user-attachments/assets/c3a15c00-07bf-4d08-8863-ea94cfceae23" /> ## 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/connector_configs/src/connector.rs` - `crates/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - ... and 1 more files **Code Patterns Applied:** - Define new data structures (2 changes) - Extend existing types with new fields (3 changes) **Detailed Identifier Changes:** Commit 4d4a81e9: Files to modify: **crates/connector_configs/src/connector.rs** Add: - struct: pub::PayloadCurrencyAuthKeyType
{"pr_number": 8825, "pr_title": "fix(connector): (payload) currency auth key wasm changes", "merged_at": "2025-08-05T08:19:29Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user", "connector"]}, "hierarchy": {"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"]}, "change_types": {"structs_added": 2, "enums_added": 1, "fields_added": 3, "imports_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(connector): [Paypal] Add support for passing shipping_cost in Payment request ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description - Add support for passing shipping_cost in Payment request of Paypal - In paypal we can pass `shipping_cost` while creating payment_intent, I have added this in the flows `PaymentsAuthorizeRouterData`, `PaymentsPostSessionTokensRouterData` and `SdkSessionUpdateRouterData` ### 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 ``` curl --location 'http://localhost:8080/accounts' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data-raw '{ "merchant_id": "merchant_1728546485", "locker_id": "m0010", "merchant_name": "NewAge Retailer", "merchant_details": { "primary_contact_person": "John Test", "primary_email": "[email protected]", "primary_phone": "sunt laborum", "secondary_contact_person": "John Test2", "secondary_email": "[email protected]", "secondary_phone": "cillum do dolor id", "website": "https://www.example.com", "about_business": "Online Retail with a wide selection of organic products for North America", "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US" } }, "return_url": "https://google.com/success", "webhook_details": { "webhook_version": "1.0.1", "webhook_username": "ekart_retail", "webhook_password": "password_ekart@123", "payment_created_enabled": true, "payment_succeeded_enabled": true, "payment_failed_enabled": true }, "sub_merchants_enabled": false, "metadata": { "city": "NY", "unit": "245" }, "primary_business_details": [ { "country": "US", "business": "food" } ] }' ``` 2. Create API Key ``` curl --location 'http://localhost:8080/api_keys/merchant_1728540504' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "name": "API Key 1", "description": null, "expiration": "2025-09-23T01:02:03.000Z" }' ``` 3. Create MCA of Paypal ``` curl --location 'http://localhost:8080/account/merchant_1728540504/connectors?=' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "connector_type": "payment_processor", "connector_name": "paypal", "connector_account_details": { "auth_type": "BodyKey", "api_key": "_", "key1": "_" }, "test_mode": false, "disabled": false, "payment_methods_enabled": [ { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "card_networks": [ "Visa", "Mastercard" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "debit", "card_networks": [ "Visa", "Mastercard" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "paypal", "payment_experience": "redirect_to_url", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": false, "installment_payment_enabled": false }, { "payment_method_type": "paypal", "payment_experience": "invoke_sdk_client", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": false, "installment_payment_enabled": false } ] }, { "payment_method": "bank_redirect", "payment_method_types": [ { "payment_method_type": "giropay", "recurring_enabled": true, "installment_payment_enabled": true, "payment_experience": "redirect_to_url" }, { "payment_method_type": "ideal", "recurring_enabled": true, "installment_payment_enabled": true, "payment_experience": "redirect_to_url" }, { "payment_method_type": "eps", "recurring_enabled": true, "installment_payment_enabled": true, "payment_experience": "redirect_to_url" }, { "payment_method_type": "sofort", "recurring_enabled": true, "installment_payment_enabled": true, "payment_experience": "redirect_to_url" } ] } ], "metadata": { "paypal_sdk": { "client_id": "___" } }, "business_country": "US", "business_label": "food" }' ``` 4. Create MCA of Taxjar ``` curl --location 'http://localhost:8080/account/merchant_1729762835/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "connector_type": "tax_processor", "connector_name": "taxjar", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "_" }, "test_mode": false, "disabled": false, "metadata": { "city": "NY", "unit": "245" }, "business_country": "US", "business_label": "food" }' ``` 5. Create payment and pass shipping_cost in request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_QdrlaR3PrAy4lCuB723Rs9gwDzJipYiEsSkHO5WCC9ZmjCLUcPA3okUdN3CggBfg' \ --data-raw '{ "amount": 2500, "currency": "USD", "confirm": false, "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "customer_id": "StripeCustomer", "email": "[email protected]", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://google.com", "shipping_cost": 1000, "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": "[email protected]" }, "order_details": [ { "product_name": "Apple iphone 15", "quantity": 1, "amount": 1000, "product_tax_code": "23" }, { "product_name": "Apple iphone 15", "quantity": 1, "amount": 1500, "product_tax_code": "23" } ], "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` 6. Create Session token ``` curl --location 'http://localhost:8080/payments/session_tokens' \ --header 'Content-Type: application/json' \ --header 'api-key: pk_dev_10cfee22267a4184a3d45665920788ea' \ --data '{ "payment_id": "pay_J3IXGvol8nNvUkSRTcwQ", "wallets": [], "client_secret": "pay_J3IXGvol8nNvUkSRTcwQ_secret_VN76rK4oCqTghQ1kwNcO" }' ``` Response ``` { "payment_id": "pay_mcVzUMZws5KmEKbGkZ0g", "client_secret": "pay_mcVzUMZws5KmEKbGkZ0g_secret_RMWlmy1jSdlp9VOMX1qc", "session_token": [ { "wallet_name": "paypal", "connector": "paypal", "session_token": "ASKAGh2WXgqfQ5TzjpZzLsfhVGlFbjq5VrV5IOX8KXDD2N_XqkGeYNDkWyr_UXnfhXpEkABdmP284b_2", "sdk_next_action": { "next_action": "post_session_tokens" } } ] } ``` 7. List Payment Methods for merchant - Check for required fields (shipping_details) ``` curl --location 'http://localhost:8080/account/payment_methods?client_secret=pay_J3IXGvol8nNvUkSRTcwQ_secret_VN76rK4oCqTghQ1kwNcO' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_10cfee22267a4184a3d45665920788ea' ``` Response ``` { "redirect_url": "https://google.com/success", "currency": "USD", "payment_methods": [ { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "paypal", "payment_experience": [ { "payment_experience_type": "invoke_sdk_client", "eligible_connectors": [ "paypal" ] }, { "payment_experience_type": "redirect_to_url", "eligible_connectors": [ "paypal" ] } ], "card_networks": null, "bank_names": null, "bank_debits": null, "bank_transfers": null, "required_fields": { "shipping.address.country": { "required_field": "shipping.address.country", "display_name": "country", "field_type": { "user_shipping_address_country": { "options": [ "ALL" ] } }, "value": "US" }, "shipping.address.first_name": { "required_field": "shipping.address.first_name", "display_name": "shipping_first_name", "field_type": "user_shipping_name", "value": "PiX" }, "shipping.address.zip": { "required_field": "shipping.address.zip", "display_name": "zip", "field_type": "user_shipping_address_pincode", "value": "94122" }, "shipping.address.state": { "required_field": "shipping.address.state", "display_name": "state", "field_type": "user_shipping_address_state", "value": "California" }, "shipping.address.city": { "required_field": "shipping.address.city", "display_name": "city", "field_type": "user_shipping_address_city", "value": "San Fransico" }, "shipping.address.last_name": { "required_field": "shipping.address.last_name", "display_name": "shipping_last_name", "field_type": "user_shipping_name", "value": null }, "shipping.address.line1": { "required_field": "shipping.address.line1", "display_name": "line1", "field_type": "user_shipping_address_line1", "value": "1467" } }, "surcharge_details": null, "pm_auth_connector": null } ] }, ], "mandate_payment": null, "merchant_name": "NewAge Retailer", "show_surcharge_breakup_screen": false, "payment_type": "normal", "request_external_three_ds_authentication": false, "collect_shipping_details_from_wallets": false, "collect_billing_details_from_wallets": false, "is_tax_calculation_enabled": false } ``` 8. Create Post Session Tokens for Paypal ``` curl --location 'http://localhost:8080/payments/pay_J3IXGvol8nNvUkSRTcwQ/post_session_tokens' \ --header 'Content-Type: application/json' \ --header 'api-key: pk_dev_10cfee22267a4184a3d45665920788ea' \ --data '{ "client_secret": "pay_J3IXGvol8nNvUkSRTcwQ_secret_VN76rK4oCqTghQ1kwNcO", "payment_method_type": "paypal", "payment_method": "wallet" }' ``` Response ``` { "payment_id": "pay_mcVzUMZws5KmEKbGkZ0g", "next_action": { "type": "invoke_sdk_client", "next_action_data": { "next_action": "confirm", "order_id": "2KW93090954330301" } } } ``` 9. Call /calculate_tax - SessionUpdate ``` curl --location 'http://localhost:8080/payments/pay_mcVzUMZws5KmEKbGkZ0g/calculate_tax' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_43922dfcb2694e09929891b0f4f7b6dc' \ --data-raw '{ "client_secret": "_", "shipping": { "address": { "line1": "1335", "line2": "E 103rd St", "city": "Los Angeles", "state": "California", "zip": "90002", "country": "US", "first_name": "Test", "last_name": "Person-us" }, "phone": { "number": "5551234", "country_code": "+1" }, "email": "[email protected]" }, "payment_method_type": "paypal" } ' ``` Response ``` { "payment_id": "pay_QTMdIrjFCvQTauCQWo10", "net_amount": 3719, "order_tax_amount": 219, "shipping_cost": 1000, "display_amount": { "net_amount": "37.19", "order_tax_amount": "2.19", "shipping_cost": "10.00" } } ``` 10. Confirm Request ``` curl 'http://localhost:8080/payments/pay_6oSZ2utmkjgdOlfrZ53E/confirm' \ -X 'POST' \ -H 'Content-Type: application/json' \ -H 'Accept-Encoding: gzip, deflate' \ -H 'Sec-Fetch-Mode: cors' \ -H 'x-payment-confirm-source: sdk' \ -H 'x-client-source: ExpressCheckoutElement' \ -H 'api-key: pk_dev_43922dfcb2694e09929891b0f4f7b6dc' \ -H 'x-browser-version: 605.1.15' \ --data-binary '{"client_secret":"________","return_url":"http://localhost:9060","retry_action":"manual_retry","shipping":{"address":{"country":"US","state":"California","zip":"94588","first_name":"Jagan","city":"Pleasanton","last_name":"Elavarasan","line1":"4141"}},"payment_method":"wallet","payment_method_type":"paypal","payment_experience":"invoke_sdk_client","connector":["paypal"],"payment_method_data":{"wallet":{"paypal_sdk":{"token":""}}},"browser_info":{"user_agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1.2 Safari/605.1.15","accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","language":"en-US","color_depth":24,"screen_height":1117,"screen_width":1728,"time_zone":-330,"java_enabled":true,"java_script_enabled":true},"payment_type":"normal"}' ``` Response ```{ "payment_id": "pay_QTMdIrjFCvQTauCQWo10", "merchant_id": "merchant_1729762835", "status": "succeeded", "amount": 2500, "net_amount": 3719, "shipping_cost": 1000, "amount_capturable": 0, "amount_received": 3719, "connector": "paypal", "client_secret": "pay_QTMdIrjFCvQTauCQWo10_secret_cgBLJ8VK5WFUUZvQhnwJ", "created": "2024-10-24T09:54:03.238Z", "currency": "USD", "customer_id": "hyperswitch_sdk_demo_id", "customer": { "id": "hyperswitch_sdk_demo_id", "name": null, "email": "[email protected]", "phone": null, "phone_country_code": null }, "description": "Hello this is description", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "wallet", "payment_method_data": { "wallet": {}, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "Pleasanton", "country": "US", "line1": "4141", "line2": "Amsterdam Ave", "line3": "alsksoe", "zip": "94588", "state": "California", "first_name": "Jagan", "last_name": "Elavarasan" }, "phone": { "number": "9876540321", "country_code": "+1" }, "email": "[email protected]" }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "[email protected]" }, "order_details": [ { "brand": null, "amount": 1500, "category": null, "quantity": 1, "product_id": null, "product_name": "Apple iPhone 15", "product_type": null, "sub_category": null, "product_img_link": null, "product_tax_code": null, "requires_shipping": null }, { "brand": null, "amount": 1000, "category": null, "quantity": 1, "product_id": null, "product_name": "Apple iPhone 16", "product_type": null, "sub_category": null, "product_img_link": null, "product_tax_code": null, "requires_shipping": null } ], "email": "[email protected]", "name": null, "phone": null, "return_url": "http://localhost:9060/", "authentication_type": "three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": "invoke_sdk_client", "payment_method_type": "paypal", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "59Y22595XY359373P", "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_QTMdIrjFCvQTauCQWo10_1", "payment_link": null, "profile_id": "pro_bFxSMR1bdhJsyq2t9WmR", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_oS1q9hdrFTXOBSCMjzp4", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-10-24T10:09:03.238Z", "fingerprint": null, "browser_info": { "language": "en-US", "time_zone": -330, "ip_address": "::1", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1.2 Safari/605.1.15", "color_depth": 24, "java_enabled": true, "screen_width": 1728, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 1117, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2024-10-24T09:54:38.047Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": 219, "connector_mandate_id": null } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/router_request_types.rs` **2. Core Business Logic** - `crates/router/src/core/payments/transformers.rs` **3. External Connector Integration** - `crates/router/src/connector/paypal.rs` - `crates/router/src/connector/paypal/transformers.rs` - `crates/router/src/types/api/verify_connector.rs` - ... and 1 more files **4. Type Definitions** - `crates/router/src/types.rs` **Code Patterns Applied:** - Implement new functions (2 changes) - Extend existing types with new fields (33 changes) **Detailed Identifier Changes:** Commit b0d5c96b: Files to modify: **crates/hyperswitch_domain_models/src/router_request_types.rs** Modify existing code **crates/router/src/connector/paypal.rs** Modify existing code **crates/router/src/connector/paypal/transformers.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/types.rs** Modify existing code **crates/router/src/types/api/verify_connector.rs** Modify existing code **crates/router/tests/connectors/utils.rs** Modify existing code
{"pr_number": 6423, "pr_title": "refactor(connector): [Paypal] Add support for passing shipping_cost in Payment request", "merged_at": "2024-10-25T13:28:45Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/router_request_types.rs"], "core_business": ["crates/router/src/core/payments/transformers.rs"], "connectors": ["crates/router/src/connector/paypal.rs", "crates/router/src/connector/paypal/transformers.rs", "crates/router/src/types/api/verify_connector.rs", "crates/router/tests/connectors/utils.rs"], "types": ["crates/router/src/types.rs"]}, "change_types": {"functions_added": 2, "fields_added": 33}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): Add payments update-intent 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 --> Added `update-intent` API for payments ### Additional Changes - [x] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding 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. Intent Create Response: ```json { "id": "12345_pay_01930aca908b76b086927c61ad1fb724", "status": "requires_payment_method", "amount_details": { "order_amount": 100, "currency": "USD", "shipping_cost": null, "order_tax_amount": null, "skip_external_tax_calculation": "Skip", "skip_surcharge_calculation": "Skip", "surcharge_amount": null, "tax_on_surcharge": null }, "client_secret": "12345_pay_01930aca908b76b086927c61ad1fb724_secret_01930aca908c71c3b6233716f1caede1", "merchant_reference_id": null, "routing_algorithm_id": null, "capture_method": "automatic", "authentication_type": "no_three_ds", "billing": null, "shipping": null, "customer_id": null, "customer_present": "Present", "description": null, "return_url": null, "setup_future_usage": "on_session", "apply_mit_exemption": "Skip", "statement_descriptor": null, "order_details": null, "allowed_payment_method_types": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "payment_link_enabled": "Skip", "payment_link_config": null, "request_incremental_authorization": "default", "expires_on": "2024-11-08T08:16:07.724Z", "frm_metadata": null, "request_external_three_ds_authentication": "Skip" } ``` 2a. Update Intent Request ``` curl --location --request PUT 'http://localhost:8080/v2/payments/12345_pay_0193921b3f687473ae7aa7e2b2cabc83/update-intent' \ --header 'Content-Type: application/json' \ --header 'x-profile-id: pro_tUJFXjqpFC8MaEF5t8zE' \ --header 'api-key: dev_FW2koArhbGpoUIZNrRPHNIbdgi7TZuCq5V3OHNlQYZOMuy8gU4hu5mrR5IivoOwh' \ --data-raw '{ "amount_details": { "order_amount": 6590, "currency": "AED", "shipping_cost": 123, "order_tax_amount": 123, "skip_external_tax_calculation": "skip", "skip_surcharge_calculation": "skip", "surcharge_amount": 123, "tax_on_surcharge": 123 }, "capture_method": "automatic", "authentication_type": "three_ds", "billing": { "address": { "city": "New York", "country": "AF", "line1": "123, King Street", "line2": "Powelson Avenue", "line3": "Bridgewater", "zip": "08807", "state": "New York", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "9123456789", "country_code": "+1" }, "email": "[email protected]" }, "shipping": { "address": { "city": "New York", "country": "AF", "line1": "123, King Street", "line2": "Powelson Avenue", "line3": "Bridgewater", "zip": "08807", "state": "New York", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "9123456789", "country_code": "+1" }, "email": "[email protected]" }, "customer_present": "present", "description": "It'\''s my first payment request", "return_url": "https://hyperswitch.io", "setup_future_usage": "off_session", "apply_mit_exemption": "Apply", "statement_descriptor": "Hyperswitch Router", "order_details": [{ "product_name": "Apple iPhone 16", "quantity": 1, "amount" : 69000, "product_img_link": "https://dummy-img-link.com" }], "allowed_payment_method_types": [ "ach" ], "metadata": {}, "connector_metadata": { "apple_pay": { "session_token_data": { "payment_processing_certificate": "<string>", "payment_processing_certificate_key": "<string>", "payment_processing_details_at": "Hyperswitch", "certificate": "<string>", "certificate_keys": "<string>", "merchant_identifier": "<string>", "display_name": "<string>", "initiative": "web", "initiative_context": "<string>", "merchant_business_country": "AF" } }, "airwallex": { "payload": "<string>" }, "noon": { "order_category": "<string>" } }, "feature_metadata": { "redirect_response": { "param": "<string>", "json_payload": {} }, "search_tags": [ "<string>" ] }, "payment_link_config": { "theme": "#4E6ADD", "logo": "https://i.pinimg.com/736x/4d/83/5c/4d835ca8aafbbb15f84d07d926fda473.jpg", "seller_name": "hyperswitch", "sdk_layout": "accordion", "display_sdk_only": true, "enabled_saved_payment_method": true, "transaction_details": [ { "key": "Policy-Number", "value": "297472368473924", "ui_configuration": { "position": 5, "is_key_bold": true, "is_value_bold": true } } ] }, "request_incremental_authorization": "true", "session_expiry": 1000, "frm_metadata": {}, "request_external_three_ds_authentication": "Enable" }' ``` 2b. Update Intent Response ```json { "id": "12345_pay_0193921b3f687473ae7aa7e2b2cabc83", "status": "requires_payment_method", "amount_details": { "order_amount": 6590, "currency": "AED", "shipping_cost": 123, "order_tax_amount": 123, "external_tax_calculation": "skip", "surcharge_calculation": "skip", "surcharge_amount": 123, "tax_on_surcharge": 123 }, "client_secret": "12345_pay_0193921b3f687473ae7aa7e2b2cabc83_secret_0193921b3f727390b03af88afb886f68", "profile_id": "pro_tUJFXjqpFC8MaEF5t8zE", "merchant_reference_id": null, "routing_algorithm_id": null, "capture_method": "automatic", "authentication_type": "three_ds", "billing": { "address": { "city": "New York", "country": "AF", "line1": "123, King Street", "line2": "Powelson Avenue", "line3": "Bridgewater", "zip": "08807", "state": "New York", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "9123456789", "country_code": "+1" }, "email": "[email protected]" }, "shipping": { "address": { "city": "New York", "country": "AF", "line1": "123, King Street", "line2": "Powelson Avenue", "line3": "Bridgewater", "zip": "08807", "state": "New York", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "9123456789", "country_code": "+1" }, "email": "[email protected]" }, "customer_id": null, "customer_present": "present", "description": "It's my first payment request", "return_url": "https://hyperswitch.io/", "setup_future_usage": "on_session", "apply_mit_exemption": "Apply", "statement_descriptor": "Hyperswitch Router", "order_details": [ { "product_name": "Apple iPhone 16", "quantity": 1, "amount": 69000, "requires_shipping": null, "product_img_link": "https://dummy-img-link.com", "product_id": null, "category": null, "sub_category": null, "brand": null, "product_type": null, "product_tax_code": null } ], "allowed_payment_method_types": [ "ach" ], "metadata": {}, "connector_metadata": { "apple_pay": { "session_token_data": { "payment_processing_certificate": "<string>", "payment_processing_certificate_key": "<string>", "payment_processing_details_at": "Hyperswitch", "certificate": "<string>", "certificate_keys": "<string>", "merchant_identifier": "<string>", "display_name": "<string>", "initiative": "web", "initiative_context": "<string>", "merchant_business_country": "AF" } }, "airwallex": { "payload": "<string>" }, "noon": { "order_category": "<string>" } }, "feature_metadata": { "redirect_response": { "param": "<string>", "json_payload": {} }, "search_tags": [ "e3846ee6d6368937023c2bbd84565e5fee999118fb8f5e16a31d1129471d130a" ] }, "payment_link_enabled": "Enable", "payment_link_config": { "theme": "#4E6ADD", "logo": "https://i.pinimg.com/736x/4d/83/5c/4d835ca8aafbbb15f84d07d926fda473.jpg", "seller_name": "hyperswitch", "sdk_layout": "accordion", "display_sdk_only": true, "enabled_saved_payment_method": true, "hide_card_nickname_field": null, "show_card_form_by_default": null, "transaction_details": [ { "key": "Policy-Number", "value": "297472368473924", "ui_configuration": { "position": 5, "is_key_bold": true, "is_value_bold": true } } ] }, "request_incremental_authorization": "true", "expires_on": "2024-12-04T14:54:39.539Z", "frm_metadata": {}, "request_external_three_ds_authentication": "Enable" } ``` ## 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/kv.rs` - `crates/diesel_models/src/payment_intent.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/lib.rs` - `crates/hyperswitch_domain_models/src/payments.rs` - `crates/hyperswitch_domain_models/src/payments/payment_intent.rs` - ... and 1 more files **4. Core Business Logic** - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/operations.rs` - `crates/router/src/core/payments/operations/payment_update_intent.rs` - ... and 1 more files **5. Type Definitions** - `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** - `api-reference-v2/api-reference/payments/payments--update-intent.mdx` - `api-reference-v2/mint.json` - `api-reference-v2/openapi_spec.json` - ... and 6 more files **Code Patterns Applied:** - Define new data structures (5 changes) - Implement new functions (31 changes) - Extend existing types with new fields (359 changes) **Detailed Identifier Changes:** Commit 19f810ae: Files to modify: **crates/api_models/src/payments.rs** Add: - function: pub::order_amount - function: pub::currency - function: pub::shipping_cost - function: pub::order_tax_amount - function: pub::skip_external_tax_calculation - function: pub::skip_surcharge_calculation - function: pub::surcharge_amount - function: pub::tax_on_surcharge - struct: pub::PaymentsUpdateIntentRequest - struct: pub::AmountDetailsUpdate - impl: impl AmountDetailsUpdate **crates/common_enums/src/enums.rs** Add: - function: private::from - function: pub::as_bool - function: private::from - function: pub::as_bool - impl: impl From<Option<bool>> for TaxCalculationOverride - impl: impl TaxCalculationOverride - impl: impl From<Option<bool>> for SurchargeCalculationOverride - impl: impl SurchargeCalculationOverride **crates/diesel_models/src/kv.rs** Add: - struct: pub::PaymentIntentUpdateMems **crates/diesel_models/src/payment_intent.rs** Remove: - function: pub::apply_changeset - function: private::from - enum: pub::PaymentIntentUpdate - impl: impl PaymentIntentUpdate - impl: impl From<PaymentIntentUpdate> for PaymentIntentUpdateInternal **crates/hyperswitch_domain_models/src/lib.rs** Remove: - function: private::from - function: private::from - impl: impl From<common_enums::SurchargeCalculationOverride> for payments::SurchargeCalculationOverride - impl: impl From<common_enums::TaxCalculationOverride> for payments::TaxCalculationOverride **crates/hyperswitch_domain_models/src/payments.rs** Remove: - function: private::from - function: private::from - enum: pub::TaxCalculationOverride - enum: pub::SurchargeCalculationOverride - impl: impl From<Option<bool>> for TaxCalculationOverride - impl: impl From<Option<bool>> for SurchargeCalculationOverride **crates/hyperswitch_domain_models/src/payments/payment_intent.rs** Remove: - struct: pub::PaymentIntentUpdateInternal **crates/hyperswitch_domain_models/src/router_flow_types/payments.rs** Add: - struct: pub::PaymentUpdateIntent **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/openapi/src/routes/payments.rs** Add: - function: pub::payments_update_intent **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/operations.rs** Add: - mod: pub::payment_update_intent **crates/router/src/core/payments/operations/payment_update_intent.rs** Add: - function: private::validate_status_for_operation - function: private::to_validate_request - function: private::to_get_tracker - function: private::to_domain - function: private::to_update_tracker - function: private::to_validate_request - function: private::to_get_tracker - function: private::to_domain - function: private::to_update_tracker - function: private::get_trackers - function: private::update_trackers - function: private::validate_request - function: private::get_customer_details - function: private::make_pm_data - function: private::perform_routing - function: private::guard_payment_against_blocklist - struct: pub::PaymentUpdateIntent - impl: impl ValidateStatusForOperation for PaymentUpdateIntent - impl: impl Operation<F, PaymentsUpdateIntentRequest> for &PaymentUpdateIntent - impl: impl Operation<F, PaymentsUpdateIntentRequest> for PaymentUpdateIntent - impl: impl GetTracker<F, payments::PaymentIntentData<F>, PaymentsUpdateIntentRequest> for PaymentUpdateIntent - impl: impl UpdateTracker<F, payments::PaymentIntentData<F>, PaymentsUpdateIntentRequest> for PaymentUpdateIntent - impl: impl ValidateRequest<F, PaymentsUpdateIntentRequest, payments::PaymentIntentData<F>> for PaymentUpdateIntent - impl: impl Domain<F, PaymentsUpdateIntentRequest, payments::PaymentIntentData<F>> for PaymentUpdateIntent **crates/router/src/core/payments/transformers.rs** Remove: - function: private::foreign_from - function: private::foreign_from - function: private::foreign_from - function: private::foreign_from - impl: impl ForeignFrom<common_enums::TaxCalculationOverride> for hyperswitch_domain_models::payments::TaxCalculationOverride - impl: impl ForeignFrom<hyperswitch_domain_models::payments::TaxCalculationOverride> for common_enums::TaxCalculationOverride - impl: impl ForeignFrom<common_enums::SurchargeCalculationOverride> for hyperswitch_domain_models::payments::SurchargeCalculationOverride - impl: impl ForeignFrom<hyperswitch_domain_models::payments::SurchargeCalculationOverride> for common_enums::SurchargeCalculationOverride **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/lock_utils.rs** Modify existing code **crates/router/src/routes/payments.rs** Modify existing code **crates/router/src/types/api/payments.rs** Modify existing code **crates/router_env/src/logger/types.rs** Modify existing code **crates/storage_impl/src/payments/payment_intent.rs** Modify existing code
{"pr_number": 6490, "pr_title": "feat(core): Add payments update-intent API for v2", "merged_at": "2024-12-09T07:45:58Z", "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/kv.rs", "crates/diesel_models/src/payment_intent.rs"], "domain": ["crates/hyperswitch_domain_models/src/lib.rs", "crates/hyperswitch_domain_models/src/payments.rs", "crates/hyperswitch_domain_models/src/payments/payment_intent.rs", "crates/hyperswitch_domain_models/src/router_flow_types/payments.rs"], "core_business": ["crates/router/src/core/payments.rs", "crates/router/src/core/payments/operations.rs", "crates/router/src/core/payments/operations/payment_update_intent.rs", "crates/router/src/core/payments/transformers.rs"], "types": ["crates/router/src/types/api/payments.rs", "crates/router_env/src/logger/types.rs"], "utils": ["crates/router/src/routes/lock_utils.rs"], "other": ["api-reference-v2/api-reference/payments/payments--update-intent.mdx", "api-reference-v2/mint.json", "api-reference-v2/openapi_spec.json", "crates/common_enums/src/enums.rs", "crates/openapi/src/openapi_v2.rs", "crates/openapi/src/routes/payments.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/payments.rs", "crates/storage_impl/src/payments/payment_intent.rs"]}, "change_types": {"structs_added": 5, "functions_added": 31, "fields_added": 359, "imports_added": 16}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(refunds_v2): Add refund update core flow in v2 apis ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR contains refunds update flow for v2 apis. It is a part of v2 implementation of refunds. ### 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). --> Merging this pr will add refunds update flow to the hyperswitch v2 apis, merchants can update refunds with v2 apis. ## How did you test 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 Refund API Call ``` curl --location 'http://localhost:8080/v2/refunds' \ --header 'X-Profile-Id: pro_AL59Mhfn1eDbm5FtUXao' \ --header 'Content-Type: application/json' \ --header 'Authorization: api-key=dev_t3GJeRLga4fvpMYfeA26gnjD5jwPWUFA9gbGdUfRwujMbWd54GDi5YjhcbmL5WiQ' \ --data '{ "payment_id":"12345_pay_01966ca5ba0f781394e31ca377c045c1", "merchant_reference_id":"1745579609", "reason":"Paid by mistake", "metadata":{ "foo":"bar" } }' ``` - Response from the above call ``` { "id": "12345_ref_01966ca5cdd87781af1426c620531fb5", "payment_id": "12345_pay_01966ca5ba0f781394e31ca377c045c1", "merchant_reference_id": "1745579528", "amount": 100, "currency": "USD", "status": "succeeded", "reason": "Paid by mistake", "metadata": { "foo": "bar" }, "error_details": { "code": "", "message": "" }, "created_at": "2025-04-25T11:12:07.651Z", "updated_at": "2025-04-25T11:12:08.717Z", "connector": "stripe", "profile_id": "pro_AL59Mhfn1eDbm5FtUXao", "merchant_connector_id": "mca_rAbIwlE7su9DkFILFzSO", "connector_refund_reference_id": null } ``` - Update Refund API Call ``` curl --location --request PUT 'http://localhost:8080/v2/refunds/12345_ref_01966ca5cdd87781af1426c620531fb5/update_metadata' \ --header 'x-profile-id: pro_AL59Mhfn1eDbm5FtUXao' \ --header 'Content-Type: application/json' \ --header 'Authorization: api-key=dev_t3GJeRLga4fvpMYfeA26gnjD5jwPWUFA9gbGdUfRwujMbWd54GDi5YjhcbmL5WiQ' \ --data '{ "reason":"Customer asked for refund", "metadata": { "customer": "Mr bean from IIT Dholakpur" } }' ``` - Response from the above call ``` { "id": "12345_ref_01966ca5cdd87781af1426c620531fb5", "payment_id": "12345_pay_01966ca5ba0f781394e31ca377c045c1", "merchant_reference_id": "1745579528", "amount": 100, "currency": "USD", "status": "succeeded", "reason": "Customer asked for refund", "metadata": { "customer": "Mr bean from IIT Dholakpur" }, "error_details": { "code": "", "message": "" }, "created_at": "2025-04-25T11:12:07.651Z", "updated_at": "2025-04-25T11:12:10.581Z", "connector": "stripe", "profile_id": "pro_AL59Mhfn1eDbm5FtUXao", "merchant_connector_id": "mca_rAbIwlE7su9DkFILFzSO", "connector_refund_reference_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/refunds.rs` **2. Core Business Logic** - `crates/router/src/core/refunds_v2.rs` **3. Type Definitions** - `crates/router/src/types/api/refunds.rs` **4. Other** - `api-reference-v2/openapi_spec.json` - `crates/openapi/src/openapi_v2.rs` - `crates/openapi/src/routes/refunds.rs` - ... and 2 more files **Code Patterns Applied:** - Define new data structures (2 changes) - Implement new functions (4 changes) - Extend existing types with new fields (21 changes) - Modify database queries (1 changes) **Detailed Identifier Changes:** Commit 04dc14a9: Files to modify: **crates/api_models/src/refunds.rs** Add: - struct: pub::RefundMetadataUpdateRequest **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/openapi/src/routes/refunds.rs** Add: - function: pub::refunds_metadata_update **crates/router/src/core/refunds_v2.rs** Add: - function: pub::refund_metadata_update_core **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/refunds.rs** Add: - function: private::get_api_event_type - function: pub::refunds_metadata_update - struct: pub::RefundsGenericRequestWithResourceId - impl: impl common_utils::events::ApiEventMetric for RefundsGenericRequestWithResourceId<T> - mod: private::internal_payload_types **crates/router/src/types/api/refunds.rs** Modify existing code
{"pr_number": 7724, "pr_title": "feat(refunds_v2): Add refund update core flow in v2 apis", "merged_at": "2025-05-13T09:36:58Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/refunds.rs"], "core_business": ["crates/router/src/core/refunds_v2.rs"], "types": ["crates/router/src/types/api/refunds.rs"], "other": ["api-reference-v2/openapi_spec.json", "crates/openapi/src/openapi_v2.rs", "crates/openapi/src/routes/refunds.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/refunds.rs"]}, "change_types": {"structs_added": 2, "functions_added": 4, "fields_added": 21, "imports_added": 1, "database_queries": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [Coingate] add wasm changes for coingate metadata ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description add wasm changes for coingate metadata ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? 1. Create Merchant 2. Create API key 3. Create MCA of coingate ``` curl --location 'http://localhost:8080/account/merchant_1742369861/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' \ --data '{ "connector_type": "payment_processor", "connector_name": "coingate", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "___" }, "test_mode": false, "disabled": false, "payment_methods_enabled": [ { "payment_method": "crypto", "payment_method_types": [ { "payment_method_type": "crypto_currency", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false } ] } ], "metadata":{ "currency_id": 1, "platform_id": 6, "ledger_account_id": "___" } }' Response ``` { "connector_type": "payment_processor", "connector_name": "coingate", "connector_label": "coingate_US_food", "merchant_connector_id": "mca_1P9UPEEiqxrOd5LL2QFu", "profile_id": "pro_uHYtW2yoEpfpSzKht6FY", "connector_account_details": { "auth_type": "BodyKey", "api_key": "8H************************************SV", "key1": "qe****we" }, "payment_methods_enabled": [ { "payment_method": "crypto", "payment_method_types": [ { "payment_method_type": "crypto_currency", "payment_experience": "redirect_to_url", "card_networks": null, "accepted_currencies": null, "accepted_countries": null, "minimum_amount": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false } ] } ], "connector_webhook_details": null, "metadata": { "currency_id": 1, "platform_id": 6, "ledger_account_id": "01JP4KPNNMF0S26GVP99RZXGWP" }, "test_mode": false, "disabled": false, "frm_configs": null, "business_country": null, "business_label": null, "business_sub_label": null, "applepay_verified_domains": null, "pm_auth_config": null, "status": "active", "additional_merchant_data": null, "connector_wallets_details": null } ``` ## 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": 7632, "pr_title": "feat(connector): [Coingate] add wasm changes for coingate metadata", "merged_at": "2025-03-25T20:15:41Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "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): [Hipay] Add Card Payments Flow ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Added 3DS /No-3ds Card flows Mandates Not added ### 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)? --> Added Cypress Tests <img width="1032" alt="Screenshot 2025-03-11 at 5 13 10 AM" src="https://github.com/user-attachments/assets/80218056-0d57-4960-bda3-4f7f6f5ae6e2" /> <img width="985" alt="Screenshot 2025-03-11 at 5 13 02 AM" src="https://github.com/user-attachments/assets/0976cc12-01cf-49fc-a5cd-9eff8ff923d8" /> <img width="899" alt="Screenshot 2025-03-11 at 5 12 53 AM" src="https://github.com/user-attachments/assets/d58e43fe-4fd5-47e4-ac53-d0c0ae6e2ef0" /> <img width="931" alt="Screenshot 2025-03-11 at 5 12 43 AM" src="https://github.com/user-attachments/assets/16c6f83a-0b17-42f3-95b2-d32964bed3a0" /> <img width="879" alt="Screenshot 2025-03-11 at 5 07 50 AM" src="https://github.com/user-attachments/assets/71f9092d-7eff-4728-a372-d54acbf8935c" /> ## 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/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/Hipay.js` - `cypress-tests/cypress/e2e/configs/Payment/Utils.js` - ... and 1 more files **5. Configuration Files** - `config/config.example.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 3 more files **Code Patterns Applied:** - Define new data structures (7 changes) - Implement new functions (23 changes) - Extend existing types with new fields (645 changes) **Detailed Identifier Changes:** Commit 3e7db573: 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/hipay.rs** Remove: - function: private::get_content_type - function: private::get_content_type - function: private::get_content_type - function: private::get_content_type - function: private::get_content_type - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Hipay - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Hipay Add: - function: pub::build_form_from_struct - function: private::get_headers - function: private::get_url - function: private::get_request_body - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::validate_connector_against_payment_request - function: private::get_headers - function: private::get_url - function: private::build_request - function: private::get_request_body - function: private::handle_response - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Hipay - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Hipay **crates/hyperswitch_connectors/src/connectors/hipay/transformers.rs** Remove: - function: private::from - function: private::from - struct: pub::HipayCard - struct: pub::HipayRefundRequest - enum: pub::HipayPaymentStatus - impl: impl From<HipayPaymentStatus> for common_enums::AttemptStatus - impl: impl TryFrom<ResponseRouterData<F, HipayPaymentsResponse, T, PaymentsResponseData>> for [derive(Default, Debug, Serialize)] **crates/hyperswitch_interfaces/src/configs.rs** Modify existing code **crates/router/src/configs/defaults/payment_connector_required_fields.rs** Modify existing code **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/types/api.rs** Modify existing code **crates/router/src/types/transformers.rs** Modify existing code
{"pr_number": 7475, "pr_title": "feat(connector): [Hipay] Add Card Payments Flow ", "merged_at": "2025-03-13T14:40:23Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user", "card"]}, "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/hipay.rs", "crates/hyperswitch_connectors/src/connectors/hipay/transformers.rs", "crates/router/src/configs/defaults/payment_connector_required_fields.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/Hipay.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", "crates/hyperswitch_interfaces/src/configs.rs"]}, "change_types": {"structs_added": 7, "functions_added": 23, "enums_added": 3, "fields_added": 645, "imports_added": 11}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [Multisafepay] Integrate EPS, MBWAY and SOFORT ## 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 new pm for multisafepay - EPS - SOFORT - MBWAY ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> <details> <summary>MCA</summary> ```json { "connector_type": "payment_processor", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "****" }, "connector_name": "multisafepay", "test_mode": false, "disabled": false, "payment_methods_enabled": [ { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "paypal", "payment_experience": "redirect_to_url" } ] }, { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "we_chat_pay", "payment_experience": "redirect_to_url" } ] }, { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "ali_pay", "payment_experience": "redirect_to_url" } ] }, { "payment_method": "wallet", "payment_method_types": [ { "payment_method_type": "amazon_pay", "payment_experience": "redirect_to_url" } ] }, { "payment_method": "bank_redirect", "payment_method_types": [ { "payment_method_type": "trustly" } ] }, { "payment_method": "bank_redirect", "payment_method_types": [ { "payment_method_type": "eps", "payment_experience": "redirect_to_url" } ] }, { "payment_method": "bank_redirect", "payment_method_types": [ { "payment_method_type": "mb_way", "payment_experience": "redirect_to_url" } ] }, { "payment_method": "bank_redirect", "payment_method_types": [ { "payment_method_type": "sofort", "payment_experience": "redirect_to_url" } ] }, { "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" }, "business_country": "US", "business_label": "default" } ``` </details> ## SOFORT <details> <summary>Payment Request</summary> ```json { "amount": 333, "currency": "EUR", "confirm": true, "capture_method": "automatic", "payment_method": "bank_redirect", "payment_method_type": "sofort", "authentication_type": "no_three_ds", "description": "hellow world", "billing": { "address": { "zip": "560095", "first_name": "Sakil", "last_name": "Mostak", "line1": "Fasdf", "country": "CN", "line2": "Fasdf", "city": "Fasdf" } }, "payment_method_data": { "bank_redirect": { "sofort": {} } } } ``` </details> <details> <summary>Confirm page</summary> <img width="1356" alt="Screenshot 2025-07-01 at 11 20 05 AM" src="https://github.com/user-attachments/assets/13699a4f-db05-4e44-ab48-f19948c2645f" /> </details> <details> <summary>Psync Response</summary> ```json { "payment_id": "pay_2VuZLa8gqY25CfYd0j9g", "merchant_id": "merchant_1751348844", "status": "succeeded", "amount": 333, "net_amount": 333, "shipping_cost": null, "amount_capturable": 0, "amount_received": 333, "connector": "multisafepay", "client_secret": "pay_2VuZLa8gqY25CfYd0j9g_secret_uJ6cIqUaMlLLZjxdduEB", "created": "2025-07-01T05:49:46.290Z", "currency": "EUR", "customer_id": null, "customer": null, "description": "hellow world", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "bank_redirect", "payment_method_data": { "bank_redirect": { "type": "BankRedirectResponse", "bank_name": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "Fasdf", "country": "CN", "line1": "Fasdf", "line2": "Fasdf", "line3": null, "zip": "560095", "state": null, "first_name": "Sakil", "last_name": "Mostak" }, "phone": null, "email": null }, "order_details": null, "email": null, "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "sofort", "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_2VuZLa8gqY25CfYd0j9g_1", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_2VuZLa8gqY25CfYd0j9g_1", "payment_link": null, "profile_id": "pro_3OEvbwtJss77rpYRZpK9", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_lpvLYRnYLwlFl8HyiR3C", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-01T06:04:46.290Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-01T05:50:08.187Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` </details> ## EPS <details> <summary>Payment request</summary> ```json { "amount": 333, "currency": "EUR", "confirm": true, "capture_method": "automatic", "payment_method": "bank_redirect", "payment_method_type": "eps", "authentication_type": "no_three_ds", "description": "hellow world", "billing": { "address": { "zip": "560095", "first_name": "Sakil", "last_name": "Mostak", "line1": "Fasdf", "country": "AT", "line2": "Fasdf", "city": "Fasdf" } }, "payment_method_data": { "bank_redirect": { "eps": {} } } } ``` </details> <details> <summary>Payment page</summary> ``` NOTE there is a bug in confirm page by multisafe page where it shows gyropay instead eps. But after success the payment is regestered under eps only in the merchant page ``` <img width="1324" alt="Screenshot 2025-07-01 at 11 34 03 AM" src="https://github.com/user-attachments/assets/b768ba16-a351-40aa-bfa3-5ae8356593d0" /> </details> <details> <summary>Psync response</summary> ```json { "payment_id": "pay_5wcVD9r07H9USnvnkmj8", "merchant_id": "merchant_1751348844", "status": "succeeded", "amount": 333, "net_amount": 333, "shipping_cost": null, "amount_capturable": 0, "amount_received": 333, "connector": "multisafepay", "client_secret": "pay_5wcVD9r07H9USnvnkmj8_secret_gszuW3VnyepDNGQycnkG", "created": "2025-07-01T06:03:45.907Z", "currency": "EUR", "customer_id": null, "customer": null, "description": "hellow world", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "bank_redirect", "payment_method_data": { "bank_redirect": { "type": "BankRedirectResponse", "bank_name": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "Fasdf", "country": "AT", "line1": "Fasdf", "line2": "Fasdf", "line3": null, "zip": "560095", "state": null, "first_name": "Sakil", "last_name": "Mostak" }, "phone": null, "email": null }, "order_details": null, "email": null, "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "eps", "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_5wcVD9r07H9USnvnkmj8_1", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_5wcVD9r07H9USnvnkmj8_1", "payment_link": null, "profile_id": "pro_3OEvbwtJss77rpYRZpK9", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_lpvLYRnYLwlFl8HyiR3C", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-01T06:18:45.907Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-01T06:04:06.199Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` </details> ## MB WAY <details> <summary>Payment</summary> ```json { "amount": 333, "currency": "EUR", "confirm": true, "capture_method": "automatic", "payment_method": "wallet", "payment_method_type": "mb_way", "authentication_type": "no_three_ds", "description": "hellow world", "billing": { "address": { "zip": "560095", "first_name": "Sakil", "last_name": "Mostak", "line1": "Fasdf", "country": "PT", "line2": "Fasdf", "city": "Fasdf" } }, "payment_method_data": { "wallet": { "mb_way_redirect": {} } } } ``` </details> <details> <summary>Payment Response </summary> ```json { "payment_id": "pay_5FG8mrPdW4jnQERhOSSW", "merchant_id": "merchant_1751348844", "status": "requires_customer_action", "amount": 333, "net_amount": 333, "shipping_cost": null, "amount_capturable": 333, "amount_received": null, "connector": "multisafepay", "client_secret": "pay_5FG8mrPdW4jnQERhOSSW_secret_OZ8fONDt6UUY4YyCHZRh", "created": "2025-07-01T06:10:53.544Z", "currency": "EUR", "customer_id": null, "customer": null, "description": "hellow world", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "wallet", "payment_method_data": { "wallet": {}, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "Fasdf", "country": "PT", "line1": "Fasdf", "line2": "Fasdf", "line3": null, "zip": "560095", "state": null, "first_name": "Sakil", "last_name": "Mostak" }, "phone": null, "email": null }, "order_details": null, "email": null, "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_5FG8mrPdW4jnQERhOSSW/merchant_1751348844/pay_5FG8mrPdW4jnQERhOSSW_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "mb_way", "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_5FG8mrPdW4jnQERhOSSW_1", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_5FG8mrPdW4jnQERhOSSW_1", "payment_link": null, "profile_id": "pro_3OEvbwtJss77rpYRZpK9", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_NafK7LHPOhPMyNsUBOfH", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-01T06:25:53.544Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-01T06:10:55.158Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` </details> <details> <summary>Confirm page</summary> <img width="1356" alt="Screenshot 2025-07-01 at 11 20 05 AM" src="https://github.com/user-attachments/assets/96558e15-dc30-4b36-a1a1-2b3de10f3262" /> <img width="1324" alt="Screenshot 2025-07-01 at 11 34 03 AM" src="https://github.com/user-attachments/assets/60ce6a5f-4c57-42aa-9175-69a47c1ec20e" /> SOME PROBLEM WITH CONFIRMATION </details> <details> <summary>Psync</summary> ``` UNABLE TO VERIFY due to issue from multisafepay . Needs alpha testing ``` </details> ### cypress test - UNABLE TO TEST REDIRECTION VIA CYPRESS DUE TO CSRF BLOCKING <img width="696" alt="Screenshot 2025-07-09 at 4 18 29 PM" src="https://github.com/user-attachments/assets/d875b5a0-6ef7-4475-a615-5cacf6c4e8bc" /> ## 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 - [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/multisafepay.rs` - `crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs` **2. Tests** - `config/deployments/integration_test.toml` - `cypress-tests/cypress/e2e/configs/Payment/Multisafepay.js` - `cypress-tests/cypress/support/redirectionHandler.js` **3. Configuration Files** - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - `config/development.toml` **Code Patterns Applied:** - Define new data structures (4 changes) - Extend existing types with new fields (92 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 8a9d7d22: Files to modify: **crates/hyperswitch_connectors/src/connectors/multisafepay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs** Remove: - struct: pub::WeChatPayInfo Add: - struct: pub::MbWayInfo - struct: pub::WeChatPayInfo - struct: pub::SofortInfo - struct: pub::EpsInfo
{"pr_number": 8506, "pr_title": "feat(connector): [Multisafepay] Integrate EPS, MBWAY and SOFORT", "merged_at": "2025-07-14T10:08:41Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/multisafepay.rs", "crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs"], "tests": ["config/deployments/integration_test.toml", "cypress-tests/cypress/e2e/configs/Payment/Multisafepay.js", "cypress-tests/cypress/support/redirectionHandler.js"], "config": ["config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml"]}, "change_types": {"structs_added": 4, "fields_added": 92, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(router): card network for co-badged card and update regex ## 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 --> - Regex for matching card network is updated to keep it in consistency with the frontend - fix bug for card network where even if it is a co-badged card, it takes card network from the card api ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Tested through Postman: - Create an MCA (Checkout) - Create a payment with co-badged card ``` { "amount": 1043, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "customer_id": "StripeCustomer", "email": "[email protected]", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://google.com", "payment_method": "card", "payment_method_data": { "card": { "card_number": "4010061700000021", "card_exp_month": "01", "card_exp_year": "99", "card_holder_name": "joseph Doe", "card_cvc": "123", "card_network": "CartesBancaires" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } } ``` - In the response, the card_network should be present i.e. `CartesBancaires` and should match - The response should look like following ``` { "payment_id": "pay_wvcJQRPQKOvHjvzqFJix", "merchant_id": "merchant_1733907987", "status": "processing", "amount": 1043, "net_amount": 1043, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "checkout", "client_secret": "pay_wvcJQRPQKOvHjvzqFJix_secret_SukmA54t9oep9K1KxSrc", "created": "2024-12-11T09:52:28.477Z", "currency": "USD", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "[email protected]", "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": "0021", "card_type": null, "card_network": "CartesBancaires", "card_issuer": null, "card_issuing_country": null, "card_isin": "401006", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "99", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "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": "PiX", "last_name": null }, "phone": null, "email": null }, "order_details": null, "email": "[email protected]", "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": null, "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": 1733910748, "expires": 1733914348, "secret": "epk_49d031a3596d4fadb79e7cdb7c58559d" }, "manual_retry_allowed": false, "connector_transaction_id": "pay_ymjd6m5acujebkctxn4hteaswa", "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_wvcJQRPQKOvHjvzqFJix_1", "payment_link": null, "profile_id": "pro_jkvQLXzyFlM6p3KyuUEY", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_wz0gCKtDv37owvc8fp6L", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-12-11T10:07:28.477Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2024-12-11T09:52:29.142Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/payments/helpers.rs` **2. Other** - `crates/cards/src/validate.rs` **Code Patterns Applied:** - Extend existing types with new fields (2 changes) **Detailed Identifier Changes:** Commit cd205378: Files to modify: **crates/cards/src/validate.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code
{"pr_number": 6801, "pr_title": "fix(router): card network for co-badged card and update regex", "merged_at": "2024-12-11T10:40:20Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/helpers.rs"], "other": ["crates/cards/src/validate.rs"]}, "change_types": {"fields_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): [Retry] MIT Retries ## 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 action type in ConnectorRoutingData (NT with ntid, Card with ntid, Connector mandate). We are storing all the instances of connector routing data with different action types. During retry it will pick the top element in the list and will try to do payment with the mandate_reference_id that will be fetched from action type. Solution doc: [link](https://docs.google.com/document/d/1SuIfFOahN8Y5bOUb_O3QUmwmpioJ26q97huAwT9bCR4/edit?usp=sharing) ``` pub struct ConnectorRoutingData { pub connector_data: ConnectorData, pub network: Option<common_enums::CardNetwork>, pub action_type: Option<ActionType>, } pub enum ActionType { NetworkTokenWithNetworkTransactionId(NTWithNTIRef), CardWithNetworkTransactionId(String), // Network Transaction Id #[cfg(feature = "v1")] ConnectorMandate(Option<diesel_models::PaymentsMandateReference>), } Retryable Connectors = [Adyen, Cybersource, Stripe] Adyen - 1. Connector Mandate 2. CardWithNetworkTransactionId Cybersource - 1. NetworkTokenWithNetworkTransactionId 2. CardWithNetworkTransactionId Stripe - 1. CardWithNetworkTransactionId After Processing - Retryable Connectors = [Adyen(Connector Mandate), Adyen(CardWithNetworkTransactionId), Cybersource(NetworkTokenWithNetworkTransactionId), Cybersource(CardWithNetworkTransactionId), Stripe(CardWithNetworkTransactionId)] do_retry: let current_connector_routing_data = retryable_connectors.next() let mandate_reference_id = get_mandate_reference_id(current_connector_routing_data.action_type) payment_data.set_mandate_id(api_models::payments::MandateIds { mandate_id: None, mandate_reference_id, //mandate_ref_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)? --> 1. Connector create Adyen: ``` curl --location 'http://localhost:8080/account/merchant_1753897495/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_BO0MXRwyIFS7jImumSCBpO7VkdFjNZ46uX506zER3sA1rBbnFn3P8OTOS1Zr606h' \ --data '{ "connector_type": "payment_processor", "connector_name": "adyen", "connector_account_details": { "auth_type": "SignatureKey", "api_secret": "abc", "api_key": "abc", "key1": "" }, "test_mode": true, "disabled": false, "payment_methods_enabled": [ { "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": "card", "payment_method_types": [ { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ "Visa", "Mastercard", "AmericanExpress" ], "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 } ] } ], "metadata": { "status_url": "https://2753-2401-4900-1cb8-2ff9-24dd-1ccf-ed12-b464.in.ngrok.io/webhooks/merchant_1678699058/globalpay", "account_name": "transaction_processing", "pricing_type": "fixed_price", "acquirer_bin": "438309", "acquirer_merchant_id": "00002000000" }, "business_country": "US", "business_label": "default", "frm_configs": null, "connector_webhook_details": { "merchant_secret": "" } }' ``` 2. Connector Create Cybersource: ``` curl --location 'http://localhost:8080/account/merchant_1753897495/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_BO0MXRwyIFS7jImumSCBpO7VkdFjNZ46uX506zER3sA1rBbnFn3P8OTOS1Zr606h' \ --data '{ "connector_type": "payment_processor", "connector_name": "cybersource", "connector_account_details": { "auth_type": "SignatureKey", "api_secret": "abc", "api_key": "abc", "key1": "" }, "test_mode": true, "disabled": false, "payment_methods_enabled": [ { "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": "card", "payment_method_types": [ { "payment_method_type": "credit", "payment_experience": null, "card_networks": [ "Visa", "Mastercard", "AmericanExpress" ], "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 } ] } ], "metadata": { "status_url": "https://2753-2401-4900-1cb8-2ff9-24dd-1ccf-ed12-b464.in.ngrok.io/webhooks/merchant_1678699058/globalpay", "account_name": "transaction_processing", "pricing_type": "fixed_price", "acquirer_bin": "438309", "acquirer_merchant_id": "00002000000" }, "business_country": "US", "business_label": "default", "frm_configs": null, "connector_webhook_details": { "merchant_secret": "" } }' ``` 3. Business profile update: ``` curl --location 'http://localhost:8080/account/merchant_1754988842/business_profile/pro_0ApGdp5GH660dy5AGft5' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_SIJmEz8xbGVEybdUspVKhl4QVfAyelalMWYp52puDIG4OWzk6ewgVGGHTm7gS1cK' \ --data '{ "is_connector_agnostic_mit_enabled": true, "is_auto_retries_enabled": true, "max_auto_retries_enabled": 5 }' ``` 4. CIT payments create: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_BO0MXRwyIFS7jImumSCBpO7VkdFjNZ46uX506zER3sA1rBbnFn3P8OTOS1Zr606h' \ --data-raw '{ "amount": 10, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "customer_id": "cu_1753904658", "email": "[email protected]", "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", "payment_type": "setup_mandate", "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" } ] }' ``` 5. Change the value of `connector_mandate_id` to some wrong value in db. 6. GSM error: ``` curl --location 'localhost:8080/gsm' \ --header 'api-key: test_admin' \ --header 'Content-Type: application/json' \ --data '{ "connector": "adyen", "flow": "Authorize", "sub_flow": "sub_flow", "code": "803", "message": "PaymentDetail not found", "status": "failed", "router_error": "Something went wrong", "decision": "retry", "step_up_possible": false, "clear_pan_possible": false, "unified_code": "5xx", "unified_message": "Error", "error_category": "frm_decline" }' ``` 7. MIT payments create: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_BO0MXRwyIFS7jImumSCBpO7VkdFjNZ46uX506zER3sA1rBbnFn3P8OTOS1Zr606h' \ --data '{ "amount": 999, "currency": "USD", "confirm": true, "profile_id": "pro_ZeFGow0L5Y1TzhzffSK7", "customer_id": "customer098765", "return_url": "https://google.com/", "recurring_details": { "type": "payment_method_id", "data": "successful CIT payment id" }, "off_session": true, "billing": { "address": { "first_name":"John", "last_name":"Doe", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US" }, "phone": { "number": "8056594427", "country_code": "+91" } } }' ``` Response (attempt_count = 2): ``` { "payment_id": "pay_DjvhVKgjBOEDU6nFkalO", "merchant_id": "merchant_1754046615", "status": "succeeded", "amount": 999, "net_amount": 999, "shipping_cost": null, "amount_capturable": 0, "amount_received": 999, "connector": "adyen", "client_secret": "pay_DjvhVKgjBOEDU6nFkalO_secret_682mdlC6mQ2xCf0Wf0A4", "created": "2025-08-01T12:42:04.553Z", "currency": "USD", "customer_id": "cu_1754050231", "customer": { "id": "cu_1754050231", "name": "John Doe", "email": "[email protected]", "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": null, "payment_method": "card", "payment_method_data": { "card": { "last4": "1111", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "411111", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "name name", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": "[email protected]", "name": "John Doe", "phone": "999999999", "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": "cu_1754050231", "created_at": 1754052124, "expires": 1754055724, "secret": "epk_378607c699c9493ba67d398ba4069d5b" }, "manual_retry_allowed": false, "connector_transaction_id": "J3LV3LZB9JTHNS75", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_DjvhVKgjBOEDU6nFkalO_2", "payment_link": null, "profile_id": "pro_wPWBpxTXWAgouZVHOP4P", "surcharge_details": null, "attempt_count": 2, "merchant_decision": null, "merchant_connector_id": "mca_2MjRpgYbkH8U92tH1huS", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-01T12:57:04.553Z", "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_eslwOh7cYf7sFsNWN1Iq", "payment_method_status": "active", "updated": "2025-08-01T12:42:08.581Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "saved_card", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` 8. Payments Retrieve: ``` curl --location 'http://localhost:8080/payments/pay_DjvhVKgjBOEDU6nFkalO?force_sync=true&expand_attempts=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_hfUb5b3thW9LuPyco462Eu5KxYbWF9GK0SldV3joK018qcsZhBG7SQbSUMPyl3ZC' ``` Payments Retrieve Response: ``` { "payment_id": "pay_DjvhVKgjBOEDU6nFkalO", "merchant_id": "merchant_1754046615", "status": "succeeded", "amount": 999, "net_amount": 999, "shipping_cost": null, "amount_capturable": 0, "amount_received": 999, "connector": "adyen", "client_secret": "pay_DjvhVKgjBOEDU6nFkalO_secret_682mdlC6mQ2xCf0Wf0A4", "created": "2025-08-01T12:42:04.553Z", "currency": "USD", "customer_id": "cu_1754050231", "customer": { "id": "cu_1754050231", "name": "John Doe", "email": "[email protected]", "phone": "999999999", "phone_country_code": "+65" }, "description": null, "refunds": null, "disputes": null, "attempts": [ { "attempt_id": "pay_DjvhVKgjBOEDU6nFkalO_2", "status": "charged", "amount": 999, "order_tax_amount": null, "currency": "USD", "connector": "adyen", "error_message": null, "payment_method": "card", "connector_transaction_id": "J3LV3LZB9JTHNS75", "capture_method": null, "authentication_type": "no_three_ds", "created_at": "2025-08-01T12:42:06.553Z", "modified_at": "2025-08-01T12:42:08.581Z", "cancellation_reason": null, "mandate_id": null, "error_code": null, "payment_token": null, "connector_metadata": null, "payment_experience": null, "payment_method_type": "credit", "reference_id": "pay_DjvhVKgjBOEDU6nFkalO_2", "unified_code": null, "unified_message": null, "client_source": null, "client_version": null }, { "attempt_id": "pay_DjvhVKgjBOEDU6nFkalO_1", "status": "failure", "amount": 999, "order_tax_amount": null, "currency": "USD", "connector": "adyen", "error_message": "PaymentDetail not found", "payment_method": "card", "connector_transaction_id": "H5BKWV6FGQ2VJT65", "capture_method": null, "authentication_type": "no_three_ds", "created_at": "2025-08-01T12:42:04.554Z", "modified_at": "2025-08-01T12:42:06.613Z", "cancellation_reason": null, "mandate_id": null, "error_code": "803", "payment_token": null, "connector_metadata": null, "payment_experience": null, "payment_method_type": "credit", "reference_id": null, "unified_code": "5xx", "unified_message": "Error", "client_source": null, "client_version": null } ], "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": true, "capture_on": null, "capture_method": null, "payment_method": "card", "payment_method_data": { "card": { "last4": "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": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": "[email protected]", "name": "John Doe", "phone": "999999999", "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": null, "manual_retry_allowed": false, "connector_transaction_id": "J3LV3LZB9JTHNS75", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_DjvhVKgjBOEDU6nFkalO_2", "payment_link": null, "profile_id": "pro_wPWBpxTXWAgouZVHOP4P", "surcharge_details": null, "attempt_count": 2, "merchant_decision": null, "merchant_connector_id": "mca_2MjRpgYbkH8U92tH1huS", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-08-01T12:57:04.553Z", "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_eslwOh7cYf7sFsNWN1Iq", "payment_method_status": "active", "updated": "2025-08-01T12:42:08.581Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "saved_card", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "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. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/mandates.rs` **2. Core Business Logic** - `crates/router/src/core/debit_routing.rs` - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/retry.rs` **3. Type Definitions** - `crates/router/src/types/api.rs` - `crates/router/src/types/api/fraud_check.rs` **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (9 changes) - Extend existing types with new fields (34 changes) - Add conditional logic for feature flags or filtering (5 changes) **Detailed Identifier Changes:** Commit c0e31d38: Files to modify: **crates/hyperswitch_domain_models/src/mandates.rs** Add: - function: private::from - impl: impl From<&PaymentsMandateReferenceRecord> for RecurringMandatePaymentData **crates/router/src/core/debit_routing.rs** Modify existing code **crates/router/src/core/payments.rs** Add: - function: pub::get_mandate_reference_id - function: private::from - function: pub::new - function: pub::with_mandate_flow - function: pub::with_network_tokenization - function: pub::with_card_network_transaction_id - function: pub::build - struct: pub::ActionTypesBuilder - impl: impl From<NTWithNTIRef> for payments_api::NetworkTokenWithNTIRef - impl: impl ActionTypesBuilder **crates/router/src/core/payments/retry.rs** Modify existing code **crates/router/src/types/api.rs** Modify existing code **crates/router/src/types/api/fraud_check.rs** Modify existing code
{"pr_number": 8628, "pr_title": "feat(core): [Retry] MIT Retries", "merged_at": "2025-09-10T14:03:30Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/mandates.rs"], "core_business": ["crates/router/src/core/debit_routing.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/payments/retry.rs"], "types": ["crates/router/src/types/api.rs", "crates/router/src/types/api/fraud_check.rs"]}, "change_types": {"structs_added": 1, "functions_added": 9, "fields_added": 34, "imports_added": 3, "conditionals_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(router): verify service for applepay merchant registration 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 Apple Pay merchant registration and verified domains retrieval for 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)? --> Request: ``` curl --location 'http://localhost:8080/v2/verify/apple-pay/cloth_seller_4hdx8pW2mxW0V6TZEQfm' \ --header 'x-client-secret: cs_0198af34cbcd72d0becd4db96e800bd9' \ --header 'x-profile-id: pro_833jt2bQKinLLA4pucBK' \ --header 'Authorization: api-key=dev_WH5clkiXgFqCpCDr62FCsFnjcRDZzIdwbvuuLK3sjC0nR3g6YWUYWVkOOzlfhxpd' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_WH5clkiXgFqCpCDr62FCsFnjcRDZzIdwbvuuLK3sjC0nR3g6YWUYWVkOOzlfhxpd' \ --data '{ "domain_names": ["hyperswitch-demo-store.netlify.app","sdk-test-app.netlify.app"], "merchant_connector_account_id": "mca_zYpPX5yTd3vo5NeMn26P" }' ``` Response: ``` { "status_message": "Applepay verification Completed" } ``` Request: ``` curl --location 'http://localhost:8080/v2/verify/applepay-verified-domains?merchant_id=cloth_seller_4hdx8pW2mxW0V6TZEQfm&merchant_connector_account_id=mca_zYpPX5yTd3vo5NeMn26P' \ --header 'x-profile-id: pro_833jt2bQKinLLA4pucBK' \ --header 'Authorization: admin-api-key=test_admin' \ --header 'api-key: dev_WH5clkiXgFqCpCDr62FCsFnjcRDZzIdwbvuuLK3sjC0nR3g6YWUYWVkOOzlfhxpd' \ --data '' ``` Response: ``` { "verified_domains": [ "hyperswitch-demo-store.netlify.app", "sdk-test-app.netlify.app" ] } ``` <img width="1329" height="886" alt="image" src="https://github.com/user-attachments/assets/6077be64-5e4e-42a5-854e-f2872aa4e8a4" /> <img width="1338" height="904" alt="image" src="https://github.com/user-attachments/assets/08ef59d1-7ed2-4ad1-850f-12ce5118e67e" /> closes #8998 ## 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/verification.rs` - `crates/router/src/core/verification/utils.rs` **2. Other** - `crates/router/src/lib.rs` - `crates/router/src/routes/app.rs` - `crates/router/src/routes/verification.rs` **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (2 changes) - Extend existing types with new fields (7 changes) **Detailed Identifier Changes:** Commit 0ba5d543: Files to modify: **crates/router/src/core/verification.rs** Modify existing code **crates/router/src/core/verification/utils.rs** Modify existing code **crates/router/src/lib.rs** Modify existing code **crates/router/src/routes/app.rs** Add: - function: pub::server - impl: impl Verify **crates/router/src/routes/verification.rs** Add: - function: pub::apple_pay_merchant_registration
{"pr_number": 8999, "pr_title": "feat(router): verify service for applepay merchant registration v2", "merged_at": "2025-08-22T13:36:37Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant", "user", "connector"]}, "hierarchy": {"core_business": ["crates/router/src/core/verification.rs", "crates/router/src/core/verification/utils.rs"], "other": ["crates/router/src/lib.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/verification.rs"]}, "change_types": {"structs_added": 1, "functions_added": 2, "fields_added": 7}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): Add MIT Types in payment Intent ## 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 introduces support for Merchant Initiated Transaction (MIT) categories in the PaymentIntent flow. It allows merchants and connectors to identify the specific type of MIT being processed. **Changes** Added a new enum MitCategory (mit_category)with values: ``` installment – Fixed purchase amount split into multiple payments. `unscheduled – Merchant-initiated, not on a fixed schedule (e.g. top-ups). recurring – Regular interval payments (usually same amount). resubmission – Retry of a previously failed/declined transaction. ``` ### 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 <!-- 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). --> Merchants need the ability to distinguish between different types of Merchant Initiated Transactions (MIT). ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> MIT Request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_V41JS3cPvNExnvPFKZD5ajvWu3II6VbNz47RgJsb3ubjs99LXKCIrKaopc4Vpc6N' \ --data-raw '{"amount": 7100, "currency": "USD", "confirm": true, "customer_id": "cu_1757579182", "capture_method":"automatic", "return_url": "https://google.com", "recurring_details": { "type": "payment_method_id", "data": "pm_MrmumBjm9141VrEP1o4E" }, "mit_category":"installment", "off_session": true, "payment_method":"card", "billing": { "address": { "first_name":"John", "last_name":"Doe", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email":"[email protected]" } }' ``` Response ``` { "payment_id": "pay_SG1wCEU569che7OHMoBo", "merchant_id": "merchant_1758881086", "status": "succeeded", "amount": 7100, "net_amount": 7100, "shipping_cost": null, "amount_capturable": 0, "amount_received": 7100, "connector": "checkout", "client_secret": "pay_SG1wCEU569che7OHMoBo_secret_bHRBSsvw53RQe6VkJpej", "created": "2025-09-29T07:54:47.149Z", "currency": "USD", "customer_id": "cu_1757579182", "customer": { "id": "cu_1757579182", "name": "Joseph Doe", "email": "[email protected]", "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": "9996", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "454347", "card_extended_bin": null, "card_exp_month": "06", "card_exp_year": "2026", "card_holder_name": "John Smith", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "John", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "[email protected]" }, "order_details": null, "email": "[email protected]", "name": "Joseph Doe", "phone": "999999999", "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": "cu_1757579182", "created_at": 1759132487, "expires": 1759136087, "secret": "epk_3ae789fa8c1b4490912c81621596d4e4" }, "manual_retry_allowed": null, "connector_transaction_id": "pay_3o652qr57uzu5gpyqg3lrecdci", "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_SG1wCEU569che7OHMoBo_1", "payment_link": null, "profile_id": "pro_9tRMCkT2d8uXdOsEVPq5", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_UeypiaVRxD7HjgKZsd3Z", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-29T08:09:47.149Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": "pm_MrmumBjm9141VrEP1o4E", "network_transaction_id": "152902114178750", "payment_method_status": "active", "updated": "2025-09-29T07:54:48.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": "src_7x2nz74l7q5engxv2wisbu3iza", "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_category": "installment" } ``` Payment Via NTID Flow ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_V41JS3cPvNExnvPFKZD5ajvWu3II6VbNz47RgJsb3ubjs99LXKCIrKaopc4Vpc6N' \ --data-raw '{ "amount": 7445, "currency": "USD", "confirm": true, "business_country": "US", "business_label": "default", "amount_to_capture": 7445, "mit_category":"installment", "customer_id": "cu_1757579182", "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "setup_future_usage": "on_session", "authentication_type": "no_three_ds", "return_url": "https://google.com", "email": "[email protected]", "name": "Joseph Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "payment_method": "card", "payment_method_type": "credit", "off_session": true, "recurring_details": { "type": "network_transaction_id_and_card_details", "data": { "card_number": "4242424242424242", "card_exp_month": "03", "card_exp_year": "2030", "card_network":"VISA", "network_transaction_id": "1232324214" } }, "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" } } }' ``` Response ``` { "payment_id": "pay_7YOefousfESb3vCgAq1t", "merchant_id": "merchant_1758881086", "status": "succeeded", "amount": 7445, "net_amount": 7445, "shipping_cost": null, "amount_capturable": 0, "amount_received": 7445, "connector": "checkout", "client_secret": "pay_7YOefousfESb3vCgAq1t_secret_JHFEtYzkg0pTyBzVc9rL", "created": "2025-09-29T08:05:15.959Z", "currency": "USD", "customer_id": null, "customer": null, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "on_session", "off_session": true, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": null, "line3": null, "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": null, "name": null, "phone": null, "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": null, "connector_label": "checkout_US_default", "business_country": "US", "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cu_1757579182", "created_at": 1759133115, "expires": 1759136715, "secret": "epk_938b930897724f35baa09c1c840de672" }, "manual_retry_allowed": null, "connector_transaction_id": "pay_t6ijotxzuh2uxbqjmks3brvxgu", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_7YOefousfESb3vCgAq1t_1", "payment_link": null, "profile_id": "pro_9tRMCkT2d8uXdOsEVPq5", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_UeypiaVRxD7HjgKZsd3Z", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-29T08:20:15.959Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "network_transaction_id": "016150703802094", "payment_method_status": null, "updated": "2025-09-29T08:05:17.403Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null, "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": null, "network_details": null, "mit_category": "installment" } ``` MIT Category Not Passed ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_V41JS3cPvNExnvPFKZD5ajvWu3II6VbNz47RgJsb3ubjs99LXKCIrKaopc4Vpc6N' \ --data-raw '{ "amount": 7445, "currency": "USD", "confirm": true, "business_country": "US", "business_label": "default", "amount_to_capture": 7445, "customer_id": "cu_1757579182", "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "no_three_ds", "return_url": "https://google.com", "email": "[email protected]", "name": "Joseph Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "payment_method": "card", "payment_method_type": "credit", "off_session": true, "recurring_details": { "type": "network_transaction_id_and_card_details", "data": { "card_number": "4242424242424242", "card_exp_month": "03", "card_exp_year": "2030", "card_network":"VISA", "network_transaction_id": "016150703802094" } }, "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" } } }' ``` Response ``` { "payment_id": "pay_ycfV8xA0IPMA0gKnA60e", "merchant_id": "merchant_1758881086", "status": "succeeded", "amount": 7445, "net_amount": 7445, "shipping_cost": null, "amount_capturable": 0, "amount_received": 7445, "connector": "checkout", "client_secret": "pay_ycfV8xA0IPMA0gKnA60e_secret_GuBIRF8xTXr1Ehel75rW", "created": "2025-09-29T08:12:59.148Z", "currency": "USD", "customer_id": null, "customer": null, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": true, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": null, "line3": null, "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe", "origin_zip": null }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": null, "name": null, "phone": null, "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": null, "connector_label": "checkout_US_default", "business_country": "US", "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cu_1757579182", "created_at": 1759133579, "expires": 1759137179, "secret": "epk_568f39f3f5cb4453a6516eaa95b6cec2" }, "manual_retry_allowed": null, "connector_transaction_id": "pay_uxdn7mbjhnaeddhjdgi4cqdsre", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pay_ycfV8xA0IPMA0gKnA60e_1", "payment_link": null, "profile_id": "pro_9tRMCkT2d8uXdOsEVPq5", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_UeypiaVRxD7HjgKZsd3Z", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-29T08:27:59.148Z", "fingerprint": null, "browser_info": null, "payment_channel": null, "payment_method_id": null, "network_transaction_id": "016150703802094", "payment_method_status": null, "updated": "2025-09-29T08:12:59.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": "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_category": null } ``` Mit Category Passed but off_session not passed ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_V41JS3cPvNExnvPFKZD5ajvWu3II6VbNz47RgJsb3ubjs99LXKCIrKaopc4Vpc6N' \ --data-raw '{ "amount": 7445, "currency": "USD", "confirm": true, "business_country": "US", "business_label": "default", "amount_to_capture": 7445, "customer_id": "cu_1757579182", "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "no_three_ds", "return_url": "https://google.com", "email": "[email protected]", "name": "Joseph Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "statement_descriptor_name": "Juspay", "statement_descriptor_suffix": "Router", "payment_method": "card", "payment_method_type": "credit", "mit_category":"installment", "recurring_details": { "type": "network_transaction_id_and_card_details", "data": { "card_number": "4242424242424242", "card_exp_month": "03", "card_exp_year": "2030", "card_network":"VISA", "network_transaction_id": "016150703802094" } }, "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" } } }' ``` Response ``` { "error": { "type": "invalid_request", "message": "`mit_category` requires both: (1) `off_session = true`, and (2) `recurring_details`.", "code": "IR_16" } } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/payments.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/payment_intent.rs` - `crates/diesel_models/src/schema.rs` - `crates/diesel_models/src/schema_v2.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payments.rs` - `crates/hyperswitch_domain_models/src/payments/payment_intent.rs` - `crates/hyperswitch_domain_models/src/router_request_types.rs` **4. Core Business Logic** - `crates/router/src/core/payments/helpers.rs` - `crates/router/src/core/payments/operations/payment_create.rs` - `crates/router/src/core/payments/transformers.rs` **5. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs` - `crates/hyperswitch_connectors/src/utils.rs` - `crates/router/src/types/api/verify_connector.rs` - ... and 1 more files **6. Type Definitions** - `crates/router/src/types.rs` **7. Utils** - `crates/router/src/utils/user/sample_data.rs` **8. Tests** - `crates/router/tests/payments.rs` - `crates/router/tests/payments2.rs` **9. Other** - `api-reference/v1/openapi_spec_v1.json` - `crates/common_enums/src/enums.rs` - `crates/openapi/src/openapi.rs` - ... and 3 more files **Code Patterns Applied:** - Implement new functions (1 changes) - Extend existing types with new fields (35 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 9312cfa3: Files to modify: **crates/api_models/src/payments.rs** Add: - function: pub::validate_mit_request **crates/common_enums/src/enums.rs** Add: - enum: pub::MitCategory **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_connectors/src/connectors/checkout/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_intent.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_request_types.rs** Modify existing code **crates/openapi/src/openapi.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payments/operations/payment_create.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/db/events.rs** Modify existing code **crates/router/src/types.rs** Modify existing code **crates/router/src/types/api/verify_connector.rs** Modify existing code **crates/router/src/utils/user/sample_data.rs** Modify existing code **crates/router/tests/connectors/utils.rs** Modify existing code **crates/router/tests/payments.rs** Modify existing code **crates/router/tests/payments2.rs** Modify existing code
{"pr_number": 9585, "pr_title": "feat(core): Add MIT Types in payment Intent ", "merged_at": "2025-10-01T10:44:27Z", "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/payment_intent.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs"], "domain": ["crates/hyperswitch_domain_models/src/payments.rs", "crates/hyperswitch_domain_models/src/payments/payment_intent.rs", "crates/hyperswitch_domain_models/src/router_request_types.rs"], "core_business": ["crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/operations/payment_create.rs", "crates/router/src/core/payments/transformers.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/router/src/types/api/verify_connector.rs", "crates/router/tests/connectors/utils.rs"], "types": ["crates/router/src/types.rs"], "utils": ["crates/router/src/utils/user/sample_data.rs"], "tests": ["crates/router/tests/payments.rs", "crates/router/tests/payments2.rs"], "other": ["api-reference/v1/openapi_spec_v1.json", "crates/common_enums/src/enums.rs", "crates/openapi/src/openapi.rs", "crates/router/src/db/events.rs", "migrations/2025-09-25-075008_add_mit_category_in_payment_intnet/down.sql", "migrations/2025-09-25-075008_add_mit_category_in_payment_intnet/up.sql"]}, "change_types": {"functions_added": 1, "enums_added": 1, "fields_added": 35, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector_cloning): Create API for cloning connectors between merchants and profiles. ## 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 branch primarily introduces the **Connector Cloning** feature. Key changes include: * **API:** Added new API models (`CloneConnectorRequest`, `CloneConnectorSource`, `CloneConnectorDestination`) and a new API endpoint (`/user/clone_connector`). * **Core Logic:** Implemented the `clone_connector` function in `crates/router/src/core/user.rs` to handle the cloning process, supported by a helper function `build_cloned_connector_create_request` in `crates/router/src/utils/user.rs`. * **Configuration:** Introduced a `clone_connector_whitelist` configuration section in `settings.rs` and added it to example/deployment config files (`config.example.toml`, `development.toml`, etc.) to control which merchants and connectors are allowed for cloning. * **Authorization & Roles:** * Added new internal permission group (`InternalManage`), parent group (`Internal`), and resource (`InternalConnector`). * Added a new predefined internal role (`internal_demo`) possibly for demonstrating or testing the clone feature. * Updated authorization info functions (`get_group_authorization_info`, `get_parent_group_description`, `get_resource_name`) to handle internal groups/resources gracefully (returning `None` for user-facing descriptions). * Updated role validation to prevent adding `InternalManage` to custom roles. * **Internal User Creation:** Added `role_id` field to `CreateInternalUserRequest`. ### Additional Changes - [x] This PR modifies the API contract (new endpoint and models for cloning). - [ ] This PR modifies the database schema - [x] This PR modifies application configuration/environment variables (new `clone_connector_whitelist` section). <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> * `config/config.example.toml` * `config/deployments/env_specific.toml` * `config/development.toml` * `config/docker_compose.toml` * `crates/router/src/configs/settings.rs` ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Closes https://github.com/juspay/hyperswitch-control-center/issues/2921 ## How did you test 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. Clone Connector API - Request ```bash curl --location '<YOUR_BASE_URL>/user/clone_connector' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <INTERNAL_DEMO_USER_AUTH_TOKEN>' \ --data '{ "source": { "mca_id": "<SOURCE_MCA_ID>", "profile_id": "<SOURCE_PROFILE_ID>", "merchant_id": "<SOURCE_MERCHANT_ID>" }, "destination": { "connector_label": "Cloned Stripe Connector", "profile_id": "<DESTINATION_PROFILE_ID>", "merchant_id": "<DESTINATION_MERCHANT_ID>" } }' ``` - Response: Same as Connector Create response ```json { "connector_type": "processor", "connector_name": "stripe", "connector_label": "Cloned Stripe Connector", "merchant_connector_id": "mca_xxxxxxxxxxxxxxxx", "connector_account_details": { "auth_type": "HeaderKey", "api_key": "sk_test_****************************************xyz" }, "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 } ], "payment_experience": "redirect_to_url", "accepted_currencies": ["USD", "EUR", "GBP"], "accepted_countries": ["US", "GB", "FR"] } ], "metadata": null, "business_country": ["US"], "business_label": "default", "business_sub_label": null, "frm_configs": null, "connector_webhook_details": { "merchant_secret": "whsec_*************************" }, "profile_id": "<DESTINATION_PROFILE_ID>", "applepay_verified_domains": null, "pm_auth_config": null, "status": "active", "connector_wallets_details": null, "additional_merchant_data": null } ``` 2. Creating Internal Demo User - Request ```bash curl --location '<YOUR_BASE_URL>/user/internal_signup' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <ADMIN_API_KEY>' \ --data-raw '{ "name": "Demo User", "email": "[email protected]", "password": "<USER_PASSWORD>", "role_id": "internal_demo" }' ``` - Response: 200 OK ## 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/user.rs` - `crates/api_models/src/user.rs` **2. Core Business Logic** - `crates/router/src/core/errors/user.rs` - `crates/router/src/core/user.rs` - `crates/router/src/core/user_role.rs` - ... and 1 more files **3. Type Definitions** - `crates/router_env/src/logger/types.rs` **4. Utils** - `crates/common_utils/src/consts.rs` - `crates/router/src/routes/lock_utils.rs` - `crates/router/src/utils/user.rs` - ... and 1 more files **5. Configuration Files** - `config/config.example.toml` - `config/deployments/env_specific.toml` - `config/development.toml` - ... and 3 more files **6. Other** - `crates/common_enums/src/enums.rs` - `crates/router/src/routes/app.rs` - `crates/router/src/routes/user.rs` - ... and 5 more files **Code Patterns Applied:** - Define new data structures (4 changes) - Implement new functions (10 changes) - Extend existing types with new fields (50 changes) - Add conditional logic for feature flags or filtering (2 changes) - Modify database queries (4 changes) **Detailed Identifier Changes:** Commit 82f15e95: Files to modify: **crates/api_models/src/events/user.rs** Modify existing code **crates/api_models/src/user.rs** Add: - struct: pub::CloneConnectorSource - struct: pub::CloneConnectorDestination - struct: pub::CloneConnectorRequest **crates/common_enums/src/enums.rs** Modify existing code **crates/common_utils/src/consts.rs** Modify existing code **crates/router/src/configs/secrets_transformers.rs** Modify existing code **crates/router/src/configs/settings.rs** Add: - struct: pub::CloneConnectorAllowlistConfig **crates/router/src/core/errors/user.rs** Modify existing code **crates/router/src/core/user.rs** Add: - function: pub::clone_connector **crates/router/src/core/user_role.rs** Modify existing code **crates/router/src/core/user_role/role.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/user.rs** Add: - function: pub::clone_connector **crates/router/src/services/authorization/info.rs** Modify existing code **crates/router/src/services/authorization/permission_groups.rs** Modify existing code **crates/router/src/services/authorization/permissions.rs** Modify existing code **crates/router/src/services/authorization/roles.rs** Add: - function: pub::from_predefined_roles **crates/router/src/services/authorization/roles/predefined_roles.rs** Modify existing code **crates/router/src/utils/user.rs** Add: - function: pub::build_cloned_connector_create_request **crates/router/src/utils/user_role.rs** Modify existing code **crates/router_env/src/logger/types.rs** Modify existing code
{"pr_number": 7949, "pr_title": "feat(connector_cloning): Create API for cloning connectors between merchants and profiles.", "merged_at": "2025-05-14T15:35:29Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"api_models": ["crates/api_models/src/events/user.rs", "crates/api_models/src/user.rs"], "core_business": ["crates/router/src/core/errors/user.rs", "crates/router/src/core/user.rs", "crates/router/src/core/user_role.rs", "crates/router/src/core/user_role/role.rs"], "types": ["crates/router_env/src/logger/types.rs"], "utils": ["crates/common_utils/src/consts.rs", "crates/router/src/routes/lock_utils.rs", "crates/router/src/utils/user.rs", "crates/router/src/utils/user_role.rs"], "config": ["config/config.example.toml", "config/deployments/env_specific.toml", "config/development.toml", "config/docker_compose.toml", "crates/router/src/configs/secrets_transformers.rs", "crates/router/src/configs/settings.rs"], "other": ["crates/common_enums/src/enums.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/user.rs", "crates/router/src/services/authorization/info.rs", "crates/router/src/services/authorization/permission_groups.rs", "crates/router/src/services/authorization/permissions.rs", "crates/router/src/services/authorization/roles.rs", "crates/router/src/services/authorization/roles/predefined_roles.rs"]}, "change_types": {"structs_added": 4, "functions_added": 10, "fields_added": 50, "imports_added": 10, "conditionals_added": 2, "database_queries": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(webhooks): add support for updating mandate details in webhooks flow ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> hot fix PR for https://github.com/juspay/hyperswitch/pull/6523 ### 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. Database Layer (Queries & Schema)** - `crates/diesel_models/src/payment_attempt.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payments/payment_attempt.rs` - `crates/hyperswitch_domain_models/src/router_flow_types/webhooks.rs` **3. Core Business Logic** - `crates/router/src/core/webhooks/incoming.rs` **4. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/fiuu.rs` - `crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs` - `crates/router/src/configs/defaults/payment_connector_required_fields.rs` - ... and 1 more files **5. Other** - `crates/hyperswitch_interfaces/src/webhooks.rs` **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (6 changes) - Extend existing types with new fields (80 changes) - Add conditional logic for feature flags or filtering (4 changes) **Detailed Identifier Changes:** Commit d927598a: Files to modify: **crates/diesel_models/src/payment_attempt.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/fiuu.rs** Add: - function: private::get_mandate_details **crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_attempt.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_flow_types/webhooks.rs** Add: - struct: pub::ConnectorMandateDetails **crates/hyperswitch_interfaces/src/webhooks.rs** Add: - function: private::get_mandate_details **crates/router/src/configs/defaults/payment_connector_required_fields.rs** Modify existing code **crates/router/src/core/webhooks/incoming.rs** Add: - function: private::should_update_connector_mandate_details - function: private::update_connector_mandate_details - function: private::insert_mandate_details **crates/router/src/services/connector_integration_interface.rs** Add: - function: private::get_mandate_details
{"pr_number": 6558, "pr_title": "fix(webhooks): add support for updating mandate details in webhooks flow ", "merged_at": "2024-11-13T13:41:57Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"database": ["crates/diesel_models/src/payment_attempt.rs"], "domain": ["crates/hyperswitch_domain_models/src/payments/payment_attempt.rs", "crates/hyperswitch_domain_models/src/router_flow_types/webhooks.rs"], "core_business": ["crates/router/src/core/webhooks/incoming.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/fiuu.rs", "crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs", "crates/router/src/configs/defaults/payment_connector_required_fields.rs", "crates/router/src/services/connector_integration_interface.rs"], "other": ["crates/hyperswitch_interfaces/src/webhooks.rs"]}, "change_types": {"structs_added": 1, "functions_added": 6, "fields_added": 80, "imports_added": 5, "conditionals_added": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(wasm): fetch list of country codes and country names ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Added a function `get_two_letter_country_code()` which fetches a list of country codes and country names for the FrontEnd to create a drop down so that the Merchant can select the country from the country list in the 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 ## How did you test it? 1. In hyperswitch BE, run this command `TARGET_CC="$(brew --prefix)/opt/llvm/bin/clang" make euclid-wasm` 2. Now, copy the wasm folder which is inside the root directory. 3. Now in hyperswitch-control-center, go to public/hyperswitch and replace the wasm folder with the one you copied from hyperswitch BE. 4. In module.js file which is inside public/hyperswitch of hyperswitch-control-center, paste this function ``` function getTwoLetterCountryCode() { if (wasm) { return wasm.getTwoLetterCountryCode(); } else { return []; } } ``` 5. In window.res file which is inside src/libraries, paste this ``` @val @scope("window") external getTwoLetterCountryCode: unit => JSON.t = "getTwoLetterCountryCode" ``` 6. Now start hyperswitch-control center by doing `npm run re:start` first and in another terminal `npm run start` 7. Also, start the hyperswitch BE, by running `cargo run` 8. Open hyperswitch dashboard (local) and open the console 9. Run the function `getTwoLetterCountryCode()` there and you'll see the output Sample Output: <img width="478" alt="Screenshot 2025-04-04 at 7 01 10 PM" src="https://github.com/user-attachments/assets/d981fd80-6e17-423d-9933-b54dc212bd25" /> Sample Response: ``` [ { "code": "AF", "name": "Afghanistan" }, { "code": "AX", "name": "AlandIslands" }, { "code": "AL", "name": "Albania" }, { "code": "DZ", "name": "Algeria" }, { "code": "AS", "name": "AmericanSamoa" }, { "code": "AD", "name": "Andorra" }, { "code": "AO", "name": "Angola" }, { "code": "AI", "name": "Anguilla" }, { "code": "AQ", "name": "Antarctica" }, { "code": "AG", "name": "AntiguaAndBarbuda" }, { "code": "AR", "name": "Argentina" }, { "code": "AM", "name": "Armenia" }, { "code": "AW", "name": "Aruba" }, { "code": "AU", "name": "Australia" }, { "code": "AT", "name": "Austria" }, { "code": "AZ", "name": "Azerbaijan" }, { "code": "BS", "name": "Bahamas" }, { "code": "BH", "name": "Bahrain" }, { "code": "BD", "name": "Bangladesh" }, { "code": "BB", "name": "Barbados" }, { "code": "BY", "name": "Belarus" }, { "code": "BE", "name": "Belgium" }, { "code": "BZ", "name": "Belize" }, { "code": "BJ", "name": "Benin" }, { "code": "BM", "name": "Bermuda" }, { "code": "BT", "name": "Bhutan" }, { "code": "BO", "name": "BoliviaPlurinationalState" }, { "code": "BQ", "name": "BonaireSintEustatiusAndSaba" }, { "code": "BA", "name": "BosniaAndHerzegovina" }, { "code": "BW", "name": "Botswana" }, { "code": "BV", "name": "BouvetIsland" }, { "code": "BR", "name": "Brazil" }, { "code": "IO", "name": "BritishIndianOceanTerritory" }, { "code": "BN", "name": "BruneiDarussalam" }, { "code": "BG", "name": "Bulgaria" }, { "code": "BF", "name": "BurkinaFaso" }, { "code": "BI", "name": "Burundi" }, { "code": "KH", "name": "Cambodia" }, { "code": "CM", "name": "Cameroon" }, { "code": "CA", "name": "Canada" }, { "code": "CV", "name": "CaboVerde" }, { "code": "KY", "name": "CaymanIslands" }, { "code": "CF", "name": "CentralAfricanRepublic" }, { "code": "TD", "name": "Chad" }, { "code": "CL", "name": "Chile" }, { "code": "CN", "name": "China" }, { "code": "CX", "name": "ChristmasIsland" }, { "code": "CC", "name": "CocosKeelingIslands" }, { "code": "CO", "name": "Colombia" }, { "code": "KM", "name": "Comoros" }, { "code": "CG", "name": "Congo" }, { "code": "CD", "name": "CongoDemocraticRepublic" }, { "code": "CK", "name": "CookIslands" }, { "code": "CR", "name": "CostaRica" }, { "code": "CI", "name": "CotedIvoire" }, { "code": "HR", "name": "Croatia" }, { "code": "CU", "name": "Cuba" }, { "code": "CW", "name": "Curacao" }, { "code": "CY", "name": "Cyprus" }, { "code": "CZ", "name": "Czechia" }, { "code": "DK", "name": "Denmark" }, { "code": "DJ", "name": "Djibouti" }, { "code": "DM", "name": "Dominica" }, { "code": "DO", "name": "DominicanRepublic" }, { "code": "EC", "name": "Ecuador" }, { "code": "EG", "name": "Egypt" }, { "code": "SV", "name": "ElSalvador" }, { "code": "GQ", "name": "EquatorialGuinea" }, { "code": "ER", "name": "Eritrea" }, { "code": "EE", "name": "Estonia" }, { "code": "ET", "name": "Ethiopia" }, { "code": "FK", "name": "FalklandIslandsMalvinas" }, { "code": "FO", "name": "FaroeIslands" }, { "code": "FJ", "name": "Fiji" }, { "code": "FI", "name": "Finland" }, { "code": "FR", "name": "France" }, { "code": "GF", "name": "FrenchGuiana" }, { "code": "PF", "name": "FrenchPolynesia" }, { "code": "TF", "name": "FrenchSouthernTerritories" }, { "code": "GA", "name": "Gabon" }, { "code": "GM", "name": "Gambia" }, { "code": "GE", "name": "Georgia" }, { "code": "DE", "name": "Germany" }, { "code": "GH", "name": "Ghana" }, { "code": "GI", "name": "Gibraltar" }, { "code": "GR", "name": "Greece" }, { "code": "GL", "name": "Greenland" }, { "code": "GD", "name": "Grenada" }, { "code": "GP", "name": "Guadeloupe" }, { "code": "GU", "name": "Guam" }, { "code": "GT", "name": "Guatemala" }, { "code": "GG", "name": "Guernsey" }, { "code": "GN", "name": "Guinea" }, { "code": "GW", "name": "GuineaBissau" }, { "code": "GY", "name": "Guyana" }, { "code": "HT", "name": "Haiti" }, { "code": "HM", "name": "HeardIslandAndMcDonaldIslands" }, { "code": "VA", "name": "HolySee" }, { "code": "HN", "name": "Honduras" }, { "code": "HK", "name": "HongKong" }, { "code": "HU", "name": "Hungary" }, { "code": "IS", "name": "Iceland" }, { "code": "IN", "name": "India" }, { "code": "ID", "name": "Indonesia" }, { "code": "IR", "name": "IranIslamicRepublic" }, { "code": "IQ", "name": "Iraq" }, { "code": "IE", "name": "Ireland" }, { "code": "IM", "name": "IsleOfMan" }, { "code": "IL", "name": "Israel" }, { "code": "IT", "name": "Italy" }, { "code": "JM", "name": "Jamaica" }, { "code": "JP", "name": "Japan" }, { "code": "JE", "name": "Jersey" }, { "code": "JO", "name": "Jordan" }, { "code": "KZ", "name": "Kazakhstan" }, { "code": "KE", "name": "Kenya" }, { "code": "KI", "name": "Kiribati" }, { "code": "KP", "name": "KoreaDemocraticPeoplesRepublic" }, { "code": "KR", "name": "KoreaRepublic" }, { "code": "KW", "name": "Kuwait" }, { "code": "KG", "name": "Kyrgyzstan" }, { "code": "LA", "name": "LaoPeoplesDemocraticRepublic" }, { "code": "LV", "name": "Latvia" }, { "code": "LB", "name": "Lebanon" }, { "code": "LS", "name": "Lesotho" }, { "code": "LR", "name": "Liberia" }, { "code": "LY", "name": "Libya" }, { "code": "LI", "name": "Liechtenstein" }, { "code": "LT", "name": "Lithuania" }, { "code": "LU", "name": "Luxembourg" }, { "code": "MO", "name": "Macao" }, { "code": "MK", "name": "MacedoniaTheFormerYugoslavRepublic" }, { "code": "MG", "name": "Madagascar" }, { "code": "MW", "name": "Malawi" }, { "code": "MY", "name": "Malaysia" }, { "code": "MV", "name": "Maldives" }, { "code": "ML", "name": "Mali" }, { "code": "MT", "name": "Malta" }, { "code": "MH", "name": "MarshallIslands" }, { "code": "MQ", "name": "Martinique" }, { "code": "MR", "name": "Mauritania" }, { "code": "MU", "name": "Mauritius" }, { "code": "YT", "name": "Mayotte" }, { "code": "MX", "name": "Mexico" }, { "code": "FM", "name": "MicronesiaFederatedStates" }, { "code": "MD", "name": "MoldovaRepublic" }, { "code": "MC", "name": "Monaco" }, { "code": "MN", "name": "Mongolia" }, { "code": "ME", "name": "Montenegro" }, { "code": "MS", "name": "Montserrat" }, { "code": "MA", "name": "Morocco" }, { "code": "MZ", "name": "Mozambique" }, { "code": "MM", "name": "Myanmar" }, { "code": "NA", "name": "Namibia" }, { "code": "NR", "name": "Nauru" }, { "code": "NP", "name": "Nepal" }, { "code": "NL", "name": "Netherlands" }, { "code": "NC", "name": "NewCaledonia" }, { "code": "NZ", "name": "NewZealand" }, { "code": "NI", "name": "Nicaragua" }, { "code": "NE", "name": "Niger" }, { "code": "NG", "name": "Nigeria" }, { "code": "NU", "name": "Niue" }, { "code": "NF", "name": "NorfolkIsland" }, { "code": "MP", "name": "NorthernMarianaIslands" }, { "code": "NO", "name": "Norway" }, { "code": "OM", "name": "Oman" }, { "code": "PK", "name": "Pakistan" }, { "code": "PW", "name": "Palau" }, { "code": "PS", "name": "PalestineState" }, { "code": "PA", "name": "Panama" }, { "code": "PG", "name": "PapuaNewGuinea" }, { "code": "PY", "name": "Paraguay" }, { "code": "PE", "name": "Peru" }, { "code": "PH", "name": "Philippines" }, { "code": "PN", "name": "Pitcairn" }, { "code": "PL", "name": "Poland" }, { "code": "PT", "name": "Portugal" }, { "code": "PR", "name": "PuertoRico" }, { "code": "QA", "name": "Qatar" }, { "code": "RE", "name": "Reunion" }, { "code": "RO", "name": "Romania" }, { "code": "RU", "name": "RussianFederation" }, { "code": "RW", "name": "Rwanda" }, { "code": "BL", "name": "SaintBarthelemy" }, { "code": "SH", "name": "SaintHelenaAscensionAndTristandaCunha" }, { "code": "KN", "name": "SaintKittsAndNevis" }, { "code": "LC", "name": "SaintLucia" }, { "code": "MF", "name": "SaintMartinFrenchpart" }, { "code": "PM", "name": "SaintPierreAndMiquelon" }, { "code": "VC", "name": "SaintVincentAndTheGrenadines" }, { "code": "WS", "name": "Samoa" }, { "code": "SM", "name": "SanMarino" }, { "code": "ST", "name": "SaoTomeAndPrincipe" }, { "code": "SA", "name": "SaudiArabia" }, { "code": "SN", "name": "Senegal" }, { "code": "RS", "name": "Serbia" }, { "code": "SC", "name": "Seychelles" }, { "code": "SL", "name": "SierraLeone" }, { "code": "SG", "name": "Singapore" }, { "code": "SX", "name": "SintMaartenDutchpart" }, { "code": "SK", "name": "Slovakia" }, { "code": "SI", "name": "Slovenia" }, { "code": "SB", "name": "SolomonIslands" }, { "code": "SO", "name": "Somalia" }, { "code": "ZA", "name": "SouthAfrica" }, { "code": "GS", "name": "SouthGeorgiaAndTheSouthSandwichIslands" }, { "code": "SS", "name": "SouthSudan" }, { "code": "ES", "name": "Spain" }, { "code": "LK", "name": "SriLanka" }, { "code": "SD", "name": "Sudan" }, { "code": "SR", "name": "Suriname" }, { "code": "SJ", "name": "SvalbardAndJanMayen" }, { "code": "SZ", "name": "Swaziland" }, { "code": "SE", "name": "Sweden" }, { "code": "CH", "name": "Switzerland" }, { "code": "SY", "name": "SyrianArabRepublic" }, { "code": "TW", "name": "TaiwanProvinceOfChina" }, { "code": "TJ", "name": "Tajikistan" }, { "code": "TZ", "name": "TanzaniaUnitedRepublic" }, { "code": "TH", "name": "Thailand" }, { "code": "TL", "name": "TimorLeste" }, { "code": "TG", "name": "Togo" }, { "code": "TK", "name": "Tokelau" }, { "code": "TO", "name": "Tonga" }, { "code": "TT", "name": "TrinidadAndTobago" }, { "code": "TN", "name": "Tunisia" }, { "code": "TR", "name": "Turkey" }, { "code": "TM", "name": "Turkmenistan" }, { "code": "TC", "name": "TurksAndCaicosIslands" }, { "code": "TV", "name": "Tuvalu" }, { "code": "UG", "name": "Uganda" }, { "code": "UA", "name": "Ukraine" }, { "code": "AE", "name": "UnitedArabEmirates" }, { "code": "GB", "name": "UnitedKingdomOfGreatBritainAndNorthernIreland" }, { "code": "UM", "name": "UnitedStatesMinorOutlyingIslands" }, { "code": "UY", "name": "Uruguay" }, { "code": "UZ", "name": "Uzbekistan" }, { "code": "VU", "name": "Vanuatu" }, { "code": "VE", "name": "VenezuelaBolivarianRepublic" }, { "code": "VN", "name": "Vietnam" }, { "code": "VG", "name": "VirginIslandsBritish" }, { "code": "VI", "name": "VirginIslandsUS" }, { "code": "WF", "name": "WallisAndFutuna" }, { "code": "EH", "name": "WesternSahara" }, { "code": "YE", "name": "Yemen" }, { "code": "ZM", "name": "Zambia" }, { "code": "ZW", "name": "Zimbabwe" }, { "code": "US", "name": "UnitedStatesOfAmerica" } ] ``` ## 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/euclid_wasm/src/lib.rs` **Code Patterns Applied:** - Implement new functions (1 changes) - Extend existing types with new fields (2 changes) **Detailed Identifier Changes:** Commit 63d9b534: Files to modify: **crates/euclid_wasm/src/lib.rs** Add: - function: pub::get_two_letter_country_code
{"pr_number": 7642, "pr_title": "feat(wasm): fetch list of country codes and country names", "merged_at": "2025-04-25T08:16:19Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant", "user"]}, "hierarchy": {"other": ["crates/euclid_wasm/src/lib.rs"]}, "change_types": {"functions_added": 1, "fields_added": 2, "imports_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [NETCETERA] add accept-language in browser_information for netcetera authentication request ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Missing BrowserInformation.AcceptLanguage in Authentication request for Netcetera - add accept-language in browser_information for netcetera authentication request ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- 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 External 3DS authentication request through Netcetera CURL ``` curl --location '{{baseURL}}/payments/{{PAYMENT_ID}}/3ds/authentication' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: {{PUBLISHABLE_KEY}}' \ --data '{ "client_secret": "pay_YgaqwRsJ2D609GavM4R7_secret_dyidRAo6cvSM5Wfbc4Se", "device_channel": "BRW", "threeds_method_comp_ind": "Y" }' ``` Response ``` { "trans_status": "Y", "acs_url": null, "challenge_request": null, "acs_reference_number": null, "acs_trans_id": null, "three_dsserver_trans_id": "0fa5cf1b-dd17-4314-8fb0-6ef51367a32b", "acs_signed_content": null, "three_ds_requestor_url": "https://google.com/" } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/router/src/connector/netcetera/netcetera_types.rs` **Code Patterns Applied:** - Extend existing types with new fields (1 changes) **Detailed Identifier Changes:** Commit aa8e2e73: Files to modify: **crates/router/src/connector/netcetera/netcetera_types.rs** Modify existing code
{"pr_number": 7059, "pr_title": "fix(connector): [NETCETERA] add accept-language in browser_information for netcetera authentication request", "merged_at": "2025-01-17T13:28:24Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment"]}, "hierarchy": {"connectors": ["crates/router/src/connector/netcetera/netcetera_types.rs"]}, "change_types": {"fields_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [stripe] fix bank redirect (`bancontact_card`) recurring mandate ## 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 aims to fix the stripe bank redirect recurring mandate. for context, `bancontact` recurring mandates happen via `sepa direct debit` and hence, stripe sends 2 connector mandate ids as shown below: ```json { "payment_method": "pm_somevalue_1", "payment_method_details": { "bancontact": { "generated_sepa_debit": "pm_somevalue_2", "generated_sepa_debit_mandate": "mandate_somevalue", }, } ``` in order to do a recurring mandate, we are expected to pass the second connector mandate id. at the moment of me writing this, what is happening is that we pass the first connector mandate id that results in the recurring transaction to fail with error message provided in `motivation and context` section. the fix is to pass second connector mandte id for the payment methods that requires it. area of impact: - stripe recurring payments. ideally, this shouldn't affect any other payment method since this pr have no logic change. also, we fallback to using first connector mandate id if we do not get second connector mandate 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). --> bancontact card bank redirect recurring mandates were failing with below message: ``` "The provided bancontact PaymentMethod cannot be used again. It was used in a previous PaymentIntent or SetupIntent to set up a sepa_debit PaymentMethod, which can be used for multiple payments. To find the ID of the sepa_debit PaymentMethod, list the sepa_debit PaymentMethods associated with the Customer used to set up this PaymentMethod." ``` this is not intended and should be fixed since the connector is live on production. closes #7989 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ### bancontact_card <details> <summary>create payment intent</summary> request: ```curl curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Accept-Language: ja' \ --header 'api-key: dev_12v5OB2ziszoDZL6Nl9nxIG65eJoFm4PtRKPayOZWpsCy74L5XTztLZX5N71VJ71' \ --data-raw '{ "amount": 6500, "order_details": [ { "product_name": "Apple iphone 15", "quantity": 1, "amount": 6500 } ], "currency": "EUR", "confirm": false, "capture_method": "automatic", "authentication_type": "three_ds", "setup_future_usage": "off_session", "request_external_three_ds_authentication": false, "email": "[email protected]", "description": "Hello this is description", "shipping": { "address": { "state": "California", "city": "Banglore", "country": "US", "line1": "sdsdfsdf", "line2": "hsgdbhd", "line3": "alsksoe", "zip": "571201", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "123456789", "country_code": "+1" } }, "connector_metadata": { "noon": { "order_category": "applepay" } }, "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "email": "[email protected]", "phone": { "number": "8056594427", "country_code": "+91" } }, "customer_id": "new" }' ``` response: ```json { "payment_id": "pay_46PJnwYjtyblbSWEEMH5", "merchant_id": "spriteMerchantBornAt1746687723", "status": "requires_payment_method", "amount": 6500, "net_amount": 6500, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_46PJnwYjtyblbSWEEMH5_secret_hy4q23J6YdCNB1WXw5tD", "created": "2025-05-08T11:00:41.266Z", "currency": "EUR", "customer_id": "new", "customer": { "id": "new", "name": null, "email": "[email protected]", "phone": null, "phone_country_code": null }, "description": "Hello this is description", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": null, "payment_method_data": null, "payment_token": null, "shipping": { "address": { "city": "Banglore", "country": "US", "line1": "sdsdfsdf", "line2": "hsgdbhd", "line3": "alsksoe", "zip": "571201", "state": "California", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "123456789", "country_code": "+1" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "[email protected]" }, "order_details": [ { "brand": null, "amount": 6500, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null } ], "email": "[email protected]", "name": null, "phone": null, "return_url": null, "authentication_type": "three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "new", "created_at": 1746702041, "expires": 1746705641, "secret": "epk_8f136979577f4053accd518f3b11fd29" }, "manual_retry_allowed": null, "connector_transaction_id": null, "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "applepay" }, "braintree": null, "adyen": null }, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_HJPiTC1q4eKhHsitqxTn", "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-05-08T11:15:41.266Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-05-08T11:00:41.298Z", "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 payment intent</summary> request: ```curl curl --location 'http://localhost:8080/payments/pay_46PJnwYjtyblbSWEEMH5/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_12v5OB2ziszoDZL6Nl9nxIG65eJoFm4PtRKPayOZWpsCy74L5XTztLZX5N71VJ71' \ --data '{ "payment_id": "pay_46PJnwYjtyblbSWEEMH5", "payment_method_data": { "bank_redirect": { "bancontact_card": { "card_number": null, "card_exp_month": null, "card_exp_year": null, "card_holder_name": null, "billing_details": null } } }, "payment_method": "bank_redirect", "mandate_data": { "update_mandate_id": null, "customer_acceptance": { "acceptance_type": "online", "accepted_at": "2025-05-07T09:30:52.779Z", "online": { "ip_address": "103.23.45.1", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:138.0) Gecko/20100101 Firefox/138.0" } }, "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" } } } }, "browser_info": { "color_depth": 24, "java_enabled": true, "java_script_enabled": true, "language": "en-US", "screen_height": 1117, "screen_width": 1728, "time_zone": -330, "ip_address": "103.159.11.202", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:138.0) Gecko/20100101 Firefox/138.0", "os_type": "macOS", "os_version": "10.15", "device_model": "Macintosh", "accept_language": "en" }, "payment_method_type": "bancontact_card", "payment_type": "new_mandate" }' ``` response: ```json { "payment_id": "pay_46PJnwYjtyblbSWEEMH5", "merchant_id": "spriteMerchantBornAt1746687723", "status": "requires_customer_action", "amount": 6500, "net_amount": 6500, "shipping_cost": null, "amount_capturable": 6500, "amount_received": 0, "connector": "stripe", "client_secret": "pay_46PJnwYjtyblbSWEEMH5_secret_hy4q23J6YdCNB1WXw5tD", "created": "2025-05-08T11:00:41.266Z", "currency": "EUR", "customer_id": "new", "customer": { "id": "new", "name": null, "email": "[email protected]", "phone": null, "phone_country_code": null }, "description": "Hello this is description", "refunds": null, "disputes": null, "mandate_id": "man_GRW76jmrxiK7Cs8FDIJr", "mandate_data": { "update_mandate_id": null, "customer_acceptance": { "acceptance_type": "online", "accepted_at": "2025-05-07T09:30:52.779Z", "online": { "ip_address": "103.23.45.1", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:138.0) Gecko/20100101 Firefox/138.0" } }, "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": "bank_redirect", "payment_method_data": { "bank_redirect": { "type": "BankRedirectResponse", "bank_name": null, "BancontactCard": { "last4": null, "card_exp_month": null, "card_exp_year": null, "card_holder_name": null } }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "Banglore", "country": "US", "line1": "sdsdfsdf", "line2": "hsgdbhd", "line3": "alsksoe", "zip": "571201", "state": "California", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "123456789", "country_code": "+1" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "[email protected]" }, "order_details": [ { "brand": null, "amount": 6500, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null } ], "email": "[email protected]", "name": null, "phone": null, "return_url": null, "authentication_type": "three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_46PJnwYjtyblbSWEEMH5/spriteMerchantBornAt1746687723/pay_46PJnwYjtyblbSWEEMH5_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "bancontact_card", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": null, "connector_transaction_id": "pi_3RMSCKD5R7gDAGff0e5Xcr6s", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "applepay" }, "braintree": null, "adyen": null }, "feature_metadata": null, "reference_id": "pi_3RMSCKD5R7gDAGff0e5Xcr6s", "payment_link": null, "profile_id": "pro_HJPiTC1q4eKhHsitqxTn", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_nRFLCSCqPa4judlbaHUi", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-05-08T11:15:41.266Z", "fingerprint": null, "browser_info": { "os_type": "macOS", "language": "en-US", "time_zone": -330, "ip_address": "103.159.11.202", "os_version": "10.15", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:138.0) Gecko/20100101 Firefox/138.0", "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", "java_script_enabled": true }, "payment_method_id": "pm_gtwOpqeWWinhXFQIDNol", "payment_method_status": null, "updated": "2025-05-08T11:01:05.114Z", "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>redirection</summary> |image| |-| |<img width="1707" alt="image" src="https://github.com/user-attachments/assets/b810dd24-52d2-4eae-9da1-218a7f6d263e" />| |<img width="873" alt="image" src="https://github.com/user-attachments/assets/85a8c5ef-317d-4e7c-baca-b437457f57e7" />| </details> <details> <summary>retrieve payment</summary> request: ```curl curl --location 'http://localhost:8080/payments/pay_46PJnwYjtyblbSWEEMH5?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_12v5OB2ziszoDZL6Nl9nxIG65eJoFm4PtRKPayOZWpsCy74L5XTztLZX5N71VJ71' ``` response: ```json { "payment_id": "pay_46PJnwYjtyblbSWEEMH5", "merchant_id": "spriteMerchantBornAt1746687723", "status": "succeeded", "amount": 6500, "net_amount": 6500, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6500, "connector": "stripe", "client_secret": "pay_46PJnwYjtyblbSWEEMH5_secret_hy4q23J6YdCNB1WXw5tD", "created": "2025-05-08T11:00:41.266Z", "currency": "EUR", "customer_id": "new", "customer": { "id": "new", "name": null, "email": "[email protected]", "phone": null, "phone_country_code": null }, "description": "Hello this is description", "refunds": null, "disputes": null, "mandate_id": "man_GRW76jmrxiK7Cs8FDIJr", "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "bank_redirect", "payment_method_data": { "bank_redirect": { "type": "BankRedirectResponse", "bank_name": null, "BancontactCard": { "last4": null, "card_exp_month": null, "card_exp_year": null, "card_holder_name": null } }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "Banglore", "country": "US", "line1": "sdsdfsdf", "line2": "hsgdbhd", "line3": "alsksoe", "zip": "571201", "state": "California", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "123456789", "country_code": "+1" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "[email protected]" }, "order_details": [ { "brand": null, "amount": 6500, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null } ], "email": "[email protected]", "name": 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": "bancontact_card", "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_3RMSCKD5R7gDAGff0e5Xcr6s", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "applepay" }, "braintree": null, "adyen": null }, "feature_metadata": null, "reference_id": "pi_3RMSCKD5R7gDAGff0e5Xcr6s", "payment_link": null, "profile_id": "pro_HJPiTC1q4eKhHsitqxTn", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_nRFLCSCqPa4judlbaHUi", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-05-08T11:15:41.266Z", "fingerprint": null, "browser_info": { "os_type": "macOS", "language": "en-US", "time_zone": -330, "ip_address": "103.159.11.202", "os_version": "10.15", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:138.0) Gecko/20100101 Firefox/138.0", "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", "java_script_enabled": true }, "payment_method_id": "pm_gtwOpqeWWinhXFQIDNol", "payment_method_status": "active", "updated": "2025-05-08T11:01:46.108Z", "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>recurring payment</summary> request: ```curl curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_12v5OB2ziszoDZL6Nl9nxIG65eJoFm4PtRKPayOZWpsCy74L5XTztLZX5N71VJ71' \ --data '{ "amount": 999, "currency": "EUR", "capture_method": "automatic", "authentication_type": "no_three_ds", "confirm": true, "customer_id": "new", "off_session": true, "description": "Hello this is description", "recurring_details": { "type": "payment_method_id", "data": "pm_gtwOpqeWWinhXFQIDNol" } }' ``` response: ```json { "payment_id": "pay_9mzLCnix44o1qsG7iqQk", "merchant_id": "spriteMerchantBornAt1746687723", "status": "processing", "amount": 999, "net_amount": 999, "shipping_cost": null, "amount_capturable": 0, "amount_received": 0, "connector": "stripe", "client_secret": "pay_9mzLCnix44o1qsG7iqQk_secret_VIhPpAB29hISqbDVRk5d", "created": "2025-05-08T11:04:06.681Z", "currency": "EUR", "customer_id": "new", "customer": { "id": "new", "name": null, "email": "[email protected]", "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": "bank_redirect", "payment_method_data": null, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "[email protected]", "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "bancontact_card", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "new", "created_at": 1746702246, "expires": 1746705846, "secret": "epk_d600fbfd15cb48ea8c172d73aafe95d5" }, "manual_retry_allowed": false, "connector_transaction_id": "pi_3RMSFHD5R7gDAGff1bbPj0tS", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pi_3RMSFHD5R7gDAGff1bbPj0tS", "payment_link": null, "profile_id": "pro_HJPiTC1q4eKhHsitqxTn", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_nRFLCSCqPa4judlbaHUi", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-05-08T11:19:06.681Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_gtwOpqeWWinhXFQIDNol", "payment_method_status": "active", "updated": "2025-05-08T11:04:08.011Z", "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_1RMSCyD5R7gDAGffKy7iS7J8", "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null } ``` </details> <details> <summary>retrieve payment</summary> it takes a few seconds for the payment to get `succeeded`. since scheduler has not been set up locally, i had to manually do a force sync. process tracker should take care of this. request: ```curl curl --location 'http://localhost:8080/payments/pay_9mzLCnix44o1qsG7iqQk?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_12v5OB2ziszoDZL6Nl9nxIG65eJoFm4PtRKPayOZWpsCy74L5XTztLZX5N71VJ71' ``` response: ```json { "payment_id": "pay_9mzLCnix44o1qsG7iqQk", "merchant_id": "spriteMerchantBornAt1746687723", "status": "succeeded", "amount": 999, "net_amount": 999, "shipping_cost": null, "amount_capturable": 0, "amount_received": 999, "connector": "stripe", "client_secret": "pay_9mzLCnix44o1qsG7iqQk_secret_VIhPpAB29hISqbDVRk5d", "created": "2025-05-08T11:04:06.681Z", "currency": "EUR", "customer_id": "new", "customer": { "id": "new", "name": null, "email": "[email protected]", "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": "bank_redirect", "payment_method_data": { "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "[email protected]" } }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "[email protected]", "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "bancontact_card", "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_3RMSFHD5R7gDAGff1bbPj0tS", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pi_3RMSFHD5R7gDAGff1bbPj0tS", "payment_link": null, "profile_id": "pro_HJPiTC1q4eKhHsitqxTn", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_nRFLCSCqPa4judlbaHUi", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-05-08T11:19:06.681Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_gtwOpqeWWinhXFQIDNol", "payment_method_status": "active", "updated": "2025-05-08T11:04:24.246Z", "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_1RMSCyD5R7gDAGffKy7iS7J8", "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null } ``` </details> ### cards just to be safe, tested cards as well (no other payment methods should be affected with this change other than bancontact and ideal): <details> <summary>create payment intent</summary> request: ```curl curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Accept-Language: ja' \ --header 'api-key: dev_12v5OB2ziszoDZL6Nl9nxIG65eJoFm4PtRKPayOZWpsCy74L5XTztLZX5N71VJ71' \ --data-raw '{ "amount": 6500, "order_details": [ { "product_name": "Apple iphone 15", "quantity": 1, "amount": 6500 } ], "currency": "EUR", "confirm": false, "capture_method": "automatic", "authentication_type": "no_three_ds", "setup_future_usage": "off_session", "request_external_three_ds_authentication": false, "email": "[email protected]", "description": "Hello this is description", "shipping": { "address": { "state": "California", "city": "Banglore", "country": "US", "line1": "sdsdfsdf", "line2": "hsgdbhd", "line3": "alsksoe", "zip": "571201", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "123456789", "country_code": "+1" } }, "connector_metadata": { "noon": { "order_category": "applepay" } }, "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "email": "[email protected]", "phone": { "number": "8056594427", "country_code": "+91" } }, "customer_id": "new" }' ``` response: ```json { "payment_id": "pay_HBBoIetDibOlU7NZd1Qv", "merchant_id": "spriteMerchantBornAt1746687723", "status": "requires_payment_method", "amount": 6500, "net_amount": 6500, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_HBBoIetDibOlU7NZd1Qv_secret_0wbaBIpByiAF96MgiX9l", "created": "2025-05-08T11:31:34.614Z", "currency": "EUR", "customer_id": "new", "customer": { "id": "new", "name": null, "email": "[email protected]", "phone": null, "phone_country_code": null }, "description": "Hello this is description", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": null, "payment_method_data": null, "payment_token": null, "shipping": { "address": { "city": "Banglore", "country": "US", "line1": "sdsdfsdf", "line2": "hsgdbhd", "line3": "alsksoe", "zip": "571201", "state": "California", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "123456789", "country_code": "+1" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "[email protected]" }, "order_details": [ { "brand": null, "amount": 6500, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null } ], "email": "[email protected]", "name": 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": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "new", "created_at": 1746703894, "expires": 1746707494, "secret": "epk_c491860832564ff5bd1561fe0715c809" }, "manual_retry_allowed": null, "connector_transaction_id": null, "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "applepay" }, "braintree": null, "adyen": null }, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_HJPiTC1q4eKhHsitqxTn", "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-05-08T11:46:34.614Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-05-08T11:31:34.628Z", "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 payment intent</summary> request: ```curl curl --location 'http://localhost:8080/payments/pay_HBBoIetDibOlU7NZd1Qv/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_12v5OB2ziszoDZL6Nl9nxIG65eJoFm4PtRKPayOZWpsCy74L5XTztLZX5N71VJ71' \ --data '{ "payment_id": "pay_HBBoIetDibOlU7NZd1Qv", "payment_method": "card", "payment_method_type": "debit", "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "01", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "card_cvc": "100" } }, "customer_acceptance": { "acceptance_type": "online", "accepted_at": "2025-05-07T09:30:52.779Z", "online": { "ip_address": "103.23.45.1", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:138.0) Gecko/20100101 Firefox/138.0" } }, "browser_info": { "color_depth": 24, "java_enabled": true, "java_script_enabled": true, "language": "en-US", "screen_height": 1117, "screen_width": 1728, "time_zone": -330, "ip_address": "103.159.11.202", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:138.0) Gecko/20100101 Firefox/138.0", "os_type": "macOS", "os_version": "10.15", "device_model": "Macintosh", "accept_language": "en" }, "payment_type": "new_mandate" }' ``` response: ```json { "payment_id": "pay_HBBoIetDibOlU7NZd1Qv", "merchant_id": "spriteMerchantBornAt1746687723", "status": "succeeded", "amount": 6500, "net_amount": 6500, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6500, "connector": "stripe", "client_secret": "pay_HBBoIetDibOlU7NZd1Qv_secret_0wbaBIpByiAF96MgiX9l", "created": "2025-05-08T11:31:34.614Z", "currency": "EUR", "customer_id": "new", "customer": { "id": "new", "name": null, "email": "[email protected]", "phone": null, "phone_country_code": null }, "description": "Hello this is description", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1111", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "JP Morgan", "card_issuing_country": "INDIA", "card_isin": "411111", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "payment_checks": { "cvc_check": "pass", "address_line1_check": "pass", "address_postal_code_check": "pass" }, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "Banglore", "country": "US", "line1": "sdsdfsdf", "line2": "hsgdbhd", "line3": "alsksoe", "zip": "571201", "state": "California", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "123456789", "country_code": "+1" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "[email protected]" }, "order_details": [ { "brand": null, "amount": 6500, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null } ], "email": "[email protected]", "name": 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": "pi_3RMShLD5R7gDAGff0J19UjFK", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "applepay" }, "braintree": null, "adyen": null }, "feature_metadata": null, "reference_id": "pi_3RMShLD5R7gDAGff0J19UjFK", "payment_link": null, "profile_id": "pro_HJPiTC1q4eKhHsitqxTn", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_nRFLCSCqPa4judlbaHUi", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-05-08T11:46:34.614Z", "fingerprint": null, "browser_info": { "os_type": "macOS", "language": "en-US", "time_zone": -330, "ip_address": "103.159.11.202", "os_version": "10.15", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:138.0) Gecko/20100101 Firefox/138.0", "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", "java_script_enabled": true }, "payment_method_id": "pm_zRfLjuiAL44Uxnk817X1", "payment_method_status": "active", "updated": "2025-05-08T11:33:08.445Z", "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_1RMShLD5R7gDAGffHkC1jRTH", "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null } ``` </details> <details> <summary>retrieve payment</summary> request: ```curl curl --location 'http://localhost:8080/payments/pay_HBBoIetDibOlU7NZd1Qv?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_12v5OB2ziszoDZL6Nl9nxIG65eJoFm4PtRKPayOZWpsCy74L5XTztLZX5N71VJ71' ``` response: ```json { "payment_id": "pay_HBBoIetDibOlU7NZd1Qv", "merchant_id": "spriteMerchantBornAt1746687723", "status": "succeeded", "amount": 6500, "net_amount": 6500, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6500, "connector": "stripe", "client_secret": "pay_HBBoIetDibOlU7NZd1Qv_secret_0wbaBIpByiAF96MgiX9l", "created": "2025-05-08T11:31:34.614Z", "currency": "EUR", "customer_id": "new", "customer": { "id": "new", "name": null, "email": "[email protected]", "phone": null, "phone_country_code": null }, "description": "Hello this is description", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "1111", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "JP Morgan", "card_issuing_country": "INDIA", "card_isin": "411111", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "payment_checks": { "cvc_check": "pass", "address_line1_check": "pass", "address_postal_code_check": "pass" }, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "Banglore", "country": "US", "line1": "sdsdfsdf", "line2": "hsgdbhd", "line3": "alsksoe", "zip": "571201", "state": "California", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "123456789", "country_code": "+1" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "[email protected]" }, "order_details": [ { "brand": null, "amount": 6500, "category": null, "quantity": 1, "tax_rate": null, "product_id": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "product_img_link": null, "product_tax_code": null, "total_tax_amount": null, "requires_shipping": null } ], "email": "[email protected]", "name": 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": "pi_3RMShLD5R7gDAGff0J19UjFK", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "applepay" }, "braintree": null, "adyen": null }, "feature_metadata": null, "reference_id": "pi_3RMShLD5R7gDAGff0J19UjFK", "payment_link": null, "profile_id": "pro_HJPiTC1q4eKhHsitqxTn", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_nRFLCSCqPa4judlbaHUi", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-05-08T11:46:34.614Z", "fingerprint": null, "browser_info": { "os_type": "macOS", "language": "en-US", "time_zone": -330, "ip_address": "103.159.11.202", "os_version": "10.15", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:138.0) Gecko/20100101 Firefox/138.0", "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", "java_script_enabled": true }, "payment_method_id": "pm_zRfLjuiAL44Uxnk817X1", "payment_method_status": "active", "updated": "2025-05-08T11:33:08.445Z", "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>recurring payment</summary> request: ```curl curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_12v5OB2ziszoDZL6Nl9nxIG65eJoFm4PtRKPayOZWpsCy74L5XTztLZX5N71VJ71' \ --data '{ "amount": 999, "currency": "EUR", "capture_method": "automatic", "authentication_type": "no_three_ds", "confirm": true, "customer_id": "new", "off_session": true, "description": "Hello this is description", "recurring_details": { "type": "payment_method_id", "data": "pm_zRfLjuiAL44Uxnk817X1" } }' ``` response: ```json { "payment_id": "pay_G1ksB3bXcirAt7CtsYP9", "merchant_id": "spriteMerchantBornAt1746687723", "status": "succeeded", "amount": 999, "net_amount": 999, "shipping_cost": null, "amount_capturable": 0, "amount_received": 999, "connector": "stripe", "client_secret": "pay_G1ksB3bXcirAt7CtsYP9_secret_JJMUdSp6SpS7jpMq49XJ", "created": "2025-05-08T11:33:31.891Z", "currency": "EUR", "customer_id": "new", "customer": { "id": "new", "name": null, "email": "[email protected]", "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": "1111", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "JP Morgan", "card_issuing_country": "INDIA", "card_isin": "411111", "card_extended_bin": null, "card_exp_month": "01", "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": "[email protected]", "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "new", "created_at": 1746704011, "expires": 1746707611, "secret": "epk_500bb0e95274419294502e0009d42a7a" }, "manual_retry_allowed": false, "connector_transaction_id": "pi_3RMShkD5R7gDAGff0wXmhdaI", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pi_3RMShkD5R7gDAGff0wXmhdaI", "payment_link": null, "profile_id": "pro_HJPiTC1q4eKhHsitqxTn", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_nRFLCSCqPa4judlbaHUi", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-05-08T11:48:31.891Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_zRfLjuiAL44Uxnk817X1", "payment_method_status": "active", "updated": "2025-05-08T11:33:33.085Z", "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_1RMShLD5R7gDAGffHkC1jRTH", "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null } ``` </details> <details> <summary>retrieve payment</summary> request: ```curl curl --location 'http://localhost:8080/payments/pay_G1ksB3bXcirAt7CtsYP9?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_12v5OB2ziszoDZL6Nl9nxIG65eJoFm4PtRKPayOZWpsCy74L5XTztLZX5N71VJ71' ``` response: ```json { "payment_id": "pay_G1ksB3bXcirAt7CtsYP9", "merchant_id": "spriteMerchantBornAt1746687723", "status": "succeeded", "amount": 999, "net_amount": 999, "shipping_cost": null, "amount_capturable": 0, "amount_received": 999, "connector": "stripe", "client_secret": "pay_G1ksB3bXcirAt7CtsYP9_secret_JJMUdSp6SpS7jpMq49XJ", "created": "2025-05-08T11:33:31.891Z", "currency": "EUR", "customer_id": "new", "customer": { "id": "new", "name": null, "email": "[email protected]", "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": "1111", "card_type": "CREDIT", "card_network": "Visa", "card_issuer": "JP Morgan", "card_issuing_country": "INDIA", "card_isin": "411111", "card_extended_bin": null, "card_exp_month": "01", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "[email protected]" } }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "[email protected]", "name": null, "phone": null, "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "pi_3RMShkD5R7gDAGff0wXmhdaI", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pi_3RMShkD5R7gDAGff0wXmhdaI", "payment_link": null, "profile_id": "pro_HJPiTC1q4eKhHsitqxTn", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_nRFLCSCqPa4judlbaHUi", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-05-08T11:48:31.891Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_zRfLjuiAL44Uxnk817X1", "payment_method_status": "active", "updated": "2025-05-08T11:33:33.085Z", "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> ### sepa bank debit <details> <summary>create payment intent</summary> request: ```curl curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_XUootVtd5tq25XA9K0SB0i4RO3pTTnpbWHebsUNfRig5WL5tSfBOneCjirenpAbP' \ --data-raw '{ "amount": 1800, "currency": "USD", "confirm": false, "capture_method": "automatic", "customer_id": "new", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "three_ds", "email": "[email protected]", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "return_url": "https://duck.com", "setup_future_usage": "off_session", "business_country": "US", "billing": { "address": { "line1": "1467", "line2": "HarrisonStreet", "line3": "HarrisonStreet", "city": "SanFransico", "state": "California", "zip": "94122", "country": "US", "first_name": "Swangi", "last_name": "Kumari" } }, "metadata": { "order_details": { "product_name": "Apple iphone 15", "quantity": 1, "amount": 1800, "account_name": "transaction_processing" } } }' ``` response: ```json { "payment_id": "pay_D33h9y1S7XIksb1w2QgY", "merchant_id": "spriteMerchantBornAt1746713671", "status": "requires_payment_method", "amount": 1800, "net_amount": 1800, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_D33h9y1S7XIksb1w2QgY_secret_d8ZcBuLS0GFvx41fzBC7", "created": "2025-05-08T14:55:42.337Z", "currency": "USD", "customer_id": "new", "customer": { "id": "new", "name": "John Doe", "email": "[email protected]", "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": null, "payment_method_data": null, "payment_token": null, "shipping": null, "billing": { "address": { "city": "SanFransico", "country": "US", "line1": "1467", "line2": "HarrisonStreet", "line3": "HarrisonStreet", "zip": "94122", "state": "California", "first_name": "Swangi", "last_name": "Kumari" }, "phone": null, "email": null }, "order_details": null, "email": "[email protected]", "name": "John Doe", "phone": "999999999", "return_url": "https://duck.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": "US", "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "new", "created_at": 1746716142, "expires": 1746719742, "secret": "epk_6373b3d1a39548e1abdde6e0ae993a13" }, "manual_retry_allowed": null, "connector_transaction_id": null, "frm_message": null, "metadata": { "order_details": { "amount": 1800, "quantity": 1, "account_name": "transaction_processing", "product_name": "Apple iphone 15" } }, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_Vy4QgpvAOgLLqtMSro11", "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-05-08T15:10:42.337Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-05-08T14:55:42.346Z", "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 payment intent</summary> request: ```curl curl --location 'http://localhost:8080/payments/pay_1lAtqj68APg0Lzz1RBZ7/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_XUootVtd5tq25XA9K0SB0i4RO3pTTnpbWHebsUNfRig5WL5tSfBOneCjirenpAbP' \ --data-raw '{ "payment_id": "pay_1lAtqj68APg0Lzz1RBZ7", "payment_method": "bank_debit", "payment_method_type": "ach", "payment_method_data": { "bank_debit": { "ach_bank_debit": { "billing_details": { "name": "John Doe", "email": "[email protected]" }, "account_number": "000123456789", "routing_number": "110000000" } } }, "mandate_data": { "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" } }, "mandate_type": { "single_use": { "amount": 6540, "currency": "USD" } } }, "browser_info": { "color_depth": 24, "java_enabled": true, "java_script_enabled": true, "language": "en-US", "screen_height": 1117, "screen_width": 1728, "time_zone": -330, "ip_address": "103.159.11.202", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:138.0) Gecko/20100101 Firefox/138.0", "os_type": "macOS", "os_version": "10.15", "device_model": "Macintosh", "accept_language": "en" }, "payment_type": "new_mandate" }' ``` response: ```json { "payment_id": "pay_D33h9y1S7XIksb1w2QgY", "merchant_id": "spriteMerchantBornAt1746713671", "status": "requires_customer_action", "amount": 1800, "net_amount": 1800, "shipping_cost": null, "amount_capturable": 1800, "amount_received": 0, "connector": "stripe", "client_secret": "pay_D33h9y1S7XIksb1w2QgY_secret_d8ZcBuLS0GFvx41fzBC7", "created": "2025-05-08T14:55:42.337Z", "currency": "USD", "customer_id": "new", "customer": { "id": "new", "name": "John Doe", "email": "[email protected]", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": "man_a9rhLB6kISXVyJiI90UO", "mandate_data": { "update_mandate_id": null, "customer_acceptance": { "acceptance_type": "online", "accepted_at": "2022-09-10T10:11:12.000Z", "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" } }, "mandate_type": { "single_use": { "amount": 6540, "currency": "USD", "start_date": null, "end_date": null, "metadata": null } } }, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "bank_debit", "payment_method_data": { "bank_debit": { "ach": { "account_number": "0001****6789", "routing_number": "110***000", "card_holder_name": null, "bank_account_holder_name": null, "bank_name": null, "bank_type": null, "bank_holder_type": null } }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "SanFransico", "country": "US", "line1": "1467", "line2": "HarrisonStreet", "line3": "HarrisonStreet", "zip": "94122", "state": "California", "first_name": "Swangi", "last_name": "Kumari" }, "phone": null, "email": null }, "order_details": null, "email": "[email protected]", "name": "John Doe", "phone": "999999999", "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_D33h9y1S7XIksb1w2QgY/spriteMerchantBornAt1746713671/pay_D33h9y1S7XIksb1w2QgY_1" }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "ach", "connector_label": "stripe_US_default", "business_country": "US", "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": null, "connector_transaction_id": "pi_3RMVrQD5R7gDAGff0m8bN954", "frm_message": null, "metadata": { "order_details": { "amount": 1800, "quantity": 1, "account_name": "transaction_processing", "product_name": "Apple iphone 15" } }, "connector_metadata": null, "feature_metadata": null, "reference_id": "pi_3RMVrQD5R7gDAGff0m8bN954", "payment_link": null, "profile_id": "pro_Vy4QgpvAOgLLqtMSro11", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_YjqGIfO85PF6xZnG3Ouq", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-05-08T15:10:42.337Z", "fingerprint": null, "browser_info": { "os_type": "macOS", "language": "en-US", "time_zone": -330, "ip_address": "103.159.11.202", "os_version": "10.15", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:138.0) Gecko/20100101 Firefox/138.0", "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", "java_script_enabled": true }, "payment_method_id": "pm_FS5SzbT7bfiigu9uBFYb", "payment_method_status": null, "updated": "2025-05-08T14:55:44.926Z", "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>retrieve payment</summary> request: ```curl curl --location 'http://localhost:8080/payments/pay_1lAtqj68APg0Lzz1RBZ7?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_XUootVtd5tq25XA9K0SB0i4RO3pTTnpbWHebsUNfRig5WL5tSfBOneCjirenpAbP' ``` response: ```json { "payment_id": "pay_D33h9y1S7XIksb1w2QgY", "merchant_id": "spriteMerchantBornAt1746713671", "status": "succeeded", "amount": 1800, "net_amount": 1800, "shipping_cost": null, "amount_capturable": 0, "amount_received": 1800, "connector": "stripe", "client_secret": "pay_D33h9y1S7XIksb1w2QgY_secret_d8ZcBuLS0GFvx41fzBC7", "created": "2025-05-08T14:55:42.337Z", "currency": "USD", "customer_id": "new", "customer": { "id": "new", "name": "John Doe", "email": "[email protected]", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": "man_a9rhLB6kISXVyJiI90UO", "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "bank_debit", "payment_method_data": { "bank_debit": { "ach": { "account_number": "0001****6789", "routing_number": "110***000", "card_holder_name": null, "bank_account_holder_name": null, "bank_name": null, "bank_type": null, "bank_holder_type": null } }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "SanFransico", "country": "US", "line1": "1467", "line2": "HarrisonStreet", "line3": "HarrisonStreet", "zip": "94122", "state": "California", "first_name": "Swangi", "last_name": "Kumari" }, "phone": null, "email": null }, "order_details": null, "email": "[email protected]", "name": "John Doe", "phone": "999999999", "return_url": "https://duck.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": "ach", "connector_label": "stripe_US_default", "business_country": "US", "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "pi_3RMVrQD5R7gDAGff0m8bN954", "frm_message": null, "metadata": { "order_details": { "amount": 1800, "quantity": 1, "account_name": "transaction_processing", "product_name": "Apple iphone 15" } }, "connector_metadata": null, "feature_metadata": null, "reference_id": "pi_3RMVrQD5R7gDAGff0m8bN954", "payment_link": null, "profile_id": "pro_Vy4QgpvAOgLLqtMSro11", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_YjqGIfO85PF6xZnG3Ouq", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-05-08T15:10:42.337Z", "fingerprint": null, "browser_info": { "os_type": "macOS", "language": "en-US", "time_zone": -330, "ip_address": "103.159.11.202", "os_version": "10.15", "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:138.0) Gecko/20100101 Firefox/138.0", "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", "java_script_enabled": true }, "payment_method_id": "pm_FS5SzbT7bfiigu9uBFYb", "payment_method_status": "active", "updated": "2025-05-08T14:56:21.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": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null } ``` </details> <details> <summary>recurring payment</summary> request: ```curl curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_XUootVtd5tq25XA9K0SB0i4RO3pTTnpbWHebsUNfRig5WL5tSfBOneCjirenpAbP' \ --data '{ "amount": 999, "currency": "USD", "capture_method": "automatic", "authentication_type": "no_three_ds", "confirm": true, "customer_id": "new", "off_session": true, "description": "Hello this is description" , "recurring_details": { "type": "mandate_id", "data": "man_a9rhLB6kISXVyJiI90UO" } }' ``` response: ```json { "payment_id": "pay_1lAtqj68APg0Lzz1RBZ7", "merchant_id": "spriteMerchantBornAt1746713671", "status": "processing", "amount": 999, "net_amount": 999, "shipping_cost": null, "amount_capturable": 0, "amount_received": 0, "connector": "stripe", "client_secret": "pay_1lAtqj68APg0Lzz1RBZ7_secret_qXpuGLVGCrCAQgfRWj6y", "created": "2025-05-08T14:59:41.984Z", "currency": "USD", "customer_id": "new", "customer": { "id": "new", "name": "John Doe", "email": "[email protected]", "phone": "999999999", "phone_country_code": "+65" }, "description": "Hello this is description", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": true, "capture_on": null, "capture_method": "automatic", "payment_method": "bank_debit", "payment_method_data": null, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "[email protected]", "name": "John Doe", "phone": "999999999", "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "ach", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "new", "created_at": 1746716381, "expires": 1746719981, "secret": "epk_6ae53619f23e479aaa49fe78ff0ad42b" }, "manual_retry_allowed": false, "connector_transaction_id": "pi_3RMVvGD5R7gDAGff0gI0w0fr", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pi_3RMVvGD5R7gDAGff0gI0w0fr", "payment_link": null, "profile_id": "pro_Vy4QgpvAOgLLqtMSro11", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_YjqGIfO85PF6xZnG3Ouq", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-05-08T15:14:41.984Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_FS5SzbT7bfiigu9uBFYb", "payment_method_status": "active", "updated": "2025-05-08T14:59:42.837Z", "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_1RMVrQD5R7gDAGffic9TPCEG", "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null } ``` </details> <details> <summary>retrieve payment</summary> request: ```curl curl --location 'http://localhost:8080/payments/pay_1lAtqj68APg0Lzz1RBZ7?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_XUootVtd5tq25XA9K0SB0i4RO3pTTnpbWHebsUNfRig5WL5tSfBOneCjirenpAbP' ``` response: ```json { "payment_id": "pay_1lAtqj68APg0Lzz1RBZ7", "merchant_id": "spriteMerchantBornAt1746713671", "status": "succeeded", "amount": 999, "net_amount": 999, "shipping_cost": null, "amount_capturable": 0, "amount_received": 999, "connector": "stripe", "client_secret": "pay_1lAtqj68APg0Lzz1RBZ7_secret_qXpuGLVGCrCAQgfRWj6y", "created": "2025-05-08T14:59:41.984Z", "currency": "USD", "customer_id": "new", "customer": { "id": "new", "name": "John Doe", "email": "[email protected]", "phone": "999999999", "phone_country_code": "+65" }, "description": "Hello this is description", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": true, "capture_on": null, "capture_method": "automatic", "payment_method": "bank_debit", "payment_method_data": { "billing": { "address": { "city": "SanFransico", "country": "US", "line1": "1467", "line2": "HarrisonStreet", "line3": "HarrisonStreet", "zip": "94122", "state": "California", "first_name": "John Doe", "last_name": null }, "phone": null, "email": "[email protected]" } }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "[email protected]", "name": "John Doe", "phone": "999999999", "return_url": null, "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "ach", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "pi_3RMVvGD5R7gDAGff0gI0w0fr", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pi_3RMVvGD5R7gDAGff0gI0w0fr", "payment_link": null, "profile_id": "pro_Vy4QgpvAOgLLqtMSro11", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_YjqGIfO85PF6xZnG3Ouq", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-05-08T15:14:41.984Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_FS5SzbT7bfiigu9uBFYb", "payment_method_status": "active", "updated": "2025-05-08T15:00:06.980Z", "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_1RMVrQD5R7gDAGffic9TPCEG", "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null } ``` </details> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/router/src/connector/stripe/transformers.rs` **Code Patterns Applied:** - Implement new functions (1 changes) - Extend existing types with new fields (3 changes) **Detailed Identifier Changes:** Commit 40fd4739: Files to modify: **crates/router/src/connector/stripe/transformers.rs** Add: - function: pub::get_payment_method_id
{"pr_number": 7990, "pr_title": "fix(connector): [stripe] fix bank redirect (`bancontact_card`) recurring mandate", "merged_at": "2025-05-13T07:07:45Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/router/src/connector/stripe/transformers.rs"]}, "change_types": {"functions_added": 1, "fields_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
ci(cypress): add bambora apac, aci connectors ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description Add Bambora APAC and ACI connectors to cypress tests Both connectors do not support 3ds payments and silently falling back to no-3ds(Should throw validation) So skipped handle redirection . ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context Test case enhancement ## How did you test it? - Bambora apac <img width="750" alt="image" src="https://github.com/user-attachments/assets/bcb757bb-c51a-4b1e-8e78-f61f1e8109bd" /> issues: 1.3ds payments silently falling back to no-3ds(Should throw validation) 2.Void call is going to requires_capture status, expected status is cancelled - ACI <img width="750" alt="image" src="https://github.com/user-attachments/assets/27182906-49c4-45a5-ba03-0020fa901e41" /> 1.3ds payments silently falling back to no-3ds(Should throw validation) ## 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 <!-- @coderabbitai ignore -->
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Tests** - `cypress-tests/cypress/e2e/configs/Payment/Aci.js` - `cypress-tests/cypress/e2e/configs/Payment/Bamboraapac.js` - `cypress-tests/cypress/e2e/configs/Payment/Utils.js` - ... and 1 more files **Code Patterns Applied:** - Extend existing types with new fields (789 changes)
{"pr_number": 8120, "pr_title": "ci(cypress): add bambora apac, aci connectors", "merged_at": "2025-06-12T13:40:33Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "connector"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/configs/Payment/Aci.js", "cypress-tests/cypress/e2e/configs/Payment/Bamboraapac.js", "cypress-tests/cypress/e2e/configs/Payment/Utils.js", "cypress-tests/cypress/support/redirectionHandler.js"]}, "change_types": {"fields_added": 789}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
refactor(dynamic_routing): remove `tenant-id` prefixed in `id` field of dynamic routing grpc requests ## 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 --> Since hyperswitch started sending tenant-id in headers of dynamic routing grpc requests, we can safely remove the tenant-id prefixed in `id` field ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> 1. Create merchant_account, api_key and mca (any connector) 2. Toggle dynamic routing ``` curl --location --request POST 'http://localhost:8080/account/merchant_1734609410/business_profile/pro_gPTjn9jLm0CxI8ZD1omL/dynamic_routing/success_based/toggle?enable=metrics' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_K70Wr6zqJLbPECg8eEXrnZ43TW41JNUuXYHzRB50geiG0lViLExjxNUld6sgdNd0' \ --data '' ``` 3. Set 100% for dynamic_routing volume split ``` curl --location --request POST 'http://localhost:8080/account/merchant_1734609410/business_profile/pro_gPTjn9jLm0CxI8ZD1omL/dynamic_routing/set_volume_split?split=100' \ --header 'api-key: dev_GFInyC2oIihPleQ4CM8u8WOa02PxN5MHR5W1YAZyXxIYTHt8KDq2VPzRNn26JyJI' ``` 4. Create a payment ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_K70Wr6zqJLbPECg8eEXrnZ43TW41JNUuXYHzRB50geiG0lViLExjxNUld6sgdNd0' \ --data '{ "amount": 6540, "authentication_type": "no_three_ds", "confirm": true, "currency": "USD", "customer_acceptance": { "acceptance_type": "online" }, "customer_id": "cus_uYakn3OQTUtAgetLDOE1", "payment_method": "card", "payment_method_data": { "card": { "card_cvc": "123", "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "card_number": "4242424242424242" } } }' ``` Need to ssh into redis server for validating the key inserted from dynamo ## 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/routing.rs` - `crates/router/src/core/routing.rs` - `crates/router/src/core/routing/helpers.rs` **Detailed Identifier Changes:** Commit 8092c1fd: Files to modify: **crates/router/src/core/payments/routing.rs** Modify existing code **crates/router/src/core/routing.rs** Modify existing code **crates/router/src/core/routing/helpers.rs** Remove: - function: pub::generate_tenant_business_profile_id
{"pr_number": 6949, "pr_title": "refactor(dynamic_routing): remove `tenant-id` prefixed in `id` field of dynamic routing grpc requests", "merged_at": "2024-12-30T07:55:32Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/routing.rs", "crates/router/src/core/routing.rs", "crates/router/src/core/routing/helpers.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): add columns unified error code and error message in refund table ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [X] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description 1) unified_code and unified_message columns already exists for payment_attempt table, this PR adds unified_code and unified_message in refund table. During `RefundUpdate::ErrorUpdate` unified_code and unified_message is saved in DB, and in `/refunds` response and `/retrieve` response unified message is shown according to the locale passed in headers. 2) This PR introduces `locale` in `SessionState` 3) This PR introduces `refund_flow` (Flow identifier used for performing GSM operations) ### 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)? --> We can test this flow by manually trigger a failure for refunds. ### Steps: 1) Make a card payment for 1000 MYR, and capture. 2) Update DB to alter the captured amount to a greater amount say 3000 MYR. 3) Make refunds call with 3000 MYR, connector will throw error since the real captured amount is lesser than this new amount. ### 1) Make card payment via Fiuu **cURL** `curl --location --request POST 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_k6hN6WS14LcwHh4Q7bKCcTDRBwPRUnfQpraO5c7dW6oWiAFOmK8pdWfHlmg6adrt' \ --data-raw '{ "amount":1000, "currency": "MYR", "confirm": true, "payment_link" : false, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 1000, "customer_id": "exampel3rewfdsvc2", "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": "5105105105105100", "card_exp_month": "12", "card_exp_year": "2030", "card_holder_name": "Max Mustermann", "card_cvc": "444" } }, "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" } }'` **Response** <img width="1308" alt="Screenshot 2024-12-24 at 16 54 21" src="https://github.com/user-attachments/assets/5c1577ea-a797-4013-aa57-59206683c80d" /> ### 2)Update DB with following commands to make captured amount greater than the real captured amount ``` UPDATE payment_intent SET amount = 3000 WHERE payment_id='pay_FBXuXJ8A2WdhcwYueQCY'; UPDATE payment_intent SET amount_captured = 3000 WHERE payment_id='pay_FBXuXJ8A2WdhcwYueQCY'; UPDATE payment_attempt SET amount = 3000 WHERE payment_id='pay_FBXuXJ8A2WdhcwYueQCY'; UPDATE payment_attempt SET amount_to_capture = 3000 WHERE payment_id='pay_FBXuXJ8A2WdhcwYueQCY'; ``` ### 3)Update ***gateway_status_map*** and ***unified_translations*** table ``` INSERT INTO unified_translations (unified_code, unified_message, locale, translation) VALUES ('UE_1000', 'Issue with payment method details', 'zh-Hant', '支付方式資訊有問題'); INSERT INTO unified_translations (unified_code, unified_message, locale, translation) VALUES ('UE_2000', 'Issue with Configurations', 'zh-Hant', '配置有問題'); INSERT INTO unified_translations (unified_code, unified_message, locale, translation) VALUES ('UE_3000', 'Technical issue with PSP', 'zh-Hant', '支付服務提供商 (PSP) 出現技術問題'); INSERT INTO unified_translations (unified_code, unified_message, locale, translation) VALUES ('UE_4000', 'Issue in the integration', 'zh-Hant', '整合過程中出現問題'); INSERT INTO unified_translations (unified_code, unified_message, locale, translation) VALUES ('UE_9000', 'Something went wrong', 'zh-Hant', '授權被拒絕'); INSERT INTO gateway_status_map ( connector, flow, sub_flow, code, message, status, decision, step_up_possible, unified_code, unified_message ) VALUES ( 'fiuu', 'refund_flow', 'sub_flow', 'PR011', 'Exceed refund amount for this transaction.', 'Failure', 'do_default', false, 'UE_1000', 'Issue with payment method details' ); ``` ### 4)a) Make refunds call with locale "zh-Hant" **cURL** ``` curl --location --request POST 'http://localhost:8080/refunds' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_k6hN6WS14LcwHh4Q7bKCcTDRBwPRUnfQpraO5c7dW6oWiAFOmK8pdWfHlmg6adrt' \ --data-raw '{ "payment_id": "pay_FBXuXJ8A2WdhcwYueQCY", "amount": 3000, "reason": "Customer returned product", "refund_type": "instant", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` **Response** <img width="924" alt="Screenshot 2024-12-24 at 16 55 49" src="https://github.com/user-attachments/assets/91ca038a-b950-450e-a734-87816ca9df5b" /> Output: We get translated unified message 4)b)Make refunds call with no locale **cURL** `curl --location --request POST 'http://localhost:8080/refunds' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_k6hN6WS14LcwHh4Q7bKCcTDRBwPRUnfQpraO5c7dW6oWiAFOmK8pdWfHlmg6adrt' \ --data-raw '{ "payment_id": "pay_FBXuXJ8A2WdhcwYueQCY", "amount": 3000, "reason": "Customer returned product", "refund_type": "instant", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }'` **Response** <img width="924" alt="Screenshot 2024-12-24 at 16 56 28" src="https://github.com/user-attachments/assets/f7179a80-186b-4cd6-a477-e85db3ff3dbe" /> Output: We get unified message in english 5)Make refunds retrieve call **cURL** `curl --location --request GET 'http://localhost:8080/refunds/ref_rbIPXQW2jgCxEGEu56U7' \ --header 'Accept: application/json' \ --header 'Accept-Language: zh-Hant' \ --header 'api-key: dev_6ix25ZzUaYWPasgWCdTkb8PVZCJEe1X6ABALYbHQxPJT9xOAREiuxXlOAuYdlYAb' \ --header 'Content-Type: text/plain' \ --data-raw '{ "name": "", "description": null, "expiration": "2023-09-23T01:02:03.000Z" }'` **Response** ![Uploading Screenshot 2024-12-27 at 16.31.20.png…]() Output: We get unified message in locale ## 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/refunds.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/refund.rs` - `crates/diesel_models/src/schema.rs` - `crates/diesel_models/src/schema_v2.rs` **3. Core Business Logic** - `crates/router/src/core/payment_link.rs` - `crates/router/src/core/payout_link.rs` - `crates/router/src/core/payouts.rs` - ... and 1 more files **4. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs` - `crates/router/src/db/merchant_connector_account.rs` - `crates/router/tests/connectors/aci.rs` - ... and 1 more files **5. Utils** - `crates/router/src/utils.rs` **6. Tests** - `crates/router/tests/cache.rs` - `crates/router/tests/payments.rs` - `crates/router/tests/payments2.rs` - ... and 1 more files **7. Other** - `api-reference/openapi_spec.json` - `crates/router/src/bin/scheduler.rs` - `crates/router/src/consts.rs` - ... and 10 more files **Code Patterns Applied:** - Implement new functions (1 changes) - Extend existing types with new fields (57 changes) **Detailed Identifier Changes:** Commit c4d36b50: Files to modify: **crates/api_models/src/refunds.rs** Modify existing code **crates/diesel_models/src/refund.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_connectors/src/connectors/airwallex/transformers.rs** Remove: - struct: pub::Location **crates/router/src/bin/scheduler.rs** Modify existing code **crates/router/src/consts.rs** Modify existing code **crates/router/src/core/payment_link.rs** Modify existing code **crates/router/src/core/payout_link.rs** Modify existing code **crates/router/src/core/payouts.rs** Modify existing code **crates/router/src/core/refunds.rs** Modify existing code **crates/router/src/db/events.rs** Modify existing code **crates/router/src/db/merchant_connector_account.rs** Modify existing code **crates/router/src/db/merchant_key_store.rs** Modify existing code **crates/router/src/db/refund.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/payment_link.rs** Modify existing code **crates/router/src/routes/payout_link.rs** Modify existing code **crates/router/src/routes/payouts.rs** Remove: - function: private::get_locale_from_header **crates/router/src/services/api.rs** Modify existing code **crates/router/src/utils.rs** Add: - function: pub::get_locale_from_header **crates/router/tests/cache.rs** Modify existing code **crates/router/tests/connectors/aci.rs** Modify existing code **crates/router/tests/connectors/utils.rs** Modify existing code **crates/router/tests/payments.rs** Modify existing code **crates/router/tests/payments2.rs** Modify existing code **crates/router/tests/services.rs** Modify existing code
{"pr_number": 6933, "pr_title": "feat(core): add columns unified error code and error message in refund table", "merged_at": "2025-01-07T08:04:42Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "user"]}, "hierarchy": {"api_models": ["crates/api_models/src/refunds.rs"], "database": ["crates/diesel_models/src/refund.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs"], "core_business": ["crates/router/src/core/payment_link.rs", "crates/router/src/core/payout_link.rs", "crates/router/src/core/payouts.rs", "crates/router/src/core/refunds.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/airwallex/transformers.rs", "crates/router/src/db/merchant_connector_account.rs", "crates/router/tests/connectors/aci.rs", "crates/router/tests/connectors/utils.rs"], "utils": ["crates/router/src/utils.rs"], "tests": ["crates/router/tests/cache.rs", "crates/router/tests/payments.rs", "crates/router/tests/payments2.rs", "crates/router/tests/services.rs"], "other": ["api-reference/openapi_spec.json", "crates/router/src/bin/scheduler.rs", "crates/router/src/consts.rs", "crates/router/src/db/events.rs", "crates/router/src/db/merchant_key_store.rs", "crates/router/src/db/refund.rs", "crates/router/src/routes/app.rs", "crates/router/src/routes/payment_link.rs", "crates/router/src/routes/payout_link.rs", "crates/router/src/routes/payouts.rs", "crates/router/src/services/api.rs", "migrations/2024-12-24-115958_add-unified-code-and-message-in-refunds/down.sql", "migrations/2024-12-24-115958_add-unified-code-and-message-in-refunds/up.sql"]}, "change_types": {"functions_added": 1, "fields_added": 57}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): populate connector raw response and connector_response_reference_id for razorpay ## 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 populates raw_connector_response for Payments when return_raw_connector_response is set to True. It also changes Payments Create and Psync endpoint for Razorpay connector. Additional Changes: - Introduces a struct ConnectorResponseData which sends raw_connector_response at core flows instead of it being in PaymentData (changed only in v2) - Rename `all_keys_required` as `return_raw_connector_response`, `get_all_keys_required()` as `should_return_raw_response()` , `whole_connector_response` as `raw_connector_response`. This rename is applied only on v2 Api and core flows to retain backward compatibility at v1. - `get_whole_connector_response()` and `get_all_keys_required()` at OperationSessionGetters are marked under v1 feature - `connector_response_reference_id` is updated in Payment_attempt at both update_trackers and post_update_trackers for v2. This is included in update_trackers in cases where Authorize flow is not performed at Connector End - Also marked this PaymentRetrieveBody, PaymentRetrieveBodyWithCredentials under v1 feature as it is not required in v2 flows ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> - Payments - Create ``` curl --location 'http://localhost:8080/v2/payments' \ --header 'Content-Type: application/json' \ --header 'x-profile-id: pro_L5WeuuGWl0EUYBhEEME1' \ --header 'Authorization: api-key=_' \ --data-raw '{ "amount_details": { "order_amount": 100, "currency": "INR" }, "capture_method":"automatic", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://google.com", "payment_method_data": { "upi": { "upi_collect": { "vpa_id": "success@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": "[email protected]" } }, "payment_method_subtype": "upi_collect", "payment_method_type": "upi", "return_raw_connector_response": true }' ``` Response ``` { "id": "12345_pay_0197c4e2b8087181963fdaae32be36b3", "status": "requires_customer_action", "amount": { "order_amount": 100, "currency": "INR", "shipping_cost": null, "order_tax_amount": null, "external_tax_calculation": "skip", "surcharge_calculation": "skip", "surcharge_amount": null, "tax_on_surcharge": null, "net_amount": 100, "amount_to_capture": null, "amount_capturable": 0, "amount_captured": null }, "customer_id": null, "connector": "razorpay", "created": "2025-07-01T07:28:02.057Z", "payment_method_data": { "billing": { "address": { "city": "San Fransico", "country": "IN", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "Swangi", "last_name": "Kumari" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "[email protected]" } }, "payment_method_type": "upi", "payment_method_subtype": "upi_collect", "connector_transaction_id": "pay_Qnik5RSCB4oVjf", "connector_reference_id": "order_Qnik4SrNFCdv8H", "merchant_connector_id": "mca_GWx9LT38SlIQ1qNFfw1p", "browser_info": null, "error": null, "shipping": null, "billing": null, "attempts": null, "connector_token_details": null, "payment_method_id": null, "next_action": { "type": "wait_screen_information", "display_from_timestamp": 1751354885589516000, "display_to_timestamp": 1751355185589516000, "poll_config": { "delay_in_secs": 5, "frequency": 5 } }, "return_url": "https://google.com/", "authentication_type": "no_three_ds", "authentication_type_applied": "no_three_ds", "is_iframe_redirection_enabled": null, "merchant_reference_id": null, "raw_connector_response": "{\"razorpay_payment_id\":\"pay_Qnik5RSCB4oVjf\"}" } ``` - Payments - Retrieve ``` curl --location 'http://localhost:8080/v2/payments/12345_pay_0197c4e2b8087181963fdaae32be36b3?force_sync=true&return_raw_connector_response=true' \ --header 'x-profile-id: pro_L5WeuuGWl0EUYBhEEME1' \ --header 'Authorization: api-key=_' \ --data '' ``` Response ``` { "id": "12345_pay_0197c4e2b8087181963fdaae32be36b3", "status": "requires_capture", "amount": { "order_amount": 100, "currency": "INR", "shipping_cost": null, "order_tax_amount": null, "external_tax_calculation": "skip", "surcharge_calculation": "skip", "surcharge_amount": null, "tax_on_surcharge": null, "net_amount": 100, "amount_to_capture": null, "amount_capturable": 100, "amount_captured": 100 }, "customer_id": null, "connector": "razorpay", "created": "2025-07-01T07:36:11.733Z", "payment_method_data": { "billing": { "address": { "city": "San Fransico", "country": "IN", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "Swangi", "last_name": "Kumari" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": "[email protected]" } }, "payment_method_type": "upi", "payment_method_subtype": "upi_collect", "connector_transaction_id": "pay_Qnik5RSCB4oVjf", "connector_reference_id": "order_Qnik4SrNFCdv8H", "merchant_connector_id": "mca_GWx9LT38SlIQ1qNFfw1p", "browser_info": null, "error": null, "shipping": null, "billing": null, "attempts": null, "connector_token_details": null, "payment_method_id": null, "next_action": null, "return_url": "https://google.com/", "authentication_type": "no_three_ds", "authentication_type_applied": null, "is_iframe_redirection_enabled": null, "merchant_reference_id": null, "raw_connector_response": "{\"entity\":\"collection\",\"count\":1,\"items\":[{\"id\":\"pay_QnishOLxdHvKJ6\",\"entity\":\"payment\",\"amount\":100,\"currency\":\"INR\",\"status\":\"authorized\",\"order_id\":\"order_QnisgYZGQHtI92\",\"invoice_id\":null,\"international\":false,\"method\":\"upi\",\"amount_refunded\":0,\"refund_status\":null,\"captured\":false,\"description\":null,\"card_id\":null,\"bank\":null,\"wallet\":null,\"vpa\":\"success@razorpay\",\"email\":\"[email protected]\",\"contact\":\"+918056594427\",\"notes\":{\"optimizer_provider_name\":\"razorpay\"},\"fee\":null,\"tax\":null,\"error_code\":null,\"error_description\":null,\"error_source\":null,\"error_step\":null,\"error_reason\":null,\"acquirer_data\":{\"rrn\":\"216013077213\",\"upi_transaction_id\":\"614E93092FDA8E2A9FA28264CF769689\"},\"gateway_provider\":\"Razorpay\",\"created_at\":1751355374,\"upi\":{\"vpa\":\"success@razorpay\"}}]}" } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/payments.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/payment_attempt.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payments/payment_attempt.rs` - `crates/hyperswitch_domain_models/src/router_data.rs` - `crates/hyperswitch_domain_models/src/router_request_types.rs` **4. Core Business Logic** - `crates/router/src/core/authentication/transformers.rs` - `crates/router/src/core/fraud_check/flows/checkout_flow.rs` - `crates/router/src/core/fraud_check/flows/fulfillment_flow.rs` - ... and 31 more files **5. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/razorpay.rs` - `crates/hyperswitch_connectors/src/connectors/razorpay/transformers.rs` - `crates/hyperswitch_connectors/src/utils.rs` - ... and 3 more files **6. Type Definitions** - `crates/common_types/src/domain.rs` - `crates/router/src/types.rs` - `crates/router/src/types/api/payments.rs` **7. Other** - `api-reference/v2/openapi_spec_v2.json` - `crates/hyperswitch_interfaces/src/conversion_impls.rs` - `crates/openapi/src/openapi_v2.rs` - ... and 2 more files **Code Patterns Applied:** - Define new data structures (2 changes) - Implement new functions (17 changes) - Extend existing types with new fields (127 changes) - Add conditional logic for feature flags or filtering (10 changes) **Detailed Identifier Changes:** Commit 2253d981: Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/common_types/src/domain.rs** Add: - struct: pub::ConnectorResponseData **crates/diesel_models/src/payment_attempt.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/razorpay.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/razorpay/transformers.rs** Add: - impl: impl TryFrom< ResponseRouterData< F, RazorpayPaymentsResponse, PaymentsAuthorizeData, PaymentsResponseData, >, > for get_order_id() **crates/hyperswitch_connectors/src/utils.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_attempt.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_data.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_request_types.rs** Modify existing code **crates/hyperswitch_interfaces/src/conversion_impls.rs** Modify existing code **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/router/src/core/authentication/transformers.rs** Modify existing code **crates/router/src/core/fraud_check/flows/checkout_flow.rs** Modify existing code **crates/router/src/core/fraud_check/flows/fulfillment_flow.rs** Modify existing code **crates/router/src/core/fraud_check/flows/record_return.rs** Modify existing code **crates/router/src/core/fraud_check/flows/sale_flow.rs** Modify existing code **crates/router/src/core/fraud_check/flows/transaction_flow.rs** Modify existing code **crates/router/src/core/mandate/utils.rs** Modify existing code **crates/router/src/core/payment_methods.rs** Modify existing code **crates/router/src/core/payments.rs** Add: - function: private::set_connector_response_reference_id - function: private::set_connector_response_reference_id - function: private::set_connector_response_reference_id - function: private::set_connector_response_reference_id **crates/router/src/core/payments/flows.rs** Modify existing code **crates/router/src/core/payments/flows/approve_flow.rs** Modify existing code **crates/router/src/core/payments/flows/authorize_flow.rs** Remove: - function: private::create_order_at_connector - function: private::update_router_data_with_create_order_result **crates/router/src/core/payments/flows/cancel_flow.rs** Modify existing code **crates/router/src/core/payments/flows/capture_flow.rs** Modify existing code **crates/router/src/core/payments/flows/complete_authorize_flow.rs** Modify existing code **crates/router/src/core/payments/flows/incremental_authorization_flow.rs** Modify existing code **crates/router/src/core/payments/flows/post_session_tokens_flow.rs** Modify existing code **crates/router/src/core/payments/flows/psync_flow.rs** Modify existing code **crates/router/src/core/payments/flows/reject_flow.rs** Modify existing code **crates/router/src/core/payments/flows/session_flow.rs** Modify existing code **crates/router/src/core/payments/flows/session_update_flow.rs** Modify existing code **crates/router/src/core/payments/flows/setup_mandate_flow.rs** Modify existing code **crates/router/src/core/payments/flows/update_metadata_flow.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **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/operations/proxy_payments_intent.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/core/relay/utils.rs** Modify existing code **crates/router/src/core/revenue_recovery/api.rs** Modify existing code **crates/router/src/core/unified_authentication_service/utils.rs** Modify existing code **crates/router/src/core/utils.rs** Modify existing code **crates/router/src/core/webhooks/incoming_v2.rs** Modify existing code **crates/router/src/core/webhooks/utils.rs** Modify existing code **crates/router/src/routes/payments.rs** Modify existing code **crates/router/src/services/api.rs** Remove: - impl: impl Authenticate for api_models::payments::PaymentsConfirmIntentRequest Add: - function: private::should_return_raw_response - function: private::should_return_raw_response - impl: impl Authenticate for api_models::payments::PaymentsConfirmIntentRequest **crates/router/src/types.rs** Modify existing code **crates/router/src/types/api/payments.rs** Modify existing code **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
{"pr_number": 8499, "pr_title": "feat(core): populate connector raw response and connector_response_reference_id for razorpay", "merged_at": "2025-07-03T13:09:30Z", "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/payment_attempt.rs"], "domain": ["crates/hyperswitch_domain_models/src/payments/payment_attempt.rs", "crates/hyperswitch_domain_models/src/router_data.rs", "crates/hyperswitch_domain_models/src/router_request_types.rs"], "core_business": ["crates/router/src/core/authentication/transformers.rs", "crates/router/src/core/fraud_check/flows/checkout_flow.rs", "crates/router/src/core/fraud_check/flows/fulfillment_flow.rs", "crates/router/src/core/fraud_check/flows/record_return.rs", "crates/router/src/core/fraud_check/flows/sale_flow.rs", "crates/router/src/core/fraud_check/flows/transaction_flow.rs", "crates/router/src/core/mandate/utils.rs", "crates/router/src/core/payment_methods.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/payments/flows.rs", "crates/router/src/core/payments/flows/approve_flow.rs", "crates/router/src/core/payments/flows/authorize_flow.rs", "crates/router/src/core/payments/flows/cancel_flow.rs", "crates/router/src/core/payments/flows/capture_flow.rs", "crates/router/src/core/payments/flows/complete_authorize_flow.rs", "crates/router/src/core/payments/flows/incremental_authorization_flow.rs", "crates/router/src/core/payments/flows/post_session_tokens_flow.rs", "crates/router/src/core/payments/flows/psync_flow.rs", "crates/router/src/core/payments/flows/reject_flow.rs", "crates/router/src/core/payments/flows/session_flow.rs", "crates/router/src/core/payments/flows/session_update_flow.rs", "crates/router/src/core/payments/flows/setup_mandate_flow.rs", "crates/router/src/core/payments/flows/update_metadata_flow.rs", "crates/router/src/core/payments/helpers.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/operations/proxy_payments_intent.rs", "crates/router/src/core/payments/transformers.rs", "crates/router/src/core/relay/utils.rs", "crates/router/src/core/revenue_recovery/api.rs", "crates/router/src/core/unified_authentication_service/utils.rs", "crates/router/src/core/utils.rs", "crates/router/src/core/webhooks/incoming_v2.rs", "crates/router/src/core/webhooks/utils.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/razorpay.rs", "crates/hyperswitch_connectors/src/connectors/razorpay/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/router/src/types/api/verify_connector.rs", "crates/router/tests/connectors/aci.rs", "crates/router/tests/connectors/utils.rs"], "types": ["crates/common_types/src/domain.rs", "crates/router/src/types.rs", "crates/router/src/types/api/payments.rs"], "other": ["api-reference/v2/openapi_spec_v2.json", "crates/hyperswitch_interfaces/src/conversion_impls.rs", "crates/openapi/src/openapi_v2.rs", "crates/router/src/routes/payments.rs", "crates/router/src/services/api.rs"]}, "change_types": {"structs_added": 2, "functions_added": 17, "fields_added": 127, "conditionals_added": 10}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(wasm_changes): Multisafepay wasm changes ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Add the following payment methods in wasm for multisafepay - TRUSTLY - ALIPAY - WE CHAT PAY - EPS - MBway - Sofort Just dashboard changes and no need test cases from BE ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - `crates/connector_configs/toml/sandbox.toml`
{"pr_number": 9746, "pr_title": "fix(wasm_changes): Multisafepay wasm changes", "merged_at": "2025-10-09T09:00:14Z", "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"}
docs(cypress): update cypress documentation ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [x] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> Existing [docs](https://github.com/juspay/hyperswitch/tree/main/cypress-tests) are outdated to an extent and miss many feature updates. closes https://github.com/juspay/hyperswitch/issues/6955 ### 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). --> Update. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Nah! ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `npm run format && npm run lint -- --fix` - [ ] 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/README.md` **Code Patterns Applied:** - Extend existing types with new fields (2 changes)
{"pr_number": 6956, "pr_title": "docs(cypress): update cypress documentation", "merged_at": "2025-01-07T07:24:16Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"tests": ["cypress-tests/README.md"]}, "change_types": {"fields_added": 2}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(authentication): fixed terminal state persistence for redirect response ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix ## Description <!-- Describe your changes in detail --> fixed terminal state persistence for redirect respon ## How did you test 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 authentication ```shell curl --location 'localhost:8080/authentication' \ --header 'X-Profile-Id: pro_wcFayhnIqtY4jZXAd2HN' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_pP7xcq6gwvuGOx0Pn6ecfWvfIF3wcjmMtyTshoMffoRsEif1vrDqJaRMO9hwyaHr' \ --data '{ "amount": 10, "currency": "USD", "acquirer_details": { "acquirer_merchant_id": "12134", "acquirer_bin": "438309", "merchant_country_code": "004" }, "authentication_connector":"juspaythreedsserver" }' ``` Eligibility ```shell curl --location 'localhost:8080/authentication/authn_JkeGGbnXvwwHYhhko7rH/eligibility' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_pP7xcq6gwvuGOx0Pn6ecfWvfIF3wcjmMtyTshoMffoRsEif1vrDqJaRMO9hwyaHr' \ --data-raw '{ "payment_method": "card", "payment_method_data": { "card": { "card_number": "4916994064252017", "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": "CA", "zip": "94122", "country": "US", "first_name": "PiX" }, "phone": { "number": "123456789", "country_code": "12" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" }, "phone": { "number": "123456789", "country_code": "12" } }, "email": "[email protected]", "browser_information": { "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": "115.99.183.2" }, }' ``` Authenticate Via BRW ```shell curl --location 'localhost:8080/authentication/authn_JkeGGbnXvwwHYhhko7rH/authenticate' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_pP7xcq6gwvuGOx0Pn6ecfWvfIF3wcjmMtyTshoMffoRsEif1vrDqJaRMO9hwyaHr' \ --data '{ "device_channel": "BRW", "threeds_method_comp_ind": "Y" } ' ``` Trigger otp ```shell curl --location 'https://mock-three-ds-server-small-lake-1937.fly.dev/processor/mock/acs/trigger-otp?redirectUrl=http%3A%2F%2Flocalhost%3A8080%2Fauthentication%2Fsahkal11%2Fauthn_JkeGGbnXvwwHYhhko7rH%2Fsync' \ --header 'accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7' \ --header 'accept-language: en-GB,en-US;q=0.9,en;q=0.8' \ --header 'cache-control: no-cache' \ --header 'content-type: application/x-www-form-urlencoded' \ --header 'origin: https://juspay-3ds-sdk.netlify.app' \ --header 'pragma: no-cache' \ --header 'priority: u=0, i' \ --header 'referer: https://juspay-3ds-sdk.netlify.app/' \ --header 'sec-ch-ua: "Google Chrome";v="137", "Chromium";v="137", "Not/A)Brand";v="24"' \ --header 'sec-ch-ua-mobile: ?0' \ --header 'sec-ch-ua-platform: "macOS"' \ --header 'sec-fetch-dest: iframe' \ --header 'sec-fetch-mode: navigate' \ --header 'sec-fetch-site: cross-site' \ --header 'sec-fetch-storage-access: active' \ --header 'upgrade-insecure-requests: 1' \ --header 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36' \ --data-urlencode 'creq={"messageType":"CReq","threeDSServerTransID":"2e23c720-f2bd-4457-87f0-6d3b2cdbba92","acsTransID":"5cc1758d-0f65-4544-9891-e9fb7c49cca7","challengeWindowSize":"01","messageVersion":"2.2.0"}' ``` Sync ```shell curl --location 'localhost:8080/authentication/sahkal11/authn_w5xUrPaBuD3R7oYxTvbC/sync' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_pP7xcq6gwvuGOx0Pn6ecfWvfIF3wcjmMtyTshoMffoRsEif1vrDqJaRMO9hwyaHr' \ --data '{ }' ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **payment** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/unified_authentication_service.rs` **2. Other** - `crates/common_enums/src/enums.rs` **Code Patterns Applied:** - Implement new functions (2 changes) - Extend existing types with new fields (2 changes) - Modify database queries (1 changes) **Detailed Identifier Changes:** Commit 375e9be9: Files to modify: **crates/common_enums/src/enums.rs** Add: - function: pub::is_terminal_state **crates/router/src/core/unified_authentication_service.rs** Modify existing code
{"pr_number": 8916, "pr_title": "fix(authentication): fixed terminal state persistence for redirect response", "merged_at": "2025-08-18T08:00:46Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"core_business": ["crates/router/src/core/unified_authentication_service.rs"], "other": ["crates/common_enums/src/enums.rs"]}, "change_types": {"functions_added": 2, "fields_added": 2, "database_queries": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [STRIPE] Added Connector Tokenization Flow for Cards ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> ### 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). --> Hotfix [PR](https://github.com/juspay/hyperswitch/pull/8248) ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/router_request_types.rs` **2. Core Business Logic** - `crates/router/src/core/payment_methods.rs` - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/transformers.rs` **3. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/facilitapay/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/stripe.rs` - `crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs` - ... and 3 more files **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (2 changes) - Extend existing types with new fields (89 changes) - Add conditional logic for feature flags or filtering (6 changes) - Modify database queries (2 changes) **Detailed Identifier Changes:** Commit a2c58743: Files to modify: **crates/hyperswitch_connectors/src/connectors/facilitapay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/stripe.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs** Add: - struct: pub::StripeBillingAddressCardToken **crates/hyperswitch_domain_models/src/router_request_types.rs** Modify existing code **crates/router/src/core/payment_methods.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Add: - function: private::get_off_session **crates/router/tests/connectors/square.rs** Modify existing code **crates/router/tests/connectors/stax.rs** Modify existing code **crates/router/tests/connectors/utils.rs** Modify existing code
{"pr_number": 8292, "pr_title": "feat(connector): [STRIPE] Added Connector Tokenization Flow for Cards", "merged_at": "2025-06-10T07:48:08Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/router_request_types.rs"], "core_business": ["crates/router/src/core/payment_methods.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/payments/transformers.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/facilitapay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/stripe.rs", "crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs", "crates/router/tests/connectors/square.rs", "crates/router/tests/connectors/stax.rs", "crates/router/tests/connectors/utils.rs"]}, "change_types": {"structs_added": 1, "functions_added": 2, "fields_added": 89, "imports_added": 1, "conditionals_added": 6, "database_queries": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [Deutschebank] Implement Card 3ds ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Implement Card 3ds for Deutschebank ### 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://testmerch.directpos.de/rest-api/apidoc/v2.1/index.html#creditCard3DSecureInitializingThePaymentSsteps1_4 ## How did you test 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** **1. No3DSManualCapture** ![image](https://github.com/user-attachments/assets/cca4c8ed-2205-419b-8eb4-4759daf20f8a) **2. 3DSAutoCapture** ![image](https://github.com/user-attachments/assets/38318c13-fba1-40f9-a4a8-16ee655e6127) **3. 3DSManualCapture** ![image](https://github.com/user-attachments/assets/58c72d9d-9668-49dd-a8af-20c6f7407b2c) **4. No3DSAutoCapture** ![image](https://github.com/user-attachments/assets/bc0b897d-5f45-4878-9a98-1498e8c9ce82) **5. VoidPayment** ![image](https://github.com/user-attachments/assets/3cedc848-9b4c-4d95-bc66-9019085648d1) **6. SyncPayment** ![image](https://github.com/user-attachments/assets/b4508f59-95b7-49e7-b079-df8933b38c3e) **7. RefundPayment** ![image](https://github.com/user-attachments/assets/b8372b26-3945-47b6-afa7-06ca75b267f9) **8. SyncRefund** ![image](https://github.com/user-attachments/assets/625f7bab-1c1f-4e89-8c89-9c4793cf78d9) Note: Currently, no 3ds for card payments are not being supported for Deutschebank. Hence, no 3ds flows are expected to return an error message saying that the payment method type is not supported, and has been handled in the cypress tests accordingly. **Postman Tests** **1. Authorize (Manual)** - Request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_o6c9H4UPb00h8hMpjOww9sHv5IWOqwTuJrNC45fOVdUdPOs0sjRQ7peoX7KgqRWp' \ --data-raw '{ "amount": 6540, "currency": "USD", "confirm": true, "business_country": "US", "business_label": "default", "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "cybersourcecustomer", "email": "[email protected]", "name": "Cardholder", "phone": "999999999", "phone_country_code": "+65", "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": "4761739090000088", "card_exp_month": "12", "card_exp_year": "34", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "customer_acceptance": { "acceptance_type": "online" }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "sundari", "last_name": "sundari" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "sundari", "last_name": "sundari" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "count_tickets": 1, "transaction_number": "5590045" } }' ``` - Response ``` { "payment_id": "pay_PS9a7QNMXDs1Qr3GjLSV", "merchant_id": "postman_merchant_GHAction_89b212fc-9f25-469f-ba4b-1a3288efcdd6", "status": "requires_customer_action", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 6540, "amount_received": null, "connector": "deutschebank", "client_secret": "pay_PS9a7QNMXDs1Qr3GjLSV_secret_dfXLVVwCzeorfBNuOGCD", "created": "2024-12-16T11:36:46.533Z", "currency": "USD", "customer_id": "cybersourcecustomer", "customer": { "id": "cybersourcecustomer", "name": "Cardholder", "email": "[email protected]", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "0088", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "476173", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "34", "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": "sundari", "last_name": "sundari" }, "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": "sundari", "last_name": "sundari" }, "phone": null, "email": null }, "order_details": null, "email": "[email protected]", "name": "Cardholder", "phone": "999999999", "return_url": "https://duck.com/", "authentication_type": "three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_PS9a7QNMXDs1Qr3GjLSV/postman_merchant_GHAction_89b212fc-9f25-469f-ba4b-1a3288efcdd6/pay_PS9a7QNMXDs1Qr3GjLSV_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": "deutschebank_US_default", "business_country": "US", "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cybersourcecustomer", "created_at": 1734349006, "expires": 1734352606, "secret": "epk_0036b25eb0ef4d599e0b2957ff64beb3" }, "manual_retry_allowed": null, "connector_transaction_id": null, "frm_message": null, "metadata": { "count_tickets": 1, "transaction_number": "5590045" }, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_hwz1M9UiyP6KcFovaoe2", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_tQJBbQeTqAOBfStOjwz6", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-12-16T11:51:46.533Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2024-12-16T11:36:49.083Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` **2. Capture (Manual)** - Request ``` curl --location 'http://localhost:8080/payments/pay_PS9a7QNMXDs1Qr3GjLSV/capture' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_o6c9H4UPb00h8hMpjOww9sHv5IWOqwTuJrNC45fOVdUdPOs0sjRQ7peoX7KgqRWp' \ --data '{ "amount_to_capture": 6540, "statement_descriptor_name": "Joseph", "statement_descriptor_suffix": "JS" }' ``` - Response ``` { "payment_id": "pay_PS9a7QNMXDs1Qr3GjLSV", "merchant_id": "postman_merchant_GHAction_89b212fc-9f25-469f-ba4b-1a3288efcdd6", "status": "succeeded", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6540, "connector": "deutschebank", "client_secret": "pay_PS9a7QNMXDs1Qr3GjLSV_secret_dfXLVVwCzeorfBNuOGCD", "created": "2024-12-16T11:36:46.533Z", "currency": "USD", "customer_id": "cybersourcecustomer", "customer": { "id": "cybersourcecustomer", "name": "Cardholder", "email": "[email protected]", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "0088", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "476173", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "34", "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": "sundari", "last_name": "sundari" }, "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": "sundari", "last_name": "sundari" }, "phone": null, "email": null }, "order_details": null, "email": "[email protected]", "name": "Cardholder", "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": "credit", "connector_label": "deutschebank_US_default", "business_country": "US", "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "nAYkZmc4a3I6pxU53fJzNP", "frm_message": null, "metadata": { "count_tickets": 1, "transaction_number": "5590045" }, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_hwz1M9UiyP6KcFovaoe2", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_tQJBbQeTqAOBfStOjwz6", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-12-16T11:51:46.533Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_RncRqkyYbJrKGoU8Ywnr", "payment_method_status": null, "updated": "2024-12-16T11:37:16.619Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` **3. Authorize + Capture** - Request ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_o6c9H4UPb00h8hMpjOww9sHv5IWOqwTuJrNC45fOVdUdPOs0sjRQ7peoX7KgqRWp' \ --data-raw '{ "amount": 6540, "currency": "USD", "confirm": true, "business_country": "US", "business_label": "default", "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "cybersourcecustomer", "email": "[email protected]", "name": "Cardholder", "phone": "999999999", "phone_country_code": "+65", "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": "4761739090000088", "card_exp_month": "12", "card_exp_year": "34", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "customer_acceptance": { "acceptance_type": "online" }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "sundari", "last_name": "sundari" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "sundari", "last_name": "sundari" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "count_tickets": 1, "transaction_number": "5590045" } }' ``` - Response ``` { "payment_id": "pay_4ueYRDmGUyI31AuqI0ea", "merchant_id": "postman_merchant_GHAction_89b212fc-9f25-469f-ba4b-1a3288efcdd6", "status": "requires_customer_action", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 6540, "amount_received": null, "connector": "deutschebank", "client_secret": "pay_4ueYRDmGUyI31AuqI0ea_secret_IixVMy93O7YiEP4JJGpN", "created": "2024-12-16T11:43:10.558Z", "currency": "USD", "customer_id": "cybersourcecustomer", "customer": { "id": "cybersourcecustomer", "name": "Cardholder", "email": "[email protected]", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "0088", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "476173", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "34", "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": "sundari", "last_name": "sundari" }, "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": "sundari", "last_name": "sundari" }, "phone": null, "email": null }, "order_details": null, "email": "[email protected]", "name": "Cardholder", "phone": "999999999", "return_url": "https://duck.com/", "authentication_type": "three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": { "type": "redirect_to_url", "redirect_to_url": "http://localhost:8080/payments/redirect/pay_4ueYRDmGUyI31AuqI0ea/postman_merchant_GHAction_89b212fc-9f25-469f-ba4b-1a3288efcdd6/pay_4ueYRDmGUyI31AuqI0ea_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": "deutschebank_US_default", "business_country": "US", "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "cybersourcecustomer", "created_at": 1734349390, "expires": 1734352990, "secret": "epk_df66b67348a9425dabef0cf41381d6f4" }, "manual_retry_allowed": null, "connector_transaction_id": null, "frm_message": null, "metadata": { "count_tickets": 1, "transaction_number": "5590045" }, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_hwz1M9UiyP6KcFovaoe2", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_tQJBbQeTqAOBfStOjwz6", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-12-16T11:58:10.558Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2024-12-16T11:43:14.008Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` **4. PSync** - Request ``` curl --location 'http://localhost:8080/payments/pay_4ueYRDmGUyI31AuqI0ea?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_o6c9H4UPb00h8hMpjOww9sHv5IWOqwTuJrNC45fOVdUdPOs0sjRQ7peoX7KgqRWp' ``` - Response ``` { "payment_id": "pay_4ueYRDmGUyI31AuqI0ea", "merchant_id": "postman_merchant_GHAction_89b212fc-9f25-469f-ba4b-1a3288efcdd6", "status": "succeeded", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6540, "connector": "deutschebank", "client_secret": "pay_4ueYRDmGUyI31AuqI0ea_secret_IixVMy93O7YiEP4JJGpN", "created": "2024-12-16T11:43:10.558Z", "currency": "USD", "customer_id": "cybersourcecustomer", "customer": { "id": "cybersourcecustomer", "name": "Cardholder", "email": "[email protected]", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "0088", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "476173", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "34", "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": "sundari", "last_name": "sundari" }, "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": "sundari", "last_name": "sundari" }, "phone": null, "email": null }, "order_details": null, "email": "[email protected]", "name": "Cardholder", "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": "credit", "connector_label": "deutschebank_US_default", "business_country": "US", "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "nVHvIf4P3jcAovFh4yPRTj", "frm_message": null, "metadata": { "count_tickets": 1, "transaction_number": "5590045" }, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_hwz1M9UiyP6KcFovaoe2", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_tQJBbQeTqAOBfStOjwz6", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-12-16T11:58:10.558Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_nsOk8a7WMuZY0WZfZaNb", "payment_method_status": "active", "updated": "2024-12-16T11:45:26.008Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` **5. Refund** - Request ``` curl --location 'http://localhost:8080/refunds' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_o6c9H4UPb00h8hMpjOww9sHv5IWOqwTuJrNC45fOVdUdPOs0sjRQ7peoX7KgqRWp' \ --data '{ "payment_id": "pay_ySLbJ4uxZJbOwybYIOxJ", "amount": 6540, "reason": "Customer returned product", "refund_type": "instant", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` - Response ``` { "refund_id": "ref_UbPDiWkAlJ3YXxAVydkh", "payment_id": "pay_ySLbJ4uxZJbOwybYIOxJ", "amount": 6540, "currency": "USD", "status": "succeeded", "reason": "Customer returned product", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "error_message": null, "error_code": null, "created_at": "2024-12-16T11:47:19.520Z", "updated_at": "2024-12-16T11:47:21.373Z", "connector": "deutschebank", "profile_id": "pro_hwz1M9UiyP6KcFovaoe2", "merchant_connector_id": "mca_tQJBbQeTqAOBfStOjwz6", "split_refunds": null } ``` **6. RSync** - Request ``` curl --location 'http://localhost:8080/refunds/ref_UbPDiWkAlJ3YXxAVydkh' \ --header 'Accept: application/json' \ --header 'api-key: dev_o6c9H4UPb00h8hMpjOww9sHv5IWOqwTuJrNC45fOVdUdPOs0sjRQ7peoX7KgqRWp' ``` - Response ``` { "refund_id": "ref_UbPDiWkAlJ3YXxAVydkh", "payment_id": "pay_ySLbJ4uxZJbOwybYIOxJ", "amount": 6540, "currency": "USD", "status": "succeeded", "reason": "Customer returned product", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "error_message": null, "error_code": null, "created_at": "2024-12-16T11:47:19.520Z", "updated_at": "2024-12-16T11:47:21.373Z", "connector": "deutschebank", "profile_id": "pro_hwz1M9UiyP6KcFovaoe2", "merchant_connector_id": "mca_tQJBbQeTqAOBfStOjwz6", "split_refunds": null } ``` **7. Cancel/Void** - Request ``` curl --location 'http://localhost:8080/payments/pay_jtzc7sPBlQ6sNNgoPG7D/cancel' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_o6c9H4UPb00h8hMpjOww9sHv5IWOqwTuJrNC45fOVdUdPOs0sjRQ7peoX7KgqRWp' \ --data '{ "cancellation_reason": "requested_by_customer" }' ``` - Response ``` { "payment_id": "pay_jtzc7sPBlQ6sNNgoPG7D", "merchant_id": "postman_merchant_GHAction_89b212fc-9f25-469f-ba4b-1a3288efcdd6", "status": "cancelled", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "deutschebank", "client_secret": "pay_jtzc7sPBlQ6sNNgoPG7D_secret_nRyINaFU4g6pBbm8id0r", "created": "2024-12-16T11:51:03.676Z", "currency": "USD", "customer_id": "cybersourcecustomer", "customer": { "id": "cybersourcecustomer", "name": "John Doe", "email": "[email protected]", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "0088", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "476173", "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": "likhin", "last_name": "bopanna" }, "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": "likhin", "last_name": "bopanna" }, "phone": null, "email": null }, "order_details": null, "email": "[email protected]", "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": "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": "pZEtlCeAsWQZqLpBNhZto5", "frm_message": null, "metadata": { "count_tickets": 1, "transaction_number": "5590045" }, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_hwz1M9UiyP6KcFovaoe2", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_tQJBbQeTqAOBfStOjwz6", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-12-16T12:06:03.676Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_lbLyNoKaCcTRjxwQKYON", "payment_method_status": null, "updated": "2024-12-16T11:51:35.365Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` **8. Supported Payments** -Request ``` curl --location --request GET 'http://localhost:8080/feature_matrix' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_jfD66VYra1Ckqm2IxU5cy1N4chjamXfyyOyXUqNEmHv0pSyCjZh3DvqOBKR0HyU8' \ --header 'X-Merchant-Id: postman_merchant_GHAction_32615a11-9334-48e0-8c5f-767da86facd7' \ --data '{ }' ``` -Response ``` { "connector_count": 3, "connectors": [ { "name": "bambora", "description": "Bambora is a leading online payment provider in Canada and United States.", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "card", "payment_method_type": "credit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": [ "CA", "US" ], "supported_currencies": [ "USD" ] }, { "payment_method": "card", "payment_method_type": "credit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": [ "US", "CA" ], "supported_currencies": [ "USD" ] } ], "supported_webhook_flows": [] }, { "name": "deutschebank", "description": "Deutsche Bank is a German multinational investment bank and financial services company ", "category": "bank_acquirer", "supported_payment_methods": [ { "payment_method": "card", "payment_method_type": "credit", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null }, { "payment_method": "bank_debit", "payment_method_type": "sepa", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": null, "supported_currencies": null } ], "supported_webhook_flows": [] }, { "name": "zsl", "description": "Zsl is a payment gateway operating in China, specializing in facilitating local bank transfers", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "bank_transfer", "payment_method_type": "local_bank_transfer", "mandates": "not_supported", "refunds": "not_supported", "supported_capture_methods": [ "automatic" ], "supported_countries": [ "CN" ], "supported_currencies": [ "CNY" ] } ], "supported_webhook_flows": [] } ] } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Database Layer (Queries & Schema)** - `crates/diesel_models/src/payment_attempt.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/router_response_types.rs` **3. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/deutschebank.rs` - `crates/hyperswitch_connectors/src/connectors/deutschebank/transformers.rs` - `crates/router/src/configs/defaults/payment_connector_required_fields.rs` **4. Tests** - `cypress-tests/cypress/e2e/PaymentUtils/Deutschebank.js` - `cypress-tests/cypress/e2e/PaymentUtils/Utils.js` **5. Other** - `crates/router/src/services/api.rs` **Code Patterns Applied:** - Define new data structures (13 changes) - Implement new functions (2 changes) - Extend existing types with new fields (374 changes) - Add conditional logic for feature flags or filtering (9 changes) **Detailed Identifier Changes:** Commit ac753352: Files to modify: **crates/diesel_models/src/payment_attempt.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/deutschebank.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/deutschebank/transformers.rs** Add: - function: private::try_from - struct: pub::DeutschebankThreeDSInitializeResponse - struct: pub::DeutschebankThreeDSInitializeResponseProcessed - struct: pub::DeutschebankThreeDSInitializeResponseChallengeRequired - struct: pub::DeutschebankThreeDSCompleteAuthorizeRequest - enum: pub::DeutschebankThreeDSInitializeResponseOutcome - enum: pub::DeutschebankCompleteAuthorizeRequest - impl: impl TryFrom< ResponseRouterData< Authorize, DeutschebankThreeDSInitializeResponse, PaymentsAuthorizeData, PaymentsResponseData, >, > for RouterData<Authorize, PaymentsAuthorizeData, PaymentsResponseData> **crates/hyperswitch_domain_models/src/router_response_types.rs** Modify existing code **crates/router/src/configs/defaults/payment_connector_required_fields.rs** Modify existing code **crates/router/src/services/api.rs** Modify existing code
{"pr_number": 6844, "pr_title": "feat(connector): [Deutschebank] Implement Card 3ds", "merged_at": "2025-01-13T11:47:57Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"database": ["crates/diesel_models/src/payment_attempt.rs"], "domain": ["crates/hyperswitch_domain_models/src/router_response_types.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/deutschebank.rs", "crates/hyperswitch_connectors/src/connectors/deutschebank/transformers.rs", "crates/router/src/configs/defaults/payment_connector_required_fields.rs"], "tests": ["cypress-tests/cypress/e2e/PaymentUtils/Deutschebank.js", "cypress-tests/cypress/e2e/PaymentUtils/Utils.js"], "other": ["crates/router/src/services/api.rs"]}, "change_types": {"structs_added": 13, "functions_added": 2, "enums_added": 2, "fields_added": 374, "imports_added": 4, "conditionals_added": 9}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [BLUECODE] Added 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 --> This Connector doesn't have a documentation. We only have a postman collection and creds. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/connector_endpoints.rs` **2. Core Business Logic** - `crates/router/src/core/connector_validation.rs` - `crates/router/src/core/payments/helpers.rs` **3. External Connector Integration** - `crates/common_enums/src/connector_enums.rs` - `crates/connector_configs/src/connector.rs` - `crates/connector_configs/toml/development.toml` - ... and 15 more files **4. Tests** - `config/deployments/integration_test.toml` - `loadtest/config/development.toml` **5. Configuration Files** - `config/config.example.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 2 more files **Code Patterns Applied:** - Define new data structures (10 changes) - Implement new functions (83 changes) - Extend existing types with new fields (163 changes) **Detailed Identifier Changes:** Commit 9f6182b7: 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::bluecode **crates/hyperswitch_connectors/src/connectors/bluecode.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::Bluecode - impl: impl Bluecode - impl: impl api::Payment for Bluecode - impl: impl api::PaymentSession for Bluecode - impl: impl api::ConnectorAccessToken for Bluecode - impl: impl api::MandateSetup for Bluecode - impl: impl api::PaymentAuthorize for Bluecode - impl: impl api::PaymentSync for Bluecode - impl: impl api::PaymentCapture for Bluecode - impl: impl api::PaymentVoid for Bluecode - impl: impl api::Refund for Bluecode - impl: impl api::RefundExecute for Bluecode - impl: impl api::RefundSync for Bluecode - impl: impl api::PaymentToken for Bluecode - impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for Bluecode - impl: impl ConnectorCommonExt<Flow, Request, Response> for Bluecode - impl: impl ConnectorCommon for Bluecode - impl: impl ConnectorValidation for Bluecode - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Bluecode - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Bluecode - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Bluecode - impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Bluecode - impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Bluecode - impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Bluecode - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Bluecode - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Bluecode - impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Bluecode - impl: impl webhooks::IncomingWebhook for Bluecode - impl: impl ConnectorSpecifications for Bluecode - mod: pub::transformers **crates/hyperswitch_connectors/src/connectors/bluecode/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::BluecodeRouterData - struct: pub::BluecodePaymentsRequest - struct: pub::BluecodeCard - struct: pub::BluecodeAuthType - struct: pub::BluecodePaymentsResponse - struct: pub::BluecodeRefundRequest - struct: pub::RefundResponse - struct: pub::BluecodeErrorResponse - enum: pub::BluecodePaymentStatus - enum: pub::RefundStatus - impl: impl From<(FloatMajorUnit, T)> for BluecodeRouterData<T> - impl: impl TryFrom<&BluecodeRouterData<&PaymentsAuthorizeRouterData>> for BluecodePaymentsRequest - impl: impl TryFrom<&ConnectorAuthType> for BluecodeAuthType - impl: impl From<BluecodePaymentStatus> for common_enums::AttemptStatus - impl: impl TryFrom<ResponseRouterData<F, BluecodePaymentsResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData> - impl: impl TryFrom<&BluecodeRouterData<&RefundsRouterData<F>>> for BluecodeRefundRequest - impl: impl From<RefundStatus> for enums::RefundStatus - impl: impl TryFrom<RefundsResponseRouterData<Execute, RefundResponse>> for RefundsRouterData<Execute> - impl: impl TryFrom<RefundsResponseRouterData<RSync, RefundResponse>> for RefundsRouterData<RSync> **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code **crates/hyperswitch_connectors/src/default_implementations_v2.rs** Modify existing code **crates/hyperswitch_domain_models/src/connector_endpoints.rs** Modify existing code **crates/router/src/connector.rs** Modify existing code **crates/router/src/core/connector_validation.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/types/api/connector_mapping.rs** Modify existing code **crates/router/src/types/connector_transformers.rs** Modify existing code **crates/router/tests/connectors/bluecode.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::BluecodeTest - impl: impl ConnectorActions for BluecodeTest - impl: impl utils::Connector for BluecodeTest **crates/router/tests/connectors/main.rs** Add: - mod: private::bluecode **crates/test_utils/src/connector_auth.rs** Modify existing code
{"pr_number": 8756, "pr_title": "feat(connector): [BLUECODE] Added Template Code", "merged_at": "2025-07-29T08:13:32Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["connector"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/connector_endpoints.rs"], "core_business": ["crates/router/src/core/connector_validation.rs", "crates/router/src/core/payments/helpers.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/bluecode.rs", "crates/hyperswitch_connectors/src/connectors/bluecode/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/hyperswitch_connectors/src/default_implementations_v2.rs", "crates/router/src/connector.rs", "crates/router/src/types/api/connector_mapping.rs", "crates/router/src/types/connector_transformers.rs", "crates/router/tests/connectors/bluecode.rs", "crates/router/tests/connectors/main.rs", "crates/router/tests/connectors/sample_auth.toml", "crates/test_utils/src/connector_auth.rs", "scripts/add_connector.sh"], "tests": ["config/deployments/integration_test.toml", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"]}, "change_types": {"structs_added": 10, "functions_added": 83, "enums_added": 2, "fields_added": 163, "imports_added": 22}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [ARCHIPEL] Make card_holder_name as none if cardholder field is none ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Archipel does not accept `card.card_holder_name` field without `cardholder` field. So if `card_holder` is None, `card.card_holder_name` must also be None. However, the reverse is allowed — the `cardholder` field can exist without `card.card_holder_name`. This PR adds changes to make sure if `card_holder` is None, `card.card_holder_name` will also be None NOTE - As an alternate solution we cannot mark `card.card_holder_name`,`cardholder` fields as required, since these are not mandatory fields. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test 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 changes (payment was failing)** call /payments without billing fields but with card_holder_name <img width="1017" alt="Screenshot 2025-06-16 at 8 49 27 PM" src="https://github.com/user-attachments/assets/5331c810-e26f-4755-95ec-e6ac83f743bf" /> ### **After changes** call /payments without billing fields but with card_holder_name ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_T1HKwjm5U0WlfjAgmTAcoE2ejpTsm5J02qCBBqYTNVkHZ7KY5ZKkz2HLfR26Mz5r' \ --data '{ "amount": 600, "amount_to_capture": 600, "currency": "EUR", "confirm": true, "capture_method": "automatic", "authentication_type": "no_three_ds", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_cvc": "123", "card_exp_month": "01", "card_exp_year": "50", "card_number": "4242424242424242", "card_holder_name": "John Wick" } } }' ``` <img width="1017" alt="Screenshot 2025-06-16 at 8 50 33 PM" src="https://github.com/user-attachments/assets/82b3cb61-bd34-4d95-8969-60361278f0ad" /> ## 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/archipel/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (4 changes) **Detailed Identifier Changes:** Commit 7f6f4c47: Files to modify: **crates/hyperswitch_connectors/src/connectors/archipel/transformers.rs** Remove: - impl: impl TryFrom<(Option<Secret<String>>, &Card)> for ArchipelCard Add: - impl: impl TryFrom<(Option<Secret<String>>, Option<ArchipelCardHolder>, &Card)> for ArchipelCard
{"pr_number": 8359, "pr_title": "fix(connector): [ARCHIPEL] Make card_holder_name as none if cardholder field is none", "merged_at": "2025-06-17T11:50:00Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "card"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/archipel/transformers.rs"]}, "change_types": {"fields_added": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connectors): [Novalnet] zero amount mandate flow for wallets ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description This PR updates connector integration for SetupMandate flow for Novalnet. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context Helps fix zero amount CIT mandate flow for wallets through Novalnet ## How did you test it? <details> <summary>1. Zero amount mandate through GPay (CIT)</summary> cURL (create a payment link) curl --location --request POST 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_Z6hI0pxQyHsH240jY8lyalrGGJGyZBtjWhFrxxCmbvEdc7KywJRANdBXFzZ8XO2G' \ --data '{"customer_id":"cus_zO4rCUYOsXWOdZb4Tb8f","profile_id":"pro_9tMbnzk3iyggEiTQDwZi","customer_acceptance":{"acceptance_type":"online","accepted_at":"1963-05-03T04:07:52.723Z","online":{"ip_address":"127.0.0.1","user_agent":"amet irure esse"}},"amount":0,"currency":"EUR","payment_link":true,"setup_future_usage":"off_session","description":"This is my description of why this payment was requested.","capture_method":"automatic","session_expiry":100000,"return_url":"https://example.com","payment_link_config":{"theme":"#0E103D","logo":"https://hyperswitch.io/favicon.ico","seller_name":"Hyperswitch Inc."}}' Response {"payment_id":"pay_H4hegvKbutEoaqqWnfi7","merchant_id":"merchant_1739349514","status":"requires_payment_method","amount":0,"net_amount":0,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":null,"client_secret":"pay_H4hegvKbutEoaqqWnfi7_secret_0dJICKnhrb8h98fGIpRH","created":"2025-02-12T09:58:12.371Z","currency":"EUR","customer_id":"cus_zO4rCUYOsXWOdZb4Tb8f","customer":{"id":"cus_zO4rCUYOsXWOdZb4Tb8f","name":"John Nether","email":null,"phone":"6168205362","phone_country_code":"+1"},"description":"This is my description of why this payment was requested.","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":null,"name":"John Nether","phone":"6168205362","return_url":"https://example.com/","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":{"customer_id":"cus_zO4rCUYOsXWOdZb4Tb8f","created_at":1739354292,"expires":1739357892,"secret":"epk_2a0d34b394314b75ae482a0151bf5793"},"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_1739349514/pay_H4hegvKbutEoaqqWnfi7?locale=en","secure_link":null,"payment_link_id":"plink_QXzLep6VzSaTGthJpxSS"},"profile_id":"pro_9tMbnzk3iyggEiTQDwZi","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-02-13T13:44:52.369Z","fingerprint":null,"browser_info":null,"payment_method_id":null,"payment_method_status":null,"updated":"2025-02-12T09:58:12.384Z","split_payments":null,"frm_metadata":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null} - Open payment link and complete GPay txn - cURL (retrieve payment_method_id) curl --location --request GET 'http://localhost:8080/payments/pay_H4hegvKbutEoaqqWnfi7?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_Z6hI0pxQyHsH240jY8lyalrGGJGyZBtjWhFrxxCmbvEdc7KywJRANdBXFzZ8XO2G' Response {"payment_id":"pay_H4hegvKbutEoaqqWnfi7","merchant_id":"merchant_1739349514","status":"succeeded","amount":0,"net_amount":0,"shipping_cost":null,"amount_capturable":0,"amount_received":0,"connector":"novalnet","client_secret":"pay_H4hegvKbutEoaqqWnfi7_secret_LieHRikq7Bov1SA7Pm0c","created":"2025-02-12T10:00:12.291Z","currency":"EUR","customer_id":"cus_zO4rCUYOsXWOdZb4Tb8f","customer":{"id":"cus_zO4rCUYOsXWOdZb4Tb8f","name":"John Doe","email":"[email protected]","phone":"999999999","phone_country_code":"+1"},"description":"Its my first payment request","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":"off_session","off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"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":"[email protected]","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":"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":"15146800034507274","frm_message":null,"metadata":{"udf1":"value1","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":null,"feature_metadata":null,"reference_id":"15146800034507274","payment_link":null,"profile_id":"pro_9tMbnzk3iyggEiTQDwZi","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_VSzA7Xp292ZhnZFVAzXk","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-02-12T10:15:12.291Z","fingerprint":null,"browser_info":null,"payment_method_id":"pm_7fdNeTCaPqNvsn5ws3V1","payment_method_status":"active","updated":"2025-02-12T10:00:14.797Z","split_payments":null,"frm_metadata":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null} </details> <details> <summary>2. MIT for GPay</summary> cURL (create GPay MIT) curl --location --request POST 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_Z6hI0pxQyHsH240jY8lyalrGGJGyZBtjWhFrxxCmbvEdc7KywJRANdBXFzZ8XO2G' \ --data-raw '{"amount":100,"currency":"EUR","confirm":true,"capture_method":"automatic","capture_on":"2022-09-10T10:11:12Z","customer_id":"cus_zO4rCUYOsXWOdZb4Tb8f","email":"[email protected]","name":"John Doe","phone":"999999999","profile_id":"pro_9tMbnzk3iyggEiTQDwZi","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_7fdNeTCaPqNvsn5ws3V1"},"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_5LvOZ6RQsFmyQqDvaqXh","merchant_id":"merchant_1737699414","status":"succeeded","amount":6500,"net_amount":6500,"shipping_cost":null,"amount_capturable":0,"amount_received":6500,"connector":"worldpay","client_secret":"pay_5LvOZ6RQsFmyQqDvaqXh_secret_njW4m0eWv4WWrYHXyUws","created":"2025-01-24T06:49:49.063Z","currency":"USD","customer_id":"cus_IoFeOlGhEeD54AbBdvxI","customer":{"id":"cus_IoFeOlGhEeD54AbBdvxI","name":"John Doe","email":"[email protected]","phone":"999999999","phone_country_code":"+65"},"description":"Its my first payment request","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":true,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"0000","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"491761","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"2030","card_holder_name":"John US","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":"[email protected]","name":"John Doe","phone":"999999999","return_url":"https://hyperswitch.io/","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":null,"connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"cus_IoFeOlGhEeD54AbBdvxI","created_at":1737701389,"expires":1737704989,"secret":"epk_37a0d95869a44072afca52b6a53523b0"},"manual_retry_allowed":false,"connector_transaction_id":"eyJrIjoiazNhYjYzMiIsImxpbmtWZXJzaW9uIjoiNi4wLjAifQ==.sN:g8wd64bwkbrp0md+bPxcanBnk2zLdsIqSa1pR99GGg8fCNQpPLoWNslSzWNPFBM5Tpa8tW7EFI5onKINsgChMHeJVoeH2lrBWCRyjZYT6h+lbqfJa+1BSoKFSY8HLWG3iYvLMl12v8Akq6Pt+SKmRV:l4OVG3XzCOZGpobnymfgF9Uk2Www3mSVoKRxeIXIe9pic4l22Rveu3MW0qp:7+4GYJYOg3e9WdLnxDKf8zDOVuNV9Smp3TrKAPuNF+l9HY8h4r+1y1WBHupQz59qPpv59wMMnZCI15w9voaKGUgn8jvCNhmdUlN6uDEfAu3+Gpx8cadeYO0VLI6Wl9IlaVI4eDFRFhVVWboq417XA0B7A7omqvwyPr9UpXP4WEW0OwEozD:UT7vKzbOBIqfC+WwXVvDoxGmrxlJztOw0Zye5zF6oXedJ3PRFO1S38DZNrYIkRNlWpYaVeOJiIYYJegfV4WMVmEHXUV1JsgVeJ7ye7vUhLQaQWH669jc7KxCb6UloO7ZTj7Q+18PY5jSOT91RpDIiNOKkj:oboIAbw=","frm_message":null,"metadata":{"udf1":"value1","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":null,"feature_metadata":null,"reference_id":"92b96418-ccfc-4a41-b882-c196f2d17d91","payment_link":null,"profile_id":"pro_7kIKHNtq6xvKHlBfazbc","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_c38WWereiWnpVCtrDTmH","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-01-24T07:04:49.062Z","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_19peBlu9TYmWO2bASPQL","payment_method_status":"active","updated":"2025-01-24T06:49:51.258Z","split_payments":null,"frm_metadata":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null} </details> <details> <summary>3. Zero amount mandate through PayPal (CIT)</summary> cURL (create a payment link) curl --location --request POST 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_Z6hI0pxQyHsH240jY8lyalrGGJGyZBtjWhFrxxCmbvEdc7KywJRANdBXFzZ8XO2G' \ --data '{"customer_id":"cus_zO4rCUYOsXWOdZb4Tb8f","profile_id":"pro_9tMbnzk3iyggEiTQDwZi","customer_acceptance":{"acceptance_type":"online","accepted_at":"1963-05-03T04:07:52.723Z","online":{"ip_address":"127.0.0.1","user_agent":"amet irure esse"}},"amount":0,"currency":"EUR","payment_link":true,"setup_future_usage":"off_session","description":"This is my description of why this payment was requested.","capture_method":"automatic","session_expiry":100000,"return_url":"https://example.com","payment_link_config":{"theme":"#0E103D","logo":"https://hyperswitch.io/favicon.ico","seller_name":"Hyperswitch Inc."}}' Response {"payment_id":"pay_eSstvDXVT0iKWsdKIkTw","merchant_id":"merchant_1739349514","status":"requires_payment_method","amount":0,"net_amount":0,"shipping_cost":null,"amount_capturable":0,"amount_received":null,"connector":null,"client_secret":"pay_eSstvDXVT0iKWsdKIkTw_secret_y5hDfv9Woup0YGv0ZvzZ","created":"2025-02-12T10:02:55.258Z","currency":"EUR","customer_id":"cus_zO4rCUYOsXWOdZb4Tb8f","customer":{"id":"cus_zO4rCUYOsXWOdZb4Tb8f","name":"John Doe","email":"[email protected]","phone":"999999999","phone_country_code":"+65"},"description":"This is my description of why this payment was requested.","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":"[email protected]","name":"John Doe","phone":"999999999","return_url":"https://example.com/","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":{"customer_id":"cus_zO4rCUYOsXWOdZb4Tb8f","created_at":1739354575,"expires":1739358175,"secret":"epk_4c4915a65d3b450286ce3e9ec0a494d4"},"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_1739349514/pay_eSstvDXVT0iKWsdKIkTw?locale=en","secure_link":null,"payment_link_id":"plink_REQTjbWTbPsP4R8fMdsA"},"profile_id":"pro_9tMbnzk3iyggEiTQDwZi","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-02-13T13:49:35.254Z","fingerprint":null,"browser_info":null,"payment_method_id":null,"payment_method_status":null,"updated":"2025-02-12T10:02:55.271Z","split_payments":null,"frm_metadata":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null} cURL (retrieve payment_method_id) curl --location --request GET 'http://localhost:8080/payments/pay_eSstvDXVT0iKWsdKIkTw?force_sync=true' \ --header 'Accept: application/json' \ --header 'api-key: dev_Z6hI0pxQyHsH240jY8lyalrGGJGyZBtjWhFrxxCmbvEdc7KywJRANdBXFzZ8XO2G' Response {"payment_id":"pay_eSstvDXVT0iKWsdKIkTw","merchant_id":"merchant_1739349514","status":"succeeded","amount":0,"net_amount":0,"shipping_cost":null,"amount_capturable":0,"amount_received":0,"connector":"novalnet","client_secret":"pay_eSstvDXVT0iKWsdKIkTw_secret_y5hDfv9Woup0YGv0ZvzZ","created":"2025-02-12T10:02:55.258Z","currency":"EUR","customer_id":"cus_zO4rCUYOsXWOdZb4Tb8f","customer":{"id":"cus_zO4rCUYOsXWOdZb4Tb8f","name":"John Doe","email":"[email protected]","phone":"999999999","phone_country_code":"+65"},"description":"This is my description of why this payment was requested.","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":{},"billing":null},"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":"[email protected]","name":"John Doe","phone":"999999999","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":"redirect_to_url","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":"15146800034821188","frm_message":null,"metadata":null,"connector_metadata":null,"feature_metadata":null,"reference_id":"15146800034821188","payment_link":{"link":"http://localhost:8080/payment_link/merchant_1739349514/pay_eSstvDXVT0iKWsdKIkTw?locale=en","secure_link":null,"payment_link_id":"plink_REQTjbWTbPsP4R8fMdsA"},"profile_id":"pro_9tMbnzk3iyggEiTQDwZi","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_VSzA7Xp292ZhnZFVAzXk","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-02-13T13:49:35.254Z","fingerprint":null,"browser_info":{"os_type":"macOS","language":"en-US","time_zone":-330,"ip_address":"::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/17.4 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_xOKqXFkPih09U60Md7a9","payment_method_status":"active","updated":"2025-02-12T10:04:11.573Z","split_payments":null,"frm_metadata":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null} </details> <details> <summary>4. MIT for PayPal</summary> cURL (create PayPal MIT) curl --location --request POST 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_Z6hI0pxQyHsH240jY8lyalrGGJGyZBtjWhFrxxCmbvEdc7KywJRANdBXFzZ8XO2G' \ --data-raw '{"amount":100,"currency":"EUR","confirm":true,"capture_method":"automatic","capture_on":"2022-09-10T10:11:12Z","customer_id":"cus_zO4rCUYOsXWOdZb4Tb8f","email":"[email protected]","name":"John Doe","phone":"999999999","profile_id":"pro_9tMbnzk3iyggEiTQDwZi","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_xOKqXFkPih09U60Md7a9"},"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_0NCUSdZA36EEALDTtMEf","merchant_id":"merchant_1739349514","status":"succeeded","amount":100,"net_amount":100,"shipping_cost":null,"amount_capturable":0,"amount_received":100,"connector":"novalnet","client_secret":"pay_0NCUSdZA36EEALDTtMEf_secret_0en976XGc0HB37cHdfN8","created":"2025-02-12T10:05:39.834Z","currency":"EUR","customer_id":"cus_zO4rCUYOsXWOdZb4Tb8f","customer":{"id":"cus_zO4rCUYOsXWOdZb4Tb8f","name":"John Doe","email":"[email protected]","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":null,"payment_token":null,"shipping":null,"billing":null,"order_details":null,"email":"[email protected]","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":"paypal","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":{"customer_id":"cus_zO4rCUYOsXWOdZb4Tb8f","created_at":1739354739,"expires":1739358339,"secret":"epk_b6fb3fbc14bd44b287d75d7f29406aa9"},"manual_retry_allowed":false,"connector_transaction_id":"15146800034912664","frm_message":null,"metadata":{"udf1":"value1","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":null,"feature_metadata":null,"reference_id":"15146800034912664","payment_link":null,"profile_id":"pro_9tMbnzk3iyggEiTQDwZi","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_VSzA7Xp292ZhnZFVAzXk","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-02-12T10:20:39.834Z","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_xOKqXFkPih09U60Md7a9","payment_method_status":"active","updated":"2025-02-12T10:05:43.065Z","split_payments":null,"frm_metadata":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":"VVBV24y20uF-D20uND14oV24y-12m14oJ00aZ16qZ20uRZTTZ18s20u18s18s151"} </details> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs` - `crates/hyperswitch_connectors/src/utils.rs` **Code Patterns Applied:** - Implement new functions (4 changes) - Extend existing types with new fields (3 changes) **Detailed Identifier Changes:** Commit 6aac16e0: Files to modify: **crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Add: - function: private::get_optional_first_name - function: private::get_optional_last_name
{"pr_number": 7251, "pr_title": "fix(connectors): [Novalnet] zero amount mandate flow for wallets", "merged_at": "2025-02-13T08:02:25Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/novalnet/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs"]}, "change_types": {"functions_added": 4, "fields_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): google pay decrypt 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 --> Decryption flow for google pays Decrypts the token using public and private key of merchant API contract change for MCA, includes credentials for decryption collection using connector_wallets_details Note: This PR also bumps the msrv version from `1.78.0` to `1.80.0` ### Additional Changes - [x] This PR modifies the API contract [Following Documentation contains the API Contract changes](https://docs.google.com/document/d/1f0ezo3-YJH8-ejRx6c0siNr0NrNRnE4Z14JOYwFNjVE/edit?tab=t.0) - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Tested through Postman: - Create a MCA with google_pay keys (public, private and root_signing keys) for `Cybersource`: ``` { "connector_type": "payment_processor", "connector_name": "cybersource", "connector_label": "cybersource_AU_defa", "connector_account_details": { "key1": "key1", "api_key": "api_key", "api_secret": "api_secret", "auth_type": "SignatureKey" }, "test_mode": false, "disabled": false, "payment_methods_enabled": [ { "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": 0, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": false } ] } ], "connector_wallets_details": { "google_pay": { "provider_details": { "merchant_info": { "merchant_name": "cybersource", "tokenization_specification": { "type": "DIRECT", "parameters": { "gateway": "cybersource", "public_key": "public_key", "private_key": "private_key", "root_signing_keys": "root_signing_keys", "recipient_id": "recipient_id" } } } }, "cards": { "allowed_auth_methods": [ "PAN_ONLY", "CRYPTOGRAM_3DS" ], "allowed_card_networks": [ "AMEX", "DISCOVER", "INTERAC", "JCB", "MASTERCARD", "VISA" ], } } }, "connector_webhook_details": { "merchant_secret": "ee148db14b97d503ab5958e7abb5c374", "additional_secret": null } } ``` - Create Google Pay Token with given parameters: ``` parameters: { "protocolVersion": "ECv2", "publicKey": "publicKey" } ``` - Create a Payment with the generated token: ``` { "amount": 6540, "currency": "EUR", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "{{customer_id}}", "email": "[email protected]", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://google.com", "payment_method": "wallet", "payment_method_type": "google_pay", "payment_method_data": { "wallet": { "google_pay": { "type": "CARD", "description": "SuccessfulAuth: Visa •••• 1000", "info": { "card_network": "VISA", "card_details": "1000", "assurance_details": { "card_holder_authenticated": false, "account_verified": true } }, "tokenization_data": { "type": "DIRECT", "token": "{{put_generated_token}}" } } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } ``` - The response should have `succeed` status ``` { "payment_id": "pay_UC3XsEwe26nx70RbwwLT", "merchant_id": "merchant_1737919085", "status": "succeeded", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6540, "connector": "cybersource", "client_secret": "pay_UC3XsEwe26nx70RbwwLT_secret_Ay0XCgzSSc5DDDhAevvw", "created": "2025-01-26T19:18:31.927Z", "currency": "EUR", "customer_id": "cus_oRTeJ7WknRcwKjLdf3Ao", "customer": { "id": "cus_oRTeJ7WknRcwKjLdf3Ao", "name": "John Doe", "email": "[email protected]", "phone": "999999999", "phone_country_code": "+1" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "wallet", "payment_method_data": { "wallet": { "google_pay": { "last4": "1000", "card_network": "VISA", "type": "CARD" } }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null } }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "billing": null, "order_details": null, "email": "[email protected]", "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "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_oRTeJ7WknRcwKjLdf3Ao", "created_at": 1737919111, "expires": 1737922711, "secret": "epk_fb46c2777fe74011afeedc26ded6b5c8" }, "manual_retry_allowed": false, "connector_transaction_id": "7379191134856729404807", "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_UC3XsEwe26nx70RbwwLT_1", "payment_link": null, "profile_id": "pro_h9SNYPWcW7Imw5n2AG0x", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_GiYH6JhoTv4WZQdrlgz2", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-01-26T19:33:31.927Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-01-26T19:18:33.874Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/admin.rs` - `crates/api_models/src/payments.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/router_data.rs` **3. Core Business Logic** - `crates/router/src/core/errors.rs` - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/helpers.rs` - ... and 1 more files **4. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs` - `crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs` - ... and 9 more files **5. Type Definitions** - `crates/router/src/types.rs` **6. Utils** - `crates/common_utils/Cargo.toml` - `crates/common_utils/src/custom_serde.rs` - `crates/common_utils/src/lib.rs` **7. Configuration Files** - `.deepsource.toml` - `Cargo.toml` - `config/config.example.toml` - ... and 6 more files **8. Other** - `Cargo.lock` - `INSTALL_dependencies.sh` - `api-reference-v2/openapi_spec.json` - ... and 4 more files **Code Patterns Applied:** - Define new data structures (18 changes) - Implement new functions (24 changes) - Extend existing types with new fields (105 changes) - Add conditional logic for feature flags or filtering (7 changes) - Modify database queries (1 changes) **Detailed Identifier Changes:** Commit e80d4320: Files to modify: **crates/api_models/src/admin.rs** Modify existing code **crates/api_models/src/payments.rs** Add: - struct: pub::GooglePayWalletDetails - struct: pub::GooglePayDetails - struct: pub::GooglePayMerchantDetails - struct: pub::GooglePayMerchantInfo - struct: pub::GooglePayTokenizationSpecification - struct: pub::GooglePayTokenizationParameters - enum: pub::GooglePayProviderDetails - enum: pub::GooglePayTokenizationType **crates/cards/src/lib.rs** Modify existing code **crates/common_enums/src/enums.rs** Add: - enum: pub::GooglePayAuthMethod **crates/common_utils/src/custom_serde.rs** Add: - function: pub::serialize **crates/common_utils/src/lib.rs** Add: - mod: private::base64_serializer **crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/gocardless/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/mollie/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/square/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/stax/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_data.rs** Modify existing code **crates/masking/src/secret.rs** Add: - function: private::as_ref - impl: impl AsRef<[u8]> for Secret<Vec<u8>> **crates/router/src/configs/secrets_transformers.rs** Add: - function: private::convert_to_raw_secret - impl: impl SecretsHandler for settings::GooglePayDecryptConfig **crates/router/src/configs/settings.rs** Add: - struct: pub::GooglePayDecryptConfig **crates/router/src/configs/validations.rs** Add: - function: pub::validate - impl: impl super::settings::GooglePayDecryptConfig **crates/router/src/connector/braintree/transformers.rs** Modify existing code **crates/router/src/connector/checkout/transformers.rs** Modify existing code **crates/router/src/connector/payme/transformers.rs** Modify existing code **crates/router/src/connector/stripe/transformers.rs** Modify existing code **crates/router/src/core/errors.rs** Add: - enum: pub::GooglePayDecryptionError **crates/router/src/core/payments.rs** Add: - function: private::get_google_pay_connector_wallet_details - struct: pub::GooglePayPaymentProcessingDetails **crates/router/src/core/payments/helpers.rs** Add: - function: private::check_expiration_date_is_valid - function: private::get_little_endian_format - function: private::filter_root_signing_keys - function: pub::new - function: pub::decrypt_token - function: private::verify_signature - function: private::verify_intermediate_signing_key - function: private::construct_signed_data_for_intermediate_signing_key_verification - function: private::validate_signed_key - function: private::verify_message_signature - function: private::load_public_key - function: private::construct_signed_data_for_signature_verification - function: private::get_shared_key - function: private::derive_key - function: private::verify_hmac - function: private::decrypt_message - struct: pub::GooglePayTokenDecryptor - struct: pub::EncryptedData - struct: pub::GooglePaySignedMessage - struct: pub::IntermediateSigningKey - struct: pub::GooglePaySignedKey - struct: pub::GooglePayRootSigningKey - enum: pub::GooglePayProtocolVersion - impl: impl GooglePayTokenDecryptor **crates/router/src/core/payments/tokenization.rs** Modify existing code **crates/router/src/types.rs** Modify existing code Commit e0ec27d9: Files to modify: **crates/api_models/src/admin.rs** Modify existing code **crates/api_models/src/payments.rs** Add: - struct: pub::GooglePayWalletDetails - struct: pub::GooglePayDetails - struct: pub::GooglePayMerchantDetails - struct: pub::GooglePayMerchantInfo - struct: pub::GooglePayTokenizationSpecification - struct: pub::GooglePayTokenizationParameters - enum: pub::GooglePayProviderDetails - enum: pub::GooglePayTokenizationType **crates/cards/src/lib.rs** Modify existing code **crates/common_enums/src/enums.rs** Add: - enum: pub::GooglePayAuthMethod **crates/common_utils/src/custom_serde.rs** Add: - function: pub::serialize **crates/common_utils/src/lib.rs** Add: - mod: private::base64_serializer **crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/gocardless/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/mollie/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/square/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/stax/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_data.rs** Modify existing code **crates/masking/src/secret.rs** Add: - function: private::as_ref - impl: impl AsRef<[u8]> for Secret<Vec<u8>> **crates/router/src/configs/secrets_transformers.rs** Add: - function: private::convert_to_raw_secret - impl: impl SecretsHandler for settings::GooglePayDecryptConfig **crates/router/src/configs/settings.rs** Add: - struct: pub::GooglePayDecryptConfig **crates/router/src/configs/validations.rs** Add: - function: pub::validate - impl: impl super::settings::GooglePayDecryptConfig **crates/router/src/connector/braintree/transformers.rs** Modify existing code **crates/router/src/connector/checkout/transformers.rs** Modify existing code **crates/router/src/connector/payme/transformers.rs** Modify existing code **crates/router/src/connector/stripe/transformers.rs** Modify existing code **crates/router/src/core/errors.rs** Add: - enum: pub::GooglePayDecryptionError **crates/router/src/core/payments.rs** Add: - function: private::get_google_pay_connector_wallet_details - struct: pub::GooglePayPaymentProcessingDetails **crates/router/src/core/payments/helpers.rs** Add: - function: private::check_expiration_date_is_valid - function: private::get_little_endian_format - function: private::filter_root_signing_keys - function: pub::new - function: pub::decrypt_token - function: private::verify_signature - function: private::verify_intermediate_signing_key - function: private::construct_signed_data_for_intermediate_signing_key_verification - function: private::validate_signed_key - function: private::verify_message_signature - function: private::load_public_key - function: private::construct_signed_data_for_signature_verification - function: private::get_shared_key - function: private::derive_key - function: private::verify_hmac - function: private::decrypt_message - struct: pub::GooglePayTokenDecryptor - struct: pub::EncryptedData - struct: pub::GooglePaySignedMessage - struct: pub::IntermediateSigningKey - struct: pub::GooglePaySignedKey - struct: pub::GooglePayRootSigningKey - enum: pub::GooglePayProtocolVersion - impl: impl GooglePayTokenDecryptor **crates/router/src/core/payments/tokenization.rs** Modify existing code **crates/router/src/types.rs** Modify existing code
{"pr_number": 6991, "pr_title": "feat(core): google pay decrypt flow", "merged_at": "2025-02-05T11:07:02Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/admin.rs", "crates/api_models/src/payments.rs"], "domain": ["crates/hyperswitch_domain_models/src/router_data.rs"], "core_business": ["crates/router/src/core/errors.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/tokenization.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/bankofamerica/transformers.rs", "crates/hyperswitch_connectors/src/connectors/cybersource/transformers.rs", "crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs", "crates/hyperswitch_connectors/src/connectors/gocardless/transformers.rs", "crates/hyperswitch_connectors/src/connectors/mollie/transformers.rs", "crates/hyperswitch_connectors/src/connectors/square/transformers.rs", "crates/hyperswitch_connectors/src/connectors/stax/transformers.rs", "crates/hyperswitch_connectors/src/connectors/wellsfargo/transformers.rs", "crates/router/src/connector/braintree/transformers.rs", "crates/router/src/connector/checkout/transformers.rs", "crates/router/src/connector/payme/transformers.rs", "crates/router/src/connector/stripe/transformers.rs"], "types": ["crates/router/src/types.rs"], "utils": ["crates/common_utils/Cargo.toml", "crates/common_utils/src/custom_serde.rs", "crates/common_utils/src/lib.rs"], "config": [".deepsource.toml", "Cargo.toml", "config/config.example.toml", "config/deployments/env_specific.toml", "config/development.toml", "crates/router/Cargo.toml", "crates/router/src/configs/secrets_transformers.rs", "crates/router/src/configs/settings.rs", "crates/router/src/configs/validations.rs"], "other": ["Cargo.lock", "INSTALL_dependencies.sh", "api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/cards/src/lib.rs", "crates/common_enums/src/enums.rs", "crates/masking/src/secret.rs"]}, "change_types": {"structs_added": 18, "functions_added": 24, "enums_added": 5, "fields_added": 105, "imports_added": 4, "conditionals_added": 7, "database_queries": 1}, "has_identifier_data": true, "commits_matched": 2, "match_method": "pr_number"}
fix(ci): Update api-reference path in pr_labeler job ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> - Updated OpenAPI spec path in `pr_labeler` CI job - Modified `CODEOWNERS` file to remove deleted folder ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding 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 #8343 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Configuration Files** - `.github/workflows/pr-convention-checks.yml` **2. Other** - `.github/CODEOWNERS` **Code Patterns Applied:** - Add conditional logic for feature flags or filtering (1 changes)
{"pr_number": 8344, "pr_title": "fix(ci): Update api-reference path in pr_labeler job", "merged_at": "2025-06-16T11:54:06Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"config": [".github/workflows/pr-convention-checks.yml"], "other": [".github/CODEOWNERS"]}, "change_types": {"conditionals_added": 1}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(router): Take merchant ID from headers in API Key - Revoke (v2) ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> - Removed merchant ID from path in `API Keys - Revoke` - Changed auth to read merchant ID from headers ### Additional Changes - [x] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> Closes #8807 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> - V1: Request: ``` curl --location --request DELETE 'http://localhost:8080/api_keys/merchant_1753949938/dev_8Xwp8SIyp0R4ItROu0tR' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' ``` Response: ```json { "merchant_id": "merchant_1753949938", "key_id": "dev_8Xwp8SIyp0R4ItROu0tR", "revoked": true } ``` - V2: Request: ``` curl --location --request DELETE 'http://localhost:8080/v2/api-keys/dev_DULXUEOAUgYKxuxE7PQN' \ --header 'x-merchant-id: cloth_seller_v2_hFIzh6a4wFsbtEkKYLxD' \ --header 'Authorization: admin-api-key=test_admin' \ --header 'api-key: test_admin' ``` Response: ```json { "merchant_id": "cloth_seller_v2_hFIzh6a4wFsbtEkKYLxD", "key_id": "dev_DULXUEOAUgYKxuxE7PQN", "revoked": true } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/api_keys.rs` **2. Other** - `crates/router/src/routes/api_keys.rs` **Code Patterns Applied:** - Extend existing types with new fields (2 changes) **Detailed Identifier Changes:** Commit d164954e: Files to modify: **crates/router/src/core/api_keys.rs** Modify existing code **crates/router/src/routes/api_keys.rs** Modify existing code
{"pr_number": 8808, "pr_title": "fix(router): Take merchant ID from headers in API Key - Revoke (v2)", "merged_at": "2025-08-05T08:25:19Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/api_keys.rs"], "other": ["crates/router/src/routes/api_keys.rs"]}, "change_types": {"fields_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): Consuming locale in PaymentsAuthorizeData from SessionState ## 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 --> `Accept-Language` we pass in headers and we will consume locale from SessionState in PaymentsAuthorizeData. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Payments Link Create ( Confirm False ) : ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_ECvrFYxLG0HyJfKyvLX6AI8TlBKre5HV8JyEPflpWStcL0MNYiRxO6I6ygoTV9zM' \ --header 'Accept-Language: zh-hk' \ --header 'Cookie: PHPSESSID=0b47db9d7de94c37b6b272087a9f2fa7' \ --data '{ "authentication_type": "no_three_ds", "customer_id": "cus_r9KFfEGCaZOo0v9K4f4g", "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" } }, "billing": { "address": { "line1": "1467", "line2": "CA", "line3": "Harrison Street", "city": "San Fransico", "state": "CA", "zip": "94122", "country": "HK", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "amount": 1, "currency": "HKD", "confirm": false, "payment_link": true, "session_expiry": 2629800, "return_url": "https://www.example.com" }' ``` Response : ``` { "payment_id": "pay_6aSu1146nOWGFU1nHba0", "merchant_id": "merchant_1753270998", "status": "requires_payment_method", "amount": 1, "net_amount": 1, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_6aSu1146nOWGFU1nHba0_secret_5n6XyQfzhH1awaPXpoaV", "created": "2025-07-23T12:07:46.620Z", "currency": "HKD", "customer_id": "cus_r9KFfEGCaZOo0v9K4f4g", "customer": { "id": "cus_r9KFfEGCaZOo0v9K4f4g", "name": "John Doe", "email": "[email protected]", "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": null, "payment_method": null, "payment_method_data": null, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "HK", "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": null, "email": "[email protected]", "name": "John Doe", "phone": "999999999", "return_url": "https://www.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_r9KFfEGCaZOo0v9K4f4g", "created_at": 1753272466, "expires": 1753276066, "secret": "epk_1bfcae3a1ae147aa81717faadc24d405" }, "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_1753270998/pay_6aSu1146nOWGFU1nHba0?locale=zh-hk", "secure_link": null, "payment_link_id": "plink_6hSyiN1JxpIBfs6LxzF7" }, "profile_id": "pro_z03ICBN6bBbLQCA5g0JW", "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-08-22T22:37:46.617Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-23T12:07:46.632Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": null, "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` <img width="1728" height="1117" alt="Screenshot 2025-07-23 at 6 14 30 PM" src="https://github.com/user-attachments/assets/b5efebf6-0a42-4960-9d0a-9be04653c410" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/router_request_types.rs` **2. Core Business Logic** - `crates/router/src/core/payments/helpers.rs` - `crates/router/src/core/payments/transformers.rs` **3. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/adyen.rs` - `crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs` - `crates/hyperswitch_connectors/src/utils.rs` - ... and 4 more files **4. Type Definitions** - `crates/router/src/types.rs` **Code Patterns Applied:** - Extend existing types with new fields (20 changes) **Detailed Identifier Changes:** Commit be03dd2a: Files to modify: **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/utils.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_request_types.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/types.rs** Modify existing code **crates/router/src/types/api/verify_connector.rs** Modify existing code **crates/router/tests/connectors/aci.rs** Modify existing code **crates/router/tests/connectors/adyen.rs** Modify existing code **crates/router/tests/connectors/utils.rs** Modify existing code
{"pr_number": 8731, "pr_title": "feat(core): Consuming locale in PaymentsAuthorizeData from SessionState", "merged_at": "2025-07-24T15:48:58Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/router_request_types.rs"], "core_business": ["crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/transformers.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/adyen.rs", "crates/hyperswitch_connectors/src/connectors/adyen/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/router/src/types/api/verify_connector.rs", "crates/router/tests/connectors/aci.rs", "crates/router/tests/connectors/adyen.rs", "crates/router/tests/connectors/utils.rs"], "types": ["crates/router/src/types.rs"]}, "change_types": {"fields_added": 20}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(router): add new api endpoint for post authentication sync in modular authentication ## 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 new api endpoint for post authentication sync in modular authentication ### 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). --> Once the challenge is submitted, we get POST callback from the ACS so we need to handle the post redirection with the new api endpoint in modular authentication ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Can be tested only PROD, as Sandbox mock server behaviour is different from PROD Shouldn't affect any other flows except modular authentication ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/unified_authentication_service.rs` **2. Other** - `crates/router/src/routes/app.rs` **Detailed Identifier Changes:** Commit 55360388: Files to modify: **crates/router/src/core/unified_authentication_service.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code
{"pr_number": 9615, "pr_title": "fix(router): add new api endpoint for post authentication sync in modular authentication", "merged_at": "2025-09-30T12:34:55Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"core_business": ["crates/router/src/core/unified_authentication_service.rs"], "other": ["crates/router/src/routes/app.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(router): update nick_name only if card_token.card_holder_name is non empty and populate additional card_details from payment_attempt if not present in the locker ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> `nick_name` and `card_network` are not populated in card details for saved card flow with netcetera 1. nick_name should be updated with card_token data (card_holder_name) only if it's not none and non empty string 2. additional card details should be populated from payment_attempt (additional payment data) after fetching from temp locker update nick_name only if card_token.card_holder_name is non empty and populate additional card_details from payment_attempt if not present in the locker ### 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 <!-- 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. Do a saved card external 3ds payment with Netcetera and try to do customer payment method list to see nick_name and card_network being populated in card details Create CURL ``` curl --location '{{BASE_URL}}/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: {{API_KEY}}' \ --data-raw '{ "request_external_three_ds_authentication": true, "request_incremental_authorization": false, "amount": 123, "currency": "USD", "confirm": false, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "customer_id": "stripecustomer1", "email": "[email protected]", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://google.com/", "setup_future_usage": "off_session", "mandate_data": { "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "125.0.0.1", "user_agent": "amet irure esse" } }, "mandate_type": { "multi_use": { "amount": 1000, "currency": "USD", "start_date": "2023-04-21T00:00:00Z", "end_date": "2023-05-21T00:00:00Z", "metadata": { "frequency": "13" } } } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "CA", "zip": "94122", "country": "US", "first_name": "John", "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" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "connector_metadata": { "noon": { "order_category": "pay" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": {}, "order_details": [ { "product_name": "Apple iphone 15", "quantity":1, "amount": 0, "account_name": "transaction_processing" } ], "routing": { "type": "single", "data": "cybersource", "timestamp": 1728906164 }, "shipping_cost": 100 }' ``` Response ``` { "payment_id": "pay_RgRay79tJE6XrnnYhUoh", "merchant_id": "merchant_1728289111", "status": "requires_payment_method", "amount": 123, "net_amount": 223, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_RgRay79tJE6XrnnYhUoh_secret_IDJcGnf9foz8yJJUQ5V8", "created": "2024-10-14T11:39:53.033Z", "currency": "USD", "customer_id": "stripecustomer1", "customer": { "id": "stripecustomer1", "name": "John Doe", "email": "[email protected]", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": { "update_mandate_id": null, "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "125.0.0.1", "user_agent": "amet irure esse" } }, "mandate_type": { "multi_use": { "amount": 1000, "currency": "USD", "start_date": "2023-04-21T00:00:00.000Z", "end_date": "2023-05-21T00:00:00.000Z", "metadata": { "frequency": "13" } } } }, "setup_future_usage": "off_session", "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": null, "payment_method_data": 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": { "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": "CA", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": [ { "brand": null, "amount": 0, "category": null, "quantity": 1, "product_id": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "product_img_link": null, "product_tax_code": null, "requires_shipping": null } ], "email": "[email protected]", "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "stripecustomer1", "created_at": 1728905993, "expires": 1728909593, "secret": "epk_7ce03d90da4d42f59dafbdc3264805ef" }, "manual_retry_allowed": null, "connector_transaction_id": null, "frm_message": null, "metadata": {}, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "pay" } }, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_0W1FrymADX9vzJ4kAifW", "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-10-14T11:54:53.033Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2024-10-14T11:39:53.088Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` Confirm CURL ``` curl --location 'localhost:8080/payments/pay_RgRay79tJE6XrnnYhUoh/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_5LPv674cWuRSlDpmLyQWKFKkR9bmLGUiLnH5IxLFfQCbbV2zEdFwkHQ47YN4cZ06' \ --data '{ "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "John Doe", "card_cvc": "737", "nick_name": "doe" } }, "payment_method": "card", "browser_info": { "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "125.0.0.1" }, "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "125.0.0.1", "user_agent": "amet irure esse" } } }' ``` Response ``` { "payment_id": "pay_RgRay79tJE6XrnnYhUoh", "merchant_id": "merchant_1728289111", "status": "requires_customer_action", "amount": 123, "net_amount": 223, "amount_capturable": 223, "amount_received": null, "connector": "cybersource", "client_secret": "pay_RgRay79tJE6XrnnYhUoh_secret_IDJcGnf9foz8yJJUQ5V8", "created": "2024-10-14T11:39:53.033Z", "currency": "USD", "customer_id": "stripecustomer1", "customer": { "id": "stripecustomer1", "name": "John Doe", "email": "[email protected]", "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": "DEBIT", "card_network": "Visa", "card_issuer": null, "card_issuing_country": "OMAN", "card_isin": "411111", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": "token_0U1KHbVHBHcFZND2vOm5", "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": { "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": "CA", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": [ { "brand": null, "amount": 0, "category": null, "quantity": 1, "product_id": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "product_img_link": null, "product_tax_code": null, "requires_shipping": null } ], "email": "[email protected]", "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": { "type": "three_ds_invoke", "three_ds_data": { "three_ds_authentication_url": "http://localhost:8080/payments/pay_RgRay79tJE6XrnnYhUoh/3ds/authentication", "three_ds_authorize_url": "http://localhost:8080/payments/pay_RgRay79tJE6XrnnYhUoh/merchant_1728289111/authorize/cybersource", "three_ds_method_details": { "three_ds_method_key": "threeDSMethodData", "three_ds_method_data_submission": true, "three_ds_method_data": "eyJ0aHJlZURTTWV0aG9kTm90aWZpY2F0aW9uVVJMIjoiaHR0cHM6Ly9leGFtcGxlLmNvbS8zZHMtbWV0aG9kLW5vdGlmaWNhdGlvbi11cmwiLCJ0aHJlZURTU2VydmVyVHJhbnNJRCI6IjUzZjBkZDAxLTc5MTItNGY2NS1hZTBkLTY3OGJiYjZmYjdhZiJ9", "three_ds_method_url": "https://3dss-pp-prev-ndm.acquiring.test.netcetera.com/acs/3ds-method" }, "poll_config": { "poll_id": "external_authentication_pay_RgRay79tJE6XrnnYhUoh", "delay_in_secs": 2, "frequency": 5 }, "message_version": "2.2.0", "directory_server_id": "A000000003" } }, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": null, "connector_transaction_id": null, "frm_message": null, "metadata": {}, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "pay" } }, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_0W1FrymADX9vzJ4kAifW", "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": { "authentication_flow": null, "electronic_commerce_indicator": null, "status": "pending", "ds_transaction_id": "53f0dd01-7912-4f65-ae0d-678bbb6fb7af", "version": "2.2.0", "error_code": null, "error_message": null }, "external_3ds_authentication_attempted": true, "expires_on": "2024-10-14T11:54:53.033Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "125.0.0.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2024-10-14T11:40:12.398Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` Customer PML CURL ``` curl --location '{{BASE_URL}}/customers/payment_methods?client_secret={{CLIENT_SECRET}}' \ --header 'Accept: application/json' \ --header 'api-key: {{PUBLISHABLE_KEY}}' ``` Response ``` { "customer_payment_methods": [ { "payment_token": "token_gQiGZNCz66gIS1i1vQvy", "payment_method_id": "pm_01JCgYWXwBXoLyWBlPRK", "customer_id": "stripecustomer1", "payment_method": "card", "payment_method_type": null, "payment_method_issuer": null, "payment_method_issuer_code": null, "recurring_enabled": true, "installment_payment_enabled": false, "payment_experience": [ "redirect_to_url" ], "card": { "scheme": "Visa", "issuer_country": "OMAN", "last4_digits": "1111", "expiry_month": "03", "expiry_year": "2030", "card_token": null, "card_holder_name": "John Doe", "card_fingerprint": null, "nick_name": "doe", "card_network": "Visa", "card_isin": "411111", "card_issuer": null, "card_type": "DEBIT", "saved_to_locker": true }, "metadata": null, "created": "2024-10-14T11:40:39.515Z", "bank": null, "surcharge_details": null, "requires_cvv": false, "last_used_at": "2024-10-14T11:40:39.515Z", "default_payment_method_set": false, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "CA", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null } } ], "is_guest_customer": false } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/payment_methods.rs` - `crates/router/src/core/payments/helpers.rs` **Code Patterns Applied:** - Extend existing types with new fields (3 changes) - Add conditional logic for feature flags or filtering (5 changes) **Detailed Identifier Changes:** Commit 9da9c5e0: Files to modify: **crates/router/src/core/payment_methods.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code
{"pr_number": 6308, "pr_title": "fix(router): update nick_name only if card_token.card_holder_name is non empty and populate additional card_details from payment_attempt if not present in the locker", "merged_at": "2024-10-14T14:30:33Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payment_methods.rs", "crates/router/src/core/payments/helpers.rs"]}, "change_types": {"fields_added": 3, "conditionals_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
revert: refactor(authentication): moved cavv storing from table to temp locker Revert https://github.com/juspay/hyperswitch/pull/7978
To implement this **unknown** 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_request_types/authentication.rs` - `crates/hyperswitch_domain_models/src/router_request_types/unified_authentication_service.rs` - `crates/hyperswitch_domain_models/src/router_response_types.rs` **3. Core Business Logic** - `crates/router/src/core/authentication.rs` - `crates/router/src/core/authentication/utils.rs` - `crates/router/src/core/payments.rs` - ... and 7 more files **4. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/gpayments/gpayments_types.rs` - `crates/hyperswitch_connectors/src/connectors/netcetera/transformers.rs` - `crates/router/src/connector/threedsecureio/transformers.rs` **5. Type Definitions** - `crates/router/src/types/api/authentication.rs` - `crates/router/src/types/domain.rs` - `crates/router/src/types/transformers.rs` **6. Other** - `crates/hyperswitch_interfaces/src/authentication.rs` **Code Patterns Applied:** - Implement new functions (8 changes) - Extend existing types with new fields (23 changes) - Add conditional logic for feature flags or filtering (5 changes) **Detailed Identifier Changes:** Commit 165fab37: Files to modify: **crates/diesel_models/src/authentication.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/gpayments/gpayments_types.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/netcetera/transformers.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_request_types/authentication.rs** Remove: - struct: pub::AuthenticationStore **crates/hyperswitch_domain_models/src/router_request_types/unified_authentication_service.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_response_types.rs** Modify existing code **crates/hyperswitch_interfaces/src/authentication.rs** Modify existing code **crates/router/src/connector/threedsecureio/transformers.rs** Modify existing code **crates/router/src/core/authentication.rs** Modify existing code **crates/router/src/core/authentication/utils.rs** Modify existing code **crates/router/src/core/payments.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_status.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/core/payments/types.rs** Modify existing code **crates/router/src/core/unified_authentication_service/utils.rs** Modify existing code **crates/router/src/core/webhooks/incoming.rs** Modify existing code **crates/router/src/types/api/authentication.rs** Modify existing code **crates/router/src/types/domain.rs** Remove: - mod: pub::authentication **crates/router/src/types/transformers.rs** Modify existing code
{"pr_number": 8023, "pr_title": "revert: refactor(authentication): moved cavv storing from table to temp locker", "merged_at": "2025-05-14T08:09:30Z", "intent": {"feature_type": "unknown", "action": "unknown", "entities": []}, "hierarchy": {"database": ["crates/diesel_models/src/authentication.rs"], "domain": ["crates/hyperswitch_domain_models/src/router_request_types/authentication.rs", "crates/hyperswitch_domain_models/src/router_request_types/unified_authentication_service.rs", "crates/hyperswitch_domain_models/src/router_response_types.rs"], "core_business": ["crates/router/src/core/authentication.rs", "crates/router/src/core/authentication/utils.rs", "crates/router/src/core/payments.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_status.rs", "crates/router/src/core/payments/transformers.rs", "crates/router/src/core/payments/types.rs", "crates/router/src/core/unified_authentication_service/utils.rs", "crates/router/src/core/webhooks/incoming.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/gpayments/gpayments_types.rs", "crates/hyperswitch_connectors/src/connectors/netcetera/transformers.rs", "crates/router/src/connector/threedsecureio/transformers.rs"], "types": ["crates/router/src/types/api/authentication.rs", "crates/router/src/types/domain.rs", "crates/router/src/types/transformers.rs"], "other": ["crates/hyperswitch_interfaces/src/authentication.rs"]}, "change_types": {"functions_added": 8, "fields_added": 23, "imports_added": 2, "conditionals_added": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(mandates): Allow connector_mandate_detail updation in case of 'Authorized' Payments ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Earlier we used to store the connector mandate id only in case of charged payments, Ideally we should store for both authorized and charged This PR is a hot fix for the [PR](https://github.com/juspay/hyperswitch/pull/6379) ### 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? Earlier **CIT 3DS Auth** ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_l2PIg8yKpNpJYfXwnSgY8IppXOrB0Nz9OAfD36Y6Xtar5h5nyO5AgVhulydeirKW' \ --data-raw '{ "currency":"USD", "amount": 300, "confirm": true, "amount_to_capture": 300, "customer_id": "malay12345", "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "three_ds", "return_url": "https://www.google.com", "email": "[email protected]", "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": "credit", "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": "PL", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "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" } } }' ``` Repsonse ``` { "payment_id": "pay_TZapMDLw1izXY80fkWEH", "merchant_id": "postman_merchant_GHAction_f1627cea-94e6-4ac1-a32c-f5b323bd2352", "status": "requires_customer_action", "amount": 300, "net_amount": 300, "shipping_cost": null, "amount_capturable": 300, "amount_received": 0, "connector": "stripe", "client_secret": "pay_TZapMDLw1izXY80fkWEH_secret_Fa5P4Jmz6jprceQncpGy", "created": "2024-10-21T11:06:52.457Z", "currency": "USD", "customer_id": "malay12345", "customer": { "id": "malay12345", "name": "Joseph Doe", "email": "[email protected]", "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": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "PL", "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, "product_id": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "product_img_link": null, "product_tax_code": null, "requires_shipping": null } ], "email": "[email protected]", "name": "Joseph Doe", "phone": "999999999", "return_url": "https://www.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_TZapMDLw1izXY80fkWEH/postman_merchant_GHAction_f1627cea-94e6-4ac1-a32c-f5b323bd2352/pay_TZapMDLw1izXY80fkWEH_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": "", "created_at": 1729508812, "expires":, "secret": "" }, "manual_retry_allowed": null, "connector_transaction_id": "", "frm_message": null, "metadata": { "order_category": "applepay" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "", "payment_link": null, "profile_id": "", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-10-21T11:21:52.457Z", "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_xoZahWXv8FU7pce7ZjsK", "payment_method_status": "inactive", "updated": "2024-10-21T11:06:53.794Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": "" } ``` connector_mandate_details not populated after the successful Authorization+Capture call, <img width="1029" alt="Screenshot 2024-10-21 at 4 44 40 PM" src="https://github.com/user-attachments/assets/20b84eea-0963-426b-a199-c3b2cb1bbc24"> **After the Changes** CIT ``` 3DS Auth curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_l2PIg8yKpNpJYfXwnSgY8IppXOrB0Nz9OAfD36Y6Xtar5h5nyO5AgVhulydeirKW' \ --data-raw '{ "currency":"USD", "amount": 300, "confirm": true, "amount_to_capture": 300, "customer_id": "malay123456", "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "three_ds", "return_url": "https://www.google.com", "email": "[email protected]", "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": "credit", "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": "PL", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "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" } } }' ``` ``` Repsonse { "payment_id": "pay_f0asI05qFiTpX56aytDw", "merchant_id": "postman_merchant_GHAction_f1627cea-94e6-4ac1-a32c-f5b323bd2352", "status": "requires_customer_action", "amount": 300, "net_amount": 300, "shipping_cost": null, "amount_capturable": 300, "amount_received": 0, "connector": "stripe", "client_secret": "pay_f0asI05qFiTpX56aytDw_secret_K3fvrqKOfg2zUt4WlnCA", "created": "2024-10-21T11:16:29.680Z", "currency": "USD", "customer_id": "malay123456", "customer": { "id": "malay123456", "name": "Joseph Doe", "email": "[email protected]", "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": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": null, "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "PL", "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, "product_id": null, "product_name": "Apple iphone 15", "product_type": null, "sub_category": null, "product_img_link": null, "product_tax_code": null, "requires_shipping": null } ], "email": "[email protected]", "name": "Joseph Doe", "phone": "999999999", "return_url": "https://www.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_f0asI05qFiTpX56aytDw/postman_merchant_GHAction_f1627cea-94e6-4ac1-a32c-f5b323bd2352/pay_f0asI05qFiTpX56aytDw_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": "malay123456", "created_at": 1729509389, "expires": 1729512989, "secret": "epk_66072a2ebcc04f94a9030ec641d12bbb" }, "manual_retry_allowed": null, "connector_transaction_id": "pi_3QCJb8D5R7gDAGff1zOIY34p", "frm_message": null, "metadata": { "order_category": "applepay" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "pi_3QCJb8D5R7gDAGff1zOIY34p", "payment_link": null, "profile_id": "pro_hywyKTTMR8vbgRrlByUs", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_kUu56HqR9wmzMl8Eyw37", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-10-21T11:31:29.680Z", "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_TqA1v1swJWaIAosbngS7", "payment_method_status": "inactive", "updated": "2024-10-21T11:16:30.793Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": "pm_1QCJb8D5R7gDAGffQQgPIlwV" } ``` Connector_mandate_details updated <img width="1496" alt="Screenshot 2024-10-21 at 4 51 01 PM" src="https://github.com/user-attachments/assets/0ff1bf30-cf4f-490d-8292-e17491a9f9a7"> MIT Payments ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_l2PIg8yKpNpJYfXwnSgY8IppXOrB0Nz9OAfD36Y6Xtar5h5nyO5AgVhulydeirKW' \ --data '{ "amount": 999, "currency": "USD", "confirm": true, "customer_id": "malay123456", "return_url": "https://google.com", "recurring_details": { "type": "payment_method_id", "data": "pm_TqA1v1swJWaIAosbngS7" }, "off_session": true, "billing": { "address": { "first_name": "John", "last_name": "Doe", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US" }, "phone": { "number": "8056594427", "country_code": "+91" } } }' ``` Response ``` { "payment_id": "pay_6Rke8ssTgVD8tpgdzAoY", "merchant_id": "postman_merchant_GHAction_f1627cea-94e6-4ac1-a32c-f5b323bd2352", "status": "succeeded", "amount": 999, "net_amount": 999, "shipping_cost": null, "amount_capturable": 0, "amount_received": 999, "connector": "stripe", "client_secret": "pay_6Rke8ssTgVD8tpgdzAoY_secret_kMoLCmtZNaYBjz7PiakM", "created": "2024-10-21T11:22:13.696Z", "currency": "USD", "customer_id": "malay123456", "customer": { "id": "malay123456", "name": "Joseph Doe", "email": "[email protected]", "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": null, "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": "[email protected]", "name": "Joseph Doe", "phone": "999999999", "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": "malay123456", "created_at": 1729509733, "expires": 1729513333, "secret": "epk_0f6a979a0fa74288af9da2b3d966814a" }, "manual_retry_allowed": false, "connector_transaction_id": "pi_3QCJggD5R7gDAGff1FIsbuSL", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pi_3QCJggD5R7gDAGff1FIsbuSL", "payment_link": null, "profile_id": "pro_hywyKTTMR8vbgRrlByUs", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_kUu56HqR9wmzMl8Eyw37", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-10-21T11:37:13.696Z", "fingerprint": null, "browser_info": null, "payment_method_id": "pm_TqA1v1swJWaIAosbngS7", "payment_method_status": "active", "updated": "2024-10-21T11:22:14.920Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": "pm_1QCJb8D5R7gDAGffQQgPIlwV" } ``` ## 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` **Code Patterns Applied:** - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit eb0461c4: Files to modify: **crates/router/src/core/payments/operations/payment_response.rs** Modify existing code
{"pr_number": 6383, "pr_title": "fix(mandates): Allow connector_mandate_detail updation in case of 'Authorized' Payments", "merged_at": "2024-10-21T15:50:26Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/operations/payment_response.rs"]}, "change_types": {"conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(users): handle edge features for users in tenancy ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description This PR - add tenant_id in roles table - add support for genenric query to serach user across all tenancies - Fixes custom roles creates by tenant_level user - List view for tenant level user - Fix bug to search across envs for tenant admin ### 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 [#6999](https://github.com/juspay/hyperswitch/issues/6999) ## How did you test it? Tenant admin able to create custom org level role ``` curl --location 'http://localhost:8080/user/role' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer JWT' \ --data '{ "role_name": "custom_role_7", "groups": ["users_view"], "role_scope": "organization" }' ``` Response ``` { "role_id": "role_KQxGGeCs6usRwxubnU2Y", "groups": [ "users_view" ], "role_name": "custom_role_7", "role_scope": "organization" } ``` For tenant level user, list api is showing that user in list, if we don't pass query, its coming with remaning org users ``` curl --location 'http://localhost:8080/user/user/list?entity_type=tenant' \ --header 'x-tenant-id: test' \ --header 'Authorization: Bearer JWT' \ ``` Response ``` [ { "email": "[email protected]", "roles": [ { "role_id": "tenant_admin", "role_name": "tenant_admin" } ] } ] ``` For global search now, we are getting org_id in the query <img width="1146" alt="Screenshot 2025-01-07 at 3 23 14 PM" src="https://github.com/user-attachments/assets/2cc0c6d9-1377-4fb6-883c-540845307d51" /> ## 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/query/role.rs` - `crates/diesel_models/src/query/user_role.rs` - `crates/diesel_models/src/role.rs` - ... and 2 more files **2. Core Business Logic** - `crates/router/src/core/user.rs` - `crates/router/src/core/user_role.rs` - `crates/router/src/core/user_role/role.rs` **3. Utils** - `crates/router/src/utils/user.rs` - `crates/router/src/utils/user_role.rs` **4. Other** - `crates/router/src/analytics.rs` - `crates/router/src/db/kafka_store.rs` - `crates/router/src/db/role.rs` - ... and 5 more files **Code Patterns Applied:** - Implement new functions (15 changes) - Extend existing types with new fields (98 changes) - Add conditional logic for feature flags or filtering (2 changes) - Modify database queries (34 changes) **Detailed Identifier Changes:** Commit d04e840c: Files to modify: **crates/diesel_models/src/query/role.rs** Modify existing code **crates/diesel_models/src/query/user_role.rs** Add: - function: pub::list_user_roles_by_user_id_across_tenants **crates/diesel_models/src/role.rs** Modify existing code **crates/diesel_models/src/schema.rs** Modify existing code **crates/diesel_models/src/schema_v2.rs** Modify existing code **crates/router/src/analytics.rs** Modify existing code **crates/router/src/core/user.rs** Modify existing code **crates/router/src/core/user_role.rs** Modify existing code **crates/router/src/core/user_role/role.rs** Modify existing code **crates/router/src/db/kafka_store.rs** Add: - function: private::list_user_roles_by_user_id_across_tenants **crates/router/src/db/role.rs** Modify existing code **crates/router/src/db/user_role.rs** Add: - function: private::list_user_roles_by_user_id_across_tenants - function: private::list_user_roles_by_user_id_across_tenants **crates/router/src/services/authorization.rs** Modify existing code **crates/router/src/services/authorization/roles.rs** Modify existing code **crates/router/src/utils/user.rs** Modify existing code **crates/router/src/utils/user_role.rs** Modify existing code
{"pr_number": 6990, "pr_title": "feat(users): handle edge features for users in tenancy", "merged_at": "2025-01-08T09:34:23Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"database": ["crates/diesel_models/src/query/role.rs", "crates/diesel_models/src/query/user_role.rs", "crates/diesel_models/src/role.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs"], "core_business": ["crates/router/src/core/user.rs", "crates/router/src/core/user_role.rs", "crates/router/src/core/user_role/role.rs"], "utils": ["crates/router/src/utils/user.rs", "crates/router/src/utils/user_role.rs"], "other": ["crates/router/src/analytics.rs", "crates/router/src/db/kafka_store.rs", "crates/router/src/db/role.rs", "crates/router/src/db/user_role.rs", "crates/router/src/services/authorization.rs", "crates/router/src/services/authorization/roles.rs", "migrations/2024-12-28-121104_add_column_tenant_id_to_roles/down.sql", "migrations/2024-12-28-121104_add_column_tenant_id_to_roles/up.sql"]}, "change_types": {"functions_added": 15, "fields_added": 98, "conditionals_added": 2, "database_queries": 34}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(celero): CIT-MIT for celero (ALPHA 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 --> CIT-MIT implementation for CELERO (alpha connector) DOCS - https://sandbox.gotnpgateway.com/docs/api/transactions#cit-mit Caviats - Connector expecting initial_transaction_id which is nothing but prev txn id - Connector not returning `payment_method_id` or `mandate_id` ### Note this is an alpha connector and we depend on alpha cypress test which ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/celero/transformers.rs` **Code Patterns Applied:** - Define new data structures (2 changes) - Implement new functions (2 changes) - Extend existing types with new fields (30 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit 55d4d7b8: Files to modify: **crates/hyperswitch_connectors/src/connectors/celero/transformers.rs** Add: - function: private::determine_cit_mit_fields - function: pub::get_mandate_reference - struct: pub::CeleroCustomer - struct: pub::CeleroMandateFields - enum: pub::CardOnFileIndicator - enum: pub::InitiatedBy - enum: pub::StoredCredentialIndicator - enum: pub::BillingMethod
{"pr_number": 9026, "pr_title": "feat(celero): CIT-MIT for celero (ALPHA CONNECTOR)", "merged_at": "2025-08-29T12:18:29Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "connector", "transaction"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/celero/transformers.rs"]}, "change_types": {"structs_added": 2, "functions_added": 2, "enums_added": 4, "fields_added": 30, "imports_added": 2, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(router): Validate 'card' as a PaymentMethodType ## 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 helper function `validate_payment_method_type_against_payment_method` added `Card` as a valid `PaymentMethodType` when `PaymentMethod` is `Card` ### 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). --> We need to support `card` as a `payment_method_subtype` ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Request: ``` curl --location 'http://localhost:8080/v2/payment-methods-session/12345_pms_01967bcef78f75a08017231cb1264185/confirm' \ --header 'x-profile-id: pro_tvEpY9HoDhpoef5zuFhB' \ --header 'Authorization: publishable-key=pk_dev_cebd8389548b40edba3e0046680b54e8,client-secret=cs_01967bcef78f75a08017232bf96065e5' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_3Je4VFrKJME1ETnyOu3TSzTSfwEz6lTef5BzJkeIWQFeZHhxzfa8KE1gZ0zDApCR' \ --data '{ "payment_method_data": { "card": { "card_number": "4000056655665556", "card_exp_month": "06", "card_exp_year": "25", "card_holder_name": "Hyperswitch", "card_cvc": "123" } }, "payment_method_type": "card", "payment_method_subtype": "card" }' ``` Response: ```json { "id": "12345_pms_01967bcef78f75a08017231cb1264185", "customer_id": "12345_cus_01967bcee4b87d0197fd5aa532ed7703", "billing": { "address": { "city": null, "country": null, "line1": null, "line2": null, "line3": null, "zip": null, "state": null, "first_name": "John", "last_name": "Dough" }, "phone": null, "email": "[email protected]" }, "psp_tokenization": { "tokenization_type": "multi_use", "connector_id": "mca_ugK10PaJlQ4K6hxDx8SB" }, "network_tokenization": null, "expires_at": "2025-04-28T10:06:23.536Z", "client_secret": "CLIENT_SECRET_REDACTED", "return_url": null, "next_action": null, "authentication_details": { "status": "succeeded", "error": null }, "associated_payment_methods": null } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [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` **Detailed Identifier Changes:** Commit 3f1d5981: Files to modify: **crates/router/src/core/payments/helpers.rs** Modify existing code
{"pr_number": 7919, "pr_title": "fix(router): Validate 'card' as a PaymentMethodType", "merged_at": "2025-04-30T12:09:54Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "connector"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/helpers.rs"]}, "change_types": {}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore: update devDependencies for cypress ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [x] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR bumps Cypress and its dependencies to its latest versions. ### 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 #8736 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> CI should pass. ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Tests** - `cypress-tests/README.md` - `cypress-tests/package-lock.json` - `cypress-tests/package.json`
{"pr_number": 8735, "pr_title": "chore: update devDependencies for cypress", "merged_at": "2025-07-28T07:44:58Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"tests": ["cypress-tests/README.md", "cypress-tests/package-lock.json", "cypress-tests/package.json"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(analytics): add issuer as filter for authentication analytics ## 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 --> Hotfix PR Original PR: [https://github.com/juspay/hyperswitch/pull/7535](https://github.com/juspay/hyperswitch/pull/7535) ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/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 587aee81: 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": 7547, "pr_title": "feat(analytics): add issuer as filter for authentication analytics", "merged_at": "2025-03-18T12:42:00Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "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"}
fix(core): fix setup mandate payments to store connector mandate details ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Earlier, for setup mandate flows we were not populating the Payment Method Info field, due to which for the Setup Mandate Payments the connector_mandate_details where not getting populated in the payment methods table. This PR fixes setup mandate payments to store connector mandate details, in the payment methods 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). --> ## How did you test it? - Create a Off -session payment , with 0 dollar ``` Create curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-feature: router-custom' \ --header 'api-key: dev_x0Y92cBUtNSQwvW9B6xfQRtg8NxoURcyMbGh9kiqxO5EfMidDo31Ji6McelAQv9M' \ --data-raw '{ "amount": 0, "currency": "USD", "confirm": false, "customer_id": "CustomerX777", "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "no_three_ds", "return_url": "https://google.com", "email": "[email protected]", "name": "Joseph Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "setup_future_usage":"off_session", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "metadata": { "app": "a" }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "connector_metadata": { "noon": { "order_category": "pay" } } }' ``` ``` Confirm curl --location 'http://localhost:8080/payments/pay_JDQtw7MFaPchY3gJ0xGC/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-feature: router-custom' \ --header 'api-key: pk_dev_e42fea0492c243978ec319ee82a94c51' \ --data '{ "confirm": true, "payment_type": "setup_mandate", "client_secret":"pay_JDQtw7MFaPchY3gJ0xGC_secret_bpP5xPEd2Zvr5jEroitS", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "browser_info": { "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "125.0.0.1" }, "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "in sit", "user_agent": "amet irure esse" } }, "payment_method": "card", "payment_method_type": "debit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "06", "card_exp_year": "2030", "card_holder_name": "John T", "card_cvc": "737" } } }' ``` ``` Reponse { "payment_id": "pay_JDQtw7MFaPchY3gJ0xGC", "merchant_id": "merchant_1730098839", "status": "succeeded", "amount": 0, "net_amount": 0, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "stripe", "client_secret": "pay_JDQtw7MFaPchY3gJ0xGC_secret_bpP5xPEd2Zvr5jEroitS", "created": "2024-10-28T07:19:45.274Z", "currency": "USD", "customer_id": "CustomerX777", "customer": { "id": "CustomerX777", "name": "Joseph Doe", "email": "[email protected]", "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": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "06", "card_exp_year": "2030", "card_holder_name": null, "payment_checks": { "cvc_check": "pass", "address_line1_check": null, "address_postal_code_check": null }, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": "[email protected]", "name": "Joseph Doe", "phone": "999999999", "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": "debit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "seti_1QEnEtD5R7gDAGffhfd9hFkh", "frm_message": null, "metadata": { "app": "a" }, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "pay" } }, "feature_metadata": null, "reference_id": "seti_1QEnEtD5R7gDAGffhfd9hFkh", "payment_link": null, "profile_id": "pro_SdclHp0ZF1u6viEq46vN", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_bn8MAJKkNFGaqH6qaRG9", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-10-28T07:34:45.274Z", "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_akEAWRV4UHi885VyYzGz", "payment_method_status": "active", "updated": "2024-10-28T07:19:48.342Z", "charges": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": "pm_1QEnEtD5R7gDAGffZ1kEyYpk" } ``` - The payment is a success - The connector mandate details would be stored in the table <img width="1725" alt="Screenshot 2024-10-28 at 12 57 20 PM" src="https://github.com/user-attachments/assets/19f0cf73-301a-434a-8d56-d38854950113"> - the list customer also has requires cvv is also false ``` { "customer_payment_methods": [ { "payment_token": "token_7X6J0bZ7CkkwGs6txRuH", "payment_method_id": "pm_akEAWRV4UHi885VyYzGz", "customer_id": "CustomerX777", "payment_method": "card", "payment_method_type": "debit", "payment_method_issuer": null, "payment_method_issuer_code": null, "recurring_enabled": true, "installment_payment_enabled": false, "payment_experience": [ "redirect_to_url" ], "card": { "scheme": null, "issuer_country": null, "last4_digits": "4242", "expiry_month": "06", "expiry_year": "2030", "card_token": null, "card_holder_name": "John T", "card_fingerprint": null, "nick_name": null, "card_network": null, "card_isin": "424242", "card_issuer": null, "card_type": null, "saved_to_locker": true }, "metadata": null, "created": "2024-10-28T07:50:07.878Z", "bank": null, "surcharge_details": null, "requires_cvv": false, "last_used_at": "2024-10-28T07:50:07.878Z", "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": "John", "last_name": "T" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null } } ], "is_guest_customer": false } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] 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` **Code Patterns Applied:** - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit cee84cdc: Files to modify: **crates/router/src/core/payments/operations/payment_response.rs** Modify existing code
{"pr_number": 6446, "pr_title": "fix(core): fix setup mandate payments to store connector mandate details", "merged_at": "2024-10-28T09:06:43Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/operations/payment_response.rs"]}, "change_types": {"conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore: update creds ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> updates wise creds ### 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 #7053 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ci should pass ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Tests** - `.github/workflows/cypress-tests-runner.yml` **Code Patterns Applied:** - Extend existing types with new fields (1 changes)
{"pr_number": 7054, "pr_title": "chore: update creds", "merged_at": "2025-01-17T10:37:04Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"tests": [".github/workflows/cypress-tests-runner.yml"]}, "change_types": {"fields_added": 1}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
refactor(core): structure of split payments ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ### Description Charges can be collected on payments for collecting fees for resellers. Adyen, Stripe allows creating charges on payment intents using their marketplace platform. The support for collecting charges on payments and refunding charges needs to be added. #### Payments - A new field `split_payments` is introduced to read charge specific details - Charge details are sent to the connector where request is transformed and sent - `charge_id` is returned by the connector which is persisted in `payment_attempt` table. This can later be used for refunding charges Before ``` "charges": { "charge_type": "destination", "fees": 100, "transfer_account_id":"{{CONNECTED_ACCOUNT_ID}}" } ``` Changes in this PR ``` "split_payments": { "stripe_split_payment": { "charge_type": "direct", "application_fees": 100, "transfer_account_id": "{{CONNECTED_ACCOUNT_ID}}" } } ``` #### Refunds - A new field `split_refunds` is introduced to read charge id and refund options - `charge_id` created during payments is fetched and used as a reference Before ``` "charges": { "charge_id": "{CHARGE ID}", "revert_platform_fee": true, "revert_transfer": true } ``` Changes in this PR ``` "split_refunds": { "stripe_split_refund": { "revert_platform_fee": true, "revert_transfer": true } } ``` ### 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 Stripe Connector ``` curl --location 'http://localhost:8080/account/merchant_1733139894/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-feature: integ-custom' \ --header 'api-key: ______' \ --data '{ "connector_type": "payment_processor", "connector_name": "stripe", "connector_account_details": { "auth_type": "HeaderKey", "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 } ] }, { "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 } ] }, { "payment_method": "bank_debit", "payment_method_types": [ { "payment_method_type": "ach", "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] } ] }' ``` ___________________________________________________________ I. Direct Charges 1. Create charge on a Payment ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: ______' \ --data '{ "amount": 200, "profile_id": "pro_zxqGZoX7GWtERcmSiOKz", "currency": "USD", "confirm": true, "capture_method": "automatic", "amount_to_capture": 200, "customer_id": "cust_no_pm", "authentication_type": "no_three_ds", "return_url": "https://google.com", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "payment_method": "card", "payment_method_type": "debit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "12", "card_exp_year": "34", "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" } }, "split_payments": { "stripe_split_payment": { "charge_type": "direct", "application_fees": 100, "transfer_account_id": "acct_1PDftAIhl7EEkW0O" } } }' ``` Response ``` { "payment_id": "pay_hCpC82M0IRXHCQBsO0jG", "merchant_id": "merchant_1733386856", "status": "succeeded", "amount": 200, "net_amount": 200, "shipping_cost": null, "amount_capturable": 0, "amount_received": 200, "connector": "stripe", "client_secret": "pay_hCpC82M0IRXHCQBsO0jG_secret_TgKJgpPoxO420p9crUI9", "created": "2024-12-06T11:34:54.293Z", "currency": "USD", "customer_id": "cust_no_pm", "customer": { "id": "cust_no_pm", "name": "John Doe", "email": null, "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "34", "card_holder_name": null, "payment_checks": { "cvc_check": "pass", "address_line1_check": "pass", "address_postal_code_check": "pass" }, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": null, "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": 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": "cust_no_pm", "created_at": 1733484894, "expires": 1733488494, "secret": "epk_88436523e5054069afa72612dc3614a3" }, "manual_retry_allowed": false, "connector_transaction_id": "pi_3QSzoAIhl7EEkW0O1IkSTtgi", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pi_3QSzoAIhl7EEkW0O1IkSTtgi", "payment_link": null, "profile_id": "pro_eSge5v6egtjkbZWDvvZY", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_xWtFAyzTrLDHK4ogUND0", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-12-06T11:49:54.293Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2024-12-06T11:34:56.115Z", "split_payments": { "stripe_split_payment": { "charge_id": "ch_3QSzoAIhl7EEkW0O12IPHRiC", "charge_type": "direct", "application_fees": 100, "transfer_account_id": "acct_1PDftAIhl7EEkW0O" } }, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` 2. Payment Sync ``` curl --location 'http://localhost:8080/payments/pay_hCpC82M0IRXHCQBsO0jG' \ --header 'Accept: application/json' \ --header 'api-key: _' ``` Response ``` { "payment_id": "pay_5F8NC4paD8bg8NVnka6J", "merchant_id": "merchant_1733386856", "status": "succeeded", "amount": 200, "net_amount": 200, "shipping_cost": null, "amount_capturable": 0, "amount_received": 200, "connector": "stripe", "client_secret": "pay_5F8NC4paD8bg8NVnka6J_secret_810pk3NhPAJq7SyOVP0k", "created": "2024-12-05T10:58:55.747Z", "currency": "USD", "customer_id": "cust_no_pm", "customer": { "id": "cust_no_pm", "name": "John Doe", "email": null, "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "34", "card_holder_name": null, "payment_checks": { "cvc_check": "pass", "address_line1_check": "pass", "address_postal_code_check": "pass" }, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": null, "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "debit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "pi_3QScloIhl7EEkW0O2WeUMnx4", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pi_3QScloIhl7EEkW0O2WeUMnx4", "payment_link": null, "profile_id": "pro_eSge5v6egtjkbZWDvvZY", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_xWtFAyzTrLDHK4ogUND0", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-12-05T11:13:55.747Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2024-12-05T10:58:57.440Z", "split_payments": { "stripe_split_payment": { "charge_id": "ch_3QScloIhl7EEkW0O2g9wekLT", "charge_type": "direct", "application_fees": 100, "transfer_account_id": "acct_1PDftAIhl7EEkW0O" } }, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` 3. Create Refund ``` curl --location 'http://localhost:8080/refunds' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: ______' \ --data '{ "payment_id": "pay_hCpC82M0IRXHCQBsO0jG", "amount": 200, "reason": "Customer returned product", "refund_type": "instant", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2024-05-05T10:11:12Z" }, "split_refunds": { "stripe_split_refund": { "revert_platform_fee": true } } }' ``` Response ``` { "refund_id": "ref_rnc9z3xBF94GIanCSByG", "payment_id": "pay_5F8NC4paD8bg8NVnka6J", "amount": 200, "currency": "USD", "status": "succeeded", "reason": "Customer returned product", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2024-05-05T10:11:12Z" }, "error_message": null, "error_code": null, "created_at": "2024-12-05T11:00:13.205Z", "updated_at": "2024-12-05T11:00:15.037Z", "connector": "stripe", "profile_id": "pro_eSge5v6egtjkbZWDvvZY", "merchant_connector_id": "mca_xWtFAyzTrLDHK4ogUND0", "split_refunds": { "stripe_split_refund": { "revert_platform_fee": true, "revert_transfer": null } } } ``` 4. Refund Sync ``` curl --location 'http://localhost:8080/refunds/sync' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json' \ --header 'api-key: _' \ --data '{ "refund_id": "ref_6OjFwcPC1yDIIF05zuN5", "force_sync": true }' ``` Response ``` { "refund_id": "ref_rnc9z3xBF94GIanCSByG", "payment_id": "pay_5F8NC4paD8bg8NVnka6J", "amount": 200, "currency": "USD", "status": "succeeded", "reason": "Customer returned product", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2024-05-05T10:11:12Z" }, "error_message": null, "error_code": null, "created_at": "2024-12-05T11:00:13.205Z", "updated_at": "2024-12-05T11:00:18.624Z", "connector": "stripe", "profile_id": "pro_eSge5v6egtjkbZWDvvZY", "merchant_connector_id": "mca_xWtFAyzTrLDHK4ogUND0", "split_refunds": { "stripe_split_refund": { "revert_platform_fee": true, "revert_transfer": null } } } ``` _____________________________________________________ II. Destination Charges 1. Create a charge on payment ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: _' \ --data '{ "amount": 6540, "profile_id": "pro_eSge5v6egtjkbZWDvvZY", "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "new", "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": "debit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "12", "card_exp_year": "34", "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" } }, "split_payments": { "stripe_split_payment": { "charge_type": "destination", "application_fees": 100, "transfer_account_id": "acct_1PDftAIhl7EEkW0O" } } }' ``` Response ``` { "payment_id": "pay_goWewVT3vwQrWEQC2zpC", "merchant_id": "merchant_1733386856", "status": "succeeded", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6540, "connector": "stripe", "client_secret": "pay_goWewVT3vwQrWEQC2zpC_secret_UJskiDNGAS6O8NbeRQ0E", "created": "2024-12-05T11:00:23.307Z", "currency": "USD", "customer_id": "new", "customer": { "id": "new", "name": "John Doe", "email": null, "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "34", "card_holder_name": null, "payment_checks": { "cvc_check": "pass", "address_line1_check": "pass", "address_postal_code_check": "pass" }, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": null, "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": 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": "new", "created_at": 1733396423, "expires": 1733400023, "secret": "epk_e06e9125bac144c8a9a9f0cb20fa7135" }, "manual_retry_allowed": false, "connector_transaction_id": "pi_3QScnDIVaesDjvMP036XjmWQ", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pi_3QScnDIVaesDjvMP036XjmWQ", "payment_link": null, "profile_id": "pro_eSge5v6egtjkbZWDvvZY", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_xWtFAyzTrLDHK4ogUND0", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-12-05T11:15:23.307Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2024-12-05T11:00:25.206Z", "split_payments": { "stripe_split_payment": { "charge_id": "ch_3QScnDIVaesDjvMP09pnAixC", "charge_type": "destination", "application_fees": 100, "transfer_account_id": "acct_1PDftAIhl7EEkW0O" } }, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` 2. Payment Sync ``` curl --location 'http://localhost:8080/payments/pay_hCpC82M0IRXHCQBsO0jG' \ --header 'Accept: application/json' \ --header 'api-key: _' ``` Response ``` { "payment_id": "pay_hCpC82M0IRXHCQBsO0jG", "merchant_id": "merchant_1733386856", "status": "succeeded", "amount": 200, "net_amount": 200, "shipping_cost": null, "amount_capturable": 0, "amount_received": 200, "connector": "stripe", "client_secret": "pay_hCpC82M0IRXHCQBsO0jG_secret_TgKJgpPoxO420p9crUI9", "created": "2024-12-06T11:34:54.293Z", "currency": "USD", "customer_id": "cust_no_pm", "customer": { "id": "cust_no_pm", "name": "John Doe", "email": null, "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "34", "card_holder_name": null, "payment_checks": { "cvc_check": "pass", "address_line1_check": "pass", "address_postal_code_check": "pass" }, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": null, "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "debit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "pi_3QSzoAIhl7EEkW0O1IkSTtgi", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "pi_3QSzoAIhl7EEkW0O1IkSTtgi", "payment_link": null, "profile_id": "pro_eSge5v6egtjkbZWDvvZY", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_xWtFAyzTrLDHK4ogUND0", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-12-06T11:49:54.293Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2024-12-06T11:34:56.115Z", "split_payments": { "stripe_split_payment": { "charge_id": "ch_3QSzoAIhl7EEkW0O12IPHRiC", "charge_type": "direct", "application_fees": 100, "transfer_account_id": "acct_1PDftAIhl7EEkW0O" } }, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` 3. Create a Refund ``` curl --location 'http://localhost:8080/refunds' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_5sqSbSWLn96RJpHuxQoXV4Cn9AOKqWjxxyDcQalE7ACxWXL5NFV6WTxptuWVhIhY' \ --data '{ "payment_id": "pay_hCpC82M0IRXHCQBsO0jG", "amount": 6540, "reason": "Customer returned product", "refund_type": "instant", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2024-05-05T10:11:12Z" }, "split_refunds": { "stripe_split_refund": { "revert_platform_fee": true, "revert_transfer": true } } }' ``` Response ``` { "refund_id": "ref_6OjFwcPC1yDIIF05zuN5", "payment_id": "pay_goWewVT3vwQrWEQC2zpC", "amount": 6540, "currency": "USD", "status": "succeeded", "reason": "Customer returned product", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2024-05-05T10:11:12Z" }, "error_message": null, "error_code": null, "created_at": "2024-12-05T11:00:28.575Z", "updated_at": "2024-12-05T11:00:30.812Z", "connector": "stripe", "profile_id": "pro_eSge5v6egtjkbZWDvvZY", "merchant_connector_id": "mca_xWtFAyzTrLDHK4ogUND0", "split_refunds": { "stripe_split_refund": { "revert_platform_fee": true, "revert_transfer": true } } } ``` 4. Refund Sync ``` curl --location 'http://localhost:8080/refunds/ref_6OjFwcPC1yDIIF05zuN5' \ --header 'Accept: application/json' \ --header 'api-key: ___' ``` Response ``` { "refund_id": "ref_6OjFwcPC1yDIIF05zuN5", "payment_id": "pay_goWewVT3vwQrWEQC2zpC", "amount": 6540, "currency": "USD", "status": "succeeded", "reason": "Customer returned product", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2024-05-05T10:11:12Z" }, "error_message": null, "error_code": null, "created_at": "2024-12-05T11:00:28.575Z", "updated_at": "2024-12-05T11:00:30.812Z", "connector": "stripe", "profile_id": "pro_eSge5v6egtjkbZWDvvZY", "merchant_connector_id": "mca_xWtFAyzTrLDHK4ogUND0", "split_refunds": { "stripe_split_refund": { "revert_platform_fee": true, "revert_transfer": true } } } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **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/enums.rs` - `crates/api_models/src/payments.rs` - ... and 1 more files **2. Database Layer (Queries & Schema)** - `crates/diesel_models/Cargo.toml` - `crates/diesel_models/src/payment_intent.rs` - `crates/diesel_models/src/refund.rs` - ... and 2 more files **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/Cargo.toml` - `crates/hyperswitch_domain_models/src/payments.rs` - `crates/hyperswitch_domain_models/src/payments/payment_intent.rs` - ... and 1 more files **4. Core Business Logic** - `crates/router/src/core/payments/helpers.rs` - `crates/router/src/core/payments/operations/payment_create.rs` - `crates/router/src/core/payments/transformers.rs` - ... and 5 more files **5. External Connector Integration** - `crates/router/src/connector/stripe.rs` - `crates/router/src/connector/stripe/transformers.rs` - `crates/router/src/types/api/verify_connector.rs` - ... and 1 more files **6. Type Definitions** - `crates/common_types/Cargo.toml` - `crates/common_types/src/lib.rs` - `crates/common_types/src/payments.rs` - ... and 2 more files **7. Utils** - `crates/router/src/utils/user/sample_data.rs` **8. Tests** - `crates/router/tests/payments.rs` - `crates/router/tests/payments2.rs` **9. Configuration Files** - `crates/openapi/Cargo.toml` - `crates/router/Cargo.toml` **10. Other** - `Cargo.lock` - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - ... and 8 more files **Code Patterns Applied:** - Define new data structures (5 changes) - Implement new functions (1 changes) - Extend existing types with new fields (91 changes) - Add conditional logic for feature flags or filtering (11 changes) **Detailed Identifier Changes:** Commit 5a85213e: Files to modify: **crates/api_models/src/enums.rs** Remove: - function: private::default - enum: pub::PaymentChargeType - enum: pub::StripeChargeType - impl: impl Default for PaymentChargeType **crates/api_models/src/payments.rs** Remove: - struct: pub::PaymentChargeRequest - struct: pub::PaymentChargeResponse Add: - struct: pub::StripeSplitPaymentsResponse **crates/api_models/src/refunds.rs** Modify existing code **crates/common_enums/src/enums.rs** Add: - enum: pub::PaymentChargeType - enum: pub::StripeChargeType **crates/common_types/src/lib.rs** Add: - mod: pub::payments - mod: pub::refunds **crates/common_types/src/payments.rs** Add: - struct: pub::StripeSplitPaymentRequest - enum: pub::SplitPaymentsRequest **crates/common_types/src/refunds.rs** Add: - struct: pub::StripeSplitRefundRequest - enum: pub::SplitRefund **crates/diesel_models/src/payment_intent.rs** Modify existing code **crates/diesel_models/src/refund.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/payments.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_intent.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_request_types.rs** Remove: - struct: pub::PaymentCharges Add: - struct: pub::StripeSplitRefund - enum: pub::SplitRefundsRequest **crates/openapi/src/openapi.rs** Modify existing code **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/router/src/connector/stripe.rs** Modify existing code **crates/router/src/connector/stripe/transformers.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payments/operations/payment_create.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/core/payments/types.rs** Modify existing code **crates/router/src/core/refunds.rs** Modify existing code **crates/router/src/core/refunds/transformers.rs** Add: - struct: pub::SplitRefundInput **crates/router/src/core/refunds/validator.rs** Modify existing code **crates/router/src/core/utils.rs** Modify existing code **crates/router/src/db/refund.rs** Modify existing code **crates/router/src/types.rs** Modify existing code **crates/router/src/types/api/verify_connector.rs** Modify existing code **crates/router/src/utils/user/sample_data.rs** Modify existing code **crates/router/tests/connectors/utils.rs** Modify existing code **crates/router/tests/payments.rs** Modify existing code **crates/router/tests/payments2.rs** Modify existing code
{"pr_number": 6706, "pr_title": "refactor(core): structure of split payments", "merged_at": "2024-12-13T10:22:44Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/Cargo.toml", "crates/api_models/src/enums.rs", "crates/api_models/src/payments.rs", "crates/api_models/src/refunds.rs"], "database": ["crates/diesel_models/Cargo.toml", "crates/diesel_models/src/payment_intent.rs", "crates/diesel_models/src/refund.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs"], "domain": ["crates/hyperswitch_domain_models/Cargo.toml", "crates/hyperswitch_domain_models/src/payments.rs", "crates/hyperswitch_domain_models/src/payments/payment_intent.rs", "crates/hyperswitch_domain_models/src/router_request_types.rs"], "core_business": ["crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/operations/payment_create.rs", "crates/router/src/core/payments/transformers.rs", "crates/router/src/core/payments/types.rs", "crates/router/src/core/refunds.rs", "crates/router/src/core/refunds/transformers.rs", "crates/router/src/core/refunds/validator.rs", "crates/router/src/core/utils.rs"], "connectors": ["crates/router/src/connector/stripe.rs", "crates/router/src/connector/stripe/transformers.rs", "crates/router/src/types/api/verify_connector.rs", "crates/router/tests/connectors/utils.rs"], "types": ["crates/common_types/Cargo.toml", "crates/common_types/src/lib.rs", "crates/common_types/src/payments.rs", "crates/common_types/src/refunds.rs", "crates/router/src/types.rs"], "utils": ["crates/router/src/utils/user/sample_data.rs"], "tests": ["crates/router/tests/payments.rs", "crates/router/tests/payments2.rs"], "config": ["crates/openapi/Cargo.toml", "crates/router/Cargo.toml"], "other": ["Cargo.lock", "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/db/refund.rs", "migrations/2024-11-22-091336_add_split_payments_in_payment_intent/down.sql", "migrations/2024-11-22-091336_add_split_payments_in_payment_intent/up.sql", "migrations/2024-11-28-103344_add_split_refunds/down.sql", "migrations/2024-11-28-103344_add_split_refunds/up.sql"]}, "change_types": {"structs_added": 5, "functions_added": 1, "enums_added": 6, "fields_added": 91, "imports_added": 16, "conditionals_added": 11}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
build(deps): bump `openssl` from 0.10.66 to 0.10.70 ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [x] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Update openssl dependency from `version = "0.10.66"` to `version = "0.10.70"` This pr also updates openssl-sys transitive dependency from `version = "0.9.103"` to `version = "0.9.105"` ### 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). --> openssl patch version `0.10.70` release We've had to update the `openssl` crate due to the advisory GHSA-rpmj-rpgj-qmpm that was recently published against the crate. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Verified by code compilation ## 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** - `crates/router/Cargo.toml` **2. Other** - `Cargo.lock`
{"pr_number": 7187, "pr_title": "build(deps): bump `openssl` from 0.10.66 to 0.10.70", "merged_at": "2025-02-05T14:36:59Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"config": ["crates/router/Cargo.toml"], "other": ["Cargo.lock"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
chore: bump cypress and its dependencies ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [x] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR bumps Cypress and its dependencies to its latest versions. ### 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 https://github.com/juspay/hyperswitch/issues/8203 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> CI should pass. ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Tests** - `cypress-tests/package-lock.json` - `cypress-tests/package.json`
{"pr_number": 8202, "pr_title": "chore: bump cypress and its dependencies", "merged_at": "2025-06-02T08:46:03Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"tests": ["cypress-tests/package-lock.json", "cypress-tests/package.json"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(finix): 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 for Finix No need test cases . ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. 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 e45bad38: Files to modify: **crates/connector_configs/src/connector.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors.rs** Add: - mod: pub::finix **crates/hyperswitch_connectors/src/connectors/finix.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::Finix - impl: impl Finix - impl: impl api::Payment for Finix - impl: impl api::PaymentSession for Finix - impl: impl api::ConnectorAccessToken for Finix - impl: impl api::MandateSetup for Finix - impl: impl api::PaymentAuthorize for Finix - impl: impl api::PaymentSync for Finix - impl: impl api::PaymentCapture for Finix - impl: impl api::PaymentVoid for Finix - impl: impl api::Refund for Finix - impl: impl api::RefundExecute for Finix - impl: impl api::RefundSync for Finix - impl: impl api::PaymentToken for Finix - impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for Finix - impl: impl ConnectorCommonExt<Flow, Request, Response> for Finix - impl: impl ConnectorCommon for Finix - impl: impl ConnectorValidation for Finix - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Finix - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Finix - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Finix - impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Finix - impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Finix - impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Finix - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Finix - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Finix - impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Finix - impl: impl webhooks::IncomingWebhook for Finix - impl: impl ConnectorSpecifications for Finix - mod: pub::transformers **crates/hyperswitch_connectors/src/connectors/finix/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::FinixRouterData - struct: pub::FinixPaymentsRequest - struct: pub::FinixCard - struct: pub::FinixAuthType - struct: pub::FinixPaymentsResponse - struct: pub::FinixRefundRequest - struct: pub::RefundResponse - struct: pub::FinixErrorResponse - enum: pub::FinixPaymentStatus - enum: pub::RefundStatus - impl: impl From<(MinorUnit, T)> for FinixRouterData<T> - impl: impl TryFrom<&FinixRouterData<&PaymentsAuthorizeRouterData>> for FinixPaymentsRequest - impl: impl TryFrom<&ConnectorAuthType> for FinixAuthType - impl: impl From<FinixPaymentStatus> for common_enums::AttemptStatus - impl: impl TryFrom<ResponseRouterData<F, FinixPaymentsResponse, T, PaymentsResponseData>> for RouterData<F, T, PaymentsResponseData> - impl: impl TryFrom<&FinixRouterData<&RefundsRouterData<F>>> for FinixRefundRequest - 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/finix.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::FinixTest - impl: impl ConnectorActions for FinixTest - impl: impl utils::Connector for FinixTest **crates/router/tests/connectors/main.rs** Add: - mod: private::finix **crates/test_utils/src/connector_auth.rs** Modify existing code
{"pr_number": 9557, "pr_title": "feat(finix): template code", "merged_at": "2025-09-26T13:26:54Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "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/finix.rs", "crates/hyperswitch_connectors/src/connectors/finix/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/finix.rs", "crates/router/tests/connectors/main.rs", "crates/test_utils/src/connector_auth.rs", "scripts/add_connector.sh"], "tests": ["config/deployments/integration_test.toml", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"]}, "change_types": {"structs_added": 10, "functions_added": 83, "enums_added": 2, "fields_added": 164, "imports_added": 22}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(analytics): refactor and rewrite authentication related analytics ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [x] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Refactored and re-wrote the authentication related analytics. The table being queried is now `authentications`. The following metrics were modified: - Authentication Attempt Count - Authentication Count - Authentication Success Count - Challenge Attempt Count - Challenge Flow Count - Challenge Success Count - Frictionless Flow Count - Frictionless Success Count ### 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). --> Get better insights into authentications related data through analytics ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Hit the following curls: #### Authentication Attempt Count: ```bash curl --location 'http://localhost:8080/analytics/v1/metrics/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.eyJ1c2VyX2lkIjoiYWFiNWIxNDEtNjQwOC00YTUyLTk2MjMtNTVhNTgxMTU1M2U4IiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQwNDE0OTA5Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0MTI3NDY4NSwib3JnX2lkIjoib3JnX1QwSEtYNHYyRGFRT2lHUDVwRk52IiwicHJvZmlsZV9pZCI6InByb19xOWc2ZW1xcGM3YjQxTG83VVhweCIsInRlbmFudF9pZCI6InB1YmxpYyJ9.LIExs1jjG6N5AFu5_S3oiuy77fWF0IbJmNGbK8HHLXI' \ --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:00Z", "endTime": "2025-02-28T09:22:00Z" }, "source": "BATCH", "timeSeries": { "granularity": "G_ONEDAY" }, "metrics": [ "authentication_attempt_count" ], "delta": true } ]' ``` Sample Output: ```json { "queryData": [ { "authentication_count": null, "authentication_attempt_count": 80, "authentication_success_count": null, "challenge_flow_count": null, "challenge_attempt_count": null, "challenge_success_count": null, "frictionless_flow_count": null, "frictionless_success_count": null, "time_bucket": null } ], "metaData": [ { "current_time_range": { "start_time": "2025-02-01T18:30:00.000Z", "end_time": "2025-02-28T09:22:00.000Z" } } ] } ``` #### Authentication Count: ```bash curl --location 'http://localhost:8080/analytics/v1/metrics/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.eyJ1c2VyX2lkIjoiYWFiNWIxNDEtNjQwOC00YTUyLTk2MjMtNTVhNTgxMTU1M2U4IiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQwNDE0OTA5Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0MTI3NDY4NSwib3JnX2lkIjoib3JnX1QwSEtYNHYyRGFRT2lHUDVwRk52IiwicHJvZmlsZV9pZCI6InByb19xOWc2ZW1xcGM3YjQxTG83VVhweCIsInRlbmFudF9pZCI6InB1YmxpYyJ9.LIExs1jjG6N5AFu5_S3oiuy77fWF0IbJmNGbK8HHLXI' \ --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:00Z", "endTime": "2025-02-28T09:22:00Z" }, "source": "BATCH", "timeSeries": { "granularity": "G_ONEDAY" }, "metrics": [ "authentication_count" ], "delta": true } ]' ``` Sample Output: ```json { "queryData": [ { "authentication_count": 95, "authentication_attempt_count": null, "authentication_success_count": null, "challenge_flow_count": null, "challenge_attempt_count": null, "challenge_success_count": null, "frictionless_flow_count": null, "frictionless_success_count": null, "time_bucket": null } ], "metaData": [ { "current_time_range": { "start_time": "2025-02-01T18:30:00.000Z", "end_time": "2025-02-28T09:22:00.000Z" } } ] } ``` #### Authentication Success Count: ```bash curl --location 'http://localhost:8080/analytics/v1/metrics/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.eyJ1c2VyX2lkIjoiYWFiNWIxNDEtNjQwOC00YTUyLTk2MjMtNTVhNTgxMTU1M2U4IiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQwNDE0OTA5Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0MTI3NDY4NSwib3JnX2lkIjoib3JnX1QwSEtYNHYyRGFRT2lHUDVwRk52IiwicHJvZmlsZV9pZCI6InByb19xOWc2ZW1xcGM3YjQxTG83VVhweCIsInRlbmFudF9pZCI6InB1YmxpYyJ9.LIExs1jjG6N5AFu5_S3oiuy77fWF0IbJmNGbK8HHLXI' \ --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:00Z", "endTime": "2025-02-28T09:22:00Z" }, "source": "BATCH", "timeSeries": { "granularity": "G_ONEDAY" }, "metrics": [ "authentication_success_count" ], "delta": true } ]' ``` Sample Output: ```json { "queryData": [ { "authentication_count": null, "authentication_attempt_count": null, "authentication_success_count": 75, "challenge_flow_count": null, "challenge_attempt_count": null, "challenge_success_count": null, "frictionless_flow_count": null, "frictionless_success_count": null, "time_bucket": null } ], "metaData": [ { "current_time_range": { "start_time": "2025-02-01T18:30:00.000Z", "end_time": "2025-02-28T09:22:00.000Z" } } ] } ``` #### Challenge Flow Count: ```bash curl --location 'http://localhost:8080/analytics/v1/metrics/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.eyJ1c2VyX2lkIjoiYWFiNWIxNDEtNjQwOC00YTUyLTk2MjMtNTVhNTgxMTU1M2U4IiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQwNDE0OTA5Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0MTI3NDY4NSwib3JnX2lkIjoib3JnX1QwSEtYNHYyRGFRT2lHUDVwRk52IiwicHJvZmlsZV9pZCI6InByb19xOWc2ZW1xcGM3YjQxTG83VVhweCIsInRlbmFudF9pZCI6InB1YmxpYyJ9.LIExs1jjG6N5AFu5_S3oiuy77fWF0IbJmNGbK8HHLXI' \ --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:00Z", "endTime": "2025-02-28T09:22:00Z" }, "source": "BATCH", "timeSeries": { "granularity": "G_ONEDAY" }, "metrics": [ "challenge_flow_count" ], "delta": true } ]' ``` Sample Output: ```json { "queryData": [ { "authentication_count": null, "authentication_attempt_count": null, "authentication_success_count": null, "challenge_flow_count": 1, "challenge_attempt_count": null, "challenge_success_count": null, "frictionless_flow_count": null, "frictionless_success_count": null, "time_bucket": null } ], "metaData": [ { "current_time_range": { "start_time": "2025-02-01T18:30:00.000Z", "end_time": "2025-02-28T09:22:00.000Z" } } ] } ``` #### Challenge Attempt Count: ```bash curl --location 'http://localhost:8080/analytics/v1/metrics/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.eyJ1c2VyX2lkIjoiYWFiNWIxNDEtNjQwOC00YTUyLTk2MjMtNTVhNTgxMTU1M2U4IiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQwNDE0OTA5Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0MTI3NDY4NSwib3JnX2lkIjoib3JnX1QwSEtYNHYyRGFRT2lHUDVwRk52IiwicHJvZmlsZV9pZCI6InByb19xOWc2ZW1xcGM3YjQxTG83VVhweCIsInRlbmFudF9pZCI6InB1YmxpYyJ9.LIExs1jjG6N5AFu5_S3oiuy77fWF0IbJmNGbK8HHLXI' \ --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:00Z", "endTime": "2025-02-28T09:22:00Z" }, "source": "BATCH", "timeSeries": { "granularity": "G_ONEDAY" }, "metrics": [ "challenge_attempt_count" ], "delta": true } ]' ``` Sample Output: ```json { "queryData": [ { "authentication_count": null, "authentication_attempt_count": null, "authentication_success_count": null, "challenge_flow_count": null, "challenge_attempt_count": 1, "challenge_success_count": null, "frictionless_flow_count": null, "frictionless_success_count": null, "time_bucket": null } ], "metaData": [ { "current_time_range": { "start_time": "2025-02-01T18:30:00.000Z", "end_time": "2025-02-28T09:22:00.000Z" } } ] } ``` #### Challenge Sccess Count: ```bash curl --location 'http://localhost:8080/analytics/v1/metrics/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.eyJ1c2VyX2lkIjoiYWFiNWIxNDEtNjQwOC00YTUyLTk2MjMtNTVhNTgxMTU1M2U4IiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQwNDE0OTA5Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0MTI3NDY4NSwib3JnX2lkIjoib3JnX1QwSEtYNHYyRGFRT2lHUDVwRk52IiwicHJvZmlsZV9pZCI6InByb19xOWc2ZW1xcGM3YjQxTG83VVhweCIsInRlbmFudF9pZCI6InB1YmxpYyJ9.LIExs1jjG6N5AFu5_S3oiuy77fWF0IbJmNGbK8HHLXI' \ --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:00Z", "endTime": "2025-02-28T09:22:00Z" }, "source": "BATCH", "timeSeries": { "granularity": "G_ONEDAY" }, "metrics": [ "challenge_success_count" ], "delta": true } ]' ``` Sample Output: ```json { "queryData": [ { "authentication_count": null, "authentication_attempt_count": null, "authentication_success_count": null, "challenge_flow_count": null, "challenge_attempt_count": null, "challenge_success_count": 1, "frictionless_flow_count": null, "frictionless_success_count": null, "time_bucket": null } ], "metaData": [ { "current_time_range": { "start_time": "2025-02-01T18:30:00.000Z", "end_time": "2025-02-28T09:22:00.000Z" } } ] } ``` #### Frictionless Flow Count: ```bash curl --location 'http://localhost:8080/analytics/v1/metrics/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.eyJ1c2VyX2lkIjoiYWFiNWIxNDEtNjQwOC00YTUyLTk2MjMtNTVhNTgxMTU1M2U4IiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQwNDE0OTA5Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0MTI3NDY4NSwib3JnX2lkIjoib3JnX1QwSEtYNHYyRGFRT2lHUDVwRk52IiwicHJvZmlsZV9pZCI6InByb19xOWc2ZW1xcGM3YjQxTG83VVhweCIsInRlbmFudF9pZCI6InB1YmxpYyJ9.LIExs1jjG6N5AFu5_S3oiuy77fWF0IbJmNGbK8HHLXI' \ --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:00Z", "endTime": "2025-02-28T09:22:00Z" }, "source": "BATCH", "timeSeries": { "granularity": "G_ONEDAY" }, "metrics": [ "frictionless_flow_count" ], "delta": true } ]' ``` Sample Output: ```json { "queryData": [ { "authentication_count": null, "authentication_attempt_count": null, "authentication_success_count": null, "challenge_flow_count": null, "challenge_attempt_count": null, "challenge_success_count": null, "frictionless_flow_count": 74, "frictionless_success_count": null, "time_bucket": null } ], "metaData": [ { "current_time_range": { "start_time": "2025-02-01T18:30:00.000Z", "end_time": "2025-02-28T09:22:00.000Z" } } ] } ``` #### Frictionless Success Count: ```bash curl --location 'http://localhost:8080/analytics/v1/metrics/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.eyJ1c2VyX2lkIjoiYWFiNWIxNDEtNjQwOC00YTUyLTk2MjMtNTVhNTgxMTU1M2U4IiwibWVyY2hhbnRfaWQiOiJtZXJjaGFudF8xNzQwNDE0OTA5Iiwicm9sZV9pZCI6Im9yZ19hZG1pbiIsImV4cCI6MTc0MTI3NDY4NSwib3JnX2lkIjoib3JnX1QwSEtYNHYyRGFRT2lHUDVwRk52IiwicHJvZmlsZV9pZCI6InByb19xOWc2ZW1xcGM3YjQxTG83VVhweCIsInRlbmFudF9pZCI6InB1YmxpYyJ9.LIExs1jjG6N5AFu5_S3oiuy77fWF0IbJmNGbK8HHLXI' \ --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:00Z", "endTime": "2025-02-28T09:22:00Z" }, "source": "BATCH", "timeSeries": { "granularity": "G_ONEDAY" }, "metrics": [ "frictionless_success_count" ], "delta": true } ]' ``` Sample Output: ```json { "queryData": [ { "authentication_count": null, "authentication_attempt_count": null, "authentication_success_count": null, "challenge_flow_count": null, "challenge_attempt_count": null, "challenge_success_count": null, "frictionless_flow_count": null, "frictionless_success_count": 74, "time_bucket": null } ], "metaData": [ { "current_time_range": { "start_time": "2025-02-01T18:30:00.000Z", "end_time": "2025-02-28T09:22:00.000Z" } } ] } ``` Queries: #### Authentication Attempt Count: ```bash SELECT sum(sign_flag) as count, min(created_at) as start_bucket, max(created_at) as end_bucket FROM authentications WHERE ( merchant_id = 'merchant_1740414909' AND authentication_status != 'pending' AND created_at >= '1726079400' AND created_at <= '1727256120' ) GROUP BY toStartOfDay(created_at) HAVING sum(sign_flag) >= '1' ``` #### Authentication Count: ```bash SELECT sum(sign_flag) as count, min(created_at) as start_bucket, max(created_at) as end_bucket FROM authentications WHERE ( merchant_id = 'merchant_1740414909' AND created_at >= '1726079400' AND created_at <= '1727256120' ) GROUP BY toStartOfDay(created_at) HAVING sum(sign_flag) >= '1' ``` #### Authentication Success Count: ```bash SELECT sum(sign_flag) as count, min(created_at) as start_bucket, max(created_at) as end_bucket FROM authentications WHERE ( merchant_id = 'merchant_1740414909' AND authentication_status = 'success' AND created_at >= '1726079400' AND created_at <= '1727256120' ) GROUP BY toStartOfDay(created_at) HAVING sum(sign_flag) >= '1' ``` #### Challenge Attempt Count: ```bash SELECT sum(sign_flag) as count, min(created_at) as start_bucket, max(created_at) as end_bucket FROM authentications WHERE ( merchant_id = 'merchant_1740414909' AND trans_status = 'C' AND authentication_status != 'pending' AND created_at >= '1726079400' AND created_at <= '1727256120' ) GROUP BY toStartOfDay(created_at) HAVING sum(sign_flag) >= '1' ``` #### Challenge Flow Count: ```bash SELECT sum(sign_flag) as count, min(created_at) as start_bucket, max(created_at) as end_bucket FROM authentications WHERE ( merchant_id = 'merchant_1740414909' AND trans_status = 'C' AND created_at >= '1726079400' AND created_at <= '1727256120' ) GROUP BY toStartOfDay(created_at) HAVING sum(sign_flag) >= '1' ``` #### Challenge Success Count: ```bash SELECT sum(sign_flag) as count, min(created_at) as start_bucket, max(created_at) as end_bucket FROM authentications WHERE ( merchant_id = 'merchant_1740414909' AND authentication_status = 'success' AND trans_status = 'C' AND created_at >= '1726079400' AND created_at <= '1727256120' ) GROUP BY toStartOfDay(created_at) HAVING sum(sign_flag) >= '1' ``` #### Frictionless Flow Count: ```bash SELECT sum(sign_flag) as count, min(created_at) as start_bucket, max(created_at) as end_bucket FROM authentications WHERE ( merchant_id = 'merchant_1740414909' AND trans_status = 'Y' AND created_at >= '1738402351' AND created_at <= '1740216751' ) GROUP BY toStartOfDay(created_at) HAVING sum(sign_flag) >= '1' ``` #### Frictionless Success Count: ```bash SELECT sum(sign_flag) as count, min(created_at) as start_bucket, max(created_at) as end_bucket FROM authentications WHERE ( merchant_id = 'merchant_1740414909' AND trans_status = 'Y' AND authentication_status = 'success' AND created_at >= '1738402351' AND created_at <= '1740216751' ) GROUP BY toStartOfDay(created_at) HAVING sum(sign_flag) >= '1' ``` ## 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. Database Layer (Queries & Schema)** - `crates/analytics/src/query.rs` **3. Core Business Logic** - `crates/analytics/src/auth_events/core.rs` **4. Type Definitions** - `crates/analytics/src/types.rs` **5. Other** - `crates/analytics/src/auth_events/accumulator.rs` - `crates/analytics/src/auth_events/metrics.rs` - `crates/analytics/src/auth_events/metrics/authentication_attempt_count.rs` - ... and 11 more files **Code Patterns Applied:** - Define new data structures (1 changes) - Extend existing types with new fields (40 changes) - Add conditional logic for feature flags or filtering (8 changes) **Detailed Identifier Changes:** Commit 1ff273e1: Files to modify: **crates/analytics/src/auth_events/accumulator.rs** Modify existing code **crates/analytics/src/auth_events/core.rs** Modify existing code **crates/analytics/src/auth_events/metrics.rs** Remove: - mod: private::three_ds_sdk_count Add: - mod: private::authentication_count **crates/analytics/src/auth_events/metrics/authentication_attempt_count.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/clickhouse.rs** Modify existing code **crates/analytics/src/lib.rs** Modify existing code **crates/analytics/src/query.rs** Modify existing code **crates/analytics/src/sqlx.rs** Modify existing code **crates/analytics/src/types.rs** Modify existing code **crates/api_models/src/analytics/auth_events.rs** Remove: - struct: pub::ThreeDsSdkCount Add: - struct: pub::AuthenticationCount - enum: pub::AuthEventDimensions **crates/router/src/analytics.rs** Modify existing code
{"pr_number": 7433, "pr_title": "feat(analytics): refactor and rewrite authentication related analytics", "merged_at": "2025-03-06T11:36:09Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant", "user"]}, "hierarchy": {"api_models": ["crates/api_models/src/analytics/auth_events.rs"], "database": ["crates/analytics/src/query.rs"], "core_business": ["crates/analytics/src/auth_events/core.rs"], "types": ["crates/analytics/src/types.rs"], "other": ["crates/analytics/src/auth_events/accumulator.rs", "crates/analytics/src/auth_events/metrics.rs", "crates/analytics/src/auth_events/metrics/authentication_attempt_count.rs", "crates/analytics/src/auth_events/metrics/three_ds_sdk_count.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/clickhouse.rs", "crates/analytics/src/lib.rs", "crates/analytics/src/sqlx.rs", "crates/router/src/analytics.rs"]}, "change_types": {"structs_added": 1, "enums_added": 1, "fields_added": 40, "imports_added": 6, "conditionals_added": 8}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(connector): [Stripebilling] change Billing Connector Payment Sync url from charges to payment intents api ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description This PR changes the url of billing connector payment sync flow from using stripe charge api to stripe payment intents api. Because in Recovery Flow there is a chance to call stripe's psync flow to update the error codes and other details for an attempt. And psync flow accepts payment intent id rather than the charge id. To reuse the existing flow we need payment_intent id to propogate. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> To test this You can follow the steps of this PR: #7461 Tested it locally. And the logs are as following. <img width="1290" alt="Screenshot 2025-04-24 at 6 10 52 PM" src="https://github.com/user-attachments/assets/7803e047-7ef5-4f58-85a5-f00313f3ab04" /> <img width="1296" alt="Screenshot 2025-04-24 at 6 11 02 PM" src="https://github.com/user-attachments/assets/80049b8e-17fc-40f3-b6ae-d5977ea3ab79" /> <img width="1288" alt="Screenshot 2025-04-24 at 6 10 25 PM" src="https://github.com/user-attachments/assets/cc252496-1924-4e9d-8daa-563c15e85979" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/stripebilling.rs` - `crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs` **Code Patterns Applied:** - Define new data structures (2 changes) - Extend existing types with new fields (11 changes) **Detailed Identifier Changes:** Commit af5e56ef: Files to modify: **crates/hyperswitch_connectors/src/connectors/stripebilling.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs** Add: - struct: pub::StripebillingBillingConnectorPaymentSyncResponseData
{"pr_number": 7893, "pr_title": "refactor(connector): [Stripebilling] change Billing Connector Payment Sync url from charges to payment intents api", "merged_at": "2025-05-02T12:12:23Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "connector"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/stripebilling.rs", "crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs"]}, "change_types": {"structs_added": 2, "fields_added": 11}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [Fiuu] Consume error message thrown by connector for Psync flow and make extraP from response struct Secret ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [X] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description 1. Need to consume error code and error message thrown by connector for PaymentsSync flow. This is to ensure that error code unification works properly <img width="525" alt="Screenshot 2024-12-24 at 17 10 09" src="https://github.com/user-attachments/assets/0c47ec20-c2c7-4da5-aac2-33547ac51f61" /> <img width="503" alt="Screenshot 2024-12-24 at 17 10 24" src="https://github.com/user-attachments/assets/7ae298fb-231e-4e48-9577-cec6deafa329" /> 2. Need to make extraP in FiuuWebhooksPaymentResponse Secret since extraP may contain sensitive data <img width="672" alt="Screenshot 2024-12-24 at 15 22 31" src="https://github.com/user-attachments/assets/70e47781-27e8-45c3-897b-fd2bb08284ef" /> ``` pub struct FiuuWebhooksPaymentResponse { pub skey: Secret<String>, pub status: FiuuPaymentWebhookStatus, #[serde(rename = "orderid")] pub order_id: String, #[serde(rename = "tranID")] pub tran_id: String, pub nbcb: String, pub amount: StringMajorUnit, pub currency: String, pub domain: Secret<String>, pub appcode: Secret<String>, pub paydate: String, pub channel: String, pub error_desc: Option<String>, pub error_code: Option<String>, #[serde(rename = "extraP")] pub extra_parameters: Option<String>, } ``` ### 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. Need to consume error message thrown by connector for PaymentsSync flow Could not simulate psync failure case locally, so could not test it 2. Need to make extraP in FiuuWebhooksPaymentResponse Secret since extraP may contain sensitive data Before (Card info inside extraP getting logged) <img width="1728" alt="Screenshot 2024-12-23 at 13 18 24" src="https://github.com/user-attachments/assets/4dab5b38-a5eb-4617-bed5-fc87cf202773" /> After (extraP is masked) <img width="1728" alt="Screenshot 2024-12-24 at 15 19 14" src="https://github.com/user-attachments/assets/5e2f6b1a-2d10-4c6f-8178-8c5c3d8b9282" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [X] I formatted the code `cargo +nightly fmt --all` - [X] I addressed lints thrown by `cargo clippy` - [X] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/fiuu.rs` - `crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs` **Code Patterns Applied:** - Extend existing types with new fields (6 changes) **Detailed Identifier Changes:** Commit e393a036: Files to modify: **crates/hyperswitch_connectors/src/connectors/fiuu.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs** Modify existing code
{"pr_number": 6934, "pr_title": "feat(connector): [Fiuu] Consume error message thrown by connector for Psync flow and make extraP from response struct Secret", "merged_at": "2024-12-27T08:37:35Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "order"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/fiuu.rs", "crates/hyperswitch_connectors/src/connectors/fiuu/transformers.rs"]}, "change_types": {"fields_added": 6}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat: add macro to generate ToEncryptable trait ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Enhancement ## Description <!-- Describe your changes in detail --> This PR adds a macro to generate ToEncryptable trait on different types ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> This PR removes the effort of repetitively implementing ToEncryptable trait which is used for batch encryption/decryption in the encryption service by adding a macro which generates code upon deriving it ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> **THIS CANNOT BE TESTED ON SANDBOX** - Compiler guided. Since this does not change any core flow - Basic test of MerchantCreate and Payments for sanity ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code
To implement this **payment** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/customers.rs` - `crates/api_models/src/payments.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/address.rs` - `crates/diesel_models/src/events.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/customer.rs` - `crates/hyperswitch_domain_models/src/merchant_connector_account.rs` - `crates/hyperswitch_domain_models/src/payments.rs` - ... and 1 more files **4. Core Business Logic** - `crates/router/src/core/admin.rs` - `crates/router/src/core/customers.rs` - `crates/router/src/core/payments/helpers.rs` - ... and 2 more files **5. Type Definitions** - `crates/router/src/types/domain/address.rs` - `crates/router/src/types/domain/event.rs` **6. Utils** - `crates/router/src/utils.rs` **7. Other** - `crates/router_derive/src/lib.rs` - `crates/router_derive/src/macros.rs` - `crates/router_derive/src/macros/to_encryptable.rs` **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (15 changes) - Extend existing types with new fields (168 changes) - Add conditional logic for feature flags or filtering (2 changes) - Modify database queries (5 changes) **Detailed Identifier Changes:** Commit 19cf0f74: Files to modify: **crates/api_models/src/customers.rs** Remove: - function: private::to_encryptable - function: private::from_encryptable - function: private::to_encryptable - function: private::from_encryptable - struct: pub::CustomerRequestWithEmail - struct: pub::CustomerRequestWithEncryption - struct: pub::EncryptableCustomer - impl: impl ToEncryptable<EncryptableCustomer, Secret<String>, Encryption> for CustomerRequestWithEncryption - impl: impl ToEncryptable<EncryptableCustomer, Secret<String>, Secret<String>> for CustomerRequestWithEmail **crates/api_models/src/payments.rs** Remove: - function: private::from_encryptable - function: private::to_encryptable - impl: impl ToEncryptable<EncryptableAddressDetails, Secret<String>, Secret<String>> for AddressDetailsWithPhone **crates/diesel_models/src/address.rs** Remove: - function: private::to_encryptable - function: private::from_encryptable - impl: impl ToEncryptable<EncryptableAddress, Secret<String>, Encryption> for Address **crates/diesel_models/src/events.rs** Remove: - function: private::to_encryptable - function: private::from_encryptable - struct: pub::EventWithEncryption - struct: pub::EncryptableEvent - impl: impl ToEncryptable<EncryptableEvent, Secret<String>, Encryption> for EventWithEncryption **crates/hyperswitch_domain_models/src/customer.rs** Modify existing code **crates/hyperswitch_domain_models/src/merchant_connector_account.rs** Remove: - function: private::from_encryptable - function: private::to_encryptable - function: private::from_encryptable - function: private::to_encryptable - function: private::from_encryptable - function: private::to_encryptable - struct: pub::McaFromRequestfromUpdate - struct: pub::McaFromRequest - struct: pub::DecryptedMca - struct: pub::EncryptedMca - struct: pub::DecryptedUpdateMca - impl: impl ToEncryptable<DecryptedMca, Secret<serde_json::Value>, Encryption> for EncryptedMca - impl: impl ToEncryptable<DecryptedUpdateMca, Secret<serde_json::Value>, Secret<serde_json::Value>> for McaFromRequestfromUpdate - impl: impl ToEncryptable<DecryptedMca, Secret<serde_json::Value>, Secret<serde_json::Value>> for McaFromRequest **crates/hyperswitch_domain_models/src/payments.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_intent.rs** Modify existing code **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/core/customers.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payments/operations/payment_create.rs** Modify existing code **crates/router/src/core/payouts/helpers.rs** Modify existing code **crates/router/src/types/domain/address.rs** Modify existing code **crates/router/src/types/domain/event.rs** Modify existing code **crates/router/src/utils.rs** Modify existing code **crates/router_derive/src/lib.rs** Add: - function: pub::derive_to_encryption_attr **crates/router_derive/src/macros.rs** Add: - mod: pub::to_encryptable **crates/router_derive/src/macros/to_encryptable.rs** Add: - function: private::parse - function: private::to_tokens - function: private::get_encryption_ty_meta - function: private::get_inner_type - function: private::get_inner_most_type - function: private::get_inner_type_recursive - function: private::get_encryptable_fields - function: private::get_field_and_inner_types - function: private::generate_struct_fields - function: private::generate_impls - function: private::generate_to_encryptable - function: pub::derive_to_encryption - struct: pub::FieldMeta - enum: private::StructType - impl: impl Parse for FieldMeta - impl: impl quote::ToTokens for FieldMeta - impl: impl StructType
{"pr_number": 6313, "pr_title": "feat: add macro to generate ToEncryptable trait", "merged_at": "2024-11-04T06:29:03Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/customers.rs", "crates/api_models/src/payments.rs"], "database": ["crates/diesel_models/src/address.rs", "crates/diesel_models/src/events.rs"], "domain": ["crates/hyperswitch_domain_models/src/customer.rs", "crates/hyperswitch_domain_models/src/merchant_connector_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/customers.rs", "crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/operations/payment_create.rs", "crates/router/src/core/payouts/helpers.rs"], "types": ["crates/router/src/types/domain/address.rs", "crates/router/src/types/domain/event.rs"], "utils": ["crates/router/src/utils.rs"], "other": ["crates/router_derive/src/lib.rs", "crates/router_derive/src/macros.rs", "crates/router_derive/src/macros/to_encryptable.rs"]}, "change_types": {"structs_added": 1, "functions_added": 15, "enums_added": 1, "fields_added": 168, "imports_added": 22, "conditionals_added": 2, "database_queries": 5}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [Redsys] Use merchant payment_id for ds_merchant_order with length check ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Hotfix for https://github.com/juspay/hyperswitch/pull/8485 ### 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)? --> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/payments.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/payment_attempt.rs` - `crates/diesel_models/src/payment_intent.rs` - `crates/diesel_models/src/schema.rs` - ... and 2 more files **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payments.rs` - `crates/hyperswitch_domain_models/src/payments/payment_attempt.rs` - `crates/hyperswitch_domain_models/src/payments/payment_intent.rs` - ... and 1 more files **4. Core Business Logic** - `crates/router/src/core/authentication/transformers.rs` - `crates/router/src/core/fraud_check/flows/checkout_flow.rs` - `crates/router/src/core/fraud_check/flows/fulfillment_flow.rs` - ... and 15 more files **5. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/redsys.rs` - `crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs` - `crates/hyperswitch_connectors/src/utils.rs` - ... and 6 more files **6. Type Definitions** - `crates/router/src/types.rs` - `crates/router/src/types/storage/payment_attempt.rs` **7. Utils** - `crates/router/src/utils/user/sample_data.rs` **8. Other** - `crates/hyperswitch_interfaces/src/api.rs` - `crates/hyperswitch_interfaces/src/conversion_impls.rs` - `crates/router/src/routes/payments.rs` - ... and 6 more files **Code Patterns Applied:** - Implement new functions (9 changes) - Extend existing types with new fields (134 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit b2d94fa1: Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/diesel_models/src/payment_attempt.rs** Modify existing code **crates/diesel_models/src/payment_intent.rs** Modify existing code **crates/diesel_models/src/schema.rs** Modify existing code **crates/diesel_models/src/schema_v2.rs** Modify existing code **crates/diesel_models/src/user/sample_data.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/redsys.rs** Add: - function: private::generate_connector_request_reference_id **crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_attempt.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_intent.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_data.rs** Modify existing code **crates/hyperswitch_interfaces/src/api.rs** Add: - function: private::generate_connector_request_reference_id **crates/hyperswitch_interfaces/src/connector_integration_interface.rs** Add: - function: private::generate_connector_request_reference_id **crates/hyperswitch_interfaces/src/conversion_impls.rs** Modify existing code **crates/router/src/core/authentication/transformers.rs** Modify existing code **crates/router/src/core/fraud_check/flows/checkout_flow.rs** Modify existing code **crates/router/src/core/fraud_check/flows/fulfillment_flow.rs** Modify existing code **crates/router/src/core/fraud_check/flows/record_return.rs** Modify existing code **crates/router/src/core/fraud_check/flows/sale_flow.rs** Modify existing code **crates/router/src/core/fraud_check/flows/transaction_flow.rs** Modify existing code **crates/router/src/core/mandate/utils.rs** Modify existing code **crates/router/src/core/payment_methods.rs** Modify existing code **crates/router/src/core/payments.rs** Add: - function: private::set_connector_request_reference_id_in_payment_attempt - function: private::set_connector_request_reference_id_in_payment_attempt - function: private::set_connector_request_reference_id_in_payment_attempt - function: private::set_connector_request_reference_id_in_payment_attempt - function: private::set_connector_request_reference_id_in_payment_attempt **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payments/operations/payment_confirm.rs** Modify existing code **crates/router/src/core/payments/operations/payment_create.rs** Modify existing code **crates/router/src/core/payments/retry.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/core/relay/utils.rs** Modify existing code **crates/router/src/core/unified_authentication_service/utils.rs** Modify existing code **crates/router/src/core/utils.rs** Modify existing code **crates/router/src/core/webhooks/utils.rs** Modify existing code **crates/router/src/routes/payments.rs** Modify existing code **crates/router/src/services/kafka/payment_intent.rs** Modify existing code **crates/router/src/services/kafka/payment_intent_event.rs** Modify existing code **crates/router/src/types.rs** Modify existing code **crates/router/src/types/api/verify_connector.rs** Modify existing code **crates/router/src/types/storage/payment_attempt.rs** Modify existing code **crates/router/src/utils/user/sample_data.rs** Modify existing code **crates/router/tests/connectors/aci.rs** Modify existing code **crates/router/tests/connectors/utils.rs** Modify existing code **crates/storage_impl/src/mock_db/payment_attempt.rs** Modify existing code **crates/storage_impl/src/payments/payment_attempt.rs** Modify existing code
{"pr_number": 8555, "pr_title": "feat(connector): [Redsys] Use merchant payment_id for ds_merchant_order with length check", "merged_at": "2025-07-08T12:27:51Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs"], "database": ["crates/diesel_models/src/payment_attempt.rs", "crates/diesel_models/src/payment_intent.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs", "crates/diesel_models/src/user/sample_data.rs"], "domain": ["crates/hyperswitch_domain_models/src/payments.rs", "crates/hyperswitch_domain_models/src/payments/payment_attempt.rs", "crates/hyperswitch_domain_models/src/payments/payment_intent.rs", "crates/hyperswitch_domain_models/src/router_data.rs"], "core_business": ["crates/router/src/core/authentication/transformers.rs", "crates/router/src/core/fraud_check/flows/checkout_flow.rs", "crates/router/src/core/fraud_check/flows/fulfillment_flow.rs", "crates/router/src/core/fraud_check/flows/record_return.rs", "crates/router/src/core/fraud_check/flows/sale_flow.rs", "crates/router/src/core/fraud_check/flows/transaction_flow.rs", "crates/router/src/core/mandate/utils.rs", "crates/router/src/core/payment_methods.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/operations/payment_confirm.rs", "crates/router/src/core/payments/operations/payment_create.rs", "crates/router/src/core/payments/retry.rs", "crates/router/src/core/payments/transformers.rs", "crates/router/src/core/relay/utils.rs", "crates/router/src/core/unified_authentication_service/utils.rs", "crates/router/src/core/utils.rs", "crates/router/src/core/webhooks/utils.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/redsys.rs", "crates/hyperswitch_connectors/src/connectors/redsys/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/hyperswitch_interfaces/src/connector_integration_interface.rs", "crates/router/src/types/api/verify_connector.rs", "crates/router/tests/connectors/aci.rs", "crates/router/tests/connectors/utils.rs", "migrations/2025-07-01-073253_add_connector_request_reference_id_and_is_payment_id_from_merchant/down.sql", "migrations/2025-07-01-073253_add_connector_request_reference_id_and_is_payment_id_from_merchant/up.sql"], "types": ["crates/router/src/types.rs", "crates/router/src/types/storage/payment_attempt.rs"], "utils": ["crates/router/src/utils/user/sample_data.rs"], "other": ["crates/hyperswitch_interfaces/src/api.rs", "crates/hyperswitch_interfaces/src/conversion_impls.rs", "crates/router/src/routes/payments.rs", "crates/router/src/services/kafka/payment_intent.rs", "crates/router/src/services/kafka/payment_intent_event.rs", "crates/storage_impl/src/mock_db/payment_attempt.rs", "crates/storage_impl/src/payments/payment_attempt.rs", "v2_migrations/2025-01-13-081847_drop_v1_columns/down.sql", "v2_migrations/2025-01-13-081847_drop_v1_columns/up.sql"]}, "change_types": {"functions_added": 9, "fields_added": 134, "imports_added": 1, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
ci(cypress): Add Airwallex Connector Test ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description 1.Enhanced Airwallex Connector in cypress for Comprehensive Testing 2.Fixed the connector_mandate_id expectation for mandates: Due to fallback they connector_mandate_id is based on the the request of setup_future_usage. In this PR i have modified based on the reponse.setup_future_usage. ## Motivation and Context These enhancements improve test coverage and reliability for the Airwallex connector, ensuring that all payment flows are properly tested and verified. ## How did you test it? <img width="544" alt="Screenshot 2025-05-30 at 4 52 40 PM" src="https://github.com/user-attachments/assets/ada8d267-c73b-4968-bb76-72a52fb5a646" /> 1.Refund 1scenario was failing due to service unavailable. Ran the test again for refund and provided the screenshot below. 2.Another 1 scenario is failing in dynamic field due to payment_method is empty in PML if the billing address is not present. Its a issue needs to be fixed. <img width="740" alt="Screenshot 2025-05-30 at 4 58 49 PM" src="https://github.com/user-attachments/assets/0e083fcb-d871-4f4b-85e9-2d255abcdb06" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **payment** feature, you'll need to modify these architectural layers: **1. Tests** - `cypress-tests/cypress/e2e/configs/Payment/Airwallex.js` - `cypress-tests/cypress/e2e/configs/Payment/Utils.js` - `cypress-tests/cypress/support/commands.js` - ... and 1 more files **Code Patterns Applied:** - Extend existing types with new fields (558 changes) - Add conditional logic for feature flags or filtering (8 changes)
{"pr_number": 8187, "pr_title": "ci(cypress): Add Airwallex Connector Test", "merged_at": "2025-06-06T12:34:21Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["payment", "user", "refund"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/configs/Payment/Airwallex.js", "cypress-tests/cypress/e2e/configs/Payment/Utils.js", "cypress-tests/cypress/support/commands.js", "cypress-tests/cypress/support/redirectionHandler.js"]}, "change_types": {"fields_added": 558, "conditionals_added": 8}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
test(cypress): add test for In Memory Cache ## 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 --> Add Test Cases for testing In Memory Cache ### 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). --> Currently test cases were not present. ## How did you test 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="1025" alt="Screenshot 2024-12-30 at 3 28 02 PM" src="https://github.com/user-attachments/assets/8059ee3c-f695-452f-ac74-3909849559d3" /> <img width="1028" alt="Screenshot 2024-12-30 at 3 28 10 PM" src="https://github.com/user-attachments/assets/d6d12ca8-3802-4a3a-94d8-0382bf8e1fb2" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Tests** - `cypress-tests/cypress/e2e/PaymentTest/00025-ConfigTest.cy.js` - `cypress-tests/cypress/e2e/PaymentTest/00028-MemoryCacheConfigs.cy.js` - `cypress-tests/cypress/support/commands.js` **Code Patterns Applied:** - Extend existing types with new fields (22 changes)
{"pr_number": 6961, "pr_title": "test(cypress): add test for In Memory Cache", "merged_at": "2025-01-09T10:25:30Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/PaymentTest/00025-ConfigTest.cy.js", "cypress-tests/cypress/e2e/PaymentTest/00028-MemoryCacheConfigs.cy.js", "cypress-tests/cypress/support/commands.js"]}, "change_types": {"fields_added": 22}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(ucs): Add profile ID to lineage tracking in Unified Connector Service ### Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ### Description This PR enhances the Unified Connector Service (UCS) by adding profile ID tracking to the lineage system. Previously, the lineage tracking only included merchant IDs, but now it includes both merchant ID and profile ID to provide better traceability and context for payment operations. ### Key Changes: 1. **Enhanced LineageIds Structure**: Updated the `LineageIds` struct in `crates/external_services/src/grpc_client.rs` to include both `merchant_id` and `profile_id` fields. 2. **Updated UCS Header Builder**: Modified the gRPC header builder types to include lineage IDs at the intermediate stage, ensuring profile IDs are properly propagated through the system. 3. **Payment Flow Integration**: Updated multiple payment flow functions in `crates/router/src/core/payments.rs` to create and pass lineage IDs containing both merchant and profile information when calling UCS. 4. **Flow Trait Updates**: Enhanced the payment flow traits in `crates/router/src/core/payments/flows.rs` to accept and handle lineage IDs in UCS calls. 5. **Constants Addition**: Added a new constant `PROFILE_ID_UNAVAILABLE` in `crates/router/src/consts.rs` for handling cases where profile ID is not available. ### Additional Changes - [x] This PR modifies the API contract - [ ] This PR modifies the database schema - [x] This PR modifies application configuration/environment variables ### Files Modified: - `crates/external_services/src/grpc_client.rs` - LineageIds structure and gRPC header builder - `crates/router/src/consts.rs` - Added PROFILE_ID_UNAVAILABLE constant - `crates/router/src/core/payments.rs` - Updated UCS calls to include lineage IDs - `crates/router/src/core/payments/flows.rs` - Flow trait updates for lineage ID support - `crates/router/src/core/payments/flows/authorize_flow.rs` - Authorize flow lineage ID integration ## Motivation and Context The enhancement is required to improve traceability and debugging capabilities in the Unified Connector Service. By including profile ID in the lineage tracking, we can: 1. **Better Traceability**: Track payment operations with both merchant and profile context 2. **Improved Debugging**: Quickly identify which profile a payment operation belongs to 3. **Enhanced Monitoring**: Provide more granular monitoring and logging capabilities 4. **Future-proofing**: Lay groundwork for profile-specific features and analytics This change supports the broader initiative to improve the observability and traceability of payment operations throughout the Hyperswitch system. ## How did you test it? <img width="1701" height="822" alt="Screenshot 2025-09-25 at 11 36 53 PM" src="https://github.com/user-attachments/assets/3830cba5-9c4b-46d5-b533-1c702cd1a552" /> unit test cases result: <img width="1294" height="246" alt="image" src="https://github.com/user-attachments/assets/041c060d-bfb9-42ab-8d31-449485eea6fa" /> The changes have been tested by: - Verifying that the new lineage IDs are properly constructed with both merchant and profile IDs - Ensuring that existing payment flows continue to work with the enhanced UCS calls - Validating that the gRPC header builder correctly handles the new lineage ID structure - Testing edge cases where profile ID might be unavailable using the new constant ## 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. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/merchant_context.rs` **2. Core Business Logic** - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/flows.rs` - `crates/router/src/core/payments/flows/authorize_flow.rs` - ... and 4 more files **3. Other** - `crates/external_services/src/grpc_client.rs` - `crates/injector/src/vault_metadata.rs` - `crates/router/src/consts.rs` **Code Patterns Applied:** - Implement new functions (2 changes) - Extend existing types with new fields (35 changes) **Detailed Identifier Changes:** Commit 7654dbf4: Files to modify: **crates/external_services/src/grpc_client.rs** Modify existing code **crates/hyperswitch_domain_models/src/merchant_context.rs** Modify existing code **crates/injector/src/vault_metadata.rs** Modify existing code **crates/router/src/consts.rs** Add: - function: private::test_profile_id_unavailable_initialization - mod: private::tests **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/flows.rs** Modify existing code **crates/router/src/core/payments/flows/authorize_flow.rs** Modify existing code **crates/router/src/core/payments/flows/external_proxy_flow.rs** Modify existing code **crates/router/src/core/payments/flows/psync_flow.rs** Modify existing code **crates/router/src/core/payments/flows/setup_mandate_flow.rs** Modify existing code **crates/router/src/core/unified_connector_service.rs** Modify existing code
{"pr_number": 9559, "pr_title": "feat(ucs): Add profile ID to lineage tracking in Unified Connector Service", "merged_at": "2025-09-30T07:33:46Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/merchant_context.rs"], "core_business": ["crates/router/src/core/payments.rs", "crates/router/src/core/payments/flows.rs", "crates/router/src/core/payments/flows/authorize_flow.rs", "crates/router/src/core/payments/flows/external_proxy_flow.rs", "crates/router/src/core/payments/flows/psync_flow.rs", "crates/router/src/core/payments/flows/setup_mandate_flow.rs", "crates/router/src/core/unified_connector_service.rs"], "other": ["crates/external_services/src/grpc_client.rs", "crates/injector/src/vault_metadata.rs", "crates/router/src/consts.rs"]}, "change_types": {"functions_added": 2, "fields_added": 35, "imports_added": 13}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): add subscription table ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ### Additional Changes - [ ] This PR modifies the API contract - [x] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables ## Description Introduce **Subscriptions** as a first-class entity in the router. This PR adds a `subscription` table, Diesel models, storage interfaces, and query helpers to **create**, **fetch**, and **update** subscription entries keyed by `(merchant_id, customer_id, subscription_id)`. ### What’s included **Database (PostgreSQL)** - New table: `subscription` - Columns: - `id VARCHAR(128) PRIMARY KEY` - `subscription_id VARCHAR(128) NULL` - `billing_processor VARCHAR(128) NULL` - `payment_method_id VARCHAR(128) NULL` - `mca_id VARCHAR(128) NULL` - `client_secret VARCHAR(128) NULL` - `merchant_id VARCHAR(64) NOT NULL` - `customer_id VARCHAR(64) NOT NULL` - `metadata JSONB NULL` - `created_at TIMESTAMP NOT NULL` - `modified_at TIMESTAMP NOT NULL` - Indexes: - `CREATE UNIQUE INDEX merchant_customer_subscription_unique_index ON subscription (merchant_id, customer_id, subscription_id);` **Migrations** - `up.sql` creates the table + unique index - `down.sql` drops the table **Diesel models & schema** - `crates/diesel_models/src/schema.rs`: `subscription` table mapping - `crates/diesel_models/src/subscription.rs`: - `SubscriptionNew` (insert) - `Subscription` (read) - `SubscriptionUpdate` (update: `subscription_id`, `payment_method_id`, `modified_at`) - Query functions: `crates/diesel_models/src/query/subscription.rs` - `SubscriptionNew::insert` - `Subscription::find_by_merchant_id_customer_id_subscription_id` - `Subscription::update_subscription_entry` **Router storage interface** - Trait: `SubscriptionInterface` (`crates/router/src/db/subscription.rs`) - `insert_subscription_entry` - `find_by_merchant_id_customer_id_subscription_id` - `update_subscription_entry` - Implemented for `Store`, `KafkaStore` (delegates), and `MockDb` (stubbed) **Wiring** - Re-exports in `crates/router/src/types/storage.rs` and module plumbing in `db.rs`, `diesel_models/src/lib.rs`, `query.rs`. --- ## Motivation and Context Subscriptions are often provisioned/managed outside Payments, but Payments needs a lightweight mapping to: - Track **billing processor** and connector meta (`mca_id`, `client_secret`) - Attach or rotate **payment_method_id** per subscription - Support **idempotent** reads keyed by merchant & customer context This schema enables upstream orchestration to store/retrieve subscription context without coupling to payment flows. --- ## API / Contract / Config Impact - **DB schema change**: ✅ (new table + unique index) - **API contract**: ❌ (no external API changes in this PR) - **Config/env**: ❌ --- ### Testing can't be performed, as in this PR we only have created the tables and not used it anywhere in the upcoming micro-prs, this will be used. however I have used it myself by making code changes, here are the screenshots. <img width="3456" height="1182" alt="Screenshot 2025-08-26 at 20 31 13" src="https://github.com/user-attachments/assets/320f6b05-74a9-44d2-ad9a-5514431e5ca2" /> <img width="3456" height="998" alt="Screenshot 2025-08-26 at 20 31 38" src="https://github.com/user-attachments/assets/123a55a4-74bd-4aa4-812b-821a0e73caa4" /> ## 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/lib.rs` - `crates/diesel_models/src/query.rs` - `crates/diesel_models/src/query/subscription.rs` - ... and 3 more files **2. Type Definitions** - `crates/router/src/types/storage.rs` - `crates/router/src/types/storage/subscription.rs` **3. Other** - `crates/router/src/db.rs` - `crates/router/src/db/subscription.rs` - `migrations/2025-08-21-110802_add_subcription_table/down.sql` - ... and 1 more files **Code Patterns Applied:** - Define new data structures (3 changes) - Implement new functions (17 changes) - Extend existing types with new fields (72 changes) - Modify database queries (4 changes) **Detailed Identifier Changes:** Commit 144f3852: Files to modify: **crates/diesel_models/src/lib.rs** Add: - mod: pub::subscription **crates/diesel_models/src/query.rs** Add: - mod: pub::subscription **crates/diesel_models/src/query/subscription.rs** Add: - function: pub::insert - function: pub::find_by_merchant_id_subscription_id - function: pub::update_subscription_entry - impl: impl SubscriptionNew - impl: impl Subscription **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** Add: - function: pub::new - function: pub::new - struct: pub::SubscriptionNew - struct: pub::Subscription - struct: pub::SubscriptionUpdate - impl: impl SubscriptionNew - impl: impl SubscriptionUpdate **crates/router/src/db.rs** Add: - mod: pub::subscription **crates/router/src/db/subscription.rs** Add: - function: private::insert_subscription_entry - function: private::find_by_merchant_id_subscription_id - function: private::update_subscription_entry - function: private::insert_subscription_entry - function: private::find_by_merchant_id_subscription_id - function: private::update_subscription_entry - function: private::insert_subscription_entry - function: private::find_by_merchant_id_subscription_id - function: private::update_subscription_entry - trait: pub::SubscriptionInterface - impl: impl SubscriptionInterface for Store - impl: impl SubscriptionInterface for MockDb - impl: impl SubscriptionInterface for KafkaStore **crates/router/src/types/storage.rs** Add: - mod: pub::subscription **crates/router/src/types/storage/subscription.rs** Modify existing code
{"pr_number": 9133, "pr_title": "feat(core): add subscription table", "merged_at": "2025-09-03T13:38:39Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"database": ["crates/diesel_models/src/lib.rs", "crates/diesel_models/src/query.rs", "crates/diesel_models/src/query/subscription.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs", "crates/diesel_models/src/subscription.rs"], "types": ["crates/router/src/types/storage.rs", "crates/router/src/types/storage/subscription.rs"], "other": ["crates/router/src/db.rs", "crates/router/src/db/subscription.rs", "migrations/2025-08-21-110802_add_subcription_table/down.sql", "migrations/2025-08-21-110802_add_subcription_table/up.sql"]}, "change_types": {"structs_added": 3, "functions_added": 17, "fields_added": 72, "imports_added": 17, "database_queries": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(router): add card_discovery in payment_attempt ## 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 card_discovery in payment_attempt Indicates the method by which a card is discovered during a payment, can be used for filtering on dashboard Payments List changes are yet to be done ### 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)? --> Tested Manually 1. Manual Card Payment CURL ``` curl --location '{{BASE_URL}}/payments/{{PAYMENT_ID}}/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: {{API_KEY}}' \ --data '{ "payment_method": "card", "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "01", "card_exp_year": "2099", "card_holder_name": "John Smith", "card_cvc": "100" } }, "payment_method_type": "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" } }' ``` ![image](https://github.com/user-attachments/assets/1f9db7f9-48eb-45c5-8958-994aa2534a62) 2. Saved Card Payment CURL ``` curl --location '{{baseURL}}/payments/{{PAYMENT_ID}}/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: {{API_KEY}}' \ --data '{ "payment_method": "card", "payment_token": "token_uFkgzxCvt8bKy9DPWVU1", "payment_method_type": "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" } }' ``` ![image](https://github.com/user-attachments/assets/8d4562b8-cf00-4690-a88d-13127872710f) 3. ClickToPay Card Payment CURL ``` curl --location '{{BASE_URL}}/payments/{{PAYMENT_ID}}/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: {{API_KEY}}' \ --data '{ "payment_method": "card", "browser_info": { "user_agent": "Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36", "accept_header": "text\/html,application\/xhtml+xml,application\/xml;q=0.9,image\/webp,image\/apng,*\/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "125.0.0.1" }, "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" } }, "ctp_service_details" : { "merchant_transaction_id": "{{merchant_transaction_id}}", "correlation_id": "{{correlation_id}}", "x_src_flow_id" : "{{x_src_flow_id}}" } }' ``` ![image](https://github.com/user-attachments/assets/bdd80e50-986d-4302-877b-5ff9d9537742) ## 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/enums.rs` - `crates/diesel_models/src/payment_attempt.rs` - `crates/diesel_models/src/schema.rs` - ... and 2 more files **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payments/payment_attempt.rs` **3. Core Business Logic** - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/helpers.rs` - `crates/router/src/core/payments/operations/payment_confirm.rs` - ... and 2 more files **4. Type Definitions** - `crates/router/src/types/storage/payment_attempt.rs` - `crates/router/src/types/storage/payment_method.rs` **5. Utils** - `crates/router/src/utils/user/sample_data.rs` **6. Other** - `crates/common_enums/src/enums.rs` - `crates/storage_impl/src/mock_db/payment_attempt.rs` - `crates/storage_impl/src/payments/payment_attempt.rs` - ... and 2 more files **Code Patterns Applied:** - Implement new functions (3 changes) - Extend existing types with new fields (52 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit f225e863: Files to modify: **crates/common_enums/src/enums.rs** Add: - enum: pub::CardDiscovery **crates/diesel_models/src/enums.rs** Modify existing code **crates/diesel_models/src/payment_attempt.rs** Modify existing code **crates/diesel_models/src/schema.rs** Modify existing code **crates/diesel_models/src/schema_v2.rs** Modify existing code **crates/diesel_models/src/user/sample_data.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_attempt.rs** Modify existing code **crates/router/src/core/payments.rs** Add: - function: private::get_card_discovery_for_card_payment_method **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payments/operations/payment_confirm.rs** Modify existing code **crates/router/src/core/payments/operations/payment_create.rs** Modify existing code **crates/router/src/core/payments/retry.rs** Modify existing code **crates/router/src/types/storage/payment_attempt.rs** Modify existing code **crates/router/src/types/storage/payment_method.rs** Add: - function: pub::is_permanent_card **crates/router/src/utils/user/sample_data.rs** Modify existing code **crates/storage_impl/src/mock_db/payment_attempt.rs** Modify existing code **crates/storage_impl/src/payments/payment_attempt.rs** Modify existing code Commit b9aa3ab4: Files to modify: **crates/common_enums/src/enums.rs** Add: - enum: pub::CardDiscovery **crates/diesel_models/src/enums.rs** Modify existing code **crates/diesel_models/src/payment_attempt.rs** Modify existing code **crates/diesel_models/src/schema.rs** Modify existing code **crates/diesel_models/src/schema_v2.rs** Modify existing code **crates/diesel_models/src/user/sample_data.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_attempt.rs** Modify existing code **crates/router/src/core/payments.rs** Add: - function: private::get_card_discovery_for_card_payment_method **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payments/operations/payment_confirm.rs** Modify existing code **crates/router/src/core/payments/operations/payment_create.rs** Modify existing code **crates/router/src/core/payments/retry.rs** Modify existing code **crates/router/src/types/storage/payment_attempt.rs** Modify existing code **crates/router/src/types/storage/payment_method.rs** Add: - function: pub::is_permanent_card **crates/router/src/utils/user/sample_data.rs** Modify existing code **crates/storage_impl/src/mock_db/payment_attempt.rs** Modify existing code **crates/storage_impl/src/payments/payment_attempt.rs** Modify existing code
{"pr_number": 7039, "pr_title": "feat(router): add card_discovery in payment_attempt", "merged_at": "2025-02-04T17:50:02Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"database": ["crates/diesel_models/src/enums.rs", "crates/diesel_models/src/payment_attempt.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs", "crates/diesel_models/src/user/sample_data.rs"], "domain": ["crates/hyperswitch_domain_models/src/payments/payment_attempt.rs"], "core_business": ["crates/router/src/core/payments.rs", "crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/operations/payment_confirm.rs", "crates/router/src/core/payments/operations/payment_create.rs", "crates/router/src/core/payments/retry.rs"], "types": ["crates/router/src/types/storage/payment_attempt.rs", "crates/router/src/types/storage/payment_method.rs"], "utils": ["crates/router/src/utils/user/sample_data.rs"], "other": ["crates/common_enums/src/enums.rs", "crates/storage_impl/src/mock_db/payment_attempt.rs", "crates/storage_impl/src/payments/payment_attempt.rs", "migrations/2025-01-13-060852_add_card_discovery_in_payment_attempt/down.sql", "migrations/2025-01-13-060852_add_card_discovery_in_payment_attempt/up.sql"]}, "change_types": {"functions_added": 3, "enums_added": 1, "fields_added": 52, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 2, "match_method": "pr_number"}
feat(cypress): add last used tests ## 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 adds tests for last used payment method. you can verify the last used based on time stamp since it varies a lot with time. additionally, have added a new config for save card 3ds flow. logic: - create a payment with no 3ds save card and pass off session with customer acceptance - list customer, you should get no 3ds token and payment method id - create a payment with 3ds save card and pass off session with customer acceptance - list customer (3ds token will be at top) - since we did 3ds payment, and performed list customer, token created here will come at the top - create a payment with token (3ds). this requires us to call redirection handler since it goes through 3ds - list customer (change token). forcefully set 2nd token - payment with token (no 3ds). now, the payment goes through no 3ds so, we do not need to call redirection handler here (this itself is the priliminary validation) - list customer, 2nd token will come at the top ### 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). --> me. ## How did you test 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 customer pm when expanded with validations: <img width="569" alt="image" src="https://github.com/user-attachments/assets/e718883e-1223-47ff-b6e8-bbf914e88415" /> full test: <img width="572" alt="image" src="https://github.com/user-attachments/assets/25b055c0-0699-4a68-a448-4e178ba98f36" /> <img width="573" alt="image" src="https://github.com/user-attachments/assets/fda0c3e9-c92e-48d7-925a-3628726b4504" /> also, the 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 `npm run lint` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Tests** - `cypress-tests-v2/cypress/fixtures/business_profile.json` - `cypress-tests/cypress/e2e/configs/Payment/Adyen.js` - `cypress-tests/cypress/e2e/configs/Payment/BankOfAmerica.js` - ... and 17 more files **Code Patterns Applied:** - Extend existing types with new fields (192 changes) - Add conditional logic for feature flags or filtering (14 changes)
{"pr_number": 7310, "pr_title": "feat(cypress): add last used tests", "merged_at": "2025-03-04T11:20:21Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "user"]}, "hierarchy": {"tests": ["cypress-tests-v2/cypress/fixtures/business_profile.json", "cypress-tests/cypress/e2e/configs/Payment/Adyen.js", "cypress-tests/cypress/e2e/configs/Payment/BankOfAmerica.js", "cypress-tests/cypress/e2e/configs/Payment/Commons.js", "cypress-tests/cypress/e2e/configs/Payment/Cybersource.js", "cypress-tests/cypress/e2e/configs/Payment/Fiuu.js", "cypress-tests/cypress/e2e/configs/Payment/Nexixpay.js", "cypress-tests/cypress/e2e/configs/Payment/Noon.js", "cypress-tests/cypress/e2e/configs/Payment/Novalnet.js", "cypress-tests/cypress/e2e/configs/Payment/Paybox.js", "cypress-tests/cypress/e2e/configs/Payment/Paypal.js", "cypress-tests/cypress/e2e/configs/Payment/Stripe.js", "cypress-tests/cypress/e2e/configs/Payment/WorldPay.js", "cypress-tests/cypress/e2e/spec/Payment/00023-PaymentMethods.cy.js", "cypress-tests/cypress/fixtures/merchant-create-body.json", "cypress-tests/cypress/fixtures/merchant-update-body.json", "cypress-tests/cypress/support/commands.js", "cypress-tests/cypress/support/redirectionHandler.js", "cypress-tests/package-lock.json", "cypress-tests/package.json"]}, "change_types": {"fields_added": 192, "conditionals_added": 14}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix: Set headers as optional in ob flows ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Make header data to consume in open banking flows as optional. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Test all open banking flows (PM auth and Payment initiation) Refer to this PR - https://github.com/juspay/hyperswitch/pull/3952 ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/pm_auth.rs` **2. Core Business Logic** - `crates/router/src/core/pm_auth.rs` **3. External Connector Integration** - `crates/pm_auth/src/connector/plaid/transformers.rs` - `crates/router/src/connector/plaid/transformers.rs` **4. Type Definitions** - `crates/pm_auth/src/types.rs` **5. Other** - `.github/CODEOWNERS` - `crates/router/src/routes/pm_auth.rs` **Code Patterns Applied:** - Extend existing types with new fields (6 changes) **Detailed Identifier Changes:** Commit 9576ee37: Files to modify: **crates/api_models/src/pm_auth.rs** Modify existing code **crates/pm_auth/src/connector/plaid/transformers.rs** Modify existing code **crates/pm_auth/src/types.rs** Modify existing code **crates/router/src/connector/plaid/transformers.rs** Modify existing code **crates/router/src/core/pm_auth.rs** Modify existing code **crates/router/src/routes/pm_auth.rs** Modify existing code
{"pr_number": 6305, "pr_title": "fix: Set headers as optional in ob flows", "merged_at": "2024-10-17T09:46:53Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment"]}, "hierarchy": {"api_models": ["crates/api_models/src/pm_auth.rs"], "core_business": ["crates/router/src/core/pm_auth.rs"], "connectors": ["crates/pm_auth/src/connector/plaid/transformers.rs", "crates/router/src/connector/plaid/transformers.rs"], "types": ["crates/pm_auth/src/types.rs"], "other": [".github/CODEOWNERS", "crates/router/src/routes/pm_auth.rs"]}, "change_types": {"fields_added": 6, "imports_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [stripebilling] consume necessary fields in stripe billing from webhooks for transaction monitoring support ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Consuming the following fields in the webhook which will support the transaction monitoring feature further. In stripebilling the subscribed webhook contains an object of that particular invoice. The details needed in the issue are available in the invoice object. Consume Billing address, Retry Count and Next Billing At for the invoice thorugh the webhook and populating in payment intent is the primary goal of this PR. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> To test this follow the steps, follow the steps in this PR #7461. After doing all the steps you can find the billing address in payment intent table for this corresponding record. Retry count and Next Billing time in feature metadata of the same payment intent ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs` **Code Patterns Applied:** - Define new data structures (4 changes) - Implement new functions (2 changes) - Extend existing types with new fields (27 changes) **Detailed Identifier Changes:** Commit d8bbb805: Files to modify: **crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs** Add: - function: private::from - function: private::from - struct: pub::StripebillingWebhookLinesObject - struct: pub::StripebillingWebhookLinesData - struct: pub::StripebillingWebhookLineDataPeriod - struct: pub::StripebillingInvoiceBillingAddress - impl: impl From<StripebillingInvoiceBillingAddress> for api_models::payments::AddressDetails
{"pr_number": 7722, "pr_title": "feat(connector): [stripebilling] consume necessary fields in stripe billing from webhooks for transaction monitoring support", "merged_at": "2025-05-06T07:36:19Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "webhook", "transaction"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/stripebilling/transformers.rs"]}, "change_types": {"structs_added": 4, "functions_added": 2, "fields_added": 27}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(core): add profile_id for default_fallback 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 --> This will refactor the route `routing/default/profile` Previously the output for this route was the default fallback connectors from all the profiles, After this refactor it will have the fallback connectors only for the mentioned profile. If the `profile_id` is provided by the authentication layer, if not it will behave as previous by taking the `merchant_id` from auth layer. Moreover we have removed 2 routes from backed as these were not being used(Dahboard as well as internal apis), hence were redundant. GET `routing/default` POST `routing/default` ### 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). --> Required by our Dashboard to move the api's under profile level ## How did you test 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://127.0.0.1:8080/routing/default/profile' \ --header 'Authorization: Bearer token ``` This should have the connectors from the mentioned profile only. ``` [ { "connector": "bankofamerica", "merchant_connector_id": "mca_ADICIF9zh09TjnpUgusU" } ] ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/routing.rs` **2. Other** - `crates/router/src/routes/app.rs` - `crates/router/src/routes/routing.rs` **Code Patterns Applied:** - Extend existing types with new fields (1 changes) **Detailed Identifier Changes:** Commit 053f8109: Files to modify: **crates/router/src/core/routing.rs** Modify existing code **crates/router/src/routes/app.rs** Modify existing code **crates/router/src/routes/routing.rs** Modify existing code
{"pr_number": 6546, "pr_title": "refactor(core): add profile_id for default_fallback api", "merged_at": "2024-11-18T14:03:58Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["merchant", "connector", "token"]}, "hierarchy": {"core_business": ["crates/router/src/core/routing.rs"], "other": ["crates/router/src/routes/app.rs", "crates/router/src/routes/routing.rs"]}, "change_types": {"fields_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore(environment): [tesouro] update currency environment variables ## 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 --> i initially pushed the changes to [this](https://github.com/juspay/hyperswitch/pull/9706) pr but since it was already in the merge queue, i raised this as a separate pr. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> `config` `loadtest/config` ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> restrict google pay transactions to only usd currency since tesouro only supports usd ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> na, transactions should fail on other currencies, should throw a 4xx. check https://github.com/juspay/hyperswitch/pull/9706 ## 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. Tests** - `config/deployments/integration_test.toml` - `loadtest/config/development.toml` **2. Configuration Files** - `config/config.example.toml` - `config/deployments/production.toml` - `config/deployments/sandbox.toml` - ... and 2 more files
{"pr_number": 9722, "pr_title": "chore(environment): [tesouro] update currency environment variables", "merged_at": "2025-10-08T15:44:43Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["transaction"]}, "hierarchy": {"tests": ["config/deployments/integration_test.toml", "loadtest/config/development.toml"], "config": ["config/config.example.toml", "config/deployments/production.toml", "config/deployments/sandbox.toml", "config/development.toml", "config/docker_compose.toml"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(cypress): Cypress test for ucs ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> added cypress test for ucs by maintaing the flow Closes #8968 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding 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)? --> You can test it with `npm run cypress:ucs` ## 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 ScreenShot of the tests <img width="1728" height="1056" alt="Screenshot 2025-08-18 at 9 15 17 AM" src="https://github.com/user-attachments/assets/20040bb1-c6a1-4158-a387-50c66330bbdd" /> <img width="1728" height="1062" alt="Screenshot 2025-08-18 at 9 15 30 AM" src="https://github.com/user-attachments/assets/809c8e81-0bc4-4d15-a754-aa1a08be7c30" />
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Tests** - `cypress-tests/cypress/e2e/configs/Payment/Authorizedotnet.js` - `cypress-tests/cypress/e2e/configs/Payment/Utils.js` - `cypress-tests/cypress/e2e/spec/UnifiedConnectorService/0001-UCSComprehensiveTest.cy.js` - ... and 2 more files **Code Patterns Applied:** - Extend existing types with new fields (6 changes) - Add conditional logic for feature flags or filtering (1 changes)
{"pr_number": 8967, "pr_title": "feat(cypress): Cypress test for ucs", "merged_at": "2025-09-02T15:36:00Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/configs/Payment/Authorizedotnet.js", "cypress-tests/cypress/e2e/configs/Payment/Utils.js", "cypress-tests/cypress/e2e/spec/UnifiedConnectorService/0001-UCSComprehensiveTest.cy.js", "cypress-tests/cypress/fixtures/merchant-create-body.json", "cypress-tests/cypress/support/commands.js"]}, "change_types": {"fields_added": 6, "conditionals_added": 1}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(errors): Entry not found error as 4xx instead of 5xx ## Type of Change <!-- Put an `x` in the boxes that apply --> - [X] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Hotfix for original PR: [7712](https://github.com/juspay/hyperswitch/pull/7712) A recent change in [this PR](https://github.com/juspay/hyperswitch/pull/7537) removed the usage of DomainStorageError in all the places and started using StorageError everywhere. Previously, DataStorage and RedisError were manually converted into StorageError based on few conditions which was missing in the mentioned PR resulting in resource_not_found being thrown as 5xx instead of 4xx. ``` StorageError::DatabaseError(i) => match i.current_context() { DatabaseError::DatabaseConnectionError => DataStorageError::DatabaseConnectionError, // TODO: Update this error type to encompass & propagate the missing type (instead of generic `db value not found`) DatabaseError::NotFound => { DataStorageError::ValueNotFound(String::from("db value not found")) } // TODO: Update this error type to encompass & propagate the duplicate type (instead of generic `db value not found`) DatabaseError::UniqueViolation => DataStorageError::DuplicateValue { entity: "db entity", key: None, }, err => DataStorageError::DatabaseError(error_stack::report!(*err)), } ``` This PR handles the manual conversion logic for DataStorageError and RedisError ### 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). --> Resource_not_found being thrown as 5xx instead of 4xx <details> <summary>Create a payment with confirm false and try to confirm the payment with invalid publishable key</summary> Request Create a payment curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_KuDhgIFqeK0Qn8YjYAouk6ztEqJnElMO79hYsBooODvx09okKXcmeEj8bUU6mwXq' \ --data-raw '{ "amount": 1000, "currency": "USD", "confirm": false, "capture_method": "automatic", "authentication_type": "no_three_ds", "customer_id": "ad", "profile_id": "pro_3LcIbwh0xcM5yfjgk3ie", "email": "[email protected]", "description": "Hello this is description", "shipping": { "address": { "state": "zsaasdas", "city": "Banglore", "country": "US", "line1": "sdsdfsdf", "line2": "hsgdbhd", "line3": "alsksoe", "zip": "571201", "first_name": "joseph", "last_name": "doe" }, "phone": { "number": "123456789", "country_code": "+1" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "123456789", "country_code": "+1" } }, "setup_future_usage": "off_session", "order_details": null }' confirm the payment with invalid publishable key curl --location 'http://localhost:8080/payments/pay_mBeU1Aorcd7KB81NXAgV/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_42efcc8f61704637b51150f3413a1f8ca' \ --data '{ "payment_method": "card", "payment_method_type": "credit", "client_secret": "pay_mBeU1Aorcd7KB81NXAgV_secret_BC5WU8N6YMeIKOcgm2qH", "profile_id": "pro_3LcIbwh0xcM5yfjgk3ie", "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "CLBRW dffdg", "card_cvc": "737" } }, "payment_type": "new_mandate", "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "125.0.0.1", "user_agent": "amet irure esse" } } }' Confirm Payment Response 500 Internal Server Error { "error": { "type": "api", "message": "Something went wrong", "code": "HE_00" } } </details> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> <details> <summary>Create a payment with confirm false and try to confirm the payment with invalid publishable key</summary> Request Create a payment curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_KuDhgIFqeK0Qn8YjYAouk6ztEqJnElMO79hYsBooODvx09okKXcmeEj8bUU6mwXq' \ --data-raw '{ "amount": 1000, "currency": "USD", "confirm": false, "capture_method": "automatic", "authentication_type": "no_three_ds", "customer_id": "ad", "profile_id": "pro_3LcIbwh0xcM5yfjgk3ie", "email": "[email protected]", "description": "Hello this is description", "shipping": { "address": { "state": "zsaasdas", "city": "Banglore", "country": "US", "line1": "sdsdfsdf", "line2": "hsgdbhd", "line3": "alsksoe", "zip": "571201", "first_name": "joseph", "last_name": "doe" }, "phone": { "number": "123456789", "country_code": "+1" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "123456789", "country_code": "+1" } }, "setup_future_usage": "off_session", "order_details": null }' confirm the payment with invalid publishable key curl --location 'http://localhost:8080/payments/pay_sdeU1Aorcd7KB81NXASD/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_42efcc8f61704637b51150f3413a1f8ca' \ --data '{ "payment_method": "card", "payment_method_type": "credit", "client_secret": "pay_sdeU1Aorcd7KB81NXASD_secret_BC5WU8N6YMeIKOcgm2qH", "profile_id": "pro_3LcIbwh0xcM5yfjgk3ie", "payment_method_data": { "card": { "card_number": "4111111111111111", "card_exp_month": "03", "card_exp_year": "2030", "card_holder_name": "CLBRW dffdg", "card_cvc": "737" } }, "payment_type": "new_mandate", "customer_acceptance": { "acceptance_type": "offline", "accepted_at": "1963-05-03T04:07:52.723Z", "online": { "ip_address": "125.0.0.1", "user_agent": "amet irure esse" } } }' Confirm Payment Response 401 Unathorized { "error": { "type": "invalid_request", "message": "API key not provided or invalid API key used", "code": "IR_01" } } </details> <details> <summary>Retrieve invalid payment id</summary> Request curl --location 'http://localhost:8080/payments/pay_FgG1La2kxeukSzIHUl8ns' \ --header 'Accept: application/json' \ --header 'x-feature: router-custom-dbd' \ --header 'api-key: dev_r6d1taIlStKeCplYDnDuPFrDT3Be1ZDq6pf0fTOOXioRoIi2pSOF5Jc8kzJJqNdz' Response 404 Not found { "error": { "type": "invalid_request", "message": "Payment does not exist in our records", "code": "HE_02" } } </details> <details> <summary>Retrieve invalid refund id</summary> Request curl --location 'http://localhost:8080/refunds/ref_kL0UzbPptCK3qZLXH6KO' \ --header 'Accept: application/json' \ --header 'api-key: dev_r6d1taIlStKeCplYDnDuPFrDT3Be1ZDq6pf0fTOOXioRoIi2pSOF5Jc8kzJJqNdz' Response 404 Not found { "error": { "type": "invalid_request", "message": "Refund does not exist in our records.", "code": "HE_02" } } </details> <details> <summary>Retrieve invalid merchant id</summary> Request curl --location 'http://localhost:8080/accounts/merchant_1743660591s' \ --header 'Accept: application/json' \ --header 'api-key: test_admin' Response 404 Not found { "error": { "type": "invalid_request", "message": "Merchant account does not exist in our records", "code": "HE_02" } } </details> <details> <summary>Retrieve customers using invalid API key</summary> Request curl --location 'http://localhost:8080/customers/list' \ --header 'Accept: application/json' \ --header 'api-key: dev_r6d1taIlStKeCplYDnDuPFrDT3Be1ZDq6pf0fTOOXioRoIi2pSOF5Jc8kzJJqNdz' Response 401 Unauthorized { "error": { "type": "invalid_request", "message": "API key not provided or invalid API key used", "code": "IR_01" } } </details> <details> <summary>Retrieve session tokens using invalid Publishable key</summary> Request curl --location 'http://localhost:8080/payments/session_tokens' \ --header 'accept: */*' \ --header 'accept-language: en-GB,en-US;q=0.9,en;q=0.8' \ --header 'api-key: pk_dev_b72a47690f4f4a95a8a447b8221b5370s' \ --header 'x-browser-name: Chrome' \ --header 'x-browser-version: 127.0.0' \ --header 'x-client-platform: web' \ --header 'x-client-version: 0.91.7' \ --header 'x-merchant-domain: www-merchant.com' \ --header 'x-payment-confirm-source: sdk' \ --data '{ "payment_id": "pay_pZNPfQY46nMLV5X225oW", "client_secret": "pay_pZNPfQY46nMLV5X225oW_secret_wrQsBzqleBKnhoOu3bLR", "wallets": [], "delayed_session_token": false }' Response 401 Unauthorized { "error": { "type": "invalid_request", "message": "API key not provided or invalid API key used", "code": "IR_01" } } </details> <details> <summary>Retrieve merchant account payment methods using invalid Publishable key</summary> Request curl --location 'http://localhost:8080/account/payment_methods?client_secret=pay_pZNPfQY46nMLV5X225oW_secret_wrQsBzqleBKnhoOu3bLR' \ --header 'accept: */*' \ --header 'accept-language: en-GB,en-US;q=0.9,en;q=0.8' \ --header 'api-key: pk_dev_b72a47690f4f4a95a8a447b8221b5370s' \ --header 'content-type: application/json' \ --header 'priority: u=1, i' \ --header 'sec-ch-ua: "Not)A;Brand";v="99", "Google Chrome";v="127", "Chromium";v="127"' \ --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/127.0.0.0 Safari/537.36' \ --header 'x-browser-name: Chrome' \ --header 'x-browser-version: 127.0.0' \ --header 'x-client-platform: web' \ --header 'x-client-version: 0.91.7' \ --header 'x-payment-confirm-source: sdk' Response 401 Unauthorized { "error": { "type": "invalid_request", "message": "API key not provided or invalid API key used", "code": "IR_01" } } </details> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Other** - `crates/storage_impl/src/errors.rs` **Code Patterns Applied:** - Extend existing types with new fields (2 changes) **Detailed Identifier Changes:** Commit 00a8487b: Files to modify: **crates/storage_impl/src/errors.rs** Modify existing code
{"pr_number": 7763, "pr_title": "fix(errors): Entry not found error as 4xx instead of 5xx", "merged_at": "2025-04-08T11:47:39Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"other": ["crates/storage_impl/src/errors.rs"]}, "change_types": {"fields_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(router): [V2] Return connector customer reference IDs in `CustomerResponse` ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Add a field `connector_customer` to `CustomerResponse` that contains a map between `MerchantConnectorAccountId` and connector customer id ### Additional Changes - [x] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> From #7246: > with respect to the multi-use tokens that were created with Stripe (support added in #7106), the payment methods were created on Stripe's end, but were not associated with a customer, due to which they could not be used to make transactions again, we used to receive such an error: ```text The provided PaymentMethod cannot be attached. To reuse a PaymentMethod, you must attach it to a Customer first. ``` > To address this, we have to create a customer on Stripe's end first, and then pass Stripe's customer ID when saving the payment method with Stripe. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> - Request: ``` curl --location 'http://localhost:8080/v2/customers/12345_cus_01951dbc16d57d03ac193a7e297d4899' \ --header 'x-profile-id: pro_Vb32qOaqvkJClXH7aNWK' \ --header 'Authorization: api-key=dev_f4mNrhkUeCtLcsqUaG1fpzHpqTCnPdJMBSPNZAP2nWwwr7FRYtbj1RUdWBPKBKZ0' \ --header 'api-key: dev_f4mNrhkUeCtLcsqUaG1fpzHpqTCnPdJMBSPNZAP2nWwwr7FRYtbj1RUdWBPKBKZ0' ``` - Response: ```json { "id": "12345_cus_01951dbc16d57d03ac193a7e297d4899", "merchant_reference_id": "customer_1739960621", "connector_customer": { "mca_hwySG2NtpzX0qr7toOy8": "cus_Rnm2pDKGyQi506" }, "name": "John Doe", "email": "[email protected]", "phone": "999999999", "phone_country_code": "+65", "description": "First customer", "default_billing_address": null, "default_shipping_address": null, "created_at": "2025-02-19T10:23:40.758Z", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "default_payment_method_id": null } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/Cargo.toml` - `crates/api_models/src/customers.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/customers.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/customer.rs` **4. Type Definitions** - `crates/common_types/src/customers.rs` - `crates/common_types/src/lib.rs` - `crates/router/src/types/api/customers.rs` **5. Other** - `api-reference-v2/openapi_spec.json` **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (2 changes) - Extend existing types with new fields (8 changes) **Detailed Identifier Changes:** Commit aedf460c: Files to modify: **crates/api_models/src/customers.rs** Modify existing code **crates/common_types/src/customers.rs** Add: - function: private::deref - function: private::deref_mut - struct: pub::ConnectorCustomerMap - impl: impl std::ops::Deref for ConnectorCustomerMap - impl: impl std::ops::DerefMut for ConnectorCustomerMap **crates/common_types/src/lib.rs** Add: - mod: pub::customers **crates/diesel_models/src/customers.rs** Remove: - function: private::deref - function: private::deref_mut - struct: pub::ConnectorCustomerMap - impl: impl std::ops::Deref for ConnectorCustomerMap - impl: impl std::ops::DerefMut for ConnectorCustomerMap **crates/hyperswitch_domain_models/src/customer.rs** Modify existing code **crates/router/src/types/api/customers.rs** Modify existing code
{"pr_number": 7319, "pr_title": "feat(router): [V2] Return connector customer reference IDs in `CustomerResponse`", "merged_at": "2025-03-21T13:58:53Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/Cargo.toml", "crates/api_models/src/customers.rs"], "database": ["crates/diesel_models/src/customers.rs"], "domain": ["crates/hyperswitch_domain_models/src/customer.rs"], "types": ["crates/common_types/src/customers.rs", "crates/common_types/src/lib.rs", "crates/router/src/types/api/customers.rs"], "other": ["api-reference-v2/openapi_spec.json"]}, "change_types": {"structs_added": 1, "functions_added": 2, "fields_added": 8}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(wasm): remove extra space from wasm for payment_method_type of JPMorgan ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description remove extra space from wasm for payment_method_type of JPMorgan ### 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? No test required as only wasm changes are done in this PR <!-- 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": 6923, "pr_title": "fix(wasm): remove extra space from wasm for payment_method_type of JPMorgan", "merged_at": "2024-12-23T14:42: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"}
feat(connector): [STRIPE] Add Incremental Authorization 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/8633) ## Description <!-- Describe your changes in detail --> Added Incremental Authorization Flow in 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). --> [8633](https://github.com/juspay/hyperswitch/issues/8633) ## How did you test 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. Payments - Create Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_GO27IMaWkZPcdQp7NA8uYvMJowN0WzpbyqEGtW7L3fxAtXZzCzy60mIZTzOjGon1' \ --data-raw ' { "amount": 1000, "currency": "USD", "confirm": true, "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 1000, "customer_id": "StripeCustomer", "email": "[email protected]", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "billing": { "address": { "first_name": "John", "last_name": "Doe", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "AT" } }, "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "12", "card_exp_year": "2026", "card_holder_name": "joseph Doe", "card_cvc": "123" } }, "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "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" }, "request_incremental_authorization": true }' ``` Response: ``` { "payment_id": "pay_jQwvRdxooT7YhHSEvann", "merchant_id": "merchant_1751975048", "status": "requires_capture", "amount": 1000, "net_amount": 1000, "shipping_cost": null, "amount_capturable": 1000, "amount_received": 0, "connector": "stripe", "client_secret": "pay_jQwvRdxooT7YhHSEvann_secret_tjC9HRIfeD3ku1ILRS8Y", "created": "2025-07-08T11:44:25.513Z", "currency": "USD", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "[email protected]", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2026", "card_holder_name": "joseph Doe", "payment_checks": { "cvc_check": "pass", "address_line1_check": "pass", "address_postal_code_check": "pass" }, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "John", "last_name": "Doe" }, "phone": null, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "AT", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "John", "last_name": "Doe" }, "phone": null, "email": null }, "order_details": null, "email": "[email protected]", "name": "John Doe", "phone": "999999999", "return_url": "https://duck.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "StripeCustomer", "created_at": 1751975065, "expires": 1751978665, "secret": "epk_4ce25909189e412389f732e1cd91ce49" }, "manual_retry_allowed": false, "connector_transaction_id": "pi_3RiZwnE9cSvqiivY0jq3K45T", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "pi_3RiZwnE9cSvqiivY0jq3K45T", "payment_link": null, "profile_id": "pro_fql6hf5I69zMoOLyp0gP", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_qTfdo4iBwxJFmMDXJwLD", "incremental_authorization_allowed": true, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-08T11:59:25.513Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "127.0.0.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-08T11:44:30.290Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "whole_connector_response": null } ``` 2. Incremental Authorization Request: ``` curl --location 'http://localhost:8080/payments/pay_jQwvRdxooT7YhHSEvann/incremental_authorization' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_GO27IMaWkZPcdQp7NA8uYvMJowN0WzpbyqEGtW7L3fxAtXZzCzy60mIZTzOjGon1' \ --data '{ "amount": 6540, "reason": "customer bought new products" }' ``` Response: ``` { "payment_id": "pay_jQwvRdxooT7YhHSEvann", "merchant_id": "merchant_1751975048", "status": "requires_capture", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 6540, "amount_received": 0, "connector": "stripe", "client_secret": "pay_jQwvRdxooT7YhHSEvann_secret_tjC9HRIfeD3ku1ILRS8Y", "created": "2025-07-08T11:44:25.513Z", "currency": "USD", "customer_id": null, "customer": { "id": null, "name": "John Doe", "email": "[email protected]", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": "card", "payment_method_data": { "card": { "last4": "4242", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2026", "card_holder_name": "joseph Doe", "payment_checks": { "cvc_check": "pass", "address_line1_check": "pass", "address_postal_code_check": "pass" }, "authentication_data": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": null, "name": null, "phone": null, "return_url": "https://duck.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": null, "manual_retry_allowed": false, "connector_transaction_id": "pi_3RiZwnE9cSvqiivY0jq3K45T", "frm_message": null, "metadata": { "udf1": "value1", "login_date": "2019-09-10T10:11:12Z", "new_customer": "true" }, "connector_metadata": null, "feature_metadata": null, "reference_id": "pi_3RiZwnE9cSvqiivY0jq3K45T", "payment_link": null, "profile_id": "pro_fql6hf5I69zMoOLyp0gP", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_qTfdo4iBwxJFmMDXJwLD", "incremental_authorization_allowed": true, "authorization_count": 1, "incremental_authorizations": [ { "authorization_id": "auth_qIHwnbG3etLwlil1piKr_1", "amount": 6540, "status": "success", "error_code": null, "error_message": null, "previously_authorized_amount": 1000 } ], "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-07-08T11:59:25.513Z", "fingerprint": null, "browser_info": { "language": "nl-NL", "time_zone": 0, "ip_address": "127.0.0.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "color_depth": 24, "java_enabled": true, "screen_width": 1536, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "screen_height": 723, "java_script_enabled": true }, "payment_method_id": null, "payment_method_status": null, "updated": "2025-07-08T11:44:36.093Z", "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 } ``` Cypress test screenshot: <img width="598" height="399" alt="Screenshot 2025-07-28 at 3 42 50 PM" src="https://github.com/user-attachments/assets/41928a7b-7f92-4165-a8a9-d2829e59b1cf" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/payments/transformers.rs` **2. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/stripe.rs` - `crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs` - `crates/hyperswitch_connectors/src/default_implementations.rs` **3. Tests** - `.github/workflows/cypress-tests-runner.yml` - `cypress-tests/cypress/e2e/configs/Payment/Stripe.js` - `cypress-tests/cypress/e2e/configs/Payment/Utils.js` **4. Other** - `api-reference/v2/openapi_spec_v2.json` - `crates/common_enums/src/enums.rs` **Code Patterns Applied:** - Define new data structures (2 changes) - Implement new functions (16 changes) - Extend existing types with new fields (37 changes) **Detailed Identifier Changes:** Commit e36bb99d: Files to modify: **crates/common_enums/src/enums.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/stripe.rs** Add: - function: private::get_headers - function: private::get_http_method - 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 PaymentIncrementalAuthorization for Stripe - impl: impl ConnectorIntegration< IncrementalAuthorization, PaymentsIncrementalAuthorizationData, PaymentsResponseData, > for Stripe **crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs** Add: - function: private::get_request_incremental_authorization - function: private::get_request_incremental_authorization - function: private::get_request_incremental_authorization - function: private::from - function: private::try_from - struct: pub::StripeIncrementalAuthRequest - enum: pub::StripeRequestIncrementalAuthorization - trait: private::GetRequestIncrementalAuthorization - impl: impl GetRequestIncrementalAuthorization for PaymentsAuthorizeData - impl: impl GetRequestIncrementalAuthorization for PaymentsCaptureData - impl: impl GetRequestIncrementalAuthorization for PaymentsCancelData - impl: impl From<StripePaymentStatus> for common_enums::AuthorizationStatus - impl: impl TryFrom< ResponseRouterData< F, PaymentIntentResponse, PaymentsIncrementalAuthorizationData, PaymentsResponseData, >, > for RouterData<F, PaymentsIncrementalAuthorizationData, PaymentsResponseData> **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code
{"pr_number": 8569, "pr_title": "feat(connector): [STRIPE] Add Incremental Authorization Flow", "merged_at": "2025-08-12T07:11:31Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/transformers.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/stripe.rs", "crates/hyperswitch_connectors/src/connectors/stripe/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs"], "tests": [".github/workflows/cypress-tests-runner.yml", "cypress-tests/cypress/e2e/configs/Payment/Stripe.js", "cypress-tests/cypress/e2e/configs/Payment/Utils.js"], "other": ["api-reference/v2/openapi_spec_v2.json", "crates/common_enums/src/enums.rs"]}, "change_types": {"structs_added": 2, "functions_added": 16, "enums_added": 1, "fields_added": 37}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [checkout] Add AVS, CVV check in the response ## 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 avs_check and cvv_check in the response. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- 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="1180" height="921" alt="Screenshot 2025-09-15 at 7 20 15 PM" src="https://github.com/user-attachments/assets/5f4c615d-d5b8-4f21-b096-11e5bb0c31eb" /> Request: ``` { "amount": 100, "currency": "USD", "confirm": true, "customer_id": "c112", "return_url": "https://www.google.com", "capture_method": "automatic", "payment_method": "card", "payment_method_type": "credit", "all_keys_required": true, "authentication_type": "no_three_ds", "description": "hellow world", "billing": { "address": { "zip": "560095", "country": "US", "first_name": "Sakil", "last_name": "Mostak", "line1": "Fasdf", "line2": "Fasdf", "city": "Fasdf" } }, "browser_info": { "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "ip_address": "192.168.1.1", "java_enabled": false, "java_script_enabled": true, "language": "en-US", "color_depth": 24, "screen_height": 1080, "screen_width": 1920, "time_zone": 330, "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36" }, "email": "[email protected]", "payment_method_data": { "card": { // "card_number": "2221008123677736", "card_number": "5137210000000158", "card_exp_month": "12", "card_exp_year": "2030", "card_holder_name": "CL-BRW2", "card_cvc": "217" } } } ``` Response: ``` { "payment_id": "pay_CkETtsS9bvmfVOdesetA", "merchant_id": "merchant_1758113993", "status": "succeeded", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 0, "amount_received": 100, "connector": "checkout", "client_secret": "pay_CkETtsS9bvmfVOdesetA_secret_HEwHkgYEGxFFT0PqBxgo", "created": "2025-09-17T13:11:26.074Z", "currency": "USD", "customer_id": "c112", "customer": { "id": "c112", "name": null, "email": "[email protected]", "phone": null, "phone_country_code": null }, "description": "hellow world", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "card", "payment_method_data": { "card": { "last4": "0158", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "513721", "card_extended_bin": null, "card_exp_month": "12", "card_exp_year": "2030", "card_holder_name": "CL-BRW2", "payment_checks": { "avs_result": "S", "card_validation_result": "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": "[email protected]", "name": null, "phone": null, "return_url": "https://www.google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "credit", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "c112", "created_at": 1758114685, "expires": 1758118285, "secret": "epk_449ee9c90e1744c79c4cb26fae1b1d38" }, "manual_retry_allowed": null, "connector_transaction_id": "pay_efcoaxnyzbaurfg2rumyb7eb5a", "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_CkETtsS9bvmfVOdesetA_1", "payment_link": null, "profile_id": "pro_MubyPpubb0zvhXbeuo54", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_8nNeleYg965YyJdoWq9R", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-09-17T13:26:26.073Z", "fingerprint": null, "browser_info": { "language": "en-US", "time_zone": 330, "ip_address": "192.168.1.1", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36", "color_depth": 24, "java_enabled": false, "screen_width": 1920, "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "screen_height": 1080, "java_script_enabled": true }, "payment_channel": null, "payment_method_id": null, "network_transaction_id": "190287459510253", "payment_method_status": null, "updated": "2025-09-17T13:11:28.548Z", "split_payments": null, "frm_metadata": null, "extended_authorization_applied": null, "capture_before": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null, "card_discovery": "manual", "force_3ds_challenge": false, "force_3ds_challenge_trigger": false, "issuer_error_code": null, "issuer_error_message": null, "is_iframe_redirection_enabled": null, "enable_partial_authorization": null, "enable_overcapture": null, "is_overcapture_enabled": null, "network_details": null } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs` **2. Tests** - `cypress-tests/cypress/e2e/configs/Payment/Checkout.js` - `cypress-tests/cypress/e2e/configs/Payment/Modifiers.js` **Code Patterns Applied:** - Implement new functions (1 changes) - Extend existing types with new fields (17 changes) **Detailed Identifier Changes:** Commit a05827e0: Files to modify: **crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs** Add: - function: private::convert_to_additional_payment_method_connector_response
{"pr_number": 9389, "pr_title": "fix(connector): [checkout] Add AVS, CVV check in the response", "merged_at": "2025-09-18T07:32:25Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/checkout/transformers.rs"], "tests": ["cypress-tests/cypress/e2e/configs/Payment/Checkout.js", "cypress-tests/cypress/e2e/configs/Payment/Modifiers.js"]}, "change_types": {"functions_added": 1, "fields_added": 17}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): added force_3ds_challenge for decoupled txns ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] New feature ## Description <!-- Describe your changes in detail --> Added force_3ds_challenge flag in payments request for decoupled txns. Previously `force_3ds_challenge` flag was a business_profile property, but now we will priortise flag send in payments request over business_profile. add two new fields in payment_create response `force_3ds_challenge`, `force_3ds_challenge_trigger` ## How did you test 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 doing a netcetera txns by updating business profile `force_3ds_challenge` as `true` For validation you can check connector request logs ```shell curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_skofCKwuzyPyyjl4YCBQJS0fVb0YwOtqBisHGo3PCtFmrCTURvcAaOVzGA7Oom6a' \ --data-raw ' { "amount": 100, "currency": "PLN", "confirm": true, "email": "[email protected]", "return_url": "https://google.com", "payment_method": "card", "payment_method_data": { "card": { "card_number": "5512459816707531", "card_exp_month": "04", "card_exp_year": "2029", "card_holder_name": "John Smith", "card_cvc": "238", "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" }, "request_external_three_ds_authentication": true, "authentication_type": "three_ds", } ' ``` force_3ds_challenge: true <img width="1694" alt="Screenshot 2025-03-13 at 12 55 44 PM" src="https://github.com/user-attachments/assets/7482729f-412d-4188-819f-31b2492aa989" /> now try overriding the value set in business profile `force_3ds_challenge` as false in payment create ```shell curl --location 'localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_Ghv3WFaXE8YXowo77WnQpMoIXsVtC0DcMfnowobAIkIkStzxVMXdTF6Li7SJoyWM' \ --data-raw '{ "amount": 6540, "currency": "USD", "confirm": false, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "StripeCustomer", "email": "[email protected]", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://duck.com", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" }, "phone": { "number": "123456789", "country_code": "12" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" }, "phone": { "number": "123456789", "country_code": "12" } }, "request_external_three_ds_authentication": true, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "force_3ds_challenge": false }' ``` force_3ds_challenge: false <img width="1589" alt="Screenshot 2025-03-13 at 12 56 49 PM" src="https://github.com/user-attachments/assets/361e0f41-54eb-4906-a90c-a457c5f4b355" /> Payment Create Response ```shell { "payment_id": "pay_N5VoouQEnkDL6bx8yxeu", "merchant_id": "sahkal", "status": "requires_payment_method", "amount": 6540, "net_amount": 6540, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_N5VoouQEnkDL6bx8yxeu_secret_8bFLGPv5ymU16mal9Qew", "created": "2025-03-23T20:17:16.893Z", "currency": "USD", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "[email protected]", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": null, "payment_method_data": null, "payment_token": null, "shipping": { "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": { "number": "123456789", "country_code": "12" }, "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": null }, "phone": { "number": "123456789", "country_code": "12" }, "email": null }, "order_details": null, "email": "[email protected]", "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": null, "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": 1742761036, "expires": 1742764636, "secret": "epk_c714e3ec07cf4c27844cd37561dfe854" }, "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_sc0RRAwEw4IuLCnHqvZ9", "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-03-23T20:32:16.893Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-03-23T20:17:16.952Z", "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 } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **payment** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/admin.rs` - `crates/api_models/src/payments.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/payment_intent.rs` - `crates/diesel_models/src/schema.rs` - `crates/diesel_models/src/schema_v2.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payments.rs` - `crates/hyperswitch_domain_models/src/payments/payment_intent.rs` - `crates/hyperswitch_domain_models/src/revenue_recovery.rs` **4. Core Business Logic** - `crates/router/src/core/payment_methods.rs` - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/helpers.rs` - ... and 5 more files **5. Utils** - `crates/router/src/utils/user/sample_data.rs` **6. Tests** - `crates/router/tests/payments.rs` - `crates/router/tests/payments2.rs` **7. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - `crates/openapi/src/openapi.rs` - ... and 5 more files **Code Patterns Applied:** - Extend existing types with new fields (89 changes) **Detailed Identifier Changes:** Commit c245ece1: Files to modify: **crates/api_models/src/admin.rs** Modify existing code **crates/api_models/src/payments.rs** Modify existing code **crates/diesel_models/src/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/payments.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_intent.rs** Modify existing code **crates/hyperswitch_domain_models/src/revenue_recovery.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** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Modify existing code **crates/router/src/core/payments/operations/payment_confirm.rs** Modify existing code **crates/router/src/core/payments/operations/payment_create.rs** Modify existing code **crates/router/src/core/payments/operations/payment_update.rs** Modify existing code **crates/router/src/core/payments/operations/payment_update_intent.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Modify existing code **crates/router/src/utils/user/sample_data.rs** Modify existing code **crates/router/tests/payments.rs** Modify existing code **crates/router/tests/payments2.rs** Modify existing code
{"pr_number": 7484, "pr_title": "feat(core): added force_3ds_challenge for decoupled txns", "merged_at": "2025-04-07T09:25:16Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/admin.rs", "crates/api_models/src/payments.rs"], "database": ["crates/diesel_models/src/payment_intent.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs"], "domain": ["crates/hyperswitch_domain_models/src/payments.rs", "crates/hyperswitch_domain_models/src/payments/payment_intent.rs", "crates/hyperswitch_domain_models/src/revenue_recovery.rs"], "core_business": ["crates/router/src/core/payment_methods.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/payments/helpers.rs", "crates/router/src/core/payments/operations/payment_confirm.rs", "crates/router/src/core/payments/operations/payment_create.rs", "crates/router/src/core/payments/operations/payment_update.rs", "crates/router/src/core/payments/operations/payment_update_intent.rs", "crates/router/src/core/payments/transformers.rs"], "utils": ["crates/router/src/utils/user/sample_data.rs"], "tests": ["crates/router/tests/payments.rs", "crates/router/tests/payments2.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/openapi/src/openapi.rs", "crates/openapi/src/openapi_v2.rs", "migrations/2025-03-11-171330_add-force-3ds-challenge-in-payment-intent/down.sql", "migrations/2025-03-11-171330_add-force-3ds-challenge-in-payment-intent/up.sql", "migrations/2025-03-20-085151_force-3ds-challenge-triggered/down.sql", "migrations/2025-03-20-085151_force-3ds-challenge-triggered/up.sql"]}, "change_types": {"fields_added": 89}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor: add result type for Program ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description This PR refactors the conversion from `ast::Program<ConnectorSelection>` to internal `Program` by introducing a fallible `TryFrom` implementation instead of an infallible `From`. This enables proper error propagation and logging during DSL conversion failures. Supporting conversion functions (`convert_rule`, `convert_if_stmt`, `convert_comparison`, `convert_value`) now return `RoutingResult<T>` instead of plain values, allowing fine-grained error handling throughout the conversion pipeline. Also, the `core/routing.rs` logic has been updated to handle these errors gracefully by logging and skipping invalid programs during routing algorithm creation. --- ## Outcomes - Adds **robust error handling** for AST-to-internal structure conversion. - Improves **diagnostic logging** on conversion failures. - Prevents invalid DSL programs from entering routing configuration. - Adheres to idiomatic Rust usage with `TryFrom` and `Result`. --- ## Diff Hunk Explanation ### `crates/router/src/core/payments/routing/utils.rs` - Changed `impl From<ast::Program<ConnectorSelection>> for Program` to `TryFrom`, enabling `Result`-based error handling. - Functions `convert_rule`, `convert_if_stmt`, `convert_comparison`, and `convert_value` were updated to return `RoutingResult<T>`. - Explicit handling of unsupported `ValueType` variants in `convert_value` with an appropriate `RoutingError`. ### `crates/router/src/core/routing.rs` - Replaced direct `.into()` conversion with a `match` on `try_into()` to handle errors without panicking. - Logs any conversion errors using `logger::error!` and `logger::debug!`. - Ensures that the creation of routing algorithms is skipped if DSL conversion fails. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ``` curl --location 'http://127.0.0.1:8080/routing' \ --header 'Content-Type: application/json' \ --header 'api-key: dev_IpYFqCd4DHf7x4ER1GBQrW0mHOZzam3pYyuP2tSRb6q7qvTw7jvEjF7UzjwFPXWu' \ --data ' { "name": "Priority rule with fallback", "description": "It is my ADVANCED config", "profile_id": "pro_INSNcGnV7dSldWXpW1GE", "algorithm": { "type": "advanced", "data": { "defaultSelection": { "type": "priority", "data": [ { "connector": "stripe", "merchant_connector_id": "mca_gtMC3BG1m6YTX0j8hwUU" } ] }, "rules": [ { "name": "cybersource first", "connectorSelection": { "type": "priority", "data": [ { "connector": "stripe", "merchant_connector_id": "mca_gtMC3BG1m6YTX0j8hwUU" } ] }, "statements": [ { "condition": [ { "lhs": "billing_country", "comparison": "equal", "value": { "type": "enum_variant", "value": "Netherlands" }, "metadata": {} }, { "lhs": "amount", "comparison": "greater_than", "value": { "type": "number_array", "value": [1000,2000] }, "metadata": {} } ], "nested": null } ] } ], "metadata": {} } } } ' ``` Response: ``` { "id": "routing_Ti6HxelZEfdijoVSPNXA", "profile_id": "pro_INSNcGnV7dSldWXpW1GE", "name": "Priority rule with fallback", "kind": "advanced", "description": "It is my ADVANCED config", "created_at": 1748515295, "modified_at": 1748515295, "algorithm_for": "payment", "decision_engine_routing_id": null } ``` The log should have this error type. <img width="1453" alt="Screenshot 2025-05-29 at 16 12 03" src="https://github.com/user-attachments/assets/a9001b64-e4ef-44ee-bc9d-63b66552971f" /> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **payment** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/payments/routing/utils.rs` - `crates/router/src/core/routing.rs` **Code Patterns Applied:** - Implement new functions (5 changes) - Extend existing types with new fields (11 changes) **Detailed Identifier Changes:** Commit 261818f2: Files to modify: **crates/router/src/core/payments/routing/utils.rs** Remove: - function: private::convert_if_stmt **crates/router/src/core/routing.rs** Modify existing code
{"pr_number": 8179, "pr_title": "refactor: add result type for Program", "merged_at": "2025-06-12T11:32:38Z", "intent": {"feature_type": "payment", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/routing/utils.rs", "crates/router/src/core/routing.rs"]}, "change_types": {"functions_added": 5, "fields_added": 11, "imports_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(webhooks): mask custom outgoing webhook headers in profile response ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Mask custom outgoing webhook headers in profile response. This changes is required to mask the custom outgoing webhook headers in the profile dashboard. This also requires control center changes, BE changes will only be merged and deployed after dashboard changes. ### 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 : Profile create ``` curl --location 'http://localhost:8080/account/merchant_1733900220/business_profile' \ --header 'Content-Type: application/json' \ --header 'api-key: ••••••' \ --data-raw '{ "profile_name" : "test_profile1", "webhook_details": { "webhook_url": "https://webhook.site/672f0697-9e14-4a49-abef-b15769c19962", "webhook_version": "1.0.1", "webhook_username": "ekart_retail", "webhook_password": "password_ekart@123", "payment_created_enabled": true, "payment_succeeded_enabled": true, "payment_failed_enabled": true }, "outgoing_webhook_custom_http_headers": { "authentication": "this is test key header", "test_key": "asd", "client_key": "asdkfjhakdjh" } }' ``` Response ``` { "merchant_id": "merchant_1733900220", "profile_id": "pro_nvV4ljCmGfPnUiRbjjMW", "profile_name": "test_profile1", "return_url": "https://google.com/success", "enable_payment_response_hash": true, "payment_response_hash_key": "IurVIL6k065SRjO2TWHcx6cf2mQCWO1SKf1tep6AZ79XBFBcLJFvsfpZ3JWRkxHy", "redirect_to_merchant_with_http_post": false, "webhook_details": { "webhook_version": "1.0.1", "webhook_username": "ekart_retail", "webhook_password": "password_ekart@123", "webhook_url": "https://webhook.site/672f0697-9e14-4a49-abef-b15769c19962", "payment_created_enabled": true, "payment_succeeded_enabled": true, "payment_failed_enabled": true }, "metadata": null, "routing_algorithm": null, "intent_fulfillment_time": 900, "frm_routing_algorithm": null, "payout_routing_algorithm": null, "applepay_verified_domains": null, "session_expiry": 900, "payment_link_config": null, "authentication_connector_details": null, "use_billing_as_payment_method_billing": true, "extended_card_info_config": null, "collect_shipping_details_from_wallet_connector": false, "collect_billing_details_from_wallet_connector": false, "always_collect_shipping_details_from_wallet_connector": false, "always_collect_billing_details_from_wallet_connector": false, "is_connector_agnostic_mit_enabled": false, "payout_link_config": null, "outgoing_webhook_custom_http_headers": { "authentication": "th*******************er", "test_key": "***", "client_key": "as********jh" }, "tax_connector_id": null, "is_tax_connector_enabled": false, "is_network_tokenization_enabled": false, "is_auto_retries_enabled": false, "max_auto_retries_enabled": null, "is_click_to_pay_enabled": false } ``` Profile update request ``` curl --location 'http://localhost:8080/account/merchant_1733900220/business_profile/pro_nvV4ljCmGfPnUiRbjjMW' \ --header 'Content-Type: application/json' \ --header 'api-key: ••••••' \ --data '{ "profile_name" : "test_profile1", "outgoing_webhook_custom_http_headers": { "changed_key" : "changed_value" } }' ``` response should have masked webhook headers ``` { "merchant_id": "merchant_1733900220", "profile_id": "pro_nvV4ljCmGfPnUiRbjjMW", "profile_name": "test_profile1", "return_url": "https://google.com/success", "enable_payment_response_hash": true, "payment_response_hash_key": "IurVIL6k065SRjO2TWHcx6cf2mQCWO1SKf1tep6AZ79XBFBcLJFvsfpZ3JWRkxHy", "redirect_to_merchant_with_http_post": false, "webhook_details": { "webhook_version": "1.0.1", "webhook_username": "ekart_retail", "webhook_password": "password_ekart@123", "webhook_url": "https://webhook.site/672f0697-9e14-4a49-abef-b15769c19962", "payment_created_enabled": true, "payment_succeeded_enabled": true, "payment_failed_enabled": true }, "metadata": null, "routing_algorithm": null, "intent_fulfillment_time": 900, "frm_routing_algorithm": null, "payout_routing_algorithm": null, "applepay_verified_domains": null, "session_expiry": 900, "payment_link_config": null, "authentication_connector_details": null, "use_billing_as_payment_method_billing": true, "extended_card_info_config": null, "collect_shipping_details_from_wallet_connector": false, "collect_billing_details_from_wallet_connector": false, "always_collect_shipping_details_from_wallet_connector": false, "always_collect_billing_details_from_wallet_connector": false, "is_connector_agnostic_mit_enabled": false, "payout_link_config": null, "outgoing_webhook_custom_http_headers": { "changed_key": "ch*********ue" }, "tax_connector_id": null, "is_tax_connector_enabled": false, "is_network_tokenization_enabled": false, "is_auto_retries_enabled": false, "max_auto_retries_enabled": null, "is_click_to_pay_enabled": false } ``` Payment webhooks : ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept-Language: zh' \ --header 'api-key: dev_e3cBS20M6B2YB0ec2fDQTbGMUQjfRpNSP6PSko2AC9plc57huvPLb70dLndryRMG' \ --data-raw '{ "amount": 700, "currency": "USD", "confirm": true, "payment_link": false, "capture_on": "2029-09-10T10:11:12Z", "amount_to_capture": 700, "name": "John Doe", "phone": "999999999", "email" :"[email protected]", "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://google.com", "payment_method_data": { "card": { "card_number": "4917610000000000", "card_exp_month": "03", "card_exp_year": "30", "card_cvc": "737" }, "billing": { "address": { "line1": "1467", "line2": "CA", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US" } } }, "payment_method": "card", "payment_method_type": "credit", "profile_id": "pro_Os8bvIiwq7rz0XESi190", "browser_info": { "color_depth": 24, "java_enabled": true, "java_script_enabled": true, "language": "en-GB", "screen_height": 720, "screen_width": 1280, "time_zone": -330, "ip_address": "208.127.127.193", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 Edg/126.0.0.0" }, "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "payment_link_config_id":"key2", "order_details": [ { "product_name": "Tea", "quantity": 1, "amount": 110, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" }, { "product_name": "Tea", "quantity": 1, "amount": 110, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" }, { "product_name": "Tea", "quantity": 1, "amount": 110, "product_img_link": "https://thumbs.dreamstime.com/b/indian-tea-spices-masala-chai-33827904.jpg" } ] } ' ``` custom headerss of out going webhook will have non masked headers . <img width="1698" alt="Screenshot 2024-12-11 at 12 38 16 PM" src="https://github.com/user-attachments/assets/949cd502-1d24-47c6-a051-e9102267e4ca"> ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/admin.rs` **2. Type Definitions** - `crates/router/src/types/api/admin.rs` **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (2 changes) - Extend existing types with new fields (4 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 09cf7a3e: Files to modify: **crates/api_models/src/admin.rs** Add: - function: private::mask_value - function: pub::from_headers - struct: pub::MaskedHeaders - impl: impl MaskedHeaders **crates/router/src/types/api/admin.rs** Modify existing code
{"pr_number": 6798, "pr_title": "fix(webhooks): mask custom outgoing webhook headers in profile response", "merged_at": "2024-12-14T07:50:37Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/admin.rs"], "types": ["crates/router/src/types/api/admin.rs"]}, "change_types": {"structs_added": 1, "functions_added": 2, "fields_added": 4, "imports_added": 1, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [adyenplatform] use YYYY format for 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 Hotfix for https://github.com/juspay/hyperswitch/pull/9823 ### 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/adyenplatform/transformers/payouts.rs` **Code Patterns Applied:** - Extend existing types with new fields (1 changes) **Detailed Identifier Changes:** Commit 588afb21: Files to modify: **crates/hyperswitch_connectors/src/connectors/adyenplatform/transformers/payouts.rs** Modify existing code
{"pr_number": 9829, "pr_title": "fix(connector): [adyenplatform] use YYYY format for expiry year", "merged_at": "2025-10-14T09:08:04Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"connectors": ["crates/hyperswitch_connectors/src/connectors/adyenplatform/transformers/payouts.rs"]}, "change_types": {"fields_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(connector): [Netcetera] add sca exemption ## 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 sca exemption field to request for netcetera ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Note: Test not added since it cant be tested in 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 **search_filter** feature, you'll need to modify these architectural layers: **1. External Connector Integration** - `crates/router/src/connector/netcetera/netcetera_types.rs` - `crates/router/src/connector/netcetera/transformers.rs` **Code Patterns Applied:** - Implement new functions (1 changes) - Extend existing types with new fields (8 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit 31204941: Files to modify: **crates/router/src/connector/netcetera/netcetera_types.rs** Add: - function: private::from - impl: impl From<Option<common_enums::ScaExemptionType>> for ThreeDSRequestor **crates/router/src/connector/netcetera/transformers.rs** Modify existing code
{"pr_number": 6611, "pr_title": "feat(connector): [Netcetera] add sca exemption", "merged_at": "2024-11-26T14:21:19Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"connectors": ["crates/router/src/connector/netcetera/netcetera_types.rs", "crates/router/src/connector/netcetera/transformers.rs"]}, "change_types": {"functions_added": 1, "fields_added": 8, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(core): Populate off_session based on payments request ## 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 --> `off_session` value needs to be populated based on the value passed in the payment request instead of mapping it using `mandate_id` [ORIGINAL PR: https://github.com/juspay/hyperswitch/pull/6855] ### 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/6856 ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Saved card payment flow via Stripe needs to be tested Payments Intent: Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_6xYIfowUNa5WtbnutyrwXVAoMGqGjUuhfgSksLrTFWMVhcrdDgOoGAwKMt7xIman' \ --data-raw '{ "amount": 6777, "currency": "USD", "confirm": false, "customer_id": "new-c77", "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "no_three_ds", "return_url": "https://google.com", "email": "[email protected]", "name": "Joseph Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "setup_future_usage": "off_session", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "connector_metadata": { "noon": { "order_category": "pay" } } }' ``` Response: ``` { "payment_id": "pay_FqbEWnqUDYTqn1COTWBA", "merchant_id": "merchant_1734419321", "status": "requires_payment_method", "amount": 6777, "net_amount": 6777, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_FqbEWnqUDYTqn1COTWBA_secret_4uHf7pszEzRmtRlQTotG", "created": "2024-12-17T07:08:58.987Z", "currency": "USD", "customer_id": "new-c77", "customer": { "id": "new-c77", "name": "Joseph Doe", "email": "[email protected]", "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": null, "payment_method_data": null, "payment_token": null, "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": "[email protected]", "name": "Joseph Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": null, "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "new-c77", "created_at": 1734419338, "expires": 1734422938, "secret": "epk_9db0e66a58de4f31b621d9a834c2d61a" }, "manual_retry_allowed": null, "connector_transaction_id": null, "frm_message": null, "metadata": null, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "pay" } }, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_6YmHK5p4Nga5XxEjoUBW", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": null, "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-12-17T07:23:58.987Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2024-12-17T07:08:59.027Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": null } ``` Payments Confirm: Request: ``` curl --location 'http://localhost:8080/payments/pay_FqbEWnqUDYTqn1COTWBA/confirm' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_6xYIfowUNa5WtbnutyrwXVAoMGqGjUuhfgSksLrTFWMVhcrdDgOoGAwKMt7xIman' \ --data '{ "confirm": true, "payment_method": "card", "payment_method_type": "credit", "payment_token": "token_9SsS9D4o2NfnAXtXm2FO" }' ``` Response: ``` { "payment_id": "pay_FqbEWnqUDYTqn1COTWBA", "merchant_id": "merchant_1734419321", "status": "succeeded", "amount": 6777, "net_amount": 6777, "shipping_cost": null, "amount_capturable": 0, "amount_received": 6777, "connector": "stripe", "client_secret": "pay_FqbEWnqUDYTqn1COTWBA_secret_4uHf7pszEzRmtRlQTotG", "created": "2024-12-17T07:08:58.987Z", "currency": "USD", "customer_id": "new-c77", "customer": { "id": "new-c77", "name": "Joseph Doe", "email": "[email protected]", "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": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "424242", "card_extended_bin": null, "card_exp_month": "10", "card_exp_year": "25", "card_holder_name": "joseph Doe", "payment_checks": null, "authentication_data": null }, "billing": null }, "payment_token": "token_9SsS9D4o2NfnAXtXm2FO", "shipping": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "billing": { "address": { "city": "San Fransico", "country": "US", "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "zip": "94122", "state": "California", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" }, "email": null }, "order_details": null, "email": "[email protected]", "name": "Joseph Doe", "phone": "999999999", "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": null, "manual_retry_allowed": false, "connector_transaction_id": "pi_3QWuuGD5R7gDAGff0mzx08ix", "frm_message": null, "metadata": null, "connector_metadata": { "apple_pay": null, "airwallex": null, "noon": { "order_category": "pay" } }, "feature_metadata": null, "reference_id": "pi_3QWuuGD5R7gDAGff0mzx08ix", "payment_link": null, "profile_id": "pro_6YmHK5p4Nga5XxEjoUBW", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_SvilGuZ7pklt1HOzqu1m", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-12-17T07:23:58.987Z", "fingerprint": null, "browser_info": { "language": null, "time_zone": null, "ip_address": "::1", "user_agent": null, "color_depth": null, "java_enabled": null, "screen_width": null, "accept_header": null, "screen_height": null, "java_script_enabled": null }, "payment_method_id": "pm_awj5TPhYRnMWDQfvPdcw", "payment_method_status": "active", "updated": "2024-12-17T07:09:25.523Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": null, "connector_mandate_id": "pm_1QWutnD5R7gDAGffcNKrApAS" } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/payments/transformers.rs` **2. Tests** - `cypress-tests/cypress/e2e/PaymentUtils/Stripe.js` **Code Patterns Applied:** - Extend existing types with new fields (6 changes) **Detailed Identifier Changes:** Commit 4f67c6e8: Files to modify: **crates/router/src/core/payments/transformers.rs** Modify existing code
{"pr_number": 6874, "pr_title": "fix(core): Populate off_session based on payments request", "merged_at": "2024-12-18T09:48:28Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/transformers.rs"], "tests": ["cypress-tests/cypress/e2e/PaymentUtils/Stripe.js"]}, "change_types": {"fields_added": 6}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor: Add routing_approach other variant to handle unknown data ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This pull request focuses on ensuring consistency and correctness when handling the `routing_approach` field across various modules in the codebase. The most significant changes involve adding `.clone()` to prevent ownership issues, updating the `RoutingApproach` enum to support additional serialization formats, and improving hashing logic. ### Consistency and correctness improvements: * **Cloning `routing_approach` values**: Updated multiple files to ensure `routing_approach` values are cloned before being processed. This change avoids ownership issues and ensures data integrity. Affected files include: - `crates/analytics/src/payments/distribution/payment_error_message.rs` - `crates/analytics/src/payments/metrics/*.rs` (e.g., [[1]](diffhunk://#diff-3931220027b3354cc9bbd3caf48c070d6fed311ce730ec96f27d99f60bbc4a2fL125-R125) [[2]](diffhunk://#diff-5448bdc31a42a1e5a7c792359b0bbf68c9daf7d7e9799e9a22752c5ee28fc4bcL111-R111) [[3]](diffhunk://#diff-c7a8a730b30339119fbc59ee80e75165e3d6ebe85fba8730bec9d09a504e64f1L125-R125) etc.) - `crates/analytics/src/payments/metrics/sessionized_metrics/*.rs` (e.g., [[1]](diffhunk://#diff-97cdcad1d3ee7011b3718f4a5686ff442b5420660c6b12bd04ffc2ed082c4fd2L126-R126) [[2]](diffhunk://#diff-9c44a330411af744203a208d3afd41784cc3991d92d755122418c0e174e48c55L186-R186) [[3]](diffhunk://#diff-91161222123b028688f90acdc120e08daf73631abab5a6cb129d822d95e63186L115-R115) etc.) - `crates/router/src/services/kafka/payment_attempt.rs` * **Hashing logic update**: Modified the `impl Hash for PaymentMetricsBucketIdentifier` to clone the `routing_approach` field before hashing, ensuring no ownership issues arise during the hashing process. (`crates/api_models/src/analytics/payments.rs`, [crates/api_models/src/analytics/payments.rsL277-R280](diffhunk://#diff-650b59962d62821e9de2a2a7f08c2fe9d87f8b47d1a0445033f3df8374d90c90L277-R280)) ### Enum enhancements: * **`RoutingApproach` enum update**: Added support for untagged serialization and a default fallback for unknown values using `#[serde(untagged)]` and `#[strum(default)]`. This ensures better compatibility with external data formats. (`crates/common_enums/src/enums.rs`, [crates/common_enums/src/enums.rsR8562-R8564](diffhunk://#diff-955707712c9bdbbd986dc29a9dd001579001580cf0a65e286ac8a2a25a2a49f2R8562-R8564)) ### Minor changes: * **Removed `Copy` trait from `TokenDataType`**: This change likely reflects that the enum now includes non-`Copy` types or is being prepared for future modifications. (`crates/common_enums/src/enums.rs`, [crates/common_enums/src/enums.rsL8536](diffhunk://#diff-955707712c9bdbbd986dc29a9dd001579001580cf0a65e286ac8a2a25a2a49f2L8536)) ### 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 a straight through payment ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_BNOaWRzwyZ3hMAbhRNtp9t6Mx7ZSVyK5gPvd1bavl0FWehvrHlre1eMifYA244TE' \ --data-raw '{ "amount": 6540, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "StripeCustomer", "profile_id": "pro_EfD8EtQQSPZxXStG6B7x", "email": "[email protected]", "name": "John Doe", "phone": "999999999", "routing": { "type": "single", "data": {"connector": "stripe", "merchant_connector_id": "mca_SdftCCtpClu32qA6oijC"} }, "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "03", "card_exp_year": "30", "card_holder_name": "joseph Doe", "card_cvc": "737" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "NL", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "127.0.0.1" } }' ``` DB - <img width="916" height="568" alt="image" src="https://github.com/user-attachments/assets/c3f0fc2c-1850-4789-b859-ab889a39cce2" /> Clickhouse - <img width="1723" height="753" alt="image" src="https://github.com/user-attachments/assets/f680d62e-91fd-4603-aa40-044dfda1579b" /> # Stagger case - 1. 3DS payment goes through older build - ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_BNOaWRzwyZ3hMAbhRNtp9t6Mx7ZSVyK5gPvd1bavl0FWehvrHlre1eMifYA244TE' \ --data-raw '{ "amount": 6540, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "StripeCustomer", "profile_id": "pro_EfD8EtQQSPZxXStG6B7x", "email": "[email protected]", "name": "John Doe", "phone": "999999999", "routing": { "type": "single", "data": {"connector": "stripe", "merchant_connector_id": "mca_SdftCCtpClu32qA6oijC"} }, "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "03", "card_exp_year": "30", "card_holder_name": "joseph Doe", "card_cvc": "737" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "NL", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "127.0.0.1" } }' ``` DB - <img width="1020" height="592" alt="image" src="https://github.com/user-attachments/assets/1b83f0ae-0839-4d64-b0ee-838aae4f9d16" /> 2. Redirection happens via newer build Clickhouse - <img width="1712" height="403" alt="image" src="https://github.com/user-attachments/assets/6b2fb4fc-2dd0-4962-8f3c-95ea3120e4cb" /> # When adding new variants in the enum (example use case)- 1. Make 3DS payment - ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_BNOaWRzwyZ3hMAbhRNtp9t6Mx7ZSVyK5gPvd1bavl0FWehvrHlre1eMifYA244TE' \ --data-raw '{ "amount": 6540, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "StripeCustomer", "profile_id": "pro_EfD8EtQQSPZxXStG6B7x", "email": "[email protected]", "name": "John Doe", "phone": "999999999", "routing": { "type": "single", "data": {"connector": "stripe", "merchant_connector_id": "mca_SdftCCtpClu32qA6oijC"} }, "phone_country_code": "+1", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://google.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "4242424242424242", "card_exp_month": "03", "card_exp_year": "30", "card_holder_name": "joseph Doe", "card_cvc": "737" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "NL", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" }, "browser_info": { "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36", "accept_header": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8", "language": "nl-NL", "color_depth": 24, "screen_height": 723, "screen_width": 1536, "time_zone": 0, "java_enabled": true, "java_script_enabled": true, "ip_address": "127.0.0.1" } }' ``` - An new unknown DB enum variant written by new application (`composite_routing`) - <img width="1017" height="915" alt="image" src="https://github.com/user-attachments/assets/07f091d6-d7a8-48de-b396-53c4210fe7c1" /> - The Application maps it to the other variant (kafka log for the same) - <img width="1951" height="222" alt="image" src="https://github.com/user-attachments/assets/1e29f9ba-0428-4442-9e3b-bf7eab0ce44a" /> - Application pushes the new variant to kafka, which is picked by clickhouse. <img width="1718" height="446" alt="image" src="https://github.com/user-attachments/assets/2cae37b8-e319-4474-9594-381dcf7e7614" /> 2. Sync for the same payment succeeds - ``` curl --location 'http://localhost:8080/payments/pay_6jXoHSKmcESyJ9vWZUIo' \ --header 'Accept: application/json' \ --header 'api-key: dev_BNOaWRzwyZ3hMAbhRNtp9t6Mx7ZSVyK5gPvd1bavl0FWehvrHlre1eMifYA244TE' ``` ``` {"payment_id":"pay_6jXoHSKmcESyJ9vWZUIo","merchant_id":"merchant_1749723893","status":"succeeded","amount":6540,"net_amount":6540,"shipping_cost":null,"amount_capturable":0,"amount_received":6540,"connector":"stripe","client_secret":"pay_6jXoHSKmcESyJ9vWZUIo_secret_fxLf6seO9OfTw9C89bJH","created":"2025-07-25T09:45:06.719Z","currency":"USD","customer_id":"StripeCustomer","customer":{"id":"StripeCustomer","name":"John Doe","email":"[email protected]","phone":"999999999","phone_country_code":"+1"},"description":"Its my first payment request","refunds":null,"disputes":null,"mandate_id":null,"mandate_data":null,"setup_future_usage":null,"off_session":null,"capture_on":null,"capture_method":"automatic","payment_method":"card","payment_method_data":{"card":{"last4":"4242","card_type":null,"card_network":null,"card_issuer":null,"card_issuing_country":null,"card_isin":"424242","card_extended_bin":null,"card_exp_month":"03","card_exp_year":"30","card_holder_name":"joseph Doe","payment_checks":null,"authentication_data":null},"billing":null},"payment_token":null,"shipping":{"address":{"city":"San Fransico","country":"US","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe"},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"billing":{"address":{"city":"San Fransico","country":"NL","line1":"1467","line2":"Harrison Street","line3":"Harrison Street","zip":"94122","state":"California","first_name":"joseph","last_name":"Doe"},"phone":{"number":"8056594427","country_code":"+91"},"email":null},"order_details":null,"email":"[email protected]","name":"John Doe","phone":"999999999","return_url":"https://google.com/","authentication_type":"three_ds","statement_descriptor_name":"joseph","statement_descriptor_suffix":"JS","next_action":null,"cancellation_reason":null,"error_code":null,"error_message":null,"unified_code":null,"unified_message":null,"payment_experience":null,"payment_method_type":"credit","connector_label":null,"business_country":null,"business_label":"default","business_sub_label":null,"allowed_payment_method_types":null,"ephemeral_key":null,"manual_retry_allowed":false,"connector_transaction_id":"pi_3RoiBbD5R7gDAGff0Aj7Gibb","frm_message":null,"metadata":{"udf1":"value1","login_date":"2019-09-10T10:11:12Z","new_customer":"true"},"connector_metadata":null,"feature_metadata":null,"reference_id":"pi_3RoiBbD5R7gDAGff0Aj7Gibb","payment_link":null,"profile_id":"pro_EfD8EtQQSPZxXStG6B7x","surcharge_details":null,"attempt_count":1,"merchant_decision":null,"merchant_connector_id":"mca_SdftCCtpClu32qA6oijC","incremental_authorization_allowed":null,"authorization_count":null,"incremental_authorizations":null,"external_authentication_details":null,"external_3ds_authentication_attempted":false,"expires_on":"2025-07-25T10:00:06.719Z","fingerprint":null,"browser_info":{"language":"nl-NL","time_zone":0,"ip_address":"127.0.0.1","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36","color_depth":24,"java_enabled":true,"screen_width":1536,"accept_header":"text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8","screen_height":723,"java_script_enabled":true},"payment_method_id":null,"payment_method_status":null,"updated":"2025-07-25T09:47:47.820Z","split_payments":null,"frm_metadata":null,"extended_authorization_applied":null,"capture_before":null,"merchant_order_reference_id":null,"order_tax_amount":null,"connector_mandate_id":null,"card_discovery":"manual","force_3ds_challenge":false,"force_3ds_challenge_trigger":false,"issuer_error_code":null,"issuer_error_message":null,"is_iframe_redirection_enabled":null,"whole_connector_response":null} ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] 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/payments.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payments/payment_attempt.rs` **3. Core Business Logic** - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/operations/payment_create.rs` - `crates/router/src/core/payments/routing.rs` **4. External Connector Integration** - `crates/analytics/src/payments/metrics/connector_success_rate.rs` - `crates/analytics/src/payments/metrics/sessionized_metrics/connector_success_rate.rs` **5. Other** - `crates/analytics/src/payments/distribution/payment_error_message.rs` - `crates/analytics/src/payments/metrics/avg_ticket_size.rs` - `crates/analytics/src/payments/metrics/debit_routing.rs` - ... and 18 more files **Code Patterns Applied:** - Extend existing types with new fields (5 changes) - Add conditional logic for feature flags or filtering (1 changes) - Modify database queries (1 changes) **Detailed Identifier Changes:** Commit 7682cd44: Files to modify: **crates/analytics/src/payments/distribution/payment_error_message.rs** Modify existing code **crates/analytics/src/payments/metrics/avg_ticket_size.rs** Modify existing code **crates/analytics/src/payments/metrics/connector_success_rate.rs** Modify existing code **crates/analytics/src/payments/metrics/debit_routing.rs** Modify existing code **crates/analytics/src/payments/metrics/payment_count.rs** Modify existing code **crates/analytics/src/payments/metrics/payment_processed_amount.rs** Modify existing code **crates/analytics/src/payments/metrics/payment_success_count.rs** Modify existing code **crates/analytics/src/payments/metrics/retries_count.rs** Modify existing code **crates/analytics/src/payments/metrics/sessionized_metrics/avg_ticket_size.rs** Modify existing code **crates/analytics/src/payments/metrics/sessionized_metrics/connector_success_rate.rs** Modify existing code **crates/analytics/src/payments/metrics/sessionized_metrics/debit_routing.rs** Modify existing code **crates/analytics/src/payments/metrics/sessionized_metrics/failure_reasons.rs** Modify existing code **crates/analytics/src/payments/metrics/sessionized_metrics/payment_count.rs** Modify existing code **crates/analytics/src/payments/metrics/sessionized_metrics/payment_processed_amount.rs** Modify existing code **crates/analytics/src/payments/metrics/sessionized_metrics/payment_success_count.rs** Modify existing code **crates/analytics/src/payments/metrics/sessionized_metrics/payments_distribution.rs** Modify existing code **crates/analytics/src/payments/metrics/sessionized_metrics/retries_count.rs** Modify existing code **crates/analytics/src/payments/metrics/sessionized_metrics/success_rate.rs** Modify existing code **crates/analytics/src/payments/metrics/success_rate.rs** Modify existing code **crates/api_models/src/analytics/payments.rs** Modify existing code **crates/common_enums/src/enums.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_attempt.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/operations/payment_create.rs** Modify existing code **crates/router/src/core/payments/routing.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/storage_impl/src/payments/payment_attempt.rs** Modify existing code
{"pr_number": 8754, "pr_title": "refactor: Add routing_approach other variant to handle unknown data", "merged_at": "2025-07-28T07:43:09Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"api_models": ["crates/api_models/src/analytics/payments.rs"], "domain": ["crates/hyperswitch_domain_models/src/payments/payment_attempt.rs"], "core_business": ["crates/router/src/core/payments.rs", "crates/router/src/core/payments/operations/payment_create.rs", "crates/router/src/core/payments/routing.rs"], "connectors": ["crates/analytics/src/payments/metrics/connector_success_rate.rs", "crates/analytics/src/payments/metrics/sessionized_metrics/connector_success_rate.rs"], "other": ["crates/analytics/src/payments/distribution/payment_error_message.rs", "crates/analytics/src/payments/metrics/avg_ticket_size.rs", "crates/analytics/src/payments/metrics/debit_routing.rs", "crates/analytics/src/payments/metrics/payment_count.rs", "crates/analytics/src/payments/metrics/payment_processed_amount.rs", "crates/analytics/src/payments/metrics/payment_success_count.rs", "crates/analytics/src/payments/metrics/retries_count.rs", "crates/analytics/src/payments/metrics/sessionized_metrics/avg_ticket_size.rs", "crates/analytics/src/payments/metrics/sessionized_metrics/debit_routing.rs", "crates/analytics/src/payments/metrics/sessionized_metrics/failure_reasons.rs", "crates/analytics/src/payments/metrics/sessionized_metrics/payment_count.rs", "crates/analytics/src/payments/metrics/sessionized_metrics/payment_processed_amount.rs", "crates/analytics/src/payments/metrics/sessionized_metrics/payment_success_count.rs", "crates/analytics/src/payments/metrics/sessionized_metrics/payments_distribution.rs", "crates/analytics/src/payments/metrics/sessionized_metrics/retries_count.rs", "crates/analytics/src/payments/metrics/sessionized_metrics/success_rate.rs", "crates/analytics/src/payments/metrics/success_rate.rs", "crates/common_enums/src/enums.rs", "crates/router/src/services/kafka/payment_attempt.rs", "crates/router/src/services/kafka/payment_attempt_event.rs", "crates/storage_impl/src/payments/payment_attempt.rs"]}, "change_types": {"fields_added": 5, "conditionals_added": 1, "database_queries": 1}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(router): refactor ctp flow to fetch mca_id and get the connector creds instead of connector_name ## 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 --> refactor ctp flow to fetch mca_id and get the connector creds instead of connector_name Main PR - https://github.com/juspay/hyperswitch/pull/6859 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Test cases in Main PR ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/admin.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/business_profile.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/business_profile.rs` - `crates/hyperswitch_domain_models/src/merchant_connector_account.rs` **4. Core Business Logic** - `crates/router/src/core/admin.rs` - `crates/router/src/core/payments.rs` - `crates/router/src/core/payments/helpers.rs` - ... and 5 more files **5. Type Definitions** - `crates/common_types/src/payments.rs` - `crates/router/src/types/api/admin.rs` **6. Other** - `crates/common_enums/src/enums.rs` - `crates/router/src/consts.rs` **Code Patterns Applied:** - Define new data structures (1 changes) - Implement new functions (6 changes) - Extend existing types with new fields (41 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit 9adb4257: Files to modify: **crates/api_models/src/admin.rs** Modify existing code **crates/common_enums/src/enums.rs** Add: - enum: pub::AuthenticationProduct **crates/common_types/src/payments.rs** Add: - function: pub::get_click_to_pay_connector_account_id - struct: pub::AuthenticationConnectorAccountMap - impl: impl AuthenticationConnectorAccountMap **crates/diesel_models/src/business_profile.rs** Modify existing code **crates/hyperswitch_domain_models/src/business_profile.rs** Modify existing code **crates/hyperswitch_domain_models/src/merchant_connector_account.rs** Add: - function: pub::get_connector_wallets_details - function: pub::get_connector_wallets_details **crates/router/src/consts.rs** Modify existing code **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/core/payments.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Add: - function: pub::is_merchant_eligible_authentication_service **crates/router/src/core/payments/operations.rs** Modify existing code **crates/router/src/core/payments/operations/payment_confirm.rs** Modify existing code **crates/router/src/core/unified_authentication_service.rs** Modify existing code **crates/router/src/core/unified_authentication_service/types.rs** Modify existing code **crates/router/src/core/unified_authentication_service/utils.rs** Modify existing code **crates/router/src/types/api/admin.rs** Modify existing code
{"pr_number": 7078, "pr_title": "refactor(router): refactor ctp flow to fetch mca_id and get the connector creds instead of connector_name", "merged_at": "2025-01-20T16:38:35Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["connector"]}, "hierarchy": {"api_models": ["crates/api_models/src/admin.rs"], "database": ["crates/diesel_models/src/business_profile.rs"], "domain": ["crates/hyperswitch_domain_models/src/business_profile.rs", "crates/hyperswitch_domain_models/src/merchant_connector_account.rs"], "core_business": ["crates/router/src/core/admin.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_confirm.rs", "crates/router/src/core/unified_authentication_service.rs", "crates/router/src/core/unified_authentication_service/types.rs", "crates/router/src/core/unified_authentication_service/utils.rs"], "types": ["crates/common_types/src/payments.rs", "crates/router/src/types/api/admin.rs"], "other": ["crates/common_enums/src/enums.rs", "crates/router/src/consts.rs"]}, "change_types": {"structs_added": 1, "functions_added": 6, "enums_added": 1, "fields_added": 41, "imports_added": 5, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(Connector): [signifyd,threedsecureio,wellsfargopayout,wise] move from routers to hyperswitch_connectors ## 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 --> Move the following connectors from `crates/router` to `crates/hyperswitch_connectors` - signifyd - threedsecureio - wellsfargopayout - wise ### 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)? --> ### WISE ```sh curl --location 'http://localhost:8080/account/merchant_1746603147/connectors' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-feature: integ-custom' \ --header 'api-key: dev_vE5MxDUUu9eQJ7AMwI4vD9nVj3IlxZy1qdpct9JB7Mt3j2mbYF7jLyjMz8KvAq94' \ --data '{ "connector_type": "payout_processor", "connector_name": "wise", "connector_account_details": { "api_key": "***", "auth_type": "BodyKey", "key1": "2***3" }, "test_mode": false, "disabled": false, "payment_methods_enabled": [ { "payment_method": "card", "payment_method_types": [ { "payment_method_type": "credit", "card_networks": [ "Visa", "Mastercard" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true }, { "payment_method_type": "debit", "card_networks": [ "Visa", "Mastercard" ], "minimum_amount": 1, "maximum_amount": 68607706, "recurring_enabled": true, "installment_payment_enabled": true } ] }, { "payment_method": "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 ```json { "connector_type": "payout_processor", "connector_name": "wise", "connector_label": "wise_US_default", "merchant_connector_id": "mca_w92QHyUrQYCIrMmO4Lzp", "profile_id": "pro_SRkbVeuCZykOW6G2bCTL", "connector_account_details": { "auth_type": "BodyKey", "api_key": "Be***************************************d4", "key1": "28****33" }, "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": "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 } ``` Create payout ```sh curl --location 'http://localhost:8080/payouts/create' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'x-feature: integ-custom' \ --header 'api-key: dev_vE5MxDUUu9eQJ7AMwI4vD9nVj3IlxZy1qdpct9JB7Mt3j2mbYF7jLyjMz8KvAq94' \ --data-raw '{ "amount": 100, "currency": "EUR", "customer": { "id": "new_id", "email": "[email protected]", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65" }, "connector": [ "wise" ], "description": "Its my first payout request", "payout_type": "card", "payout_method_data": { "card": { "card_number": "4000000000002503", "expiry_month": "08", "expiry_year": "25", "card_holder_name": "joseph Doe", "card_cvc": "999" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "city": "San Fransico", "zip": "94122", "country": "CH", "first_name": "John", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "entity_type": "Individual", "recurring": true, "metadata": { "city": "NY", "unit": "245", "source_balance_account": "BA32CNH223227G5KQKQDJ48HB" }, "confirm": true, "auto_fulfill": true }' ``` response -- LOOKS like card payment ```json { "error": { "type": "invalid_request", "message": "Payout Eligibility for Wise is not implemented", "code": "IR_00" } } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/payments/flows.rs` **2. External Connector Integration** - `crates/hyperswitch_connectors/Cargo.toml` - `crates/hyperswitch_connectors/src/connectors.rs` - `crates/hyperswitch_connectors/src/connectors/signifyd.rs` - ... and 18 more files **3. Configuration Files** - `crates/router/Cargo.toml` **4. Other** - `Cargo.lock` **Code Patterns Applied:** - Define new data structures (3 changes) - Implement new functions (105 changes) - Extend existing types with new fields (375 changes) - Modify database queries (2 changes) **Detailed Identifier Changes:** Commit 1dabfe3e: Files to modify: **crates/hyperswitch_connectors/src/connectors.rs** Add: - mod: pub::signifyd - mod: pub::threedsecureio - mod: pub::wellsfargopayout - mod: pub::wise **crates/hyperswitch_connectors/src/connectors/signifyd.rs** Add: - function: private::build_headers - function: private::id - function: private::common_get_content_type - function: private::base_url - function: private::get_auth_header - function: private::build_error_response - function: private::build_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_webhook_source_verification_algorithm - function: private::get_webhook_source_verification_signature - function: private::get_webhook_source_verification_message - function: private::verify_webhook_source - function: private::get_webhook_object_reference_id - function: private::get_webhook_event_type - function: private::get_webhook_resource_object - struct: pub::Signifyd - impl: impl ConnectorCommonExt<Flow, Request, Response> for Signifyd - impl: impl ConnectorCommon for Signifyd - impl: impl Payment for Signifyd - impl: impl PaymentAuthorize for Signifyd - impl: impl PaymentSync for Signifyd - impl: impl PaymentVoid for Signifyd - impl: impl PaymentCapture for Signifyd - impl: impl MandateSetup for Signifyd - impl: impl ConnectorAccessToken for Signifyd - impl: impl PaymentToken for Signifyd - impl: impl Refund for Signifyd - impl: impl RefundExecute for Signifyd - impl: impl RefundSync for Signifyd - impl: impl ConnectorValidation for Signifyd - impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for Signifyd - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Signifyd - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Signifyd - impl: impl PaymentSession for Signifyd - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Signifyd - impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Signifyd - impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Signifyd - impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Signifyd - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Signifyd - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Signifyd - impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Signifyd - impl: impl FraudCheck for Signifyd - impl: impl FraudCheckSale for Signifyd - impl: impl FraudCheckCheckout for Signifyd - impl: impl FraudCheckTransaction for Signifyd - impl: impl FraudCheckFulfillment for Signifyd - impl: impl FraudCheckRecordReturn for Signifyd - impl: impl ConnectorIntegration<Sale, FraudCheckSaleData, FraudCheckResponseData> for Signifyd - impl: impl ConnectorIntegration<Checkout, FraudCheckCheckoutData, FraudCheckResponseData> for Signifyd - impl: impl ConnectorIntegration<Transaction, FraudCheckTransactionData, FraudCheckResponseData> for Signifyd - impl: impl ConnectorIntegration<Fulfillment, FraudCheckFulfillmentData, FraudCheckResponseData> for Signifyd - impl: impl ConnectorIntegration<RecordReturn, FraudCheckRecordReturnData, FraudCheckResponseData> for Signifyd - impl: impl IncomingWebhook for Signifyd - impl: impl ConnectorSpecifications for Signifyd - mod: pub::transformers **crates/hyperswitch_connectors/src/connectors/signifyd/transformers/auth.rs** Add: - function: private::try_from - struct: pub::SignifydAuthType - impl: impl TryFrom<&ConnectorAuthType> for SignifydAuthType **crates/hyperswitch_connectors/src/connectors/threedsecureio.rs** Add: - 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_webhook_object_reference_id - function: private::get_webhook_event_type - function: private::get_webhook_resource_object - 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 - struct: pub::Threedsecureio - impl: impl Payment for Threedsecureio - impl: impl PaymentSession for Threedsecureio - impl: impl ConnectorAccessToken for Threedsecureio - impl: impl MandateSetup for Threedsecureio - impl: impl PaymentAuthorize for Threedsecureio - impl: impl PaymentSync for Threedsecureio - impl: impl PaymentCapture for Threedsecureio - impl: impl PaymentVoid for Threedsecureio - impl: impl Refund for Threedsecureio - impl: impl RefundExecute for Threedsecureio - impl: impl RefundSync for Threedsecureio - impl: impl PaymentToken for Threedsecureio - impl: impl ConnectorIntegration<PaymentMethodToken, PaymentMethodTokenizationData, PaymentsResponseData> for Threedsecureio - impl: impl ConnectorCommonExt<Flow, Request, Response> for Threedsecureio - impl: impl ConnectorCommon for Threedsecureio - impl: impl ConnectorValidation for Threedsecureio - impl: impl ConnectorIntegration<Session, PaymentsSessionData, PaymentsResponseData> for Threedsecureio - impl: impl ConnectorIntegration<AccessTokenAuth, AccessTokenRequestData, AccessToken> for Threedsecureio - impl: impl ConnectorIntegration<SetupMandate, SetupMandateRequestData, PaymentsResponseData> for Threedsecureio - impl: impl ConnectorIntegration<Authorize, PaymentsAuthorizeData, PaymentsResponseData> for Threedsecureio - impl: impl ConnectorIntegration<PSync, PaymentsSyncData, PaymentsResponseData> for Threedsecureio - impl: impl ConnectorIntegration<Capture, PaymentsCaptureData, PaymentsResponseData> for Threedsecureio - impl: impl ConnectorIntegration<Void, PaymentsCancelData, PaymentsResponseData> for Threedsecureio - impl: impl ConnectorIntegration<Execute, RefundsData, RefundsResponseData> for Threedsecureio - impl: impl ConnectorIntegration<RSync, RefundsData, RefundsResponseData> for Threedsecureio - impl: impl IncomingWebhook for Threedsecureio - impl: impl ConnectorPreAuthentication for Threedsecureio - impl: impl ConnectorPreAuthenticationVersionCall for Threedsecureio - impl: impl ExternalAuthentication for Threedsecureio - impl: impl ConnectorAuthentication for Threedsecureio - impl: impl ConnectorPostAuthentication for Threedsecureio - impl: impl ConnectorIntegration< Authentication, ConnectorAuthenticationRequestData, AuthenticationResponseData, > for Threedsecureio - impl: impl ConnectorIntegration<PreAuthentication, PreAuthNRequestData, AuthenticationResponseData> for Threedsecureio - impl: impl ConnectorIntegration< PostAuthentication, ConnectorPostAuthenticationRequestData, AuthenticationResponseData, > for Threedsecureio - impl: impl ConnectorIntegration< PreAuthenticationVersionCall, PreAuthNRequestData, AuthenticationResponseData, > for Threedsecureio - impl: impl ConnectorSpecifications for Threedsecureio - mod: pub::transformers **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code **crates/hyperswitch_connectors/src/default_implementations_v2.rs** Modify existing code **crates/hyperswitch_connectors/src/types.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Add: - function: private::get_order_details - function: private::get_currency - trait: pub::FraudCheckSaleRequest - trait: pub::FraudCheckRecordReturnRequest - impl: impl FraudCheckSaleRequest for FraudCheckSaleData - impl: impl FraudCheckRecordReturnRequest for FraudCheckRecordReturnData **crates/router/src/connector.rs** Remove: - mod: pub::signifyd - mod: pub::threedsecureio - mod: pub::wellsfargopayout - mod: pub::wise **crates/router/src/connector/signifyd.rs** Remove: - function: private::build_headers - function: private::id - function: private::common_get_content_type - function: private::base_url - function: private::get_auth_header - function: private::build_error_response - function: private::build_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_webhook_source_verification_algorithm - function: private::get_webhook_source_verification_signature - function: private::get_webhook_source_verification_message - function: private::verify_webhook_source - function: private::get_webhook_object_reference_id - function: private::get_webhook_event_type - function: private::get_webhook_resource_object - struct: pub::Signifyd - impl: impl ConnectorCommonExt<Flow, Request, Response> for Signifyd - impl: impl ConnectorCommon for Signifyd - impl: impl api::Payment for Signifyd - impl: impl api::PaymentAuthorize for Signifyd - impl: impl api::PaymentSync for Signifyd - impl: impl api::PaymentVoid for Signifyd - impl: impl api::PaymentCapture for Signifyd - impl: impl api::MandateSetup for Signifyd - impl: impl api::ConnectorAccessToken for Signifyd - impl: impl api::PaymentToken for Signifyd - impl: impl api::Refund for Signifyd - impl: impl api::RefundExecute for Signifyd - impl: impl api::RefundSync for Signifyd - impl: impl ConnectorValidation for Signifyd - impl: impl ConnectorIntegration< api::PaymentMethodToken, types::PaymentMethodTokenizationData, types::PaymentsResponseData, > for Signifyd - impl: impl ConnectorIntegration<api::AccessTokenAuth, types::AccessTokenRequestData, types::AccessToken> for Signifyd - impl: impl ConnectorIntegration< api::SetupMandate, types::SetupMandateRequestData, types::PaymentsResponseData, > for Signifyd - impl: impl api::PaymentSession for Signifyd - impl: impl ConnectorIntegration<api::Session, types::PaymentsSessionData, types::PaymentsResponseData> for Signifyd - impl: impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::PaymentsResponseData> for Signifyd - impl: impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsResponseData> for Signifyd - impl: impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::PaymentsResponseData> for Signifyd - impl: impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsResponseData> for Signifyd - impl: impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsResponseData> for Signifyd - impl: impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponseData> for Signifyd - impl: impl api::FraudCheck for Signifyd - impl: impl frm_api::FraudCheckSale for Signifyd - impl: impl frm_api::FraudCheckCheckout for Signifyd - impl: impl frm_api::FraudCheckTransaction for Signifyd - impl: impl frm_api::FraudCheckFulfillment for Signifyd - impl: impl frm_api::FraudCheckRecordReturn for Signifyd - impl: impl ConnectorIntegration< frm_api::Sale, frm_types::FraudCheckSaleData, frm_types::FraudCheckResponseData, > for Signifyd - impl: impl ConnectorIntegration< frm_api::Checkout, frm_types::FraudCheckCheckoutData, frm_types::FraudCheckResponseData, > for Signifyd - impl: impl ConnectorIntegration< frm_api::Transaction, frm_types::FraudCheckTransactionData, frm_types::FraudCheckResponseData, > for Signifyd - impl: impl ConnectorIntegration< frm_api::Fulfillment, frm_types::FraudCheckFulfillmentData, frm_types::FraudCheckResponseData, > for Signifyd - impl: impl ConnectorIntegration< frm_api::RecordReturn, frm_types::FraudCheckRecordReturnData, frm_types::FraudCheckResponseData, > for Signifyd - impl: impl api::IncomingWebhook for Signifyd - impl: impl ConnectorSpecifications for Signifyd - mod: pub::transformers **crates/router/src/connector/signifyd/transformers/auth.rs** Remove: - function: private::try_from - struct: pub::SignifydAuthType - impl: impl TryFrom<&types::ConnectorAuthType> for SignifydAuthType **crates/router/src/connector/threedsecureio.rs** Remove: - 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_webhook_object_reference_id - function: private::get_webhook_event_type - function: private::get_webhook_resource_object - 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 - struct: pub::Threedsecureio - impl: impl api::Payment for Threedsecureio - impl: impl api::PaymentSession for Threedsecureio - impl: impl api::ConnectorAccessToken for Threedsecureio - impl: impl api::MandateSetup for Threedsecureio - impl: impl api::PaymentAuthorize for Threedsecureio - impl: impl api::PaymentSync for Threedsecureio - impl: impl api::PaymentCapture for Threedsecureio - impl: impl api::PaymentVoid for Threedsecureio - impl: impl api::Refund for Threedsecureio - impl: impl api::RefundExecute for Threedsecureio - impl: impl api::RefundSync for Threedsecureio - impl: impl api::PaymentToken for Threedsecureio - impl: impl ConnectorIntegration< api::PaymentMethodToken, types::PaymentMethodTokenizationData, types::PaymentsResponseData, > for Threedsecureio - impl: impl ConnectorCommonExt<Flow, Request, Response> for Threedsecureio - impl: impl ConnectorCommon for Threedsecureio - impl: impl ConnectorValidation for Threedsecureio - impl: impl ConnectorIntegration<api::Session, types::PaymentsSessionData, types::PaymentsResponseData> for Threedsecureio - impl: impl ConnectorIntegration<api::AccessTokenAuth, types::AccessTokenRequestData, types::AccessToken> for Threedsecureio - impl: impl ConnectorIntegration< api::SetupMandate, types::SetupMandateRequestData, types::PaymentsResponseData, > for Threedsecureio - impl: impl ConnectorIntegration<api::Authorize, types::PaymentsAuthorizeData, types::PaymentsResponseData> for Threedsecureio - impl: impl ConnectorIntegration<api::PSync, types::PaymentsSyncData, types::PaymentsResponseData> for Threedsecureio - impl: impl ConnectorIntegration<api::Capture, types::PaymentsCaptureData, types::PaymentsResponseData> for Threedsecureio - impl: impl ConnectorIntegration<api::Void, types::PaymentsCancelData, types::PaymentsResponseData> for Threedsecureio - impl: impl ConnectorIntegration<api::Execute, types::RefundsData, types::RefundsResponseData> for Threedsecureio - impl: impl ConnectorIntegration<api::RSync, types::RefundsData, types::RefundsResponseData> for Threedsecureio - impl: impl api::IncomingWebhook for Threedsecureio - impl: impl api::ConnectorPreAuthentication for Threedsecureio - impl: impl api::ConnectorPreAuthenticationVersionCall for Threedsecureio - impl: impl api::ExternalAuthentication for Threedsecureio - impl: impl api::ConnectorAuthentication for Threedsecureio - impl: impl api::ConnectorPostAuthentication for Threedsecureio - impl: impl ConnectorIntegration< api::Authentication, types::authentication::ConnectorAuthenticationRequestData, types::authentication::AuthenticationResponseData, > for Threedsecureio - impl: impl ConnectorIntegration< api::PreAuthentication, types::authentication::PreAuthNRequestData, types::authentication::AuthenticationResponseData, > for Threedsecureio - impl: impl ConnectorIntegration< api::PostAuthentication, types::authentication::ConnectorPostAuthenticationRequestData, types::authentication::AuthenticationResponseData, > for Threedsecureio - impl: impl ConnectorIntegration< api::PreAuthenticationVersionCall, types::authentication::PreAuthNRequestData, types::authentication::AuthenticationResponseData, > for Threedsecureio - impl: impl ConnectorSpecifications for Threedsecureio - mod: pub::transformers **crates/router/src/connector/utils.rs** Remove: - function: private::get_order_details - function: private::get_currency - trait: pub::FraudCheckCheckoutRequest - trait: pub::FraudCheckTransactionRequest - impl: impl FraudCheckCheckoutRequest for fraud_check::FraudCheckCheckoutData - impl: impl FraudCheckTransactionRequest for fraud_check::FraudCheckTransactionData **crates/router/src/core/payments/flows.rs** Modify existing code
{"pr_number": 7953, "pr_title": "refactor(Connector): [signifyd,threedsecureio,wellsfargopayout,wise] move from routers to hyperswitch_connectors", "merged_at": "2025-05-13T10:06:45Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"core_business": ["crates/router/src/core/payments/flows.rs"], "connectors": ["crates/hyperswitch_connectors/Cargo.toml", "crates/hyperswitch_connectors/src/connectors.rs", "crates/hyperswitch_connectors/src/connectors/signifyd.rs", "crates/router/src/connector/signifyd/transformers.rs", "crates/router/src/connector/signifyd/transformers/api.rs", "crates/hyperswitch_connectors/src/connectors/signifyd/transformers/auth.rs", "crates/hyperswitch_connectors/src/connectors/threedsecureio.rs", "crates/router/src/connector/threedsecureio/transformers.rs", "crates/router/src/connector/wellsfargopayout.rs", "crates/router/src/connector/wellsfargopayout/transformers.rs", "crates/router/src/connector/wise.rs", "crates/router/src/connector/wise/transformers.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/hyperswitch_connectors/src/default_implementations_v2.rs", "crates/hyperswitch_connectors/src/types.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/router/src/connector.rs", "crates/router/src/connector/signifyd.rs", "crates/router/src/connector/signifyd/transformers/auth.rs", "crates/router/src/connector/threedsecureio.rs", "crates/router/src/connector/utils.rs"], "config": ["crates/router/Cargo.toml"], "other": ["Cargo.lock"]}, "change_types": {"structs_added": 3, "functions_added": 105, "enums_added": 1, "fields_added": 375, "imports_added": 70, "database_queries": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
refactor(proxy): specify hosts for proxy exclusion instead of complete URLs ## 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 refactors the logic for excluding specific HTTP / HTTPS traffic from being proxied via the outgoing proxy. Specifically, the changes included are: 1. We no longer need two clients (a proxied client and a non-proxied client), we can have the same client handle traffic as required. 2. We need not specify complete URLs for proxy exclusion, we can just specify the domain names or IP addresses of the hosts to be excluded. This also handles excluding traffic from a subdomain if a parent domain is excluded. This is achieved with [`reqwest::Proxy::no_proxy()`](https://docs.rs/reqwest/0.12.11/reqwest/struct.Proxy.html#method.no_proxy) and [`reqwest::NoProxy::from_string()`](https://docs.rs/reqwest/0.12.11/reqwest/struct.NoProxy.html#method.from_string). ### 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` 4. `crates/router/src/configs` 5. `loadtest/config` --> This PR introduces a config option `bypass_proxy_hosts` instead of `bypass_proxy_urls` under the `[proxy]` config section. ## 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 would help significantly reduce maintenance efforts on our side with respect to which URLs we wanted to be excluded from being proxied, since we previously had some of these URLs being specified in code. The PR helps ensure that all the domains to be excluded would be specified via configuration alone, while also allowing us to easily exclude subdomains (for example, excluding `cluster.local` would exclude all traffic to services within a Kubernetes cluster from being proxied). Closes #1039. ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Locally, by setting up [`mitmproxy`](https://mitmproxy.org) as a proxy for outgoing HTTP and HTTPS traffic. I also set up our card vault locally to simulate an internal service running close to the application. I ran `mitmproxy` using the command: ```shell mitmweb --listen-port 8090 --web-port 8091 ``` Application was configured in the `development.toml` file to use the proxy: ```toml [proxy] http_url = "http://localhost:8090" https_url = "http://localhost:8090" bypass_proxy_hosts = "localhost, cluster.local" ``` 1. Creating a payment via Postman: ![Screenshot of 2 requests being proxied](https://github.com/user-attachments/assets/4725232e-c513-4b2d-960f-7bf063b8d51a) Two requests are listed on the `mitmproxy` web interface, one to `api.stripe.com` and one to `webhook.site`, indicating that they were proxied. In this case, all HTTPS traffic is being proxied. 2. Saving a payment method in the locker: The locker host is initially configured as: ```toml [locker] host = "http://127.0.0.1:3001" mock_locker = false ``` Since the locker host was `127.0.0.1` and only `localhost` was excluded from being proxied, the locker request is also being proxied: ![Screenshot of card vault request being proxied](https://github.com/user-attachments/assets/e272180a-a0fc-4d46-9cba-460e7f8f1e42) On updating the locker host to `http://localhost:3001` in the `development.toml` file, the locker request is no longer proxied, the `mitmproxy` web interface is blank: ![Screenshot of a blank mitmproxy web interface](https://github.com/user-attachments/assets/bca62207-4074-4ef1-9ac0-4ae20fb99da0) As another confirmation that the locker call actually happened, I see logs emitted by the locker application with the same request ID as that returned by the `router` in its response headers. One more thing to note here is that we did not have to include the port number (`localhost:3001`) in the `bypass_proxy_hosts` list, only `localhost` was sufficient. 3. Excluding `stripe.com` from being proxied and creating a payment: I updated the `development.toml` file to include `stripe.com` in `bypass_proxy_hosts`: ```toml bypass_proxy_hosts = "localhost, cluster.local, stripe.com" ``` Even though we only excluded `stripe.com` and did not explicitly exclude `api.stripe.com`, the request to `api.stripe.com` was excluded as well. This can be compared with the screenshot in (1), the request to `api.stripe.com` is not listed: ![Screenshot of a request being proxied](https://github.com/user-attachments/assets/daa865d9-b768-4c42-9da3-c054cb3342b5) (2) and (3) indicate that proxy exclusion is happening as expected. ### Testing on our hosted environments In case of our hosted environments, we would have to ensure that nothing with respect to outgoing traffic from the `router` application remains affected: if an outgoing proxy has been configured (correctly), all of the external HTTP(S) traffic (to connectors, etc.) must be proxied, while traffic to our internal services such as our locker or encryption service must be excluded from being proxied. ## 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/config.example.toml` - `config/deployments/env_specific.toml` - `crates/router/src/configs/defaults.rs` - ... and 1 more files **2. Other** - `crates/common_enums/src/enums.rs` - `crates/router/src/bin/scheduler.rs` - `crates/router/src/lib.rs` - ... and 3 more files **Code Patterns Applied:** - Implement new functions (5 changes) - Extend existing types with new fields (5 changes) **Detailed Identifier Changes:** Commit bd1f0770: Files to modify: **crates/common_enums/src/enums.rs** Modify existing code **crates/router/src/bin/scheduler.rs** Modify existing code **crates/router/src/configs/defaults.rs** Modify existing code **crates/router/src/configs/settings.rs** Modify existing code **crates/router/src/lib.rs** Modify existing code **crates/router/src/services/api.rs** Modify existing code **crates/router/src/services/api/client.rs** Remove: - function: pub::proxy_bypass_urls **crates/router/src/services/openidconnect.rs** Modify existing code
{"pr_number": 6957, "pr_title": "refactor(proxy): specify hosts for proxy exclusion instead of complete URLs", "merged_at": "2025-01-15T13:04:48Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "connector"]}, "hierarchy": {"config": ["config/config.example.toml", "config/deployments/env_specific.toml", "crates/router/src/configs/defaults.rs", "crates/router/src/configs/settings.rs"], "other": ["crates/common_enums/src/enums.rs", "crates/router/src/bin/scheduler.rs", "crates/router/src/lib.rs", "crates/router/src/services/api.rs", "crates/router/src/services/api/client.rs", "crates/router/src/services/openidconnect.rs"]}, "change_types": {"functions_added": 5, "fields_added": 5}, "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 This PR enables a flag which enables HyperSwitch SDK to handle removal of `beforeunload` events based on it's consumption by the integrating merchants. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context This PR enables handling of removal of `beforeunload` events once checkout form is submitted by the user. Helps keep a clean user experience. ## How did you test it? Tested locally using payment links. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Core Business Logic** - `crates/router/src/core/payment_link/payment_link_initiate/payment_link_initiator.js` - `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": 7072, "pr_title": "refactor(payment-link): use shouldRemoveBeforeUnloadEvents flag for handling removal of beforeunload events through SDK", "merged_at": "2025-01-20T13:23:35Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "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"}
refactor(dynamic_fields): dynamic fields for Adyen and Stripe, renaming klarnaCheckout, WASM for KlarnaCheckout ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [x] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> 1. Dynamic fields path for `Adyen` and `Stripe` is changed which is a frontend requirement 2. `WASM` for `klarnaCheckout` added in `Klarna` which is a dashboard requirement. 3. Removed `KlarnaCheckout` enum and using the already present `KlarnaRedirect` enum value as it was creating some frontend conflicts with `Adyen's` KlarnaRedirect 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)? --> 1. Dynamic fields path for `Adyen` and `Stripe` is changed which is a frontend requirement to show the input boxes, so no testing required. 2. `WASM` for `klarnaCheckout` added in `Klarna` which is a dashboard requirement to list out the Payment Methods for `Klarna`, so no testing required. 3. Have removed `KlarnaCheckout` enum and using the already present `KlarnaRedirect` enum value for the flow. This doesn't effect the payment flow and `klarnaCheckout` is working as previously. ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_nsmdfKGJM74PYSViFQ04zsoTMLFkF2VkcvuRdmerez2zBfHSjCrZIxpEln9vYBgl' \ --data-raw '{ "amount": 50000, "order_tax_amount":0, "confirm": false, "currency": "EUR", "capture_method": "automatic", "customer_id": "klarna", "payment_experience":"redirect_to_url", "capture_on": "2022-09-10T10:11:12Z", "authentication_type": "no_three_ds", "payment_method": "pay_later", "payment_method_type": "klarna", "payment_method_data": { "pay_later": { "klarna_checkout":{} } }, "email": "[email protected]", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "return_url": "https://google.com" }' ``` Response ``` { "payment_id": "pay_b9SVvCHWeHFV7jiTCr1v", "merchant_id": "merchant_1734083062", "status": "requires_confirmation", "amount": 50000, "net_amount": 50000, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_b9SVvCHWeHFV7jiTCr1v_secret_uTuJ4C4UZtzKWCkJqKyj", "created": "2024-12-16T12:15:12.009Z", "currency": "EUR", "customer_id": "klarna", "customer": { "id": "klarna", "name": "John Doe", "email": "[email protected]", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "automatic", "payment_method": "pay_later", "payment_method_data": { "pay_later": { "klarna_sdk": null }, "billing": null }, "payment_token": null, "shipping": null, "billing": null, "order_details": null, "email": "[email protected]", "name": "John Doe", "phone": "999999999", "return_url": "https://google.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": "redirect_to_url", "payment_method_type": "klarna", "connector_label": null, "business_country": null, "business_label": "default", "business_sub_label": null, "allowed_payment_method_types": null, "ephemeral_key": { "customer_id": "klarna", "created_at": 1734351311, "expires": 1734354911, "secret": "epk_5aaf5ecba75d4de68712573428fe89f2" }, "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_PdHB9mW2uWUx2di0W9u3", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": null, "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2024-12-16T12:30:12.009Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2024-12-16T12:15:12.033Z", "split_payments": null, "frm_metadata": null, "merchant_order_reference_id": null, "order_tax_amount": 0, "connector_mandate_id": null } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/payments.rs` **2. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payment_method_data.rs` **3. External Connector Integration** - `crates/connector_configs/src/transformer.rs` - `crates/connector_configs/toml/development.toml` - `crates/connector_configs/toml/production.toml` - ... and 13 more files **4. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` **Code Patterns Applied:** - Extend existing types with new fields (2 changes) **Detailed Identifier Changes:** Commit a6367d92: Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/connector_configs/src/transformer.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/square/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/zen/transformers.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Modify existing code **crates/hyperswitch_domain_models/src/payment_method_data.rs** Modify existing code **crates/router/src/configs/defaults/payment_connector_required_fields.rs** Modify existing code **crates/router/src/connector/adyen/transformers.rs** Modify existing code **crates/router/src/connector/klarna.rs** Modify existing code **crates/router/src/connector/klarna/transformers.rs** Modify existing code **crates/router/src/connector/nuvei/transformers.rs** Modify existing code **crates/router/src/connector/paypal/transformers.rs** Modify existing code **crates/router/src/connector/stripe/transformers.rs** Modify existing code **crates/router/src/connector/utils.rs** Modify existing code
{"pr_number": 7015, "pr_title": "refactor(dynamic_fields): dynamic fields for Adyen and Stripe, renaming klarnaCheckout, WASM for KlarnaCheckout", "merged_at": "2025-02-06T14:33:44Z", "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/payment_method_data.rs"], "connectors": ["crates/connector_configs/src/transformer.rs", "crates/connector_configs/toml/development.toml", "crates/connector_configs/toml/production.toml", "crates/connector_configs/toml/sandbox.toml", "crates/hyperswitch_connectors/src/connectors/multisafepay/transformers.rs", "crates/hyperswitch_connectors/src/connectors/square/transformers.rs", "crates/hyperswitch_connectors/src/connectors/zen/transformers.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/router/src/configs/defaults/payment_connector_required_fields.rs", "crates/router/src/connector/adyen/transformers.rs", "crates/router/src/connector/klarna.rs", "crates/router/src/connector/klarna/transformers.rs", "crates/router/src/connector/nuvei/transformers.rs", "crates/router/src/connector/paypal/transformers.rs", "crates/router/src/connector/stripe/transformers.rs", "crates/router/src/connector/utils.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json"]}, "change_types": {"fields_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(themes): Add `theme_name` and `entity_type` in themes table ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> This PR adds `theme_name` and `entity_type` in the themes table. This will help us in 1. Having a name for the theme. 2. EntityType identifier to help us identity the lineage type instead of guessing it. ### Additional Changes - [ ] 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` 3. `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). --> Closes #6620. ## How did you test 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 an internal change and doesn't affect any APIs. ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [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/query/user/theme.rs` - `crates/diesel_models/src/schema.rs` - `crates/diesel_models/src/schema_v2.rs` - ... and 1 more files **2. Type Definitions** - `crates/common_utils/src/types/theme.rs` **3. Other** - `crates/router/src/db/user/theme.rs` - `migrations/2024-11-20-110014_add-entity-type-and-theme-name-in-themes/down.sql` - `migrations/2024-11-20-110014_add-entity-type-and-theme-name-in-themes/up.sql` **Code Patterns Applied:** - Extend existing types with new fields (6 changes) - Modify database queries (3 changes) **Detailed Identifier Changes:** Commit bf13c161: Files to modify: **crates/common_utils/src/types/theme.rs** Modify existing code **crates/diesel_models/src/query/user/theme.rs** Modify existing code **crates/diesel_models/src/schema.rs** Modify existing code **crates/diesel_models/src/schema_v2.rs** Modify existing code **crates/diesel_models/src/user/theme.rs** Modify existing code **crates/router/src/db/user/theme.rs** Modify existing code
{"pr_number": 6621, "pr_title": "feat(themes): Add `theme_name` and `entity_type` in themes table", "merged_at": "2024-11-21T21:06:12Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"database": ["crates/diesel_models/src/query/user/theme.rs", "crates/diesel_models/src/schema.rs", "crates/diesel_models/src/schema_v2.rs", "crates/diesel_models/src/user/theme.rs"], "types": ["crates/common_utils/src/types/theme.rs"], "other": ["crates/router/src/db/user/theme.rs", "migrations/2024-11-20-110014_add-entity-type-and-theme-name-in-themes/down.sql", "migrations/2024-11-20-110014_add-entity-type-and-theme-name-in-themes/up.sql"]}, "change_types": {"fields_added": 6, "imports_added": 1, "database_queries": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat: add routing support for v2 sdk session flow ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [x] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description <!-- Describe your changes in detail --> Added session routing support for session call in v2. And store the prerouting results in the payment_intent tabled prerouting_algorithm column. Other changes: * used `MerchantConnectorAccounts` Wrapper instead of `Vec<MerchantConnectorAccount>` across the codebase. ### 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)? --> follow the steps mentioned in this PR. https://github.com/juspay/hyperswitch/pull/6502 In addition to that check if `prerouting_algorithm` column in `payment_intent` is updated. use this query. `select prerouting_algorithm from payment_intent where id ='payment_id';` ![image](https://github.com/user-attachments/assets/53f1496b-c7ee-4e2e-8e9d-1d548b532f35) ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/admin.rs` - `crates/api_models/src/routing.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/payment_intent.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/Cargo.toml` - `crates/hyperswitch_domain_models/src/configs.rs` - `crates/hyperswitch_domain_models/src/consts.rs` - ... and 7 more files **4. Core Business Logic** - `crates/router/src/core/admin.rs` - `crates/router/src/core/payment_methods/cards.rs` - `crates/router/src/core/payments.rs` - ... and 12 more files **5. External Connector Integration** - `crates/common_enums/src/connector_enums.rs` - `crates/hyperswitch_connectors/src/connectors/coinbase.rs` - `crates/hyperswitch_connectors/src/connectors/helcim.rs` - ... and 7 more files **6. Type Definitions** - `crates/router/src/types/api.rs` - `crates/router/src/types/api/authentication.rs` - `crates/router/src/types/api/authentication_v2.rs` - ... and 3 more files **7. Utils** - `crates/common_utils/src/macros.rs` - `crates/kgraph_utils/Cargo.toml` - `crates/kgraph_utils/src/error.rs` - ... and 1 more files **8. Configuration Files** - `.typos.toml` - `crates/hyperswitch_interfaces/src/configs.rs` - `crates/router/Cargo.toml` **9. Other** - `Cargo.lock` - `crates/hyperswitch_interfaces/src/api.rs` - `crates/hyperswitch_interfaces/src/api/authentication.rs` - ... and 11 more files **Code Patterns Applied:** - Define new data structures (20 changes) - Implement new functions (79 changes) - Extend existing types with new fields (393 changes) - Add conditional logic for feature flags or filtering (20 changes) - Modify database queries (19 changes) **Detailed Identifier Changes:** Commit c3e8c67b: Files to modify: **crates/api_models/src/admin.rs** Modify existing code **crates/api_models/src/routing.rs** Modify existing code **crates/common_enums/src/connector_enums.rs** Add: - function: private::try_from - impl: impl TryFrom<Connector> for RoutableConnectors **crates/common_utils/src/macros.rs** Add: - function: private::deref - function: private::deref_mut - function: private::into_iter - impl: impl std::ops::Deref for $wrapper_name - impl: impl std::ops::DerefMut for $wrapper_name - impl: impl IntoIterator for $wrapper_name **crates/diesel_models/src/payment_intent.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/coinbase.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/helcim.rs** Add: - function: private::connector_transaction_id - function: private::connector_transaction_id - impl: impl ConnectorTransactionId for Helcim **crates/hyperswitch_connectors/src/connectors/nexinets.rs** Add: - function: private::connector_transaction_id - function: private::connector_transaction_id - impl: impl ConnectorTransactionId for Nexinets **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** Add: - function: pub::validate - struct: pub::Connectors - struct: pub::ConnectorParams - struct: pub::NoParams - struct: pub::ConnectorParamsWithKeys - struct: pub::ConnectorParamsWithModeType - struct: pub::ConnectorParamsWithMoreUrls - struct: pub::ConnectorParamsWithFileUploadUrl - struct: pub::AdyenParamsWithThreeBaseUrls - struct: pub::ConnectorParamsWithSecondaryBaseUrl - struct: pub::ConnectorParamsWithThreeUrls - impl: impl NoParams **crates/hyperswitch_domain_models/src/consts.rs** Modify existing code **crates/hyperswitch_domain_models/src/lib.rs** Add: - mod: pub::configs - mod: pub::routing **crates/hyperswitch_domain_models/src/merchant_connector_account.rs** Add: - function: private::filter_and_map - function: pub::filter_by_profile **crates/hyperswitch_domain_models/src/payments.rs** Add: - function: pub::parse_and_get_metadata **crates/hyperswitch_domain_models/src/payments/payment_intent.rs** Remove: - function: private::from - impl: impl From<PaymentIntentUpdate> for diesel_models::PaymentIntentUpdateInternal Add: - function: private::try_from - impl: impl TryFrom<PaymentIntentUpdate> for diesel_models::PaymentIntentUpdateInternal **crates/hyperswitch_domain_models/src/router_flow_types.rs** Add: - mod: pub::authentication **crates/hyperswitch_domain_models/src/router_flow_types/authentication.rs** Add: - struct: pub::PreAuthentication - struct: pub::PreAuthenticationVersionCall - struct: pub::Authentication - struct: pub::PostAuthentication **crates/hyperswitch_domain_models/src/routing.rs** Add: - function: private::from - function: private::from - struct: pub::RoutingData - struct: pub::PaymentRoutingInfo - struct: pub::PaymentRoutingInfoInner - enum: pub::PreRoutingConnectorChoice - enum: pub::PaymentRoutingInfoSerde - impl: impl From<PaymentRoutingInfoSerde> for PaymentRoutingInfo - impl: impl From<PaymentRoutingInfo> for PaymentRoutingInfoSerde **crates/hyperswitch_interfaces/src/api.rs** Add: - function: private::connector_transaction_id - trait: pub::Connector - trait: pub::PayoutsV2 - trait: pub::FraudCheck - trait: pub::FraudCheckV2 - trait: pub::ConnectorTransactionId - impl: impl Connector for T - mod: pub::authentication - mod: pub::authentication_v2 **crates/hyperswitch_interfaces/src/api/authentication.rs** Add: - trait: pub::ConnectorAuthentication - trait: pub::ConnectorPreAuthentication - trait: pub::ConnectorPreAuthenticationVersionCall - trait: pub::ConnectorPostAuthentication - trait: pub::ExternalAuthentication **crates/hyperswitch_interfaces/src/api/authentication_v2.rs** Add: - trait: pub::ConnectorAuthenticationV2 - trait: pub::ConnectorPreAuthenticationV2 - trait: pub::ConnectorPreAuthenticationVersionCallV2 - trait: pub::ConnectorPostAuthenticationV2 - trait: pub::ExternalAuthenticationV2 **crates/hyperswitch_interfaces/src/api/fraud_check.rs** Add: - trait: pub::FraudCheck **crates/hyperswitch_interfaces/src/api/fraud_check_v2.rs** Add: - trait: pub::FraudCheckV2 **crates/hyperswitch_interfaces/src/configs.rs** Remove: - function: pub::validate - struct: pub::Connectors - struct: pub::ConnectorParams - struct: pub::NoParams - struct: pub::ConnectorParamsWithKeys - struct: pub::ConnectorParamsWithModeType - struct: pub::ConnectorParamsWithMoreUrls - struct: pub::ConnectorParamsWithFileUploadUrl - struct: pub::AdyenParamsWithThreeBaseUrls - struct: pub::ConnectorParamsWithSecondaryBaseUrl - struct: pub::ConnectorParamsWithThreeUrls - impl: impl NoParams **crates/hyperswitch_interfaces/src/connector_integration_interface.rs** Add: - function: private::fmt - function: pub::get_connector_integration - function: pub::validate_file_upload - function: private::get_webhook_body_decoding_algorithm - function: private::get_webhook_body_decoding_message - function: private::decode_webhook_body - function: private::get_webhook_source_verification_algorithm - function: private::get_webhook_source_verification_merchant_secret - function: private::get_webhook_source_verification_signature - function: private::get_webhook_source_verification_message - function: private::verify_webhook_source - function: private::get_webhook_object_reference_id - function: private::get_webhook_event_type - function: private::get_webhook_resource_object - function: private::get_webhook_api_response - function: private::get_dispute_details - function: private::get_external_authentication_details - function: private::get_mandate_details - function: private::get_network_txn_id - function: private::get_flow_type - function: private::validate_connector_against_payment_request - function: private::validate_mandate_payment - function: private::validate_psync_reference_id - function: private::is_webhook_source_verification_mandatory - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - function: private::get_connector_about - function: private::id - function: private::get_currency_unit - function: private::get_auth_header - function: private::common_get_content_type - function: private::base_url - function: private::build_error_response - function: private::get_multiple_capture_sync_method - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_5xx_error_response - function: private::clone_box - function: private::connector_transaction_id - enum: pub::ConnectorEnum - enum: pub::ConnectorIntegrationEnum - trait: pub::RouterDataConversion - trait: pub::ConnectorIntegrationInterface - impl: impl std::fmt::Debug for ConnectorEnum - impl: impl ConnectorEnum - impl: impl IncomingWebhook for ConnectorEnum - impl: impl ConnectorRedirectResponse for ConnectorEnum - impl: impl ConnectorValidation for ConnectorEnum - impl: impl ConnectorSpecifications for ConnectorEnum - impl: impl ConnectorCommon for ConnectorEnum - impl: impl ConnectorIntegrationInterface<T, ResourceCommonData, Req, Resp> for ConnectorIntegrationEnum<'static, T, ResourceCommonData, Req, Resp> - impl: impl api::ConnectorTransactionId for ConnectorEnum **crates/hyperswitch_interfaces/src/connector_integration_v2.rs** Add: - trait: pub::ConnectorV2 - impl: impl ConnectorV2 for T **crates/hyperswitch_interfaces/src/lib.rs** Add: - mod: pub::connector_integration_interface - mod: pub::conversion_impls **crates/kgraph_utils/src/error.rs** Modify existing code **crates/kgraph_utils/src/mca.rs** Add: - function: private::compile_request_pm_types - function: private::compile_payment_method_enabled - function: private::compile_merchant_connector_graph **crates/openapi/src/openapi.rs** Modify existing code **crates/openapi/src/openapi_v2.rs** Modify existing code **crates/router/src/consts.rs** Modify existing code **crates/router/src/core/admin.rs** Modify existing code **crates/router/src/core/payment_methods/cards.rs** Modify existing code **crates/router/src/core/payments.rs** Remove: - mod: pub::connector_integration_v2_impls Add: - function: pub::perform_session_token_routing - struct: pub::SessionTokenRoutingResult **crates/router/src/core/payments/connector_integration_v2_impls.rs** Remove: - impl: impl api::PaymentV2 for connector::DummyConnector<T> - impl: impl api::PaymentAuthorizeV2 for connector::DummyConnector<T> - impl: impl api::PaymentAuthorizeSessionTokenV2 for connector::DummyConnector<T> - impl: impl api::PaymentSyncV2 for connector::DummyConnector<T> - impl: impl api::PaymentVoidV2 for connector::DummyConnector<T> - impl: impl api::PaymentApproveV2 for connector::DummyConnector<T> - impl: impl api::PaymentRejectV2 for connector::DummyConnector<T> - impl: impl api::PaymentCaptureV2 for connector::DummyConnector<T> - impl: impl api::PaymentSessionV2 for connector::DummyConnector<T> - impl: impl api::MandateSetupV2 for connector::DummyConnector<T> - impl: impl api::PaymentIncrementalAuthorizationV2 for connector::DummyConnector<T> - impl: impl api::PaymentsCompleteAuthorizeV2 for connector::DummyConnector<T> - impl: impl api::PaymentTokenV2 for connector::DummyConnector<T> - impl: impl api::ConnectorCustomerV2 for connector::DummyConnector<T> - impl: impl api::PaymentsPreProcessingV2 for connector::DummyConnector<T> - impl: impl api::PaymentsPostProcessingV2 for connector::DummyConnector<T> - impl: impl api::TaxCalculationV2 for connector::DummyConnector<T> - impl: impl api::PaymentSessionUpdateV2 for connector::DummyConnector<T> - impl: impl api::PaymentPostSessionTokensV2 for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::Authorize, types::PaymentFlowData, types::PaymentsAuthorizeData, types::PaymentsResponseData, > for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::PSync, types::PaymentFlowData, types::PaymentsSyncData, types::PaymentsResponseData, > for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::Void, types::PaymentFlowData, types::PaymentsCancelData, types::PaymentsResponseData, > for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::Approve, types::PaymentFlowData, types::PaymentsApproveData, types::PaymentsResponseData, > for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::Reject, types::PaymentFlowData, types::PaymentsRejectData, types::PaymentsResponseData, > for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::Capture, types::PaymentFlowData, types::PaymentsCaptureData, types::PaymentsResponseData, > for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::Session, types::PaymentFlowData, types::PaymentsSessionData, types::PaymentsResponseData, > for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::SetupMandate, types::PaymentFlowData, types::SetupMandateRequestData, types::PaymentsResponseData, > for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::IncrementalAuthorization, types::PaymentFlowData, types::PaymentsIncrementalAuthorizationData, types::PaymentsResponseData, > for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::CompleteAuthorize, types::PaymentFlowData, types::CompleteAuthorizeData, types::PaymentsResponseData, > for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::PaymentMethodToken, types::PaymentFlowData, types::PaymentMethodTokenizationData, types::PaymentsResponseData, > for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::CreateConnectorCustomer, types::PaymentFlowData, types::ConnectorCustomerData, types::PaymentsResponseData, > for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::PreProcessing, types::PaymentFlowData, types::PaymentsPreProcessingData, types::PaymentsResponseData, > for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::PostProcessing, types::PaymentFlowData, types::PaymentsPostProcessingData, types::PaymentsResponseData, > for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::CalculateTax, types::PaymentFlowData, types::PaymentsTaxCalculationData, types::TaxCalculationResponseData, > for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::SdkSessionUpdate, types::PaymentFlowData, types::SdkPaymentsSessionUpdateData, types::PaymentsResponseData, > for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::PostSessionTokens, types::PaymentFlowData, types::PaymentsPostSessionTokensData, types::PaymentsResponseData, > for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::AuthorizeSessionToken, types::PaymentFlowData, types::AuthorizeSessionTokenData, types::PaymentsResponseData, > for connector::DummyConnector<T> - impl: impl api::RefundV2 for connector::DummyConnector<T> - impl: impl api::RefundExecuteV2 for connector::DummyConnector<T> - impl: impl api::RefundSyncV2 for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::Execute, types::RefundFlowData, types::RefundsData, types::RefundsResponseData, > for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::RSync, types::RefundFlowData, types::RefundsData, types::RefundsResponseData, > for connector::DummyConnector<T> - impl: impl api::ConnectorAccessTokenV2 for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::AccessTokenAuth, types::AccessTokenFlowData, types::AccessTokenRequestData, types::AccessToken, > for connector::DummyConnector<T> - impl: impl api::DisputeV2 for connector::DummyConnector<T> - impl: impl api::AcceptDisputeV2 for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::Accept, types::DisputesFlowData, types::AcceptDisputeRequestData, types::AcceptDisputeResponse, > for connector::DummyConnector<T> - impl: impl api::DefendDisputeV2 for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::Defend, types::DisputesFlowData, types::DefendDisputeRequestData, types::DefendDisputeResponse, > for connector::DummyConnector<T> - impl: impl api::SubmitEvidenceV2 for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::Evidence, types::DisputesFlowData, types::SubmitEvidenceRequestData, types::SubmitEvidenceResponse, > for connector::DummyConnector<T> - impl: impl api::FileUploadV2 for connector::DummyConnector<T> - impl: impl api::UploadFileV2 for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::Upload, types::FilesFlowData, types::UploadFileRequestData, types::UploadFileResponse, > for connector::DummyConnector<T> - impl: impl api::RetrieveFileV2 for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::Retrieve, types::FilesFlowData, types::RetrieveFileRequestData, types::RetrieveFileResponse, > for connector::DummyConnector<T> - impl: impl api::PayoutsV2 for connector::DummyConnector<T> - impl: impl api::PayoutCreateV2 for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::PoCreate, types::PayoutFlowData, types::PayoutsData, types::PayoutsResponseData, > for connector::DummyConnector<T> - impl: impl api::PayoutEligibilityV2 for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::PoEligibility, types::PayoutFlowData, types::PayoutsData, types::PayoutsResponseData, > for connector::DummyConnector<T> - impl: impl api::PayoutFulfillV2 for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::PoFulfill, types::PayoutFlowData, types::PayoutsData, types::PayoutsResponseData, > for connector::DummyConnector<T> - impl: impl api::PayoutCancelV2 for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::PoCancel, types::PayoutFlowData, types::PayoutsData, types::PayoutsResponseData, > for connector::DummyConnector<T> - impl: impl api::PayoutQuoteV2 for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::PoQuote, types::PayoutFlowData, types::PayoutsData, types::PayoutsResponseData, > for connector::DummyConnector<T> - impl: impl api::PayoutRecipientV2 for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::PoRecipient, types::PayoutFlowData, types::PayoutsData, types::PayoutsResponseData, > for connector::DummyConnector<T> - impl: impl api::PayoutSyncV2 for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::PoSync, types::PayoutFlowData, types::PayoutsData, types::PayoutsResponseData, > for connector::DummyConnector<T> - impl: impl api::PayoutRecipientAccountV2 for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::PoRecipientAccount, types::PayoutFlowData, types::PayoutsData, types::PayoutsResponseData, > for connector::DummyConnector<T> - impl: impl api::ConnectorVerifyWebhookSourceV2 for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::VerifyWebhookSource, types::WebhookSourceVerifyData, types::VerifyWebhookSourceRequestData, types::VerifyWebhookSourceResponseData, > for connector::DummyConnector<T> - impl: impl api::FraudCheckV2 for connector::DummyConnector<T> - impl: impl api::FraudCheckSaleV2 for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::Sale, types::FrmFlowData, frm_types::FraudCheckSaleData, frm_types::FraudCheckResponseData, > for connector::DummyConnector<T> - impl: impl api::FraudCheckCheckoutV2 for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::Checkout, types::FrmFlowData, frm_types::FraudCheckCheckoutData, frm_types::FraudCheckResponseData, > for connector::DummyConnector<T> - impl: impl api::FraudCheckTransactionV2 for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::Transaction, types::FrmFlowData, frm_types::FraudCheckTransactionData, frm_types::FraudCheckResponseData, > for connector::DummyConnector<T> - impl: impl api::FraudCheckFulfillmentV2 for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::Fulfillment, types::FrmFlowData, frm_types::FraudCheckFulfillmentData, frm_types::FraudCheckResponseData, > for connector::DummyConnector<T> - impl: impl api::FraudCheckRecordReturnV2 for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::RecordReturn, types::FrmFlowData, frm_types::FraudCheckRecordReturnData, frm_types::FraudCheckResponseData, > for connector::DummyConnector<T> - impl: impl api::ConnectorMandateRevokeV2 for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::MandateRevoke, types::MandateRevokeFlowData, types::MandateRevokeRequestData, types::MandateRevokeResponseData, > for connector::DummyConnector<T> - impl: impl api::ExternalAuthenticationV2 for connector::DummyConnector<T> - impl: impl api::ConnectorPreAuthenticationV2 for connector::DummyConnector<T> - impl: impl api::ConnectorPreAuthenticationVersionCallV2 for connector::DummyConnector<T> - impl: impl api::ConnectorAuthenticationV2 for connector::DummyConnector<T> - impl: impl api::ConnectorPostAuthenticationV2 for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::Authentication, types::ExternalAuthenticationFlowData, types::authentication::ConnectorAuthenticationRequestData, types::authentication::AuthenticationResponseData, > for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::PreAuthentication, types::ExternalAuthenticationFlowData, types::authentication::PreAuthNRequestData, types::authentication::AuthenticationResponseData, > for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::PreAuthenticationVersionCall, types::ExternalAuthenticationFlowData, types::authentication::PreAuthNRequestData, types::authentication::AuthenticationResponseData, > for connector::DummyConnector<T> - impl: impl services::ConnectorIntegrationV2< api::PostAuthentication, types::ExternalAuthenticationFlowData, types::authentication::ConnectorPostAuthenticationRequestData, types::authentication::AuthenticationResponseData, > for connector::DummyConnector<T> - mod: private::dummy_connector_default_impl **crates/router/src/core/payments/flows.rs** Modify existing code **crates/router/src/core/payments/helpers.rs** Remove: - function: pub::filter_mca_based_on_profile_and_connector_type **crates/router/src/core/payments/operations/payment_session.rs** Modify existing code **crates/router/src/core/payments/operations/payment_session_intent.rs** Add: - function: private::to_update_tracker - function: private::to_update_tracker - function: private::update_trackers - impl: impl UpdateTracker<F, payments::PaymentIntentData<F>, PaymentsSessionRequest> for PaymentSessionIntent **crates/router/src/core/payments/routing.rs** Remove: - function: pub::perform_cgraph_filtering Add: - struct: pub::SessionFlowRoutingInput - struct: pub::SessionRoutingPmTypeInput **crates/router/src/core/payments/session_operation.rs** Modify existing code **crates/router/src/core/payments/transformers.rs** Remove: - function: private::connector_transaction_id - function: private::connector_transaction_id - function: private::connector_transaction_id - function: private::connector_transaction_id - impl: impl ConnectorTransactionId for Helcim - impl: impl ConnectorTransactionId for Nexinets **crates/router/src/core/payout_link.rs** Modify existing code **crates/router/src/core/routing.rs** Modify existing code **crates/router/src/core/routing/helpers.rs** Remove: - function: pub::get_all_mcas - function: private::filter_and_map - function: pub::filter_by_profile - struct: pub::MerchantConnectorAccounts - impl: impl MerchantConnectorAccounts **crates/router/src/core/utils.rs** Modify existing code **crates/router/src/db/kafka_store.rs** Modify existing code **crates/router/src/db/merchant_connector_account.rs** Modify existing code **crates/router/src/services.rs** Remove: - mod: pub::conversion_impls **crates/router/src/services/connector_integration_interface.rs** Remove: - function: pub::get_connector_integration - function: pub::validate_file_upload - function: private::get_webhook_body_decoding_algorithm - function: private::get_webhook_body_decoding_message - function: private::decode_webhook_body - function: private::get_webhook_source_verification_algorithm - function: private::get_webhook_source_verification_merchant_secret - function: private::get_webhook_source_verification_signature - function: private::get_webhook_source_verification_message - function: private::verify_webhook_source - function: private::get_webhook_object_reference_id - function: private::get_webhook_event_type - function: private::get_webhook_resource_object - function: private::get_webhook_api_response - function: private::get_dispute_details - function: private::get_external_authentication_details - function: private::get_mandate_details - function: private::get_network_txn_id - function: private::get_revenue_recovery_attempt_details - function: private::get_revenue_recovery_invoice_details - function: private::connector_transaction_id - function: private::get_flow_type - function: private::validate_connector_against_payment_request - function: private::validate_mandate_payment - function: private::validate_psync_reference_id - function: private::is_webhook_source_verification_mandatory - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - function: private::get_connector_about - function: private::id - function: private::get_currency_unit - function: private::get_auth_header - function: private::common_get_content_type - function: private::base_url - function: private::build_error_response - function: private::get_multiple_capture_sync_method - function: private::build_request - function: private::handle_response - function: private::get_error_response - function: private::get_5xx_error_response - function: private::clone_box - enum: pub::ConnectorEnum - enum: pub::ConnectorIntegrationEnum - trait: pub::RouterDataConversion - trait: pub::ConnectorIntegrationInterface - impl: impl ConnectorEnum - impl: impl api::IncomingWebhook for ConnectorEnum - impl: impl api::ConnectorTransactionId for ConnectorEnum - impl: impl ConnectorRedirectResponse for ConnectorEnum - impl: impl ConnectorValidation for ConnectorEnum - impl: impl ConnectorSpecifications for ConnectorEnum - impl: impl api::ConnectorCommon for ConnectorEnum - impl: impl ConnectorIntegrationInterface<T, ResourceCommonData, Req, Resp> for ConnectorIntegrationEnum<'static, T, ResourceCommonData, Req, Resp> **crates/router/src/types/api.rs** Modify existing code **crates/router/src/types/api/authentication.rs** Remove: - struct: pub::PreAuthentication - struct: pub::PreAuthenticationVersionCall - struct: pub::Authentication - struct: pub::PostAuthentication - trait: pub::ConnectorAuthentication - trait: pub::ConnectorPreAuthentication - trait: pub::ConnectorPreAuthenticationVersionCall - trait: pub::ConnectorPostAuthentication - trait: pub::ExternalAuthentication **crates/router/src/types/api/authentication_v2.rs** Remove: - trait: pub::ConnectorAuthenticationV2 - trait: pub::ConnectorPreAuthenticationV2 - trait: pub::ConnectorPreAuthenticationVersionCallV2 - trait: pub::ConnectorPostAuthenticationV2 - trait: pub::ExternalAuthenticationV2 **crates/router/src/types/api/fraud_check.rs** Modify existing code **crates/router/src/types/api/fraud_check_v2.rs** Remove: - trait: pub::FraudCheckV2 **crates/router/src/types/storage.rs** Remove: - function: private::from - function: private::from - struct: pub::RoutingData - struct: pub::PaymentRoutingInfo - struct: pub::PaymentRoutingInfoInner - enum: pub::PreRoutingConnectorChoice - enum: pub::PaymentRoutingInfoSerde - impl: impl From<PaymentRoutingInfoSerde> for PaymentRoutingInfo - impl: impl From<PaymentRoutingInfo> for PaymentRoutingInfoSerde **crates/storage_impl/src/payments/payment_intent.rs** Modify existing code
{"pr_number": 6763, "pr_title": "feat: add routing support for v2 sdk session flow", "merged_at": "2025-03-26T08:52:58Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "merchant", "user"]}, "hierarchy": {"api_models": ["crates/api_models/src/admin.rs", "crates/api_models/src/routing.rs"], "database": ["crates/diesel_models/src/payment_intent.rs"], "domain": ["crates/hyperswitch_domain_models/Cargo.toml", "crates/hyperswitch_domain_models/src/configs.rs", "crates/hyperswitch_domain_models/src/consts.rs", "crates/hyperswitch_domain_models/src/lib.rs", "crates/hyperswitch_domain_models/src/merchant_connector_account.rs", "crates/hyperswitch_domain_models/src/payments.rs", "crates/hyperswitch_domain_models/src/payments/payment_intent.rs", "crates/hyperswitch_domain_models/src/router_flow_types.rs", "crates/hyperswitch_domain_models/src/router_flow_types/authentication.rs", "crates/hyperswitch_domain_models/src/routing.rs"], "core_business": ["crates/router/src/core/admin.rs", "crates/router/src/core/payment_methods/cards.rs", "crates/router/src/core/payments.rs", "crates/router/src/core/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/payment_session.rs", "crates/router/src/core/payments/operations/payment_session_intent.rs", "crates/router/src/core/payments/routing.rs", "crates/router/src/core/payments/session_operation.rs", "crates/router/src/core/payments/transformers.rs", "crates/router/src/core/payout_link.rs", "crates/router/src/core/routing.rs", "crates/router/src/core/routing/helpers.rs", "crates/router/src/core/utils.rs"], "connectors": ["crates/common_enums/src/connector_enums.rs", "crates/hyperswitch_connectors/src/connectors/coinbase.rs", "crates/hyperswitch_connectors/src/connectors/helcim.rs", "crates/hyperswitch_connectors/src/connectors/nexinets.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/hyperswitch_connectors/src/default_implementations_v2.rs", "crates/hyperswitch_interfaces/src/connector_integration_interface.rs", "crates/hyperswitch_interfaces/src/connector_integration_v2.rs", "crates/router/src/db/merchant_connector_account.rs", "crates/router/src/services/connector_integration_interface.rs"], "types": ["crates/router/src/types/api.rs", "crates/router/src/types/api/authentication.rs", "crates/router/src/types/api/authentication_v2.rs", "crates/router/src/types/api/fraud_check.rs", "crates/router/src/types/api/fraud_check_v2.rs", "crates/router/src/types/storage.rs"], "utils": ["crates/common_utils/src/macros.rs", "crates/kgraph_utils/Cargo.toml", "crates/kgraph_utils/src/error.rs", "crates/kgraph_utils/src/mca.rs"], "config": [".typos.toml", "crates/hyperswitch_interfaces/src/configs.rs", "crates/router/Cargo.toml"], "other": ["Cargo.lock", "crates/hyperswitch_interfaces/src/api.rs", "crates/hyperswitch_interfaces/src/api/authentication.rs", "crates/hyperswitch_interfaces/src/api/authentication_v2.rs", "crates/hyperswitch_interfaces/src/api/fraud_check.rs", "crates/hyperswitch_interfaces/src/api/fraud_check_v2.rs", "crates/router/src/services/conversion_impls.rs", "crates/hyperswitch_interfaces/src/lib.rs", "crates/openapi/src/openapi.rs", "crates/openapi/src/openapi_v2.rs", "crates/router/src/consts.rs", "crates/router/src/db/kafka_store.rs", "crates/router/src/services.rs", "crates/storage_impl/src/payments/payment_intent.rs"]}, "change_types": {"structs_added": 20, "functions_added": 79, "enums_added": 4, "fields_added": 393, "imports_added": 46, "conditionals_added": 20, "database_queries": 19}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
feat(core): create a process_tracker workflow for PCR ## 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 ,creates a process_tracker execute workflow , to trigger a MIT Payment retry - The first retry attempt , would create a Execute task entry in the PT which would do a api call to the pg to do the MIT payment, - Its based on the intent status and the called connector param and active_attemt_id, we take a decision, If Decision: - **Execute** (i.e, the payment_intent status is in processing and there is no active attempt present) > **Action**: The payment is done , and based on the attempt status get the actions >If its a **sync Action** , then the payment status is processing -> create another task to perform psync **;** Finish the current task > If the payment_status is a **success** -> Send back a successful webhook **;** Finish the current task > If the payment is a **terminal_failure** -> Send back a failure webhook **;** Finish The Current Task > If the payment is a **retryable payment** the action would be **Retry** -> update the current task process to pending and increment the retry count by 1 > If its an unintended attempt status move it to Manual Review **;** Mark the current task’s pt status as ‘Review’ > If there was an error check if , => If the payment intent doesn’t have an **active_attempt_id** , a new pt task `REVIEW_TASK` is introduced **;** Finish the current task => If there is a **active_attempt_id** then, create another task to perform psync **;** Finish the current task - **Psync** (i.e., the payment_intent status is in processing but the connector has been called and there is an active attempt) > If an existing process_tracker entry for the `PSYNC TASK`exists, then => **Action**: match attempt status and update the process tracker status based on that. => Finish the current task > If there isn’t any `PSYNC_TASK` in process tracker, => **Action**: Create a new psync_task in process tracker => Finish the current task - **ReviewTaskForFailedPayment**(To check if the failure is a terminal failure or a retryable one in which the db update for connector_called field and active_attempt_id did not happen successfully) | **ReviewTaskForSuccessfulPayment** (to prevent from double charge) > Create a `Review_Task` , which is would to handle the abnormal states of a payment (it would re evaluate the decision taken on payment_intent’s params) ; finish the current task > `This is implemented in the following` [PR](https://github.com/juspay/hyperswitch/pull/7178) - InvalidTask > If there is an ambiguous state then log it and finish the current task ### 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? > This is a v2 PR, cannot be tested , until this [PR](https://github.com/juspay/hyperswitch/pull/7215) gets merged ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/payments.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/enums.rs` - `crates/diesel_models/src/process_tracker.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/payments/payment_intent.rs` **4. Core Business Logic** - `crates/router/src/core.rs` - `crates/router/src/core/passive_churn_recovery.rs` - `crates/router/src/core/passive_churn_recovery/transformers.rs` - ... and 2 more files **5. Type Definitions** - `crates/router/src/types/storage.rs` - `crates/router/src/types/storage/passive_churn_recovery.rs` - `crates/scheduler/src/consumer/types/process_data.rs` **6. Utils** - `crates/scheduler/src/utils.rs` **7. Other** - `crates/router/src/bin/scheduler.rs` - `crates/router/src/workflows.rs` - `crates/router/src/workflows/outgoing_webhook_retry.rs` - ... and 7 more files **Code Patterns Applied:** - Define new data structures (4 changes) - Implement new functions (17 changes) - Extend existing types with new fields (88 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit 44dc45b8: Files to modify: **crates/api_models/src/payments.rs** Modify existing code **crates/diesel_models/src/enums.rs** Modify existing code **crates/diesel_models/src/process_tracker.rs** Modify existing code **crates/hyperswitch_domain_models/src/payments/payment_intent.rs** Modify existing code **crates/router/src/bin/scheduler.rs** Remove: - function: private::trigger_workflow - impl: impl ProcessTrackerWorkflows<routes::SessionState> for WorkflowRunner **crates/router/src/core.rs** Add: - mod: pub::passive_churn_recovery **crates/router/src/core/passive_churn_recovery.rs** Add: - function: pub::perform_execute_payment - function: private::insert_psync_pcr_task - function: pub::call_psync_api - mod: pub::transformers - mod: pub::types **crates/router/src/core/passive_churn_recovery/transformers.rs** Add: - function: private::foreign_from - impl: impl ForeignFrom<AttemptStatus> for PcrAttemptStatus **crates/router/src/core/passive_churn_recovery/types.rs** Add: - function: pub::update_pt_status_based_on_attempt_status_for_execute_payment - function: pub::get_decision_based_on_params - function: pub::execute_payment - function: pub::execute_payment_task_response_handler - function: pub::decide_retry_failure_action - function: private::call_proxy_api - enum: pub::PcrAttemptStatus - enum: pub::Decision - enum: pub::Action - impl: impl PcrAttemptStatus - impl: impl Decision - impl: impl Action **crates/router/src/core/payments/operations/payment_confirm_intent.rs** Modify existing code **crates/router/src/types/storage.rs** Add: - mod: pub::passive_churn_recovery **crates/router/src/types/storage/passive_churn_recovery.rs** Add: - struct: pub::PcrWorkflowTrackingData - struct: pub::PcrPaymentData **crates/router/src/workflows.rs** Add: - mod: pub::passive_churn_recovery_workflow **crates/router/src/workflows/outgoing_webhook_retry.rs** Add: - function: private::execute_workflow **crates/router/src/workflows/passive_churn_recovery_workflow.rs** Add: - function: private::execute_workflow - function: private::execute_workflow - function: pub::extract_data_and_perform_action - function: pub::get_schedule_time_to_retry_mit_payments - struct: pub::ExecutePcrWorkflow - impl: impl ProcessTrackerWorkflow<SessionState> for ExecutePcrWorkflow **crates/router/src/workflows/payment_method_status_update.rs** Add: - function: private::execute_workflow **crates/router/src/workflows/payment_sync.rs** Modify existing code **crates/router/src/workflows/refund_router.rs** Add: - function: private::execute_workflow **crates/router/src/workflows/tokenized_data.rs** Add: - function: private::execute_workflow **crates/scheduler/src/consumer/types/process_data.rs** Add: - function: private::default - struct: pub::RevenueRecoveryPaymentProcessTrackerMapping - impl: impl Default for RevenueRecoveryPaymentProcessTrackerMapping **crates/scheduler/src/errors.rs** Modify existing code **crates/scheduler/src/utils.rs** Add: - function: pub::get_pcr_payments_retry_schedule_time **crates/storage_impl/src/errors.rs** Add: - enum: pub::RecoveryError
{"pr_number": 7124, "pr_title": "feat(core): create a process_tracker workflow for PCR", "merged_at": "2025-02-27T14:07:23Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "connector", "webhook"]}, "hierarchy": {"api_models": ["crates/api_models/src/payments.rs"], "database": ["crates/diesel_models/src/enums.rs", "crates/diesel_models/src/process_tracker.rs"], "domain": ["crates/hyperswitch_domain_models/src/payments/payment_intent.rs"], "core_business": ["crates/router/src/core.rs", "crates/router/src/core/passive_churn_recovery.rs", "crates/router/src/core/passive_churn_recovery/transformers.rs", "crates/router/src/core/passive_churn_recovery/types.rs", "crates/router/src/core/payments/operations/payment_confirm_intent.rs"], "types": ["crates/router/src/types/storage.rs", "crates/router/src/types/storage/passive_churn_recovery.rs", "crates/scheduler/src/consumer/types/process_data.rs"], "utils": ["crates/scheduler/src/utils.rs"], "other": ["crates/router/src/bin/scheduler.rs", "crates/router/src/workflows.rs", "crates/router/src/workflows/outgoing_webhook_retry.rs", "crates/router/src/workflows/passive_churn_recovery_workflow.rs", "crates/router/src/workflows/payment_method_status_update.rs", "crates/router/src/workflows/payment_sync.rs", "crates/router/src/workflows/refund_router.rs", "crates/router/src/workflows/tokenized_data.rs", "crates/scheduler/src/errors.rs", "crates/storage_impl/src/errors.rs"]}, "change_types": {"structs_added": 4, "functions_added": 17, "enums_added": 4, "fields_added": 88, "imports_added": 33, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(cypress): backup and restore sessions when using user apis ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> this pr fixes the issue where cookies are not being set when hitting user apis. - we need to set cookies. but cypress does not directly support that - `cy.setCookie()` method does not persist outside of the `it()` block - in order to make it persist, we need to set session using `cy.session()` method in the `beforeEach()` hook closes #6977 this pr, of course, does not fix the hooks (caching) 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). --> NA ## How did you test 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="540" alt="image" src="https://github.com/user-attachments/assets/5d1f0463-e9a2-4ee7-9597-65151c85539e" /> every failure here is related to assertion and `globalState` where `connectorId` and `mcaId` not getting updated. This can be picked up a separate PR since the fix done in this PR is `P0` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `npm run format && npm run lint -- --fix` - [ ] 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/RoutingTest/00000-PriorityRouting.cy.js` - `cypress-tests/cypress/e2e/RoutingTest/00001-VolumeBasedRouting.cy.js` - `cypress-tests/cypress/e2e/RoutingTest/00002-RuleBasedRouting.cy.js` - ... and 2 more files **Code Patterns Applied:** - Extend existing types with new fields (5 changes)
{"pr_number": 6978, "pr_title": "fix(cypress): backup and restore sessions when using user apis", "merged_at": "2025-01-08T11:43:26Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user", "order", "connector"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/RoutingTest/00000-PriorityRouting.cy.js", "cypress-tests/cypress/e2e/RoutingTest/00001-VolumeBasedRouting.cy.js", "cypress-tests/cypress/e2e/RoutingTest/00002-RuleBasedRouting.cy.js", "cypress-tests/cypress/e2e/RoutingTest/00003-Retries.cy.js", "cypress-tests/cypress/support/commands.js"]}, "change_types": {"fields_added": 5}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
feat(connector): [paypal, trustpay] add in feature matrix ## 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 paypal, trustpay, nomupay connectors in feature matrix ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> ``` curl --location 'http://localhost:8080/feature_matrix' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_jQNBYCfN5R0473yldj23Yl7HsGbCctexthWkELSAMAGpjCxKAspb2fcQDP1KmMJz' ``` Response: ``` { "connector_count": 2, "connectors": [ { "name": "PAYPAL", "display_name": "Paypal", "description": "PayPal is a Slovakia-based company specializing in secure e-commerce payments, particularly within the EEA area.", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "card", "payment_method_type": "credit", "payment_method_type_display_name": "Credit Card", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard", "AmericanExpress", "DinersClub", "Discover", "Interac", "JCB", "CartesBancaires" ], "supported_countries": [ "TTO", "HND", "TWN", "DEU", "MCO", "BDI", "SLV", "LCA", "ESP", "GUF", "MUS", "FRO", "FIN", "MKD", "SPM", "ETH", "DNK", "NGA", "GMB", "VCT", "ROU", "QAT", "PER", "MYT", "TGO", "NOR", "TCD", "KNA", "DMA", "FJI", "POL", "KOR", "SLE", "KIR", "LAO", "BFA", "KWT", "CRI", "WSM", "ABW", "GBR", "MWI", "BHR", "ZWE", "BRB", "MSR", "BIH", "SYC", "TZA", "NIU", "COD", "SMR", "KAZ", "NAM", "BMU", "CHL", "ISL", "LKA", "NRU", "BLZ", "GTM", "ZMB", "SGP", "ARE", "GIB", "LSO", "SUR", "GAB", "JPN", "PAN", "CHE", "NCL", "USA", "SVK", "GRD", "DOM", "SAU", "TKM", "UGA", "BLR", "VNM", "MDV", "CYP", "LTU", "LIE", "MAR", "SWZ", "MHL", "ERI", "NER", "MLT", "PNG", "UKR", "SVN", "REU", "NPL", "PYF", "FRA", "NFK", "SHN", "CIV", "ISR", "COG", "SJM", "HKG", "BWA", "URY", "SLB", "BRA", "CPV", "SOM", "GEO", "AGO", "KEN", "MNE", "MOZ", "NIC", "IND", "AUS", "IRL", "CMR", "GRL", "GLP", "LUX", "MEX", "NLD", "THA", "CAN", "HUN", "PCN", "PHL", "TUV", "AIA", "VGB", "PRY", "KHM", "DZA", "GUY", "MNG", "BEL", "TON", "JAM", "TCA", "GNB", "OMN", "ZAF", "COM", "NZL", "MDG", "BRN", "SRB", "IDN", "MLI", "KGZ", "AZE", "VEN", "RWA", "ECU", "GRC", "COK", "DJI", "PRT", "BHS", "EGY", "BTN", "AUT", "RUS", "TUN", "BOL", "MYS", "COL", "SEN", "JOR", "STP", "HRV", "ARG", "FSM", "GIN", "ATG", "MDA", "SWE", "ITA", "LVA", "EST", "BEN", "BGR", "MRT", "CZE", "CYM", "TJK" ], "supported_currencies": [ "PLN", "SEK", "SGD", "BRL", "NZD", "ILS", "CHF", "THB", "PHP", "USD", "CZK", "JPY", "CAD", "CNY", "MXN", "GBP", "HUF", "HKD", "EUR", "MYR", "NOK", "AUD", "DKK", "TWD" ] }, { "payment_method": "card", "payment_method_type": "debit", "payment_method_type_display_name": "Debit Card", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "three_ds": "supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard", "AmericanExpress", "DinersClub", "Discover", "Interac", "JCB", "CartesBancaires" ], "supported_countries": [ "NFK", "URY", "FIN", "NER", "CAN", "GMB", "COM", "SMR", "MCO", "GUF", "DOM", "ECU", "DNK", "CMR", "CRI", "GEO", "BGR", "FRA", "TUN", "GTM", "NLD", "NAM", "PAN", "TCA", "GNB", "SEN", "SVK", "BLZ", "NZL", "AGO", "ATG", "ISR", "MRT", "TON", "OMN", "RUS", "LIE", "BEN", "FJI", "GAB", "SHN", "MLT", "UKR", "TUV", "LTU", "GIN", "RWA", "KHM", "MYS", "VNM", "NGA", "USA", "TWN", "DZA", "MEX", "AUS", "MDV", "SLB", "CHL", "MWI", "ZMB", "BRA", "ZWE", "PCN", "NIU", "GRD", "NOR", "GUY", "BTN", "NRU", "SAU", "SJM", "AZE", "LAO", "GBR", "BHR", "MDG", "IND", "ARG", "EGY", "SGP", "WSM", "HRV", "KAZ", "GIB", "SPM", "GLP", "MDA", "TKM", "STP", "BFA", "BWA", "BEL", "MNE", "ITA", "DJI", "CYP", "KOR", "GRC", "NCL", "KEN", "PER", "VCT", "CHE", "FRO", "KGZ", "AIA", "MYT", "PYF", "CYM", "BRB", "AUT", "ISL", "HKG", "BOL", "PRY", "REU", "IRL", "JPN", "COD", "VGB", "PHL", "SWZ", "EST", "MAR", "JOR", "NIC", "TZA", "ETH", "IDN", "BMU", "SUR", "FSM", "SLE", "ROU", "MNG", "BHS", "PNG", "SOM", "BRN", "NPL", "BDI", "HND", "ARE", "LKA", "MUS", "SLV", "BLR", "POL", "CPV", "JAM", "SYC", "TTO", "MLI", "ZAF", "BIH", "QAT", "LVA", "CZE", "SVN", "KNA", "DEU", "MKD", "DMA", "LUX", "HUN", "ERI", "COG", "COK", "PRT", "THA", "SRB", "GRL", "ABW", "MHL", "SWE", "MOZ", "COL", "TGO", "VEN", "LSO", "TCD", "MSR", "KWT", "KIR", "LCA", "CIV", "UGA", "ESP", "TJK" ], "supported_currencies": [ "CNY", "PHP", "TWD", "HKD", "JPY", "SEK", "MXN", "ILS", "BRL", "PLN", "EUR", "USD", "DKK", "HUF", "AUD", "CAD", "CZK", "NZD", "MYR", "NOK", "GBP", "SGD", "CHF", "THB" ] }, { "payment_method": "wallet", "payment_method_type": "paypal", "payment_method_type_display_name": "PayPal", "mandates": "supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": [ "NCL", "MRT", "DMA", "MYS", "GIN", "STP", "MKD", "CAN", "SLV", "ISR", "TTO", "KOR", "KIR", "SMR", "COG", "MLT", "MSR", "KWT", "ITA", "COK", "SLE", "MNG", "MOZ", "FRO", "GRL", "TCD", "DNK", "MWI", "URY", "CPV", "CMR", "MDA", "ESP", "HND", "UKR", "MLI", "AUT", "SGP", "TJK", "DEU", "POL", "SWE", "GUY", "SRB", "KNA", "ETH", "THA", "NPL", "MUS", "PAN", "NIU", "LKA", "VEN", "GLP", "BRB", "OMN", "SWZ", "MDV", "PRT", "LIE", "SUR", "ISL", "LTU", "AZE", "TGO", "FIN", "LSO", "HRV", "PYF", "CHL", "NGA", "BRN", "NZL", "FSM", "LAO", "MYT", "LCA", "BFA", "BTN", "ATG", "CYM", "HKG", "ZMB", "CYP", "SYC", "COL", "AGO", "HUN", "MAR", "CIV", "DOM", "BHR", "SJM", "KGZ", "SOM", "DZA", "EST", "MHL", "PNG", "MCO", "TZA", "GNB", "WSM", "KAZ", "MNE", "QAT", "NAM", "KEN", "COD", "TON", "AIA", "PHL", "TCA", "SEN", "ERI", "JAM", "SHN", "BEN", "GIB", "RUS", "EGY", "BOL", "REU", "ABW", "GMB", "ARG", "VNM", "IND", "LVA", "NOR", "MDG", "GUF", "TUV", "GEO", "TKM", "ARE", "JPN", "VCT", "SAU", "FRA", "GTM", "SVN", "TWN", "LUX", "NRU", "KHM", "BGR", "BMU", "BHS", "ZAF", "NER", "TUN", "PER", "NIC", "UGA", "AUS", "SPM", "BIH", "SLB", "IRL", "COM", "NFK", "BDI", "GRD", "VGB", "GBR", "BLR", "BRA", "PCN", "MEX", "FJI", "GRC", "CHE", "BLZ", "BEL", "IDN", "GAB", "PRY", "ROU", "JOR", "SVK", "NLD", "USA", "DJI", "CRI", "CZE", "BWA", "RWA", "ZWE", "ECU" ], "supported_currencies": [ "GBP", "USD", "ILS", "MYR", "DKK", "CZK", "MXN", "HUF", "SEK", "JPY", "EUR", "HKD", "TWD", "PLN", "SGD", "AUD", "BRL", "PHP", "NOK", "NZD", "CAD", "CHF", "THB", "CNY" ] }, { "payment_method": "bank_redirect", "payment_method_type": "eps", "payment_method_type_display_name": "EPS", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": [ "MDV", "VGB", "COG", "SUR", "LTU", "KGZ", "USA", "BOL", "SRB", "MLI", "GMB", "CAN", "PAN", "GRD", "CYP", "PNG", "RUS", "KWT", "PHL", "CYM", "BTN", "GAB", "TKM", "SVN", "GIN", "AGO", "GUF", "NGA", "COK", "LAO", "BHR", "SJM", "TJK", "BRB", "BEL", "FRO", "SHN", "TCA", "TON", "BLR", "NIU", "MNG", "AIA", "NAM", "KNA", "DOM", "HND", "KOR", "KIR", "MYT", "JAM", "TZA", "ABW", "CRI", "DMA", "PCN", "CZE", "DJI", "IDN", "HRV", "DNK", "IRL", "AUS", "GTM", "ISL", "NPL", "GRC", "THA", "GIB", "LCA", "CHL", "SLV", "AUT", "VEN", "NOR", "MKD", "ZWE", "ECU", "MDA", "GNB", "SWE", "KAZ", "CIV", "FSM", "FRA", "NER", "GLP", "TTO", "ETH", "VCT", "EGY", "NRU", "SWZ", "HUN", "GUY", "NLD", "GRL", "MWI", "JPN", "BGR", "OMN", "BRN", "HKG", "JOR", "NCL", "PER", "DZA", "CMR", "PRY", "MRT", "SYC", "BIH", "BWA", "ITA", "ISR", "SGP", "TWN", "COM", "LIE", "MLT", "MAR", "MEX", "SLB", "MOZ", "NFK", "NZL", "MDG", "FJI", "DEU", "ESP", "KHM", "MSR", "CHE", "GEO", "ARG", "SLE", "ATG", "EST", "PYF", "BRA", "ERI", "SOM", "UGA", "LSO", "SMR", "LKA", "TUN", "GBR", "BHS", "STP", "BEN", "PRT", "IND", "FIN", "MCO", "TGO", "BDI", "MNE", "VNM", "TUV", "TCD", "NIC", "UKR", "URY", "LVA", "QAT", "POL", "SEN", "BMU", "SVK", "MYS", "COD", "RWA", "MHL", "MUS", "ARE", "ZAF", "WSM", "ZMB", "AZE", "BLZ", "KEN", "BFA", "ROU", "SPM", "SAU", "REU", "CPV", "COL", "LUX" ], "supported_currencies": [ "PHP", "SEK", "CAD", "EUR", "BRL", "SGD", "CNY", "NOK", "NZD", "THB", "TWD", "CZK", "GBP", "CHF", "MYR", "JPY", "ILS", "AUD", "MXN", "HUF", "PLN", "USD", "DKK", "HKD" ] }, { "payment_method": "bank_redirect", "payment_method_type": "giropay", "payment_method_type_display_name": "Giropay", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": [ "STP", "GRC", "ZMB", "MUS", "CHE", "BRB", "KGZ", "BFA", "TCA", "GMB", "SUR", "MSR", "COL", "DJI", "JOR", "NFK", "WSM", "GAB", "PRY", "GNB", "IND", "MAR", "KEN", "TON", "MLI", "GBR", "LCA", "SGP", "MHL", "MKD", "COG", "BTN", "MDG", "SMR", "AUT", "LIE", "LAO", "FRA", "OMN", "THA", "BGR", "KOR", "REU", "GLP", "CMR", "ABW", "BOL", "MOZ", "HUN", "SPM", "CHL", "TJK", "BRA", "NPL", "COD", "ETH", "TCD", "SVK", "PHL", "AUS", "MDV", "VGB", "CRI", "MDA", "PER", "COK", "CYP", "MEX", "KAZ", "MNG", "RWA", "SWE", "GUF", "BRN", "ISL", "SLE", "TZA", "NIC", "SRB", "RUS", "BLR", "MNE", "MCO", "GUY", "TGO", "NZL", "TKM", "QAT", "SLV", "FJI", "NER", "BIH", "SAU", "TTO", "NOR", "VEN", "TUN", "BEN", "LVA", "EGY", "MRT", "USA", "NCL", "FRO", "IDN", "TWN", "GEO", "SYC", "SVN", "ESP", "VCT", "CAN", "BMU", "ZWE", "EST", "SEN", "ZAF", "MYT", "PAN", "BHR", "PRT", "SJM", "SHN", "CIV", "CYM", "GIN", "KNA", "UGA", "VNM", "BEL", "AGO", "AZE", "LKA", "UKR", "PYF", "GTM", "COM", "JAM", "DEU", "ITA", "MYS", "DOM", "HKG", "ARG", "ECU", "CZE", "DNK", "KHM", "ARE", "GRD", "IRL", "SOM", "CPV", "MLT", "TUV", "MWI", "ROU", "BDI", "ISR", "NIU", "ATG", "FSM", "NAM", "BLZ", "LSO", "NLD", "URY", "BWA", "PNG", "NRU", "KIR", "SLB", "ERI", "FIN", "KWT", "POL", "NGA", "BHS", "AIA", "HRV", "DZA", "DMA", "GIB", "GRL", "HND", "SWZ", "JPN", "LTU", "LUX", "PCN" ], "supported_currencies": [ "PHP", "NZD", "CNY", "GBP", "CHF", "SGD", "USD", "ILS", "BRL", "AUD", "TWD", "PLN", "CZK", "DKK", "EUR", "MYR", "MXN", "CAD", "THB", "NOK", "HKD", "HUF", "JPY", "SEK" ] }, { "payment_method": "bank_redirect", "payment_method_type": "ideal", "payment_method_type_display_name": "iDEAL", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": [ "HRV", "BTN", "MDA", "ESP", "SWE", "NAM", "FRA", "ARG", "PCN", "MNE", "PHL", "LCA", "CMR", "MNG", "ISL", "SAU", "CHE", "FIN", "KIR", "BMU", "GUF", "EGY", "UGA", "SLV", "DJI", "HUN", "GNB", "AZE", "JOR", "BRB", "LKA", "SGP", "THA", "CIV", "TUV", "COK", "SWZ", "SPM", "VNM", "NPL", "CRI", "LVA", "ECU", "GTM", "CPV", "BIH", "COL", "ITA", "HND", "ATG", "RUS", "ZWE", "IRL", "BLR", "NIU", "IND", "MRT", "SEN", "BHS", "TZA", "MSR", "DZA", "PNG", "BWA", "GLP", "ISR", "DNK", "SVK", "TON", "MUS", "CYP", "MEX", "KHM", "KOR", "ERI", "ZAF", "QAT", "BRA", "LUX", "COG", "GBR", "NCL", "TKM", "JPN", "KWT", "FSM", "KEN", "MCO", "PRT", "GRL", "TJK", "BRN", "NOR", "DEU", "LSO", "STP", "GEO", "GIN", "SVN", "VCT", "VGB", "NER", "GRC", "OMN", "KGZ", "COD", "FRO", "KAZ", "FJI", "KNA", "BHR", "EST", "NLD", "TGO", "LAO", "NFK", "REU", "NIC", "UKR", "SJM", "JAM", "GIB", "TTO", "PYF", "BEL", "IDN", "CYM", "BFA", "PRY", "ARE", "BLZ", "COM", "ZMB", "MOZ", "RWA", "SMR", "BDI", "TWN", "CZE", "SYC", "TUN", "MLI", "MYS", "TCA", "MAR", "CAN", "AGO", "SOM", "URY", "ETH", "SHN", "MHL", "GMB", "AUS", "MDG", "GRD", "LTU", "AUT", "NRU", "SLE", "GUY", "NGA", "ROU", "SRB", "MYT", "WSM", "PAN", "NZL", "BOL", "GAB", "DMA", "ABW", "LIE", "TCD", "AIA", "CHL", "SUR", "PER", "BEN", "SLB", "MWI", "MDV", "MKD", "BGR", "VEN", "USA", "MLT", "DOM", "HKG", "POL" ], "supported_currencies": [ "TWD", "USD", "DKK", "MYR", "NOK", "CNY", "MXN", "CZK", "ILS", "CAD", "NZD", "SEK", "CHF", "SGD", "PLN", "PHP", "GBP", "HUF", "EUR", "HKD", "THB", "AUD", "JPY", "BRL" ] }, { "payment_method": "bank_redirect", "payment_method_type": "sofort", "payment_method_type_display_name": "Sofort", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [ "automatic", "manual", "sequential_automatic" ], "supported_countries": [ "IRL", "NGA", "MDA", "BRN", "GUY", "RUS", "IND", "BLR", "BMU", "NCL", "MUS", "NOR", "MYT", "KOR", "GNB", "GLP", "GIB", "NIC", "PCN", "SLE", "GBR", "SMR", "COK", "GIN", "THA", "LTU", "TCA", "ESP", "VNM", "TZA", "AIA", "BGR", "COD", "TUN", "TJK", "PYF", "PAN", "NFK", "CHE", "TWN", "BRA", "ISL", "AUS", "PRY", "MWI", "ARE", "KWT", "TUV", "ATG", "SLB", "SLV", "MNE", "FRA", "COM", "CYP", "LVA", "KNA", "HKG", "HUN", "EST", "KGZ", "NPL", "PER", "CYM", "JOR", "URY", "MEX", "SWZ", "TCD", "WSM", "BFA", "MKD", "SOM", "MAR", "SWE", "CZE", "BDI", "GAB", "BIH", "SJM", "DJI", "LUX", "CAN", "GTM", "UKR", "FJI", "KEN", "SUR", "MRT", "REU", "PNG", "ZAF", "NAM", "GUF", "BWA", "GMB", "SVK", "BHR", "GRC", "MNG", "BOL", "JPN", "ECU", "POL", "IDN", "CHL", "SPM", "USA", "TTO", "MHL", "NER", "QAT", "TKM", "VGB", "BEL", "CRI", "KAZ", "MYS", "ABW", "MSR", "LCA", "OMN", "ERI", "SGP", "KIR", "MDG", "VCT", "AGO", "MCO", "NIU", "AUT", "UGA", "MLI", "SYC", "NZL", "DOM", "TON", "DEU", "COG", "ISR", "ZMB", "FSM", "DNK", "STP", "RWA", "LIE", "SAU", "SVN", "ROU", "LSO", "BHS", "VEN", "COL", "TGO", "KHM", "BEN", "NLD", "LAO", "GEO", "AZE", "NRU", "SRB", "CPV", "GRL", "FRO", "SHN", "HND", "EGY", "ZWE", "PRT", "BLZ", "BTN", "HRV", "MLT", "JAM", "ITA", "DZA", "MOZ", "FIN", "CMR", "DMA", "PHL", "MDV", "LKA", "SEN", "ETH", "BRB", "GRD", "CIV", "ARG" ], "supported_currencies": [ "BRL", "ILS", "PHP", "THB", "SGD", "TWD", "CZK", "MXN", "NZD", "NOK", "MYR", "AUD", "GBP", "SEK", "CHF", "HUF", "USD", "DKK", "CNY", "PLN", "HKD", "CAD", "EUR", "JPY" ] } ], "supported_webhook_flows": [ "payments", "refunds", "disputes" ] }, { "name": "TRUSTPAY", "display_name": "Trustpay", "description": "TrustPay is a Slovakia-based company specializing in secure e-commerce payments, particularly within the EEA area.", "category": "payment_gateway", "supported_payment_methods": [ { "payment_method": "card", "payment_method_type": "credit", "payment_method_type_display_name": "Credit Card", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [], "three_ds": "not_supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard", "AmericanExpress", "DinersClub", "Discover", "Interac", "JCB", "CartesBancaires", "UnionPay" ], "supported_countries": null, "supported_currencies": [ "DKK", "GBP", "NOK", "HUF", "CHF", "USD", "CZK", "AUD", "SEK", "EUR", "CAD", "PLN", "NZD", "RON" ] }, { "payment_method": "card", "payment_method_type": "debit", "payment_method_type_display_name": "Debit Card", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [], "three_ds": "not_supported", "no_three_ds": "supported", "supported_card_networks": [ "Visa", "Mastercard", "AmericanExpress", "DinersClub", "Discover", "Interac", "JCB", "CartesBancaires", "UnionPay" ], "supported_countries": null, "supported_currencies": [ "NOK", "HUF", "NZD", "CHF", "GBP", "RON", "AUD", "USD", "SEK", "PLN", "EUR", "CAD", "DKK", "CZK" ] }, { "payment_method": "bank_transfer", "payment_method_type": "instant_bank_transfer", "payment_method_type_display_name": "Instant Bank Transfer", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [], "supported_countries": [ "SVK", "AUT", "DEU", "GBR", "ITA", "CZE" ], "supported_currencies": [ "GBP", "EUR", "CZK" ] }, { "payment_method": "bank_transfer", "payment_method_type": "sepa_bank_transfer", "payment_method_type_display_name": "SEPA Bank Transfer", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [], "supported_countries": null, "supported_currencies": null }, { "payment_method": "bank_redirect", "payment_method_type": "giropay", "payment_method_type_display_name": "Giropay", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [], "supported_countries": null, "supported_currencies": null }, { "payment_method": "bank_redirect", "payment_method_type": "sofort", "payment_method_type_display_name": "Sofort", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [], "supported_countries": [ "NLD" ], "supported_currencies": [ "EUR" ] }, { "payment_method": "bank_redirect", "payment_method_type": "eps", "payment_method_type_display_name": "EPS", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [], "supported_countries": [ "AUT" ], "supported_currencies": [ "EUR" ] }, { "payment_method": "bank_redirect", "payment_method_type": "ideal", "payment_method_type_display_name": "iDEAL", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [], "supported_countries": [ "AUT" ], "supported_currencies": [ "EUR" ] }, { "payment_method": "bank_redirect", "payment_method_type": "blik", "payment_method_type_display_name": "BLIK", "mandates": "not_supported", "refunds": "supported", "supported_capture_methods": [], "supported_countries": [ "POL" ], "supported_currencies": [ "PLN" ] } ], "supported_webhook_flows": [ "payments", "refunds", "disputes" ] }, ] } ``` ## 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/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 (6 changes) - Extend existing types with new fields (82 changes) **Detailed Identifier Changes:** Commit a64a4d59: Files to modify: **crates/hyperswitch_connectors/src/connectors/paypal.rs** Remove: - function: private::validate_connector_against_payment_request - impl: impl ConnectorSpecifications for Paypal Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorSpecifications for Paypal **crates/hyperswitch_connectors/src/connectors/trustpay.rs** Remove: - impl: impl ConnectorSpecifications for Trustpay Add: - function: private::get_connector_about - function: private::get_supported_payment_methods - function: private::get_supported_webhook_flows - impl: impl ConnectorSpecifications for Trustpay
{"pr_number": 7911, "pr_title": "feat(connector): [paypal, trustpay] add in feature matrix", "merged_at": "2025-05-08T12:28:32Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "refund", "connector"]}, "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": 6, "fields_added": 82, "imports_added": 3}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(connector): [Braintree] Consume merchant_account_id and merchant_config_currency in payment requests ## 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 --> Consume merchant_account_id and merchant_config_currency from payment requests for braintree. [ORIGINAL PR]: https://github.com/juspay/hyperswitch/pull/7408 ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Payment: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_yW2kCnhqMn1oIAK1ebcLiKtHRrevZEzL1uqFrIrn9O3ckmsXu8vunKf9GkcdoBaQ' \ --data-raw '{ "amount": 6540, "currency": "USD", "confirm": true, "capture_method": "automatic", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 6540, "customer_id": "BraintreeCustomer", "email": "[email protected]", "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": "4000000000001091", "card_exp_month": "12", "card_exp_year": "26", "card_holder_name": "CL BRW", "card_cvc": "123" } }, "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "joseph", "last_name": "Doe" }, "phone": { "number": "8056594427", "country_code": "+91" } }, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` Subsequent Payments: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_yW2kCnhqMn1oIAK1ebcLiKtHRrevZEzL1uqFrIrn9O3ckmsXu8vunKf9GkcdoBaQ' \ --data '{ "amount": 6541, "currency": "USD", "capture_method": "automatic", "confirm": true, "customer_id": "BraintreeCustomer3", "recurring_details": { "type": "payment_method_id", "data": "pm_xxZMQfyR7pTe15LT4bQw" }, "off_session": true }' ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [x] I formatted the code `cargo +nightly fmt --all` - [x] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. API Request/Response Models** - `crates/api_models/src/payments.rs` **2. Database Layer (Queries & Schema)** - `crates/diesel_models/src/payment_attempt.rs` **3. Domain Models (Business Logic Types)** - `crates/hyperswitch_domain_models/src/router_request_types.rs` - `crates/hyperswitch_domain_models/src/router_response_types.rs` **4. Core Business Logic** - `crates/router/src/core/payments/transformers.rs` - `crates/router/src/core/relay/utils.rs` - `crates/router/src/core/utils.rs` **5. External Connector Integration** - `crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs` - `crates/router/src/types/api/verify_connector.rs` - `crates/router/tests/connectors/utils.rs` **6. Type Definitions** - `crates/router/src/types.rs` **7. Other** - `api-reference-v2/openapi_spec.json` - `api-reference/openapi_spec.json` - `crates/openapi/src/openapi.rs` - ... and 2 more files **Code Patterns Applied:** - Define new data structures (1 changes) - Extend existing types with new fields (27 changes) **Detailed Identifier Changes:** Commit bf0b9bb9: Files to modify: **crates/api_models/src/payments.rs** Add: - struct: pub::BraintreeData **crates/diesel_models/src/payment_attempt.rs** Modify existing code **crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_request_types.rs** Modify existing code **crates/hyperswitch_domain_models/src/router_response_types.rs** Modify existing code **crates/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 **crates/router/src/core/relay/utils.rs** Modify existing code **crates/router/src/core/utils.rs** Modify existing code **crates/router/src/services/api.rs** Modify existing code **crates/router/src/types.rs** Modify existing code **crates/router/src/types/api/verify_connector.rs** Modify existing code **crates/router/tests/connectors/utils.rs** Modify existing code
{"pr_number": 7445, "pr_title": "fix(connector): [Braintree] Consume merchant_account_id and merchant_config_currency in payment requests", "merged_at": "2025-03-06T12:31:28Z", "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/payment_attempt.rs"], "domain": ["crates/hyperswitch_domain_models/src/router_request_types.rs", "crates/hyperswitch_domain_models/src/router_response_types.rs"], "core_business": ["crates/router/src/core/payments/transformers.rs", "crates/router/src/core/relay/utils.rs", "crates/router/src/core/utils.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors/braintree/transformers.rs", "crates/router/src/types/api/verify_connector.rs", "crates/router/tests/connectors/utils.rs"], "types": ["crates/router/src/types.rs"], "other": ["api-reference-v2/openapi_spec.json", "api-reference/openapi_spec.json", "crates/openapi/src/openapi.rs", "crates/openapi/src/openapi_v2.rs", "crates/router/src/services/api.rs"]}, "change_types": {"structs_added": 1, "fields_added": 27}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
ci: update creds ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description <!-- Describe your changes in detail --> Required changes are made after rotating the api key for 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). --> ## How did you test 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. Tests** - `.github/workflows/cypress-tests-runner.yml` **Code Patterns Applied:** - Extend existing types with new fields (1 changes)
{"pr_number": 7345, "pr_title": "ci: update creds", "merged_at": "2025-02-21T20:24:02Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"tests": [".github/workflows/cypress-tests-runner.yml"]}, "change_types": {"fields_added": 1}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix(payment): disable payment update via client 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 --> Disable payment update via client config and allow using config if needed 🔴 remove from config after some time and completely depricate update payment via client auth completely - Throw internal server error if some one tries to update via client auth (if config is not enabled) ### 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)? --> - Update using client auth when config is not allowed request ```sh curl --location 'http://localhost:8080/payments/pay_ImiqolwzntLifVgMh7eJ' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_bd649cb441c64b2495d01d9e01d2d8ce' \ --data-raw '{ "amount": 100, "currency": "USD", "confirm": false, "card_cvc":"fdsa", "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 100, "customer_id": "StripeCustomer", "email": "[email protected]", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://duck.com", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" }, "phone": { "number": "123456789", "country_code": "12" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" }, "phone": { "number": "123456789", "country_code": "12" } }, "request_external_three_ds_authentication": true, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` response ```sh { "error": { "type": "api", "message": "Something went wrong", "code": "HE_00" } } ``` <img width="1728" alt="Screenshot 2025-05-06 at 5 24 51 PM" src="https://github.com/user-attachments/assets/5b346efd-1bda-4231-84d7-21bdb4e78b0d" /> - Update when config is set as true - set config as true ```sh curl --location 'http://localhost:8080/configs/' \ --header 'Content-Type: application/json' \ --header 'api-key: test_admin' \ --data '{ "key": "payment_update_enabled_for_client_auth_merchant_1746517127", "value":"true" }' ``` ```sh curl --location 'http://localhost:8080/payments/pay_ImiqolwzntLifVgMh7eJ' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: pk_dev_bd649cb441c64b2495d01d9e01d2d8ce' \ --data-raw '{ "amount": 100, "currency": "USD", "confirm": false, "card_cvc":"fdsa", "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 100, "customer_id": "StripeCustomer", "email": "[email protected]", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://duck.com", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" }, "phone": { "number": "123456789", "country_code": "12" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" }, "phone": { "number": "123456789", "country_code": "12" } }, "request_external_three_ds_authentication": true, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` response ```json { "payment_id": "pay_ImiqolwzntLifVgMh7eJ", "merchant_id": "merchant_1746517127", "status": "requires_payment_method", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_ImiqolwzntLifVgMh7eJ_secret_GT1AyI1AWmBwVhfayFLk", "created": "2025-05-06T07:41:40.672Z", "currency": "USD", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "[email protected]", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": null, "payment_method_data": 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": { "number": "123456789", "country_code": "12" }, "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": null }, "phone": { "number": "123456789", "country_code": "12" }, "email": null }, "order_details": null, "email": "[email protected]", "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": 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_Zn3QxWmRdehEMKANcY0E", "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-05-06T07:56:40.672Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-05-06T12:17:04.472Z", "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 } ``` - Update using api_key should always work regardless the config ```sh curl --location 'http://localhost:8080/payments/pay_MukWGg9LZtwHCd2Ccwxl' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_JgaeGxCbDQkTTYtHjQbkVW76PhZuwXwZOXzioNz72hpiRbdZSQDORC7J3zTQ8upo' \ --data-raw '{ "amount": 100, "currency": "USD", "confirm": false, "card_cvc":"fdsa", "capture_method": "manual", "capture_on": "2022-09-10T10:11:12Z", "amount_to_capture": 100, "customer_id": "StripeCustomer", "email": "[email protected]", "name": "John Doe", "phone": "999999999", "phone_country_code": "+65", "description": "Its my first payment request", "authentication_type": "three_ds", "return_url": "https://duck.com", "billing": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" }, "phone": { "number": "123456789", "country_code": "12" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country": "US", "first_name": "PiX" }, "phone": { "number": "123456789", "country_code": "12" } }, "request_external_three_ds_authentication": true, "statement_descriptor_name": "joseph", "statement_descriptor_suffix": "JS", "metadata": { "udf1": "value1", "new_customer": "true", "login_date": "2019-09-10T10:11:12Z" } }' ``` Response `200` ```json { "payment_id": "pay_ImiqolwzntLifVgMh7eJ", "merchant_id": "merchant_1746517127", "status": "requires_payment_method", "amount": 100, "net_amount": 100, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": null, "client_secret": "pay_ImiqolwzntLifVgMh7eJ_secret_GT1AyI1AWmBwVhfayFLk", "created": "2025-05-06T07:41:40.672Z", "currency": "USD", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "[email protected]", "phone": "999999999", "phone_country_code": "+65" }, "description": "Its my first payment request", "refunds": null, "disputes": null, "mandate_id": null, "mandate_data": null, "setup_future_usage": null, "off_session": null, "capture_on": null, "capture_method": "manual", "payment_method": null, "payment_method_data": 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": { "number": "123456789", "country_code": "12" }, "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": null }, "phone": { "number": "123456789", "country_code": "12" }, "email": null }, "order_details": null, "email": "[email protected]", "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": 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_Zn3QxWmRdehEMKANcY0E", "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-05-06T07:56:40.672Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-05-06T12:17:04.472Z", "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 } ``` ## 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/operations/payment_update.rs` **2. Utils** - `crates/common_utils/src/id_type/merchant.rs` **Code Patterns Applied:** - Implement new functions (3 changes) - Extend existing types with new fields (5 changes) - Add conditional logic for feature flags or filtering (1 changes) **Detailed Identifier Changes:** Commit cac87234: Files to modify: **crates/common_utils/src/id_type/merchant.rs** Add: - function: pub::get_payment_update_enabled_for_client_auth_key **crates/router/src/core/payments/helpers.rs** Add: - function: private::get_payment_update_enabled_for_client_auth - function: pub::allow_payment_update_enabled_for_client_auth **crates/router/src/core/payments/operations/payment_update.rs** Modify existing code Commit c7230a2f: Files to modify: **crates/common_utils/src/id_type/merchant.rs** Add: - function: pub::get_payment_update_enabled_for_client_auth_key **crates/router/src/core/payments/helpers.rs** Add: - function: private::get_payment_update_enabled_for_client_auth - function: pub::allow_payment_update_enabled_for_client_auth **crates/router/src/core/payments/operations/payment_update.rs** Modify existing code
{"pr_number": 7970, "pr_title": "fix(payment): disable payment update via client config", "merged_at": "2025-05-07T10:57:11Z", "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/operations/payment_update.rs"], "utils": ["crates/common_utils/src/id_type/merchant.rs"]}, "change_types": {"functions_added": 3, "fields_added": 5, "conditionals_added": 1}, "has_identifier_data": true, "commits_matched": 2, "match_method": "pr_number"}
refactor(connector): [PAYPAL, ADYEN] Move to crate hyperswitch_connectors ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD ## Description Move connectors Paypal and Adyen from Router to hyperswitch_connectors crate. ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? Paypal cypress test <img width="811" alt="Screenshot 2025-03-11 at 8 41 13 PM" src="https://github.com/user-attachments/assets/ef7d5f1e-e745-40fe-91e8-207d2fe5c72d" /> Adyen cypress test <img width="878" alt="Screenshot 2025-03-11 at 11 29 46 PM" src="https://github.com/user-attachments/assets/f74c75d8-e455-4976-8264-d3f0a46fc1ea" /> ## 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/types.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/hyperswitch_connectors/src/connectors.rs` - `crates/router/src/connector/adyen.rs` - `crates/router/src/connector/adyen/transformers.rs` - ... and 7 more files **4. Other** - `crates/router/src/consts.rs` **Code Patterns Applied:** - Define new data structures (3 changes) - Implement new functions (52 changes) - Extend existing types with new fields (563 changes) - Add conditional logic for feature flags or filtering (6 changes) **Detailed Identifier Changes:** Commit cf364192: Files to modify: **crates/hyperswitch_connectors/src/connectors.rs** Add: - mod: pub::adyen - mod: pub::paypal **crates/hyperswitch_connectors/src/constants.rs** Modify existing code **crates/hyperswitch_connectors/src/default_implementations.rs** Modify existing code **crates/hyperswitch_connectors/src/default_implementations_v2.rs** Modify existing code **crates/hyperswitch_connectors/src/utils.rs** Add: - function: pub::is_manual_capture - function: private::get_optional_country - function: private::is_auto_capture - trait: pub::PaymentsPostSessionTokensRequestData - impl: impl PaymentsPostSessionTokensRequestData for PaymentsPostSessionTokensData **crates/hyperswitch_domain_models/src/types.rs** Modify existing code **crates/router/src/connector.rs** Remove: - mod: pub::adyen - mod: pub::paypal **crates/router/src/consts.rs** Modify existing code **crates/router/src/core/payments/connector_integration_v2_impls.rs** Modify existing code **crates/router/src/core/payments/flows.rs** Modify existing code
{"pr_number": 7431, "pr_title": "refactor(connector): [PAYPAL, ADYEN] Move to crate hyperswitch_connectors", "merged_at": "2025-03-13T12:17:55Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user", "connector"]}, "hierarchy": {"domain": ["crates/hyperswitch_domain_models/src/types.rs"], "core_business": ["crates/router/src/core/payments/connector_integration_v2_impls.rs", "crates/router/src/core/payments/flows.rs"], "connectors": ["crates/hyperswitch_connectors/src/connectors.rs", "crates/router/src/connector/adyen.rs", "crates/router/src/connector/adyen/transformers.rs", "crates/router/src/connector/paypal.rs", "crates/router/src/connector/paypal/transformers.rs", "crates/hyperswitch_connectors/src/constants.rs", "crates/hyperswitch_connectors/src/default_implementations.rs", "crates/hyperswitch_connectors/src/default_implementations_v2.rs", "crates/hyperswitch_connectors/src/utils.rs", "crates/router/src/connector.rs"], "other": ["crates/router/src/consts.rs"]}, "change_types": {"structs_added": 3, "functions_added": 52, "fields_added": 563, "imports_added": 38, "conditionals_added": 6}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
fix(core): Send whole_connector_response even when Connector sends an Error ## Type of Change <!-- Put an `x` in the boxes that apply --> - [x] Bugfix - [ ] New feature - [ ] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [ ] CI/CD Closes this [issue](https://github.com/juspay/hyperswitch/issues/8144) ## Description <!-- Describe your changes in detail --> send whole_connector_response even when connector sends an error ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context <!-- Why is this change required? What problem does it solve? If it fixes an open issue, please link to the issue here. If you don't have an issue, we'd recommend starting with one first so the PR can focus on the implementation (unless it is an obvious bug or documentation fix that will have little conversation). --> ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Postman Test 1. Payments - Create (with invalid creds, `confirm`: `true` and `all_keys_required`: `true`) Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_6zQcrKUzlenHXPheZtIUO3WbxTAiPtBxxrLFw1sSRmjRIn0QGPJ1z6NnwlHUKKVa' \ --data-raw '{ "amount": 35308, "currency": "USD", "confirm": true, "all_keys_required": true, "capture_method": "automatic", "customer_id": "StripeCustomer", "email": "[email protected]", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "profile_id": "pro_RdVLVWtGWBgd9sMam8Dg", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "370000000000002", "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" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country":"US", "first_name": "PiX" } } }' ``` Response: ``` { "payment_id": "pay_78k7Xn25MnMHMwoFsJPX", "merchant_id": "merchant_1748265048", "status": "failed", "amount": 35308, "net_amount": 35308, "shipping_cost": null, "amount_capturable": 0, "amount_received": null, "connector": "authorizedotnet", "client_secret": "pay_78k7Xn25MnMHMwoFsJPX_secret_BlNgMRRNeA6Wre5jbtWr", "created": "2025-05-26T13:33:49.037Z", "currency": "USD", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "[email protected]", "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": "0002", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "370000", "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": "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": "[email protected]", "name": "John Doe", "phone": "999999999", "return_url": "https://duck.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": "E00003", "error_message": "The 'AnetApi/xml/v1/schema/AnetApiSchema.xsd:transactionKey' element is invalid - The value XXXXXXXXXXXXXXXXXXX is invalid according to its datatype 'String' - The actual length is greater than the MaxLength value.", "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": "StripeCustomer", "created_at": 1748266429, "expires": 1748270029, "secret": "epk_3c034be0d8934ec98fcde1b244d55ed6" }, "manual_retry_allowed": true, "connector_transaction_id": null, "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": null, "payment_link": null, "profile_id": "pro_RdVLVWtGWBgd9sMam8Dg", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_FvbbC2wYxwcnbvoXrSFL", "incremental_authorization_allowed": false, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-05-26T13:48:49.037Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-05-26T13:33:50.999Z", "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": "{\"messages\":{\"resultCode\":\"Error\",\"message\":[{\"code\":\"E00003\",\"text\":\"The 'AnetApi/xml/v1/schema/AnetApiSchema.xsd:transactionKey' element is invalid - The value XXXXXXXXXXXXXXXXXXX is invalid according to its datatype 'String' - The actual length is greater than the MaxLength value.\"}]}}" } ``` 2.. Payments - Create (with valid API Keys, `confirm`: `true` and `all_keys_required`: `true`) Request: ``` curl --location 'http://localhost:8080/payments' \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'api-key: dev_6zQcrKUzlenHXPheZtIUO3WbxTAiPtBxxrLFw1sSRmjRIn0QGPJ1z6NnwlHUKKVa' \ --data-raw '{ "amount": 35308, "currency": "USD", "confirm": true, "all_keys_required": true, "capture_method": "automatic", "customer_id": "StripeCustomer", "email": "[email protected]", "name": "John Doe", "phone": "999999999", "phone_country_code": "+1", "profile_id": "pro_RdVLVWtGWBgd9sMam8Dg", "description": "Its my first payment request", "authentication_type": "no_three_ds", "return_url": "https://duck.com", "payment_method": "card", "payment_method_type": "credit", "payment_method_data": { "card": { "card_number": "370000000000002", "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" } }, "shipping": { "address": { "line1": "1467", "line2": "Harrison Street", "line3": "Harrison Street", "city": "San Fransico", "state": "California", "zip": "94122", "country":"US", "first_name": "PiX" } } }' ``` Response: ``` { "payment_id": "pay_hxQGHpxW3F5DNxeyiY8z", "merchant_id": "merchant_1748267173", "status": "succeeded", "amount": 35308, "net_amount": 35308, "shipping_cost": null, "amount_capturable": 0, "amount_received": 35308, "connector": "authorizedotnet", "client_secret": "pay_hxQGHpxW3F5DNxeyiY8z_secret_da5n53bB7Kb1exV85EK2", "created": "2025-05-26T13:46:40.052Z", "currency": "USD", "customer_id": "StripeCustomer", "customer": { "id": "StripeCustomer", "name": "John Doe", "email": "[email protected]", "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": "0002", "card_type": null, "card_network": null, "card_issuer": null, "card_issuing_country": null, "card_isin": "370000", "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": "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": "[email protected]", "name": "John Doe", "phone": "999999999", "return_url": "https://duck.com/", "authentication_type": "no_three_ds", "statement_descriptor_name": null, "statement_descriptor_suffix": null, "next_action": null, "cancellation_reason": null, "error_code": null, "error_message": null, "unified_code": null, "unified_message": null, "payment_experience": null, "payment_method_type": "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": 1748267200, "expires": 1748270800, "secret": "epk_fad60adb28944cf8be7a3d64bbce0672" }, "manual_retry_allowed": false, "connector_transaction_id": "120063944184", "frm_message": null, "metadata": null, "connector_metadata": null, "feature_metadata": null, "reference_id": "120063944184", "payment_link": null, "profile_id": "pro_zHrEr9z5qskGtTpA1ZPg", "surcharge_details": null, "attempt_count": 1, "merchant_decision": null, "merchant_connector_id": "mca_NnVBGa1fNbiNyFfGuadr", "incremental_authorization_allowed": null, "authorization_count": null, "incremental_authorizations": null, "external_authentication_details": null, "external_3ds_authentication_attempted": false, "expires_on": "2025-05-26T14:01:40.052Z", "fingerprint": null, "browser_info": null, "payment_method_id": null, "payment_method_status": null, "updated": "2025-05-26T13:46:42.017Z", "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": "{\"transactionResponse\":{\"responseCode\":\"1\",\"authCode\":\"UA8PIX\",\"avsResultCode\":\"Y\",\"cvvResultCode\":\"P\",\"cavvResultCode\":\"2\",\"transId\":\"120063944184\",\"refTransID\":\"\",\"transHash\":\"\",\"testRequest\":\"0\",\"accountNumber\":\"XXXX0002\",\"accountType\":\"AmericanExpress\",\"messages\":[{\"code\":\"1\",\"description\":\"This transaction has been approved.\"}],\"transHashSha2\":\"7028AF831EAF78761E94F39C2F6D1544D0916D8330C75AED524A99A2917BBA17D76305F51183A97E15D9E30A206EC869F0F5D45903F5C7928A454176060439D7\",\"SupplementalDataQualificationIndicator\":0,\"networkTransId\":\"73WA8F79F6PERAJ1F57SWAB\"},\"profileResponse\":{\"messages\":{\"resultCode\":\"Ok\",\"message\":[{\"code\":\"I00001\",\"text\":\"Successful.\"}]},\"customerProfileId\":\"931062475\",\"customerPaymentProfileIdList\":[\"930352630\"],\"customerShippingAddressIdList\":[]},\"refId\":\"\",\"messages\":{\"resultCode\":\"Ok\",\"message\":[{\"code\":\"I00001\",\"text\":\"Successful.\"}]}}" } ``` ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Other** - `crates/router/src/services/api.rs` **Code Patterns Applied:** - Implement new functions (1 changes) - Extend existing types with new fields (6 changes) - Add conditional logic for feature flags or filtering (2 changes) **Detailed Identifier Changes:** Commit 3aa38bac: Files to modify: **crates/router/src/services/api.rs** Add: - function: private::store_raw_connector_response_if_required
{"pr_number": 9043, "pr_title": "fix(core): Send whole_connector_response even when Connector sends an Error", "merged_at": "2025-08-28T11:58:47Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["customer", "payment", "merchant"]}, "hierarchy": {"other": ["crates/router/src/services/api.rs"]}, "change_types": {"functions_added": 1, "fields_added": 6, "conditionals_added": 2}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}
chore(analytics): SDK table schema changes ## 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 --> Updating SDK table schema ### 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` --> crates/analytics/docs/clickhouse/scripts/sdk_events.sql ## 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 resolves the issue people face for SDK Events table API on dashboard is using the sdk_events_audit table ## How did you test it? <!-- Did you write an integration/unit/API test to verify the code changes? Or did you test this change manually (provide relevant screenshots)? --> Schema structure changes for sdk table. Nothing to test. ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [ ] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Other** - `crates/analytics/docs/clickhouse/scripts/sdk_events.sql`
{"pr_number": 6579, "pr_title": "chore(analytics): SDK table schema changes", "merged_at": "2024-12-17T10:54:50Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": []}, "hierarchy": {"other": ["crates/analytics/docs/clickhouse/scripts/sdk_events.sql"]}, "change_types": {}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
ci(cypress): Add Noon Connector ## Type of Change <!-- Put an `x` in the boxes that apply --> - [ ] Bugfix - [ ] New feature - [x] Enhancement - [ ] Refactoring - [ ] Dependency updates - [ ] Documentation - [x] CI/CD ## Description Add Noon Connector for Cypress Automation Note : Noon supports only 3ds payments , so all the no_three_ds payments are skipped ### Additional Changes - [ ] This PR modifies the API contract - [ ] This PR modifies the database schema - [ ] This PR modifies application configuration/environment variables <!-- Provide links to the files with corresponding changes. Following are the paths where you can find config files: 1. `config` 2. `crates/router/src/configs` 3. `loadtest/config` --> ## Motivation and Context Noon connector was not available in the cypress automation ## How did you test it? <img width="710" alt="image" src="https://github.com/user-attachments/assets/88aec323-824c-49e3-b51e-67d469c9826a"> ## Checklist <!-- Put an `x` in the boxes that apply --> - [ ] I formatted the code `cargo +nightly fmt --all` - [ ] I addressed lints thrown by `cargo clippy` - [x] I reviewed the submitted code - [ ] I added unit tests for my changes where possible
To implement this **search_filter** feature, you'll need to modify these architectural layers: **1. Tests** - `cypress-tests/cypress/e2e/PaymentUtils/Commons.js` - `cypress-tests/cypress/e2e/PaymentUtils/Noon.js` - `cypress-tests/cypress/e2e/PaymentUtils/Utils.js` **Code Patterns Applied:** - Extend existing types with new fields (486 changes)
{"pr_number": 6603, "pr_title": "ci(cypress): Add Noon Connector", "merged_at": "2024-11-22T10:58:31Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["payment", "user", "connector"]}, "hierarchy": {"tests": ["cypress-tests/cypress/e2e/PaymentUtils/Commons.js", "cypress-tests/cypress/e2e/PaymentUtils/Noon.js", "cypress-tests/cypress/e2e/PaymentUtils/Utils.js"]}, "change_types": {"fields_added": 486}, "has_identifier_data": false, "commits_matched": 0, "match_method": "none"}
fix: lazy connection pools for dynamic routing service ## 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 hyperswitch server was panicking, if it wasn't able to establish a connection with dynamic_routing service. We have fixed this by establishing lazy connection pools and not established channel(which was previously). Which will insure hyperswitch server to run even when the connection isn't established. ### 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 on my local. <img width="1728" alt="Screenshot 2024-10-25 at 4 15 03 PM" src="https://github.com/user-attachments/assets/a7a1d6c8-8c6c-4b35-ae3a-b05b6af9f9bc"> This can't be tested on Integ as we don't have this service on integ. Can't be tested on sbx as well, as it will require the pods to be killed. and a re-establishment of connection. ## 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** - `crates/external_services/Cargo.toml` **2. Other** - `Cargo.lock` - `crates/external_services/src/grpc_client/dynamic_routing.rs` **Code Patterns Applied:** - Extend existing types with new fields (1 changes) **Detailed Identifier Changes:** Commit 71d99332: Files to modify: **crates/external_services/src/grpc_client/dynamic_routing.rs** Remove: - impl: impl SuccessBasedDynamicRouting for SuccessRateCalculatorClient<Channel> Add: - impl: impl SuccessBasedDynamicRouting for SuccessRateCalculatorClient<Client>
{"pr_number": 6437, "pr_title": "fix: lazy connection pools for dynamic routing service", "merged_at": "2024-11-05T11:04:52Z", "intent": {"feature_type": "search_filter", "action": "add_feature", "entities": ["user"]}, "hierarchy": {"config": ["crates/external_services/Cargo.toml"], "other": ["Cargo.lock", "crates/external_services/src/grpc_client/dynamic_routing.rs"]}, "change_types": {"fields_added": 1, "imports_added": 4}, "has_identifier_data": true, "commits_matched": 1, "match_method": "pr_number"}